Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Openai Function Calls Workers OpenAI GPT function calling with JavaScript and Cloudflare Workers

A step-by-step tutorial for building a Cloudflare Worker that integrates with OpenAI's function calling API to perform real-time web scraping and data retrieval.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Openai Function Calls Workers OpenAI GPT function calling with JavaScript and Cloudflare Workers

A step-by-step tutorial for building a Cloudflare Worker that integrates with OpenAI's function calling API to perform real-time web scraping and data retrieval.

When To Use

Use when you need to implement a workflow where an LLM triggers external tool execution, such as fetching website content via a Cloudflare Worker to inform model responses.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-workflow-guide.mdA tutorial guide for implementing OpenAI GPT function calling within a Cloudflare Workers environment using JavaScript.Questions about a tutorial guide for implementing OpenAI GPT function calling within a Cloudflare Workers environment using JavaScript.
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-2.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-3.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-4.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-5.textA JavaScript implementation demonstrating how to use OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to use OpenAI function calling within a Cloudflare Workers environment.
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-6.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-7.textA JavaScript implementation demonstrating how to use OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to use OpenAI function calling within a Cloudflare Workers environment.
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-8.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-9.textA JavaScript implementation of an OpenAI GPT function calling integration within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation of an OpenAI GPT function calling integration within a Cloudflare Workers environment.
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-10.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-11.textA JavaScript implementation of an OpenAI function calling workflow running on a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript implementation of an OpenAI function calling workflow running on a Cloudflare Worker.
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-12.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-13.textA text file containing the required OPENAI_API_KEY environment variable configuration for a Cloudflare Workers OpenAI function calling implementation.Exact payloads, commands, or snippets shown in A text file containing the required OPENAIAPIKEY environment variable configuration for a Cloudflare Workers OpenAI f...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-14.textA JavaScript implementation of a Cloudflare Worker that integrates OpenAI function calling to process user messages.Exact payloads, commands, or snippets shown in A JavaScript implementation of a Cloudflare Worker that integrates OpenAI function calling to process user messages.
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-15.textA JavaScript implementation demonstrating how to use OpenAI function calling within a Cloudflare Workers environment to fetch and process website content.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to use OpenAI function calling within a Cloudflare Workers environment...
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-16.textA JavaScript implementation demonstrating how to handle OpenAI tool calls within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to handle OpenAI tool calls within a Cloudflare Workers environment.
examples/workers-openai-function-calls-index-gpt-calling-with-javascript-and-clou-17.textA JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A JavaScript implementation demonstrating how to integrate OpenAI function calling within a Cloudflare Workers enviro...

What This Skill Covers

  • In this tutorial, you will build a project that leverages OpenAI's function calling ↗ feature, available in OpenAI's latest Chat Completions API models.
  • Main sections: Tags, What you will learn, Before you start, 1\. Create a new Worker project, 2\. Make a request to OpenAI.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/tutorials/openai-function-calls-workers/index.md