-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FYI - @curtisman
- Loading branch information
Showing
11 changed files
with
157 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
ts/packages/defaultAgentProvider/test/data/translate-image-history-e2e.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
[ | ||
[ | ||
{ | ||
"request": "Tell me about the image in the chat history.", | ||
"action": { | ||
"translatorName": "chat", | ||
"actionName": "lookupAndGenerateResponse", | ||
"parameters": { | ||
"originalRequest": "Tell me about the image in the chat history.", | ||
"conversationLookupFilters": [ | ||
{ | ||
"terms": [ | ||
"image" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"history": { | ||
"text": "It's an image!", | ||
"source": "chat", | ||
"entities": [ | ||
{ | ||
"name": "image", | ||
"type": [ | ||
"object" | ||
] | ||
}, | ||
{ | ||
"name": "non-existent image", | ||
"type": [ | ||
"object" | ||
] | ||
}, | ||
{ | ||
"name": "attachment__0.png", | ||
"type": [ | ||
"file", | ||
"image", | ||
"data" | ||
] | ||
} | ||
] | ||
}, | ||
"attachments": [ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABhSURBVDhPY6AdqJ9vwFA/5wAEA9kkAbDmuR8YGub+B2MQm2hD0DWTZAiyZnQXEGUIyL/ICuEGIBsMVIMT1M+dgBJoMANAAGwISA6ohmiAbABZYNSAwWBA/dwFYEw7wMAAAAOtdVt9DPxQAAAAAElFTkSuQmCC" ] | ||
}, | ||
{ | ||
"request": "show me attachment__0.png", | ||
"action" : { | ||
"translatorName": "chat", | ||
"actionName": "lookupAndGenerateResponse", | ||
"parameters": { | ||
"originalRequest": "show me attachment__0.png", | ||
"relatedFiles": [ | ||
"attachment__0.png" | ||
], | ||
"retrieveRelatedFilesFromStorage": true | ||
}, | ||
"entities": { | ||
"relatedFiles": [ | ||
{ | ||
"name": "attachment__0.png", | ||
"type": [ | ||
"file", | ||
"image", | ||
"data" | ||
], | ||
"sourceAppAgentName": "chat" | ||
} | ||
] | ||
} | ||
}, | ||
"history": { | ||
"text":"Action chat.lookupAndGenerateResponse completed.", | ||
"source": "chat", | ||
"entities": [ | ||
{ | ||
"name": "attachment__0.png", | ||
"type": [ | ||
"file", | ||
"image", | ||
"data" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
ts/packages/defaultAgentProvider/test/translateImageConversation.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { defineTranslateTest } from "./translateTestCommon.js"; | ||
const dataFiles = ["test/data/translate-image-history-e2e.json"]; | ||
import registerDebug from "debug"; | ||
registerDebug.enable("*"); | ||
await defineTranslateTest("translate image request (w/history)", dataFiles); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
ts/packages/defaultAgentProvider/test/translate_history.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters