UNPKG

@xynehq/jaf

Version:

Juspay Agent Framework - A purely functional agent framework with immutable state and composable tools

75 lines 2.7 kB
/** * JAF ADK Layer - LLM Configuration Bridge * * Functional configuration system for LLM providers following JAF patterns */ import { Model } from '../types.js'; import type { AdkLLMServiceConfig } from '../providers/llm-service.js'; export interface AdkLLMConfig { provider: 'litellm' | 'openai' | 'anthropic' | 'google'; baseUrl?: string; apiKey?: string; defaultModel?: Model | string; timeout?: number; retries?: number; temperature?: number; maxTokens?: number; streaming?: boolean; } export interface AdkProviderConfig { name: string; baseUrl: string; apiKey: string; models: AdkModelConfig[]; rateLimits?: AdkRateLimitConfig; features?: AdkProviderFeatures; } export interface AdkModelConfig { name: string; displayName: string; contextWindow: number; maxTokens: number; supportsFunctionCalling: boolean; supportsStreaming: boolean; costPer1KTokens?: { input: number; output: number; }; } export interface AdkRateLimitConfig { requestsPerMinute?: number; tokensPerMinute?: number; concurrent?: number; } export interface AdkProviderFeatures { streaming: boolean; functionCalling: boolean; multimodal: boolean; vision: boolean; jsonMode: boolean; } export interface AdkEnvironmentConfig { litellmUrl?: string; litellmApiKey?: string; openaiApiKey?: string; anthropicApiKey?: string; googleApiKey?: string; azureApiKey?: string; azureEndpoint?: string; defaultProvider?: string; defaultModel?: string; } export declare const DEFAULT_PROVIDER_CONFIGS: Record<string, AdkProviderConfig>; export declare const loadEnvironmentConfig: () => AdkEnvironmentConfig; export declare const createAdkLLMConfig: (provider: string, overrides?: Partial<AdkLLMConfig>) => AdkLLMConfig; export declare const createAdkLLMServiceConfig: (config: AdkLLMConfig) => AdkLLMServiceConfig; export declare const getModelConfig: (modelName: string) => AdkModelConfig | undefined; export declare const getModelsForProvider: (provider: string) => AdkModelConfig[]; export declare const getAllAvailableModels: () => AdkModelConfig[]; export declare const getProviderForModel: (modelName: string) => string | undefined; export declare const mapAdkModelToProviderModel: (adkModel: Model | string) => string; export declare const validateAdkLLMConfig: (config: AdkLLMConfig) => string[]; export declare const createDefaultAdkLLMConfig: () => AdkLLMConfig; export declare const createAdkLLMConfigFromEnvironment: () => AdkLLMConfig; export declare const debugAdkLLMConfig: (config: AdkLLMConfig) => void; //# sourceMappingURL=llm-config.d.ts.map