mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Improve Inferred Document Search Query Extraction from GPT
Using stop_words = "\n" was preventing JSON responses with newlines in them
This commit is contained in:
@@ -67,7 +67,7 @@ def extract_questions(
|
|||||||
model_name=model,
|
model_name=model,
|
||||||
temperature=temperature,
|
temperature=temperature,
|
||||||
max_tokens=max_tokens,
|
max_tokens=max_tokens,
|
||||||
model_kwargs={"stop": ["A: ", "\n"], "response_format": {"type": "json_object"}},
|
model_kwargs={"response_format": {"type": "json_object"}},
|
||||||
openai_api_key=api_key,
|
openai_api_key=api_key,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user