kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
old-agentic-v1^2
rodzic
e330647e9f
commit
cc855b944d
|
@ -11,9 +11,11 @@ async function main() {
|
||||||
const ai = new Agentic({ openai })
|
const ai = new Agentic({ openai })
|
||||||
|
|
||||||
const out = await ai
|
const out = await ai
|
||||||
.gpt4(`Give me random facts about {{topic}}`)
|
.gpt3(`Give me {{numFacts}} random facts about {{topic}}`)
|
||||||
.output(z.array(z.string()))
|
.input(
|
||||||
.input(z.object({ topic: z.string() }))
|
z.object({ topic: z.string(), numFacts: z.number().int().default(5) })
|
||||||
|
)
|
||||||
|
.output(z.object({ facts: z.array(z.string()) }))
|
||||||
.modelParams({ temperature: 0.9 })
|
.modelParams({ temperature: 0.9 })
|
||||||
.call({ topic: 'cats' })
|
.call({ topic: 'cats' })
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue