UNPKG

@ai-foundry/llm-sdk

Version:

This is just another SDK for the common LLM API providers.

22 lines (21 loc) 915 B
import type { LLMTokensUsage, FinishReason, LLMOptions, LLMApiProviderOptions } from '../models/llm.models'; import type { LLMMessage, ToolCallPart, ToolResultPart } from '../models/llm-message.models'; import type { LLMTool } from '../models/llm-tool.models'; import type { LLMApiResponse, LLMApiService } from '../services/llm-api.service'; export interface GenerateTextParams extends LLMOptions { llm: LLMApiService; messages: LLMMessage[]; tools?: LLMTool[]; maxSteps?: number; providerOptions?: LLMApiProviderOptions; } export interface TextResponse { text: string | null; usage: LLMTokensUsage; finishReason: FinishReason; toolCalls: ToolCallPart[]; toolResults: ToolResultPart[]; messages: LLMMessage[]; steps: LLMApiResponse[]; } export declare function generateText({ llm, messages, tools, maxSteps, ...options }: GenerateTextParams): Promise<TextResponse>;