Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Actions in ChatKit

Teaches how to implement and handle actions in the ChatKit SDK to trigger streaming responses or side-effects via widget interactions or imperative client-side calls, including server-side handling, client-side callba...

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Actions in ChatKit

Teaches how to implement and handle actions in the ChatKit SDK to trigger streaming responses or side-effects via widget interactions or imperative client-side calls, including server-side handling, client-side callba...

When To Use

Use when you need to trigger server-side logic or client-side callbacks from UI widgets without requiring a user to submit a text message.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/actions-in-chatkit-workflow-guide.mdA guide explaining how to trigger streaming responses and side-effects using actions within the ChatKit SDK.Questions about a guide explaining how to trigger streaming responses and side-effects using actions within the ChatKit SDK.
examples/actions-in-chatkit-chatkit-actions-python-button-click.pythonA Python code example demonstrating how to implement a Button component with an onClickAction configuration in ChatKit.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to implement a Button component with an onClickAction configuration in ChatKit.
examples/actions-in-chatkit-chatkit-actions.tsxA TypeScript React example demonstrating how to use the chatKit.sendAction method to trigger an action with a payload.Exact payloads, commands, or snippets shown in A TypeScript React example demonstrating how to use the chatKit.sendAction method to trigger an action with a payload.
examples/actions-in-chatkit-chatkit-actions-python-server-implementation.pythonA Python implementation of a ChatKitServer class demonstrating how to handle asynchronous actions within a ChatKit environment.Exact payloads, commands, or snippets shown in A Python implementation of a ChatKitServer class demonstrating how to handle asynchronous actions within a ChatKit en...
examples/actions-in-chatkit-chatkit-actions-python-button-config.pythonA Python code snippet demonstrating how to configure a Button component with an onClickAction using ActionConfig.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to configure a Button component with an onClickAction using ActionConfig.
examples/actions-in-chatkit-chatkit-actions-typescript-handler.tsA TypeScript code example demonstrating how to handle widget actions and send action responses using the ChatKit API.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to handle widget actions and send action responses using the ChatKit API.
examples/actions-in-chatkit-chatkit-actions-python-payload.pythonA Python code snippet demonstrating how to define and parse complex action payloads using Pydantic models for ChatKit actions.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to define and parse complex action payloads using Pydantic models for ChatKit...
examples/actions-in-chatkit-chatkit-actions-python-form-onsubmit.pythonA Python code snippet demonstrating how to configure the onSubmitAction property within a ChatKit Form component to trigger a custom action.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to configure the onSubmitAction property within a ChatKit Form component to t...
examples/actions-in-chatkit-chatkit-actions-python-button-config-2.pythonA Python code snippet demonstrating how to configure a Button component with a long-running action type in ChatKit.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to configure a Button component with a long-running action type in ChatKit.

What This Skill Covers

  • Actions are a way for the ChatKit SDK frontend to trigger a streaming response without the user submitting a message. They can also be used to trigger side-e...
  • Main sections: Triggering actions, In response to user interaction with widgets, Handling actions, On the server, Client.

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.openai.com/api/docs/guides/chatkit-actions.md