Travis Fischer 2023-05-26 18:00:55 -07:00
rodzic e085215b11
commit 757b41c729
2 zmienionych plików z 0 dodań i 18 usunięć

Wyświetl plik

@ -32,8 +32,6 @@ export async function main() {
.call({
article
})
console.log('example', example)
}
main()

Wyświetl plik

@ -1,16 +0,0 @@
import dotenv from 'dotenv-safe'
import { OpenAIClient } from 'openai-fetch'
import { z } from 'zod'
import { Agentic } from '../src'
dotenv.config()
export async function summaryAgent() {
const openai = new OpenAIClient({ apiKey: process.env.OPENAI_API_KEY! })
const $ = new Agentic({ openai })
return $.gpt4(
`You are an expert at summarizing web pages. Summarize this article for me: {{article}}`
).input(z.object({ article: z.string() }))
}