Skip to content

Commit 3c19f72

Browse files
committed
fix: update completion method documentation and remove stop parameter
1 parent 4179041 commit 3c19f72

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

adminforth/types/adapters/CompletionAdapter.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ export interface CompletionAdapter {
77
validate(): void;
88

99
/**
10-
* This method should return a text completion based on the provided content and stop sequence.
10+
* This method should return a text completion based on the provided content.
1111
* @param content - The input text to complete
12-
* @param stop - An array of stop sequences to indicate where to stop the completion
1312
* @param maxTokens - The maximum number of tokens to generate
13+
* @param outputSchema - Optional structured output schema for the response
14+
* @param onChunk - Optional callback invoked for each streamed chunk
1415
* @returns A promise that resolves to an object containing the completed text and other metadata
1516
*/
1617
complete(
1718
content: string,
18-
stop: string[],
1919
maxTokens: number,
20-
outputSchema?: any
20+
outputSchema?: any,
21+
onChunk?: (chunk: string) => void | Promise<void>,
2122
): Promise<{
2223
content?: string;
2324
finishReason?: string;
@@ -30,4 +31,4 @@ export interface CompletionAdapter {
3031
* @returns The number of tokens in the input content
3132
*/
3233
measureTokensCount(content: string): Promise<number> | number;
33-
}
34+
}

0 commit comments

Comments
 (0)