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 1+ export type CompletionStreamEvent = {
2+ type : "output" | "reasoning" ;
3+ delta : string ;
4+ text : string ;
5+ source ?: "summary" | "text" ;
6+ } ;
17export interface CompletionAdapter {
28
39 /**
@@ -11,14 +17,19 @@ export interface CompletionAdapter {
1117 * @param content - The input text to complete
1218 * @param maxTokens - The maximum number of tokens to generate
1319 * @param outputSchema - Optional structured output schema for the response
14- * @param onChunk - Optional callback invoked for each streamed chunk
20+ * @param reasoningEffort - Optional parameter to indicate the level of reasoning effort for the completion
21+ * @param onChunk - Optional callback invoked for each streamed chunk or reasoning event
1522 * @returns A promise that resolves to an object containing the completed text and other metadata
1623 */
1724 complete (
1825 content : string ,
1926 maxTokens : number ,
2027 outputSchema ?: any ,
21- onChunk ?: ( chunk : string ) => void | Promise < void > ,
28+ reasoningEffort ?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' ,
29+ onChunk ?: (
30+ chunk : string ,
31+ event ?: CompletionStreamEvent ,
32+ ) => void | Promise < void > ,
2233 ) : Promise < {
2334 content ?: string ;
2435 finishReason ?: string ;
You can’t perform that action at this time.
0 commit comments