kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: update ai sdk, dexter, and zod
rodzic
3419b05d0a
commit
d312cdbd34
|
@ -1,26 +0,0 @@
|
|||
import 'dotenv/config'
|
||||
|
||||
import { createOpenAI } from '@ai-sdk/openai'
|
||||
import { Browserbase, BrowserbaseAISDK } from '@browserbasehq/sdk'
|
||||
import { generateText } from 'ai'
|
||||
|
||||
async function main() {
|
||||
const browserbase = new Browserbase()
|
||||
const openai = createOpenAI({ compatibility: 'strict' })
|
||||
|
||||
const browserTool = BrowserbaseAISDK(browserbase, { textContent: true })
|
||||
console.log(browserTool.parameters)
|
||||
|
||||
const result = await generateText({
|
||||
model: openai('gpt-4o-mini'),
|
||||
tools: { browserTool },
|
||||
toolChoice: 'required',
|
||||
temperature: 0,
|
||||
system: 'You are a helpful assistant. Be as concise as possible.',
|
||||
prompt: 'What is the weather in San Francisco?'
|
||||
})
|
||||
|
||||
console.log(result.toolResults[0])
|
||||
}
|
||||
|
||||
await main()
|
|
@ -10,11 +10,10 @@
|
|||
"dependencies": {
|
||||
"@agentic/ai-sdk": "workspace:*",
|
||||
"@agentic/weather": "workspace:*",
|
||||
"@ai-sdk/openai": "^0.0.68",
|
||||
"@browserbasehq/sdk": "^1.4.2",
|
||||
"ai": "^3.4.16",
|
||||
"openai": "^4.49.0",
|
||||
"zod": "^3.23.8"
|
||||
"@ai-sdk/openai": "^1.1.13",
|
||||
"ai": "^4.1.42",
|
||||
"openai": "^4.85.2",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*"
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
"@agentic/serper": "workspace:*",
|
||||
"@agentic/stdlib": "workspace:*",
|
||||
"@agentic/weather": "workspace:*",
|
||||
"@dexaai/dexter": "^2.1.0",
|
||||
"zod": "^3.23.8"
|
||||
"@dexaai/dexter": "^4.1.1",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"@agentic/stdlib": "workspace:*",
|
||||
"genkit": "^1.0.4",
|
||||
"genkitx-openai": "^0.16.0",
|
||||
"zod": "^3.23.8"
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"@langchain/core": "^0.3.13",
|
||||
"@langchain/openai": "^0.3.11",
|
||||
"langchain": "^0.3.3",
|
||||
"zod": "^3.23.8"
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"@agentic/llamaindex": "workspace:*",
|
||||
"@agentic/stdlib": "workspace:*",
|
||||
"llamaindex": "^0.7.3",
|
||||
"zod": "^3.23.8"
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*"
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
"dependencies": {
|
||||
"@agentic/core": "workspace:*",
|
||||
"@agentic/stdlib": "workspace:*",
|
||||
"openai": "^4.49.0",
|
||||
"zod": "^3.23.8"
|
||||
"openai": "^4.85.2",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"@agentic/core": "workspace:*",
|
||||
"@agentic/stdlib": "workspace:*",
|
||||
"restore-cursor": "^5.1.0",
|
||||
"zod": "^3.23.8"
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*"
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
"@agentic/core": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ai": "^3.1.30"
|
||||
"ai": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*",
|
||||
"ai": "^3.1.30"
|
||||
"ai": "^4.1.42"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
"@agentic/core": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@dexaai/dexter": "^2.1.0"
|
||||
"@dexaai/dexter": "^4.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*",
|
||||
"@dexaai/dexter": "^2.1.0"
|
||||
"@dexaai/dexter": "^4.1.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
"devDependencies": {
|
||||
"@agentic/core": "workspace:*",
|
||||
"@agentic/tsconfig": "workspace:*",
|
||||
"@ai-sdk/openai": "^0.0.68",
|
||||
"@ai-sdk/openai": "^1.1.13",
|
||||
"ai": "^4.0.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
|
892
pnpm-lock.yaml
892
pnpm-lock.yaml
Plik diff jest za duży
Load Diff
Ładowanie…
Reference in New Issue