From 27efb2a33d34ab78e508efb5dbfa8caeeaec2e17 Mon Sep 17 00:00:00 2001 From: Zvonimir Sabljic Date: Tue, 12 Sep 2023 21:28:01 +0200 Subject: [PATCH] Don't send max_tokens to openai api so we can use as much context as possible --- pilot/utils/llm_connection.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pilot/utils/llm_connection.py b/pilot/utils/llm_connection.py index d22da97ac6..9c1e845eaf 100644 --- a/pilot/utils/llm_connection.py +++ b/pilot/utils/llm_connection.py @@ -100,7 +100,6 @@ def create_gpt_chat_completion(messages: List[dict], req_type, min_tokens=MIN_TO gpt_data = { 'model': os.getenv('OPENAI_MODEL', 'gpt-4'), 'n': 1, - 'max_tokens': min(MAX_GPT_MODEL_TOKENS - tokens_in_messages, 2048), 'temperature': 1, 'top_p': 1, 'presence_penalty': 0,