From 6b6e92f761cf5f34bb4feadec4872e7d0899068c Mon Sep 17 00:00:00 2001 From: Tony Powell Date: Thu, 23 Jan 2025 11:23:12 -0500 Subject: [PATCH] Log tool calls in example --- js/packages/phoenix-client/examples/apply_prompt_openai.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/packages/phoenix-client/examples/apply_prompt_openai.ts b/js/packages/phoenix-client/examples/apply_prompt_openai.ts index 2e9ff8f8e1..f4aa7eda8d 100644 --- a/js/packages/phoenix-client/examples/apply_prompt_openai.ts +++ b/js/packages/phoenix-client/examples/apply_prompt_openai.ts @@ -38,7 +38,7 @@ const main = async () => { prompt, sdk: "openai", variables: { - question: "What is the capital of France?", + question: "When does Monster Hunter Wilds come out?", }, }); @@ -70,6 +70,8 @@ const main = async () => { } catch { console.log(responseText); } + } else if (chunk.choices[0]?.delta?.tool_calls) { + console.log(chunk.choices[0]?.delta?.tool_calls); } }