From b97ca9d19dae9b61cf5b6f75c79357df1780b30d Mon Sep 17 00:00:00 2001 From: sabaimran Date: Mon, 27 May 2024 01:23:54 +0530 Subject: [PATCH] Skip using max_tokens as input to the extract questions step, as that's not used for max_output --- src/khoj/processor/conversation/anthropic/anthropic_chat.py | 2 -- src/khoj/routers/api.py | 1 - 2 files changed, 3 deletions(-) diff --git a/src/khoj/processor/conversation/anthropic/anthropic_chat.py b/src/khoj/processor/conversation/anthropic/anthropic_chat.py index 28b1e0f0..8c6157b8 100644 --- a/src/khoj/processor/conversation/anthropic/anthropic_chat.py +++ b/src/khoj/processor/conversation/anthropic/anthropic_chat.py @@ -25,7 +25,6 @@ def extract_questions_anthropic( conversation_log={}, api_key=None, temperature=0, - max_tokens=100, location_data: LocationData = None, ): """ @@ -71,7 +70,6 @@ def extract_questions_anthropic( model_name=model, temperature=temperature, api_key=api_key, - max_tokens=max_tokens, ) # Extract, Clean Message from Claude's Response diff --git a/src/khoj/routers/api.py b/src/khoj/routers/api.py index ff1217f9..9d4a8e6b 100644 --- a/src/khoj/routers/api.py +++ b/src/khoj/routers/api.py @@ -353,7 +353,6 @@ async def extract_references_and_questions( api_key=api_key, conversation_log=meta_log, location_data=location_data, - max_tokens=conversation_config.max_prompt_size, ) # Collate search results as context for GPT