From a63aedb2b105c0772fab6aba2529ac88f9a22637 Mon Sep 17 00:00:00 2001 From: Nicholas Albion Date: Wed, 4 Oct 2023 14:53:22 +1100 Subject: [PATCH] fix for #130 --- pilot/utils/llm_connection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pilot/utils/llm_connection.py b/pilot/utils/llm_connection.py index c563cec..4fa77cc 100644 --- a/pilot/utils/llm_connection.py +++ b/pilot/utils/llm_connection.py @@ -108,6 +108,7 @@ def create_gpt_chat_completion(messages: List[dict], req_type, project, logger.error(f'The request to {os.getenv("ENDPOINT")} API failed: %s', e) print(f'The request to {os.getenv("ENDPOINT")} API failed. Here is the error message:') print(e) + return {} # https://github.com/Pythagora-io/gpt-pilot/issues/130 - may need to revisit how we handle this def delete_last_n_lines(n):