feat: add OpenAI provider with structured output support (#28)

* feat: add OpenAI provider with structured output support

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

* fix: add @ai-sdk/openai dependency and fix modelConfigs access

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

* fix: correct indentation in agent.ts

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

* refactor: centralize model initialization in config.ts

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

* refactor: improve model config access patterns

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

* fix: remove unused imports

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

* refactor: clean up

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
This commit is contained in:
devin-ai-integration[bot]
2025-02-06 15:05:38 +08:00
committed by GitHub
parent f1c7ada6ae
commit 50dff0863c
15 changed files with 271 additions and 100 deletions

23
package-lock.json generated
View File

@@ -1,15 +1,16 @@
{
"name": "agentic-search",
"name": "node-deepresearch",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "agentic-search",
"name": "node-deepresearch",
"version": "1.0.0",
"license": "ISC",
"license": "Apache-2.0",
"dependencies": {
"@ai-sdk/google": "^1.0.0",
"@ai-sdk/openai": "^1.1.9",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
"@types/node-fetch": "^2.6.12",
@@ -51,6 +52,22 @@
"zod": "^3.0.0"
}
},
"node_modules/@ai-sdk/openai": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-1.1.9.tgz",
"integrity": "sha512-t/CpC4TLipdbgBJTMX/otzzqzCMBSPQwUOkYPGbT/jyuC86F+YO9o+LS0Ty2pGUE1kyT+B3WmJ318B16ZCg4hw==",
"license": "Apache-2.0",
"dependencies": {
"@ai-sdk/provider": "1.0.7",
"@ai-sdk/provider-utils": "2.1.6"
},
"engines": {
"node": ">=18"
},
"peerDependencies": {
"zod": "^3.0.0"
}
},
"node_modules/@ai-sdk/provider": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-1.0.7.tgz",