From aed746c2bc3a3cf1b824fad9e5b25ec2e6c48115 Mon Sep 17 00:00:00 2001 From: codebane Date: Sat, 21 Oct 2023 19:20:43 +0300 Subject: [PATCH] fixing backward compat issue --- llm-server/routes/root_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llm-server/routes/root_service.py b/llm-server/routes/root_service.py index 38c0d1e66..87e64ad2e 100644 --- a/llm-server/routes/root_service.py +++ b/llm-server/routes/root_service.py @@ -52,7 +52,7 @@ def handle_request(data: Dict[str, Any]) -> Any: base_prompt = data.get("base_prompt", "") headers = data.get("headers", {}) server_base_url = cast(str, data.get("server_base_url", "")) - app = headers["X-App-Name"] or None + app = headers.get("X-App-Name") or None logging.info("[OpenCopilot] Got the following user request: {}".format(text)) for required_field, error_msg in [ @@ -81,7 +81,7 @@ def handle_request(data: Dict[str, Any]) -> Any: "of them" ) current_state = process_state(app, headers) - + logging.info(f"Received app configuration: {app}") bot_response = hasSingleIntent(swagger_doc, text, session_id, current_state) if len(bot_response.ids) >= 1: