From d7fdfab5ea2c1abd780bbd32b0bc3a2e2ddcb919 Mon Sep 17 00:00:00 2001 From: FloRul Date: Wed, 20 Mar 2024 16:40:42 -0400 Subject: [PATCH] Update prepare_system_prompt function call --- lambdas/inference/src/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lambdas/inference/src/index.py b/lambdas/inference/src/index.py index 05fb8e5..40fb5f4 100644 --- a/lambdas/inference/src/index.py +++ b/lambdas/inference/src/index.py @@ -133,7 +133,7 @@ def lambda_handler(event, context): chat_history = json.loads(history.get(limit=5)) # prepare the prompt - system_prompt = prepare_system_prompt(query, docs, source) + system_prompt = prepare_system_prompt(docs, source) user_message = query response = invoke_model( system_prompt=system_prompt, @@ -172,7 +172,7 @@ def lambda_handler(event, context): print(e) return { "statusCode": 500, - "body": json.dumps(e), + "body": json.dumps(str(e)), "headers": HEADERS, }