mirror of
https://github.com/usestrix/strix.git
synced 2026-09-13 23:11:07 +00:00
fix(web_search): send only the agent's query to Exa search
Exa /search is a neural search endpoint, not a chat model, so prepending the Perplexity system prompt made Exa match the prompt's own vocabulary (Kali, OWASP, apt, NIST) instead of the query. The system prompt stays on the Perplexity path where it is a chat system message; the Exa summary instruction is unchanged.
This commit is contained in:
parent
0c4364a6a7
commit
84f4108195
2 changed files with 2 additions and 2 deletions
|
|
@ -121,7 +121,7 @@ def _exa_content(api_key: str, query: str, search_type: str, num_results: int) -
|
|||
api_key,
|
||||
"https://api.exa.ai/search",
|
||||
{
|
||||
"query": f"{_SYSTEM_PROMPT}\n\n{query}",
|
||||
"query": query,
|
||||
"type": search_type,
|
||||
"numResults": num_results,
|
||||
"contents": {"summary": {"query": _EXA_SUMMARY_PROMPT}},
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ def test_exa_content_requests_summaries_and_renders_results(
|
|||
|
||||
assert captured["url"] == "https://api.exa.ai/search"
|
||||
assert captured["headers"]["x-api-key"] == "ek"
|
||||
assert "OpenSSH 7.4 RCE?" in captured["json"]["query"]
|
||||
assert captured["json"]["query"] == "OpenSSH 7.4 RCE?"
|
||||
assert captured["json"]["type"] == "auto"
|
||||
assert captured["json"]["numResults"] == 5
|
||||
assert captured["json"]["contents"] == {"summary": {"query": tool._EXA_SUMMARY_PROMPT}}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue