mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 20:01:24 +00:00
feat(ai): Implement Gemini provider with streaming and tool support
- Added GeminiLLM provider implementation with GoogleGenerativeAI SDK - Supports streaming with text/thinking content and completion signals - Handles Gemini's parts-based content system (text, thought, functionCall) - Implements tool/function calling with proper format conversion - Maps between unified types and Gemini-specific formats (model vs assistant role) - Added test example matching other provider patterns - Fixed typo in AssistantMessage type (stopResaon -> stopReason) across all providers
This commit is contained in:
parent
cb4c32faaa
commit
a8ba19f0b4
8 changed files with 360 additions and 14 deletions
|
|
@ -5,7 +5,10 @@
|
|||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": ["dist", "README.md"],
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
"clean": "rm -rf dist",
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
|
|
@ -13,13 +16,21 @@
|
|||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"openai": "5.12.2",
|
||||
"@anthropic-ai/sdk": "0.60.0",
|
||||
"@google/genai": "1.14.0",
|
||||
"chalk": "^5.5.0"
|
||||
"@google/generative-ai": "^0.24.1",
|
||||
"chalk": "^5.5.0",
|
||||
"openai": "5.12.2"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"keywords": ["ai", "llm", "openai", "anthropic", "gemini", "unified", "api"],
|
||||
"keywords": [
|
||||
"ai",
|
||||
"llm",
|
||||
"openai",
|
||||
"anthropic",
|
||||
"gemini",
|
||||
"unified",
|
||||
"api"
|
||||
],
|
||||
"author": "Mario Zechner",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
|
@ -30,4 +41,4 @@
|
|||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue