Skip to content

get_prompt method does not work #1672

@subhankaladi

Description

@subhankaladi

get_prompt method not working

my code:

import asyncio
from agents import Agent, RunContextWrapper


prompt_agent = Agent(
    name="PromptBot",
    prompt={
    "id": "pmpt_68a223bf2d5.........................",
    "version": "4"
  }
)

async def check_structured_prompt():
    context = RunContextWrapper(context={})
    prompt_param = await prompt_agent.get_prompt(context)
    print(f"Structured prompt: {prompt_param}")

asyncio.run(check_structured_prompt())

output:

Structured prompt: {'id': 'pmpt_68a223bf2d54.........................', 'version': '4', 'variables': None}

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:coreneeds-more-infoWaiting for a reply/more info from the authorquestionQuestion about using the SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions