From b690f9b78a226656a3846f4ed997fe27c64de014 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 16 Jun 2023 17:42:21 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- legacy/examples/summarize-news.ts | 6 +++--- legacy/src/services/diffbot.ts | 1 - legacy/src/tools/diffbot.ts | 2 +- legacy/tsup.config.ts | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/legacy/examples/summarize-news.ts b/legacy/examples/summarize-news.ts index c5906d4e..2308fcbe 100644 --- a/legacy/examples/summarize-news.ts +++ b/legacy/examples/summarize-news.ts @@ -2,7 +2,7 @@ import { OpenAIClient } from '@agentic/openai-fetch' import 'dotenv/config' import { z } from 'zod' -import { Agentic, DiffbotTool, SerpAPITool } from '@/index' +import { Agentic, SerpAPITool } from '@/index' async function main() { const openai = new OpenAIClient({ apiKey: process.env.OPENAI_API_KEY! }) @@ -10,7 +10,7 @@ async function main() { const res = await agentic .gpt4(`Summarize the latest news on {{topic}} using markdown.`) - .tools([new SerpAPITool(), new DiffbotTool()]) + .tools([new SerpAPITool()]) .input( z.object({ topic: z.string() @@ -25,7 +25,7 @@ async function main() { topic: 'HF0 accelerator' }) - console.log(res) + console.log('\n\n\n' + res) } main() diff --git a/legacy/src/services/diffbot.ts b/legacy/src/services/diffbot.ts index 0473680e..efd30eba 100644 --- a/legacy/src/services/diffbot.ts +++ b/legacy/src/services/diffbot.ts @@ -1,7 +1,6 @@ import defaultKy from 'ky' import { AbortError } from 'p-retry' import pThrottle from 'p-throttle' -import { P } from 'pino' import { throttleKy } from '@/utils' diff --git a/legacy/src/tools/diffbot.ts b/legacy/src/tools/diffbot.ts index 04560522..941df61d 100644 --- a/legacy/src/tools/diffbot.ts +++ b/legacy/src/tools/diffbot.ts @@ -3,7 +3,7 @@ import { z } from 'zod' import * as types from '@/types' import { DiffbotClient } from '@/services/diffbot' import { BaseTask } from '@/task' -import { omit, pick } from '@/utils' +import { pick } from '@/utils' export const DiffbotInputSchema = z.object({ url: z.string().describe('URL of page to scrape') diff --git a/legacy/tsup.config.ts b/legacy/tsup.config.ts index 453ae031..61e14bd6 100644 --- a/legacy/tsup.config.ts +++ b/legacy/tsup.config.ts @@ -12,7 +12,7 @@ export default defineConfig([ minify: false, shims: true, dts: true, - esbuildOptions(options, context) { + esbuildOptions(options) { options.target = 'es2020' options.jsx = 'preserve' }