File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,16 +166,16 @@ async def run_agent(request: Request) -> Response:
166166 # Capture and log raw body
167167 body = await request .body ()
168168 print (f"Raw request body: { body .decode ('utf-8' )} " )
169-
169+
170170 import json
171171 body_dict = json .loads (body )
172-
172+
173173 query_text = ""
174-
174+
175175 # Handle JSONRPC format (ContextForge sends this for agents with URLs ending in /)
176176 if "jsonrpc" in body_dict :
177177 params = body_dict .get ("params" , {})
178-
178+
179179 # Handle nested message structure from Admin UI test
180180 if "message" in params and isinstance (params ["message" ], dict ):
181181 message_obj = params ["message" ]
@@ -202,7 +202,7 @@ async def run_agent(request: Request) -> Response:
202202 elif "message" in body_dict :
203203 query_text = body_dict ["message" ]
204204 print (f"Extracted from message field: { query_text } " )
205-
205+
206206 if not query_text :
207207 query_text = "Hello"
208208 print ("No query found, using default: Hello" )
You can’t perform that action at this time.
0 commit comments