- Changed package name from @mariozechner/ai to @mariozechner/pi-ai - Fixed generate-models.ts to fetch from models.dev API instead of local file - Completely rewrote README with practical examples: - Image input with base64 encoding - Proper tool calling with context management - Streaming with completion indicators - Abort signal usage - Provider-specific options (reasoning/thinking) - Custom model definitions for local/self-hosted LLMs - Environment variables explanation - Bumped version to 0.5.9 and published
33 lines
888 B
TypeScript
33 lines
888 B
TypeScript
// @mariozechner/pi-ai - Unified LLM API with automatic model discovery
|
|
// This package provides a common interface for working with multiple LLM providers
|
|
|
|
export const version = "0.5.8";
|
|
|
|
// Export generated models data
|
|
export { PROVIDERS } from "./models.generated.js";
|
|
|
|
// Export models utilities and types
|
|
export {
|
|
type AnthropicModel,
|
|
type CerebrasModel,
|
|
createLLM,
|
|
type GoogleModel,
|
|
type GroqModel,
|
|
type Model,
|
|
type OpenAIModel,
|
|
type OpenRouterModel,
|
|
PROVIDER_CONFIG,
|
|
type ProviderModels,
|
|
type ProviderToLLM,
|
|
type XAIModel,
|
|
} from "./models.js";
|
|
|
|
// Export providers
|
|
export { AnthropicLLM } from "./providers/anthropic.js";
|
|
export { GoogleLLM } from "./providers/google.js";
|
|
export { OpenAICompletionsLLM } from "./providers/openai-completions.js";
|
|
export { OpenAIResponsesLLM } from "./providers/openai-responses.js";
|
|
|
|
// Export types
|
|
export type * from "./types.js";
|