mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-09 06:29:47 +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,
|
"hits": hits_per_page,
|
||||||
}
|
}
|
||||||
while True:
|
while True:
|
||||||
results = requests.get(SEARCH_ENDPOINT, params=params).json()
|
results = requests.post(SEARCH_ENDPOINT, json=params).json()
|
||||||
hits = results["root"].get("children", [])
|
hits = results["root"].get("children", [])
|
||||||
|
|
||||||
doc_chunk_ids.extend(
|
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():
|
if "query" in query_params and not cast(str, query_params["query"]).strip():
|
||||||
raise ValueError("No/empty query received")
|
raise ValueError("No/empty query received")
|
||||||
|
|
||||||
response = requests.get(
|
response = requests.post(
|
||||||
SEARCH_ENDPOINT,
|
SEARCH_ENDPOINT,
|
||||||
params=dict(
|
json=dict(
|
||||||
**query_params,
|
**query_params,
|
||||||
**{
|
**{
|
||||||
"presentation.timing": True,
|
"presentation.timing": True,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user