From 464a666b87dba31f8368814d4fd97a838e043c59 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 26 May 2023 21:43:30 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- legacy/examples/basic.ts | 22 ++-------------------- legacy/examples/scratch.ts | 19 ------------------- 2 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 legacy/examples/scratch.ts diff --git a/legacy/examples/basic.ts b/legacy/examples/basic.ts index 803661a7..090ac0d6 100644 --- a/legacy/examples/basic.ts +++ b/legacy/examples/basic.ts @@ -10,28 +10,10 @@ async function main() { const openai = new OpenAIClient({ apiKey: process.env.OPENAI_API_KEY! }) const $ = new Agentic({ openai }) - // const ex0 = await $.gpt4(`give me a single boolean value`) - // .output(z.boolean()) - // // .retry({ attempts: 3 }) - // .call() - // console.log(ex0) - - const ex1 = await $.gpt4(`generate fake data`) + const example = await $.gpt4(`generate fake data`) .output(z.object({ foo: z.string(), bar: z.number() })) - // .output(z.string()) - // .retry({ attempts: 3 }) .call() - console.log(ex1) - - // const getBoolean = $.gpt4(`are you {{mood}}?`) - // .input(z.object({ mood: z.string() })) - // .output(z.boolean()) - - // const results = await Promise.all([ - // getBoolean.call({ mood: 'happy' }), - // getBoolean.call({ mood: 'sad' }) - // ]) - // console.log(results) + console.log(example) } main() diff --git a/legacy/examples/scratch.ts b/legacy/examples/scratch.ts deleted file mode 100644 index df3ed199..00000000 --- a/legacy/examples/scratch.ts +++ /dev/null @@ -1,19 +0,0 @@ -import dotenv from 'dotenv-safe' -import { OpenAIClient } from 'openai-fetch' -import { z } from 'zod' - -import { Agentic } from '../src' - -dotenv.config() - -async function main() { - const openai = new OpenAIClient({ apiKey: process.env.OPENAI_API_KEY! }) - const $ = new Agentic({ openai }) - - const ex1 = await $.gpt4(`generate fake data`) - // .output(z.object({ foo: z.string(), bar: z.number() })) - .call() - console.log(ex1) -} - -main()