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

24 wiersze
599 B
TypeScript
Czysty Zwykły widok Historia

2024-06-05 08:07:44 +00:00
#!/usr/bin/env node
import 'dotenv/config'
import { createDexterFunctions } from '@agentic/dexter'
import { e2b } from '@agentic/e2b'
2024-06-05 08:07:44 +00:00
import { ChatModel, createAIRunner } from '@dexaai/dexter'
async function main() {
const runner = createAIRunner({
chatModel: new ChatModel({
2024-08-04 10:55:47 +00:00
params: { model: 'gpt-4o-mini', temperature: 0 },
2024-06-05 08:07:44 +00:00
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()