Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/query_agent/test_query_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,15 +1032,15 @@ async def fake_post_with_capture(self, url, headers=None, json=None, timeout=Non
agent._headers = dummy_client.additional_headers

# Test with effort set
results = await agent.search("test query", limit=2, effort="low")
results = await agent.search("test query", limit=2, effort="medium")
assert isinstance(results, AsyncSearchModeResponse)
assert captured["json"]["effort"] == "low"
assert captured["json"]["effort"] == "medium"

# Reset captured json, then paginate — effort should persist
captured = {}
results_2 = await results.next(limit=2, offset=1)
assert isinstance(results_2, AsyncSearchModeResponse)
assert captured["json"]["effort"] == "low"
assert captured["json"]["effort"] == "medium"


async def test_async_search_only_mode_failure(monkeypatch):
Expand Down
2 changes: 1 addition & 1 deletion weaviate_agents/query/classes/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SearchModeRequestBase(BaseModel):
offset: int
filtering: Optional[Literal["recall", "precision"]] = None
diversity_weight: Optional[float] = None
effort: Optional[Literal["low", "medium", "high"]] = None
effort: Optional[Literal["medium", "high", "ultrahigh"]] = None


class SearchModeExecutionRequest(SearchModeRequestBase):
Expand Down
8 changes: 4 additions & 4 deletions weaviate_agents/query/query_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ def search(
collections: Union[list[Union[str, QueryAgentCollectionConfig]], None] = None,
filtering: Optional[Literal["recall", "precision"]] = None,
diversity_weight: Optional[float] = None,
effort: Optional[Literal["low", "medium", "high"]] = None,
effort: Optional[Literal["medium", "high", "ultrahigh"]] = None,
) -> SearchModeResponse:
"""Run the Query Agent search-only mode.

Expand All @@ -1428,7 +1428,7 @@ def search(
Higher values push for more topical variety at the cost of relevance.
Defaults to None (no diversity).
effort: The amount of effort the agent should put into the search.
One of "low", "medium", or "high". Higher effort may improve
One of "medium", "high", or "ultrahigh". Higher effort may improve
result quality at the expense of increased latency and cost.

Returns:
Expand Down Expand Up @@ -2262,7 +2262,7 @@ async def search(
collections: Union[list[Union[str, QueryAgentCollectionConfig]], None] = None,
filtering: Optional[Literal["recall", "precision"]] = None,
diversity_weight: Optional[float] = None,
effort: Optional[Literal["low", "medium", "high"]] = None,
effort: Optional[Literal["medium", "high", "ultrahigh"]] = None,
) -> AsyncSearchModeResponse:
"""Run the Query Agent search-only mode.

Expand All @@ -2286,7 +2286,7 @@ async def search(
Higher values push for more topical variety at the cost of relevance.
Defaults to None (no diversity).
effort: The amount of effort the agent should put into the search.
One of "low", "medium", or "high". Higher effort may improve
One of "medium", "high", or "ultrahigh". Higher effort may improve
result quality at the expense of increased latency and cost.

Returns:
Expand Down
2 changes: 1 addition & 1 deletion weaviate_agents/query/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
system_prompt: Optional[str],
filtering: Optional[Literal["recall", "precision"]] = None,
diversity_weight: Optional[float] = None,
effort: Optional[Literal["low", "medium", "high"]] = None,
effort: Optional[Literal["medium", "high", "ultrahigh"]] = None,
):
self.headers = headers
self.connection_headers = connection_headers
Expand Down
Loading