We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76eb300 commit 5ce4a58Copy full SHA for 5ce4a58
examples/05_custom_agent.py
@@ -60,10 +60,10 @@ def __init__(
60
api_key=settings.api_key,
61
)
62
63
- async def get_system_messages(self) -> list[types.ContentBlock]:
64
- """Return system prompt as content blocks."""
+ async def get_system_messages(self) -> list[dict[str, Any]]:
+ """Return system prompt formatted for OpenAI chat API."""
65
system_text = self.system_prompt or "You are a helpful assistant."
66
- return [types.TextContent(type="text", text=system_text)]
+ return [{"role": "system", "content": system_text}]
67
68
def get_tool_schemas(self) -> list[dict[str, Any]]:
69
"""Convert MCP tools to OpenAI function format."""
0 commit comments