kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
rodzic
e085215b11
commit
757b41c729
|
@ -32,8 +32,6 @@ export async function main() {
|
||||||
.call({
|
.call({
|
||||||
article
|
article
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('example', example)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -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() }))
|
|
||||||
}
|
|
Ładowanie…
Reference in New Issue