mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Chat API updates (#205184)
* api - remove unused types, add jsdoc, make request handler setable (for consistency), more readonly usage https://github.com/microsoft/vscode/issues/199908 * remove ChatMessage and Role * fix a ton of compile errors... * jsdoc
This commit is contained in:
24
src/vscode-dts/vscode.proposed.chatProvider.d.ts
vendored
24
src/vscode-dts/vscode.proposed.chatProvider.d.ts
vendored
@@ -5,27 +5,6 @@
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// TODO@API NAME: ChatMessageKind?
|
||||
export enum ChatMessageRole {
|
||||
System = 0,
|
||||
User = 1,
|
||||
// TODO@API name: align with ChatAgent (or whatever we'll rename that to)
|
||||
Assistant = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* A chat message that is used to make chat request against a language model.
|
||||
*/
|
||||
export class ChatMessage {
|
||||
|
||||
readonly role: ChatMessageRole;
|
||||
|
||||
readonly content: string;
|
||||
|
||||
constructor(role: ChatMessageRole, content: string);
|
||||
}
|
||||
|
||||
|
||||
export interface ChatResponseFragment {
|
||||
index: number;
|
||||
part: string;
|
||||
@@ -37,8 +16,7 @@ declare module 'vscode' {
|
||||
* Represents a large language model that accepts ChatML messages and produces a streaming response
|
||||
*/
|
||||
export interface ChatResponseProvider {
|
||||
provideLanguageModelResponse(messages: ChatMessage[], options: { [name: string]: any }, extensionId: string, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
|
||||
provideLanguageModelResponse2?(messages: LanguageModelMessage[], options: { [name: string]: any }, extensionId: string, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
|
||||
provideLanguageModelResponse2(messages: LanguageModelMessage[], options: { [name: string]: any }, extensionId: string, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
|
||||
}
|
||||
|
||||
export interface ChatResponseProviderMetadata {
|
||||
|
||||
Reference in New Issue
Block a user