Skip to content

Commit 3d2781a

Browse files
craigsdennisRebeccaTamachiro
authored andcommitted
Updates Traditional Function Calling Example (#20682)
1 parent 72ae234 commit 3d2781a

File tree

1 file changed

+3
-5
lines changed
  • src/content/docs/workers-ai/function-calling

1 file changed

+3
-5
lines changed

src/content/docs/workers-ai/function-calling/index.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default {
8484
const response = await env.AI.run(
8585
"@hf/nousresearch/hermes-2-pro-mistral-7b",
8686
{
87-
messages: [{ role: "user", content: "Who is Cloudflare on github?" }],
87+
messages: [{ role: "user", content: "Who is Cloudflare on GitHub?" }],
8888
tools: [
8989
{
9090
name: "getGithubUser",
@@ -130,16 +130,14 @@ export default {
130130
messages: [
131131
{
132132
role: "user",
133-
content: "Who is Cloudflare on github?",
133+
content: "Who is Cloudflare on GitHub?",
134134
},
135135
{
136136
role: "assistant",
137-
content: "",
138-
tool_call: selected_tool.name,
137+
content: JSON.stringify(selected_tool),
139138
},
140139
{
141140
role: "tool",
142-
name: selected_tool.name,
143141
content: JSON.stringify(res),
144142
},
145143
],

0 commit comments

Comments
 (0)