forked from microsoft/sample-app-aoai-chatGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request microsoft#22 from microsoft/sawidder/public-api
Refactor to use public API
- Loading branch information
Showing
12 changed files
with
221 additions
and
196 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,49 @@ | ||
export type AskResponse = { | ||
answer: string; | ||
thoughts: string | null; | ||
data_points: string[]; | ||
top_docs: DocumentResult[]; | ||
citations: Citation[]; | ||
error?: string; | ||
}; | ||
|
||
export type MessageContent = { | ||
content_type: string; | ||
parts: string[]; | ||
top_docs: DocumentResult[]; | ||
intent: string | null; | ||
}; | ||
|
||
export type DocumentResult = { | ||
export type Citation = { | ||
content: string; | ||
id: string; | ||
title: string | null; | ||
filepath: string | null; | ||
url: string | null; | ||
metadata: string | null; | ||
chunk_id: string | null; | ||
reindex_id: string | null; | ||
} | ||
|
||
export type ToolMessageContent = { | ||
citations: Citation[]; | ||
intent: string; | ||
} | ||
|
||
export type ChatMessage = { | ||
message_id: string; | ||
parent_message_id: string | null; | ||
role: string; | ||
content: MessageContent; | ||
content: string; | ||
end_turn: boolean | null; | ||
}; | ||
|
||
export enum ChatCompletionType { | ||
ChatCompletion = "chat.completion", | ||
ChatCompletionChunk = "chat.completion.chunk" | ||
} | ||
|
||
export type ChatResponseChoice = { | ||
index: number; | ||
messages: ChatMessage[]; | ||
} | ||
|
||
export type ChatResponse = { | ||
id: string; | ||
model: string; | ||
created: number; | ||
object: ChatCompletionType; | ||
choices: ChatResponseChoice[]; | ||
} | ||
|
||
export type ConversationRequest = { | ||
messages: ChatMessage[]; | ||
}; |
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
Oops, something went wrong.