chatgpt-api/examples/dexter/code-interpreter.ts

25 wiersze
614 B
TypeScript
Czysty Zwykły widok Historia

2024-06-05 08:07:44 +00:00
#!/usr/bin/env node
import 'dotenv/config'
import { ChatModel, createAIRunner } from '@dexaai/dexter'
import { createDexterFunctions } from '../../src/sdks/dexter.js'
import { e2b } from '../../src/tools/e2b.js'
async function main() {
const runner = createAIRunner({
chatModel: new ChatModel({
params: { model: 'gpt-4o', temperature: 0 },
debug: true
}),
functions: createDexterFunctions(e2b)
})
const result = await runner(
'Visualize a distribution of height of men based on the latest data you know. Also print the median value.'
)
console.log(result)
}
await main()