From aec713d2ff084b60d3072fe417c5c1c94970f0bb 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 --- legacy/examples/openai/bin/weather.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/legacy/examples/openai/bin/weather.ts b/legacy/examples/openai/bin/weather.ts index c50b0245..c9bd2619 100644 --- a/legacy/examples/openai/bin/weather.ts +++ b/legacy/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) } }