mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 18:03:50 +00:00
feat(ai): Implement unified AI API with Anthropic provider
- Define clean API with complete() method and callbacks for streaming - Add comprehensive type system for messages, tools, and usage - Implement AnthropicAI provider with full feature support: - Thinking/reasoning with signatures - Tool calling with parallel execution - Streaming via callbacks (onText, onThinking) - Proper error handling and stop reasons - Cache tracking for input/output tokens - Add working test/example demonstrating tool execution flow - Support for system prompts, temperature, max tokens - Proper message role types: user, assistant, toolResult
This commit is contained in:
parent
f064ea0e14
commit
e5aedfed29
7 changed files with 597 additions and 1 deletions
1
package-lock.json
generated
1
package-lock.json
generated
|
|
@ -1604,6 +1604,7 @@
|
|||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "0.60.0",
|
||||
"@google/genai": "1.14.0",
|
||||
"chalk": "^5.5.0",
|
||||
"openai": "5.12.2"
|
||||
},
|
||||
"devDependencies": {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue