From 11b04194d4cb5592903e2729ad63de0d67592c03 Mon Sep 17 00:00:00 2001 From: Craig Dennis Date: Mon, 10 Mar 2025 10:16:41 -0700 Subject: [PATCH] Updates Traditional Function Calling Example --- src/content/docs/workers-ai/function-calling/index.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/content/docs/workers-ai/function-calling/index.mdx b/src/content/docs/workers-ai/function-calling/index.mdx index 17a484c1029fc4..f730bff881fa67 100644 --- a/src/content/docs/workers-ai/function-calling/index.mdx +++ b/src/content/docs/workers-ai/function-calling/index.mdx @@ -84,7 +84,7 @@ export default { const response = await env.AI.run( "@hf/nousresearch/hermes-2-pro-mistral-7b", { - messages: [{ role: "user", content: "Who is Cloudflare on github?" }], + messages: [{ role: "user", content: "Who is Cloudflare on GitHub?" }], tools: [ { name: "getGithubUser", @@ -130,16 +130,14 @@ export default { messages: [ { role: "user", - content: "Who is Cloudflare on github?", + content: "Who is Cloudflare on GitHub?", }, { role: "assistant", - content: "", - tool_call: selected_tool.name, + content: JSON.stringify(selected_tool), }, { role: "tool", - name: selected_tool.name, content: JSON.stringify(res), }, ],