Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Prompts

DynamicPromptFunctionmodule-attribute

DynamicPromptFunction=Callable[[GenerateDynamicPromptData],MaybeAwaitable[Prompt]]

A function that dynamically generates a prompt.

Prompt

Bases:TypedDict

Prompt configuration to use for interacting with an OpenAI model.

Source code insrc/agents/prompts.py
classPrompt(TypedDict):"""Prompt configuration to use for interacting with an OpenAI model."""id:str"""The unique ID of the prompt."""version:NotRequired[str]"""Optional version of the prompt."""variables:NotRequired[dict[str,ResponsesPromptVariables]]"""Optional variables to substitute into the prompt."""

idinstance-attribute

id:str

The unique ID of the prompt.

versioninstance-attribute

version:NotRequired[str]

Optional version of the prompt.

variablesinstance-attribute

variables:NotRequired[dict[str,Variables]]

Optional variables to substitute into the prompt.

GenerateDynamicPromptDatadataclass

Inputs to a function that allows you to dynamically generate a prompt.

Source code insrc/agents/prompts.py
@dataclassclassGenerateDynamicPromptData:"""Inputs to a function that allows you to dynamically generate a prompt."""context:RunContextWrapper[Any]"""The run context."""agent:Agent[Any]"""The agent for which the prompt is being generated."""

contextinstance-attribute

context:RunContextWrapper[Any]

The run context.

agentinstance-attribute

agent:Agent[Any]

The agent for which the prompt is being generated.


[8]ページ先頭

©2009-2025 Movatter.jp