Conversation
The docs example showed returning a single Message object, which is not a supported return type. Updated to show list[Message] and corrected docstrings in prompt.py to match the actual supported types.
WalkthroughThe pull request updates prompt-related documentation and docstrings to reflect changes in return types. An example function Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (4)src/fastmcp/**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
docs/**/*.mdx📄 CodeRabbit inference engine (docs/.cursor/rules/mintlify.mdc)
Files:
docs/**/*.{md,mdx,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
docs/**/*.{md,mdx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The documentation example for prompts showed returning a single
Messageobject with-> Message, but this is not a supported return type. Theconvert_resultmethod only handles:str→ wrapped as single user Messagelist[Message | str]→ converted to list[Message]PromptResult→ passed throughA single
Messagewould raiseTypeError: Prompt must return str, list[Message], or PromptResult.Updated the example to return
list[Message]which demonstrates the multi-message capability, and corrected the docstrings inPrompt.from_functionandFunctionPrompt.from_functionto match the actual supported types.