UNPKG

@ai-foundry/llm-sdk

Version:

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

28 lines (27 loc) 1.16 kB
import type { LLMOptions } from '../../models/llm.models'; import type { LLMMessage } from '../../models/llm-message.models'; import type { LLMTool } from '../../models/llm-tool.models'; import { LLMApiService, type LLMApiResponse } from '../llm-api.service'; import type { JSONObject } from '../../models/data.models'; export interface AzureOpenAIServiceEndpointParams { apiKey: string; deployment: string; endpoint: string; apiVersion?: string; } export interface AzureOpenAIServiceUrlParams { url: string; headers: Record<string, string>; apiVersion?: string; } export type AzureOpenAIServiceParams = AzureOpenAIServiceEndpointParams | AzureOpenAIServiceUrlParams; export declare class AzureOpenAIService extends LLMApiService { #private; constructor(params: AzureOpenAIServiceParams); getURL(): string; getHeaders(): Record<string, string>; formatToolCallPayload(tool: LLMTool): JSONObject; formatMessagePayload(message: LLMMessage): JSONObject; formatOptionsPayload(options: LLMOptions): JSONObject; parseAssistantResponse(data: JSONObject): Omit<LLMApiResponse, 'request' | 'response'>; }