UNPKG

@agentica/core

Version:

Agentic AI Library specialized in LLM Function Calling

15 lines (14 loc) 901 B
import type { ChatCompletion, ChatCompletionChunk, ChatCompletionMessageToolCall } from "openai/resources"; declare function transformCompletionChunk(source: string | Uint8Array): ChatCompletionChunk; declare function accumulate(origin: ChatCompletion, chunk: ChatCompletionChunk): ChatCompletion; declare function merge(chunks: ChatCompletionChunk[]): ChatCompletion; declare function mergeChoice(acc: ChatCompletion.Choice, cur: ChatCompletionChunk.Choice): ChatCompletion.Choice; declare function mergeToolCalls(acc: ChatCompletionMessageToolCall, cur: ChatCompletionChunk.Choice.Delta.ToolCall): ChatCompletionMessageToolCall; export declare const ChatGptCompletionMessageUtil: { transformCompletionChunk: typeof transformCompletionChunk; accumulate: typeof accumulate; merge: typeof merge; mergeChoice: typeof mergeChoice; mergeToolCalls: typeof mergeToolCalls; }; export {};