We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ee81b3 commit bfb9737Copy full SHA for bfb9737
src/perplexity_advanced_mcp/search_tool.py
@@ -210,11 +210,10 @@ async def ask_perplexity(
210
211
# Add reasoning if available
212
reasoning = response.get("reasoning")
213
- if reasoning is not None:
214
- result += f"<think>\n{reasoning}\n</think>\n\n"
+ answer = response.get("content", "")
215
216
- # Add answer
217
- content = response.get("content", "")
218
- result += f"<answer>\n{content}\n</answer>"
+ reasoning_text = f"<think>\n{reasoning}\n</think>\n\n" if reasoning else ""
+ answer_text = f"<answer>\n{answer}\n</answer>"
219
+ result += reasoning_text + answer_text
220
return result
0 commit comments