File tree Expand file tree Collapse file tree
adminforth/types/adapters Expand file tree Collapse file tree Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments