Skip to content

Commit

Permalink
Fix indentation and add user message to message history
Browse files Browse the repository at this point in the history
  • Loading branch information
FloRul committed Mar 20, 2024
1 parent d7fdfab commit c2f90f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lambdas/inference/src/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ def invoke_model(
if source == "call":
maxtokens //= 2


messages = message_history.append({"role": "user", "content": user_message})

body = json.dumps(
{
"anthropic_version": "bedrock-2023-05-31",
Expand Down Expand Up @@ -111,7 +112,7 @@ def lambda_handler(event, context):
embedding_collection_name = event["queryStringParameters"]["collectionName"]

sessionId = str(uuid.uuid1())

if "sessionId" in event["queryStringParameters"]:
sessionId = event["queryStringParameters"]["sessionId"]

Expand Down

0 comments on commit c2f90f6

Please sign in to comment.