UNPKG

graphlit-client

Version:
49 lines (48 loc) 3.72 kB
import { ConversationToolCall, Specification, ToolDefinitionInput } from "../generated/graphql-types.js"; import { OpenAIMessage, AnthropicMessage, GoogleMessage, CohereMessage, MistralMessage, BedrockMessage } from "./llm-formatters.js"; import { StreamEvent } from "../types/internal.js"; /** * Stream with OpenAI SDK */ export declare function streamWithOpenAI(specification: Specification, messages: OpenAIMessage[], tools: ToolDefinitionInput[] | undefined, openaiClient: any, // OpenAI client instance onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>; /** * Stream with Anthropic SDK */ export declare function streamWithAnthropic(specification: Specification, messages: AnthropicMessage[], systemPrompt: string | undefined, tools: ToolDefinitionInput[] | undefined, anthropicClient: any, // Anthropic client instance onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>; /** * Stream with Google SDK */ export declare function streamWithGoogle(specification: Specification, messages: GoogleMessage[], systemPrompt: string | undefined, tools: ToolDefinitionInput[] | undefined, googleClient: any, // Google GenerativeAI client instance onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>; /** * Stream with Groq SDK (OpenAI-compatible) */ export declare function streamWithGroq(specification: Specification, messages: OpenAIMessage[], tools: ToolDefinitionInput[] | undefined, groqClient: any, // Groq client instance (OpenAI-compatible) onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>; /** * Stream with Cerebras SDK (OpenAI-compatible) */ export declare function streamWithCerebras(specification: Specification, messages: OpenAIMessage[], tools: ToolDefinitionInput[] | undefined, cerebrasClient: any, // OpenAI client instance configured for Cerebras onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>; /** * Stream with Deepseek SDK (OpenAI-compatible) */ export declare function streamWithDeepseek(specification: Specification, messages: OpenAIMessage[], tools: ToolDefinitionInput[] | undefined, deepseekClient: any, // OpenAI client instance configured for Deepseek onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>; /** * Stream with Cohere SDK */ export declare function streamWithCohere(specification: Specification, messages: CohereMessage[], tools: ToolDefinitionInput[] | undefined, cohereClient: any, // CohereClient instance onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>; /** * Stream with Mistral SDK */ export declare function streamWithMistral(specification: Specification, messages: MistralMessage[], tools: ToolDefinitionInput[] | undefined, mistralClient: any, // Mistral client instance onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>; /** * Stream with Bedrock SDK (for Claude models) */ export declare function streamWithBedrock(specification: Specification, messages: BedrockMessage[], systemPrompt: string | undefined, tools: ToolDefinitionInput[] | undefined, bedrockClient: any, // BedrockRuntimeClient instance onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;