mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-20 13:05:49 +02:00
DAN-55 Intent Model (#89)
Includes: - Intent Model - Heuristic Classifications - GPT self error classification - Bugfix on finding end of answer stream
This commit is contained in:
@@ -96,19 +96,15 @@ if __name__ == "__main__":
|
||||
"query": query,
|
||||
"collection": QDRANT_DEFAULT_COLLECTION,
|
||||
"use_keyword": flow_type == "keyword", # Ignore if not QA Endpoints
|
||||
"filters": json.dumps([{SOURCE_TYPE: source_types}]),
|
||||
"filters": [{SOURCE_TYPE: source_types}],
|
||||
}
|
||||
|
||||
if args.stream:
|
||||
with requests.get(
|
||||
endpoint, params=urllib.parse.urlencode(query_json), stream=True
|
||||
) as r:
|
||||
with requests.post(endpoint, json=query_json, stream=True) as r:
|
||||
for json_response in r.iter_lines():
|
||||
pprint(json.loads(json_response.decode()))
|
||||
else:
|
||||
response = requests.get(
|
||||
endpoint, params=urllib.parse.urlencode(query_json)
|
||||
)
|
||||
response = requests.post(endpoint, json=query_json)
|
||||
contents = json.loads(response.content)
|
||||
pprint(contents)
|
||||
|
||||
|
Reference in New Issue
Block a user