From 0028b41fe38612b30ca6cb73ea51e8ff0e6f2e2e Mon Sep 17 00:00:00 2001 From: Arya Dasgupta Date: Wed, 28 Jan 2026 16:31:28 +0530 Subject: [PATCH] docs: add example for streaming with function calling (#2365) * docs: add example for streaming with function calling * Minor fix and add example to playground --------- Co-authored-by: Reynaldi Chernando --- src/docs/src/AI/chat.md | 82 +++++++++++++++++++ src/docs/src/examples.js | 6 ++ .../ai-streaming-function-calling.html | 77 +++++++++++++++++ 3 files changed, 165 insertions(+) create mode 100644 src/docs/src/playground/examples/ai-streaming-function-calling.html diff --git a/src/docs/src/AI/chat.md b/src/docs/src/AI/chat.md index 7a7faa0dc..8a1f86377 100755 --- a/src/docs/src/AI/chat.md +++ b/src/docs/src/AI/chat.md @@ -270,6 +270,88 @@ List of OpenAI models that support the web search can be found in their [API com ``` +Streaming Function Calling + +```html;ai-streaming-function-calling + + + + + + +``` + Web Search ```html;ai-web-search diff --git a/src/docs/src/examples.js b/src/docs/src/examples.js index e6b6ad76d..f2fe775c8 100644 --- a/src/docs/src/examples.js +++ b/src/docs/src/examples.js @@ -67,6 +67,12 @@ const examples = [ slug: 'ai-function-calling', source: '/playground/examples/ai-function-calling.html', }, + { + title: 'Streaming Function Calls', + description: 'Run AI function calling with streaming using Puter.js. Try out AI examples directly in Puter.js playground.', + slug: 'ai-streaming-function-calling', + source: '/playground/examples/ai-streaming-function-calling.html', + }, { title: 'Web Search', description: 'Perform web search using AI to generate accurate and up-to-date information. Try out this example in Puter.js playground.', diff --git a/src/docs/src/playground/examples/ai-streaming-function-calling.html b/src/docs/src/playground/examples/ai-streaming-function-calling.html new file mode 100644 index 000000000..c782c59ec --- /dev/null +++ b/src/docs/src/playground/examples/ai-streaming-function-calling.html @@ -0,0 +1,77 @@ + + + + + + \ No newline at end of file