9 Commits

Author SHA1 Message Date
Devin AI
4c0093deb0 refactor: add multi-provider support with Vercel AI SDK
- Add support for Gemini, OpenAI, and Ollama providers
- Set default models (gemini-flash-1.5 for Gemini, gpt4o-mini for OpenAI)
- Implement provider factory pattern
- Update schema handling for each provider
- Add environment variable configuration
- Maintain token tracking across providers

Co-Authored-By: Han Xiao <han.xiao@jina.ai>
2025-02-05 12:28:21 +00:00
Devin AI
22c2244225 refactor: replace Google's Gemini client with OpenAI
- Remove @google/generative-ai dependency
- Add OpenAI client
- Update all tool files to use OpenAI's chat completions API
- Convert schema definitions to use Zod
- Maintain existing temperature configurations
- Add proper type safety with TypeScript

Co-Authored-By: Han Xiao <han.xiao@jina.ai>
2025-02-05 12:00:57 +00:00
devin-ai-integration[bot]
76f8cd242a
feat: merge types and add tests (#10)
* feat: merge types and add tests

- Merged types.ts and tracker.ts
- Added Jest configuration and setup
- Added comprehensive tests for tools and agent
- Updated package.json with test scripts

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* chore: remove tracker.ts after merging into types.ts

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* fix: remove sensitive API keys from jest.setup.js

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* fix: improve error handling and test timeouts

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* feat: add token budget enforcement to TokenTracker

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* feat: add github actions workflow for CI and fix remaining issues

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-02-03 18:01:59 +08:00
devin-ai-integration[bot]
ca0f780cc3
feat: add web server wrapper for getResponse (#6)
* feat: add web server wrapper for getResponse

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* chore: update package-lock.json

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* fix: add proper types to Express route handlers

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: update API endpoint path and request parameters

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: centralize model configurations with per-tool settings

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: update agent.ts to use centralized model configuration

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-02-02 22:07:43 +08:00
devin-ai-integration[bot]
b48f7afb6d
feat: add Brave Search integration (#4)
* feat: add Brave Search integration

- Add Brave Search implementation
- Configure Brave API key in config
- Make search provider configurable with Brave as default

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* chore: first commit

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-01-31 18:24:45 +08:00
devin-ai-integration[bot]
f99608909c
refactor: centralize token tracking and clean up console output (#3)
* refactor: centralize token tracking and clean up console output

- Remove manual token tracking in agent.ts
- Track tokens through tokenTracker.trackUsage()
- Clean up verbose console output
- Add ESLint configuration
- Fix TypeScript linting issues

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: simplify sleep function and use console.log consistently

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: remove color modifiers from console.log statements

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-01-31 15:25:28 +08:00
Han Xiao
cd35dc7966 chore: first commit 2025-01-27 13:47:13 +08:00
Han Xiao
1291e23cef chore: first commit 2025-01-26 15:26:46 +08:00
Han Xiao
5eb75fcb61 chore: first commit 2025-01-26 14:53:55 +08:00