You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lambda/chat_with_document_resolver/index.py
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -52,8 +52,11 @@ def handler(event, context):
52
52
full_prompt="You are an assistant that's responsible for getting details from document text attached here based on questions from the user.\n\n"
53
53
full_prompt+="If you don't know the answer, just say that you don't know. Don't try to make up an answer.\n\n"
54
54
full_prompt+="Additionally, use the user and assistant responses in the following JSON object to see what's been asked and what the resposes were in the past.\n\n"
55
-
full_prompt+="The JSON object is: "+json.dumps(history) +".\n\n"
56
-
full_prompt+="The user's question is: "+prompt
55
+
# full_prompt += "Your response MUST be in the following JSON format: {'content': [{'text': 'String'}]}.\n\n"
56
+
# full_prompt += "You MUST NOT include outside of that JSON format.\n\n"
57
+
# full_prompt += "Do NOT include the role or anything else in the response."
58
+
full_prompt+="The history JSON object is: "+json.dumps(history) +".\n\n"
59
+
full_prompt+="The user's question is: "+prompt+"\n\n"
57
60
58
61
# this feature is not enabled until the model can be selected on the chat screen
59
62
# selectedModelId = event['arguments']['modelId']
@@ -67,13 +70,14 @@ def handler(event, context):
67
70
68
71
# Call Bedrock Runtime to get Python code based on the prompt
0 commit comments