mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-04 12:09:53 +02:00
Change Vespa Query to Post from Get (#1044)
This commit is contained in:
parent
6768c24723
commit
988e9aa682
@ -157,7 +157,7 @@ def _get_vespa_chunk_ids_by_document_id(
|
||||
"hits": hits_per_page,
|
||||
}
|
||||
while True:
|
||||
results = requests.get(SEARCH_ENDPOINT, params=params).json()
|
||||
results = requests.post(SEARCH_ENDPOINT, json=params).json()
|
||||
hits = results["root"].get("children", [])
|
||||
|
||||
doc_chunk_ids.extend(
|
||||
@ -559,9 +559,9 @@ def _query_vespa(query_params: Mapping[str, str | int | float]) -> list[Inferenc
|
||||
if "query" in query_params and not cast(str, query_params["query"]).strip():
|
||||
raise ValueError("No/empty query received")
|
||||
|
||||
response = requests.get(
|
||||
response = requests.post(
|
||||
SEARCH_ENDPOINT,
|
||||
params=dict(
|
||||
json=dict(
|
||||
**query_params,
|
||||
**{
|
||||
"presentation.timing": True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user