old-agentic-v1^2
Travis Fischer 2023-05-26 18:10:48 -07:00
rodzic aced678911
commit 95bb8c1e70
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -11,7 +11,7 @@ export async function sentimentAgent() {
const $ = new Agentic({ openai }) const $ = new Agentic({ openai })
const example = await $.gpt4( const example = await $.gpt4(
`You are an expert sentiment-labelling assistant. Label the following texts as positive or negative: {{texts}}` `You are an expert sentiment-labelling assistant. Label the following texts as positive or negative: \n{{#texts}}- {{.}}\n{{/texts}}`
) )
.input(z.object({ texts: z.string().array() })) .input(z.object({ texts: z.string().array() }))
.output(z.array(z.object({ text: z.string(), label: z.string() }))) .output(z.array(z.object({ text: z.string(), label: z.string() })))