32e1a2724a
- Add AudioSource interface and 'audio' variant to MessageContentPart union - Update buildUserMessage() to create audio content parts from attachments - Add attachmentToAudioSource(), hasAudio(), stripAudioParts() helpers - Gemini: native audio via inlineData (same format as images) - OpenAI/GitHub: native audio via input_audio content parts - Anthropic/Bedrock: graceful fallback to transcript text - Update getMessageTextWithTools() to handle audio blocks for local models
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
export { AnthropicClient, type AnthropicClientConfig } from './anthropic.js';
|
|
export { OpenAIClient, type OpenAIClientConfig } from './openai.js';
|
|
export { GeminiClient, type GeminiClientConfig } from './gemini.js';
|
|
export { BedrockClient, type BedrockClientConfig } from './bedrock.js';
|
|
export { GitHubModelsClient, type GitHubModelsClientConfig } from './github.js';
|
|
export { OllamaClient, type OllamaClientConfig } from './local/index.js';
|
|
export { LlamaCppClient, type LlamaCppClientConfig } from './local/index.js';
|
|
export { ModelRouter, type ModelRouterConfig, type ModelTier } from './router.js';
|
|
export { withRetry, isRetryable, DEFAULT_RETRY_CONFIG, type RetryConfig } from './retry.js';
|
|
export { estimateCost, MODEL_COSTS_PER_MILLION } from './costs.js';
|
|
export {
|
|
isSupportedImage,
|
|
isSupportedAudio,
|
|
attachmentToImageSource,
|
|
attachmentToAudioSource,
|
|
buildUserMessage,
|
|
getMessageText,
|
|
hasImages,
|
|
hasAudio,
|
|
stripAudioParts,
|
|
} from './media.js';
|
|
export type {
|
|
Message,
|
|
MessageContentPart,
|
|
ImageSource,
|
|
AudioSource,
|
|
ChatRequest,
|
|
ChatResponse,
|
|
ChatStreamEvent,
|
|
TokenUsage,
|
|
ModelClient,
|
|
StreamingModelClient,
|
|
ToolDefinition,
|
|
ModelToolCall,
|
|
ContentBlock,
|
|
ToolResultEntry,
|
|
ToolMessage,
|
|
ConversationMessage,
|
|
} from './types.js';
|