From da4c28b159d656c856f4068fae993fa10c932495 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 14 Mar 2025 21:03:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/openai/bin/weather.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/openai/bin/weather.ts b/examples/openai/bin/weather.ts index c50b0245..c9bd2619 100644 --- a/examples/openai/bin/weather.ts +++ b/examples/openai/bin/weather.ts @@ -43,6 +43,8 @@ async function main() { }) } + console.log() + { // Second call to OpenAI to generate a text response const res = await openai.chat.completions.create({ @@ -52,7 +54,7 @@ async function main() { tools: weather.functions.toolSpecs }) const message = res.choices?.[0]?.message - console.log(JSON.stringify(message, null, 2)) + console.log(message?.content) } }