mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Merge branch 'master' of github.com:debanjum/khoj
This commit is contained in:
commit
9a63f89f33
1 changed files with 2 additions and 1 deletions
|
@ -535,6 +535,7 @@ async def extract_references_and_questions(
|
||||||
|
|
||||||
# Initialize Variables
|
# Initialize Variables
|
||||||
api_key = state.processor_config.conversation.openai_api_key
|
api_key = state.processor_config.conversation.openai_api_key
|
||||||
|
chat_model = state.processor_config.conversation.chat_model
|
||||||
conversation_type = "general" if q.startswith("@general") else "notes"
|
conversation_type = "general" if q.startswith("@general") else "notes"
|
||||||
compiled_references = []
|
compiled_references = []
|
||||||
inferred_queries = []
|
inferred_queries = []
|
||||||
|
@ -542,7 +543,7 @@ async def extract_references_and_questions(
|
||||||
if conversation_type == "notes":
|
if conversation_type == "notes":
|
||||||
# Infer search queries from user message
|
# Infer search queries from user message
|
||||||
with timer("Extracting search queries took", logger):
|
with timer("Extracting search queries took", logger):
|
||||||
inferred_queries = extract_questions(q, api_key=api_key, conversation_log=meta_log)
|
inferred_queries = extract_questions(q, model=chat_model, api_key=api_key, conversation_log=meta_log)
|
||||||
|
|
||||||
# Collate search results as context for GPT
|
# Collate search results as context for GPT
|
||||||
with timer("Searching knowledge base took", logger):
|
with timer("Searching knowledge base took", logger):
|
||||||
|
|
Loading…
Add table
Reference in a new issue