Skip to content

Commit

Permalink
Include base URL when using openai api config in extract questions. C…
Browse files Browse the repository at this point in the history
…lose #831
  • Loading branch information
sabaimran committed Jun 21, 2024
1 parent b9966eb commit d3c0111
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/khoj/routers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,13 @@ async def extract_references_and_questions(
elif conversation_config.model_type == ChatModelOptions.ModelType.OPENAI:
openai_chat_config = conversation_config.openai_config
api_key = openai_chat_config.api_key
base_url = openai_chat_config.api_base_url
chat_model = conversation_config.chat_model
inferred_queries = extract_questions(
defiltered_query,
model=chat_model,
api_key=api_key,
api_base_url=base_url,
conversation_log=meta_log,
location_data=location_data,
max_tokens=conversation_config.max_prompt_size,
Expand Down

0 comments on commit d3c0111

Please sign in to comment.