File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11import json
2+
3+
24try :
35 from .src .module import chat_module
6+ from .src .agents .utils .types import JsonType
47except ImportError :
58 from src .module import chat_module
9+ from src .agents .utils .types import JsonType
610
7- def handler (event , context ):
11+ def handler (event : JsonType , context ):
812 """
913 Lambda handler function
1014 """
@@ -45,7 +49,7 @@ def handler(event, context):
4549 # Create a response
4650 response = {
4751 "statusCode" : 200 ,
48- "body" : chatbot_response
52+ "body" : json . dumps ( chatbot_response )
4953 }
5054
5155 # Log the response for debugging purposes
Original file line number Diff line number Diff line change 66try :
77 from .agents .utils .parse_json_context_to_prompt import parse_json_to_prompt
88 from .agents .base_agent .base_agent import invoke_base_agent
9+ from .agents .utils .types import JsonType
910except ImportError :
1011 from src .agents .utils .parse_json_context_to_prompt import parse_json_to_prompt
1112 from src .agents .base_agent .base_agent import invoke_base_agent
13+ from src .agents .utils .types import JsonType
1214
13- def chat_module (message : Any , params : Params ) -> Result :
15+ def chat_module (message : Any , params : Params ) -> JsonType :
1416 """
1517 Function used by student to converse with a chatbot.
1618 ---
You can’t perform that action at this time.
0 commit comments