File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
code/backend/batch/utilities/orchestrator Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,18 @@ async def orchestrate(
125125 prompt_tokens = answer .prompt_tokens ,
126126 completion_tokens = answer .completion_tokens ,
127127 )
128+ else :
129+ logger .info ("Unknown function call detected" )
130+ text = result .choices [0 ].message .content
131+ answer = Answer (question = user_message , answer = text )
128132 else :
129133 logger .info ("No function call detected" )
130134 text = result .choices [0 ].message .content
131135 answer = Answer (question = user_message , answer = text )
132136
137+ if answer .answer is None :
138+ answer .answer = "The requested information is not available in the retrieved data. Please try another query or topic."
139+
133140 # Call Content Safety tool
134141 if self .config .prompts .enable_content_safety :
135142 if response := self .call_content_safety_output (user_message , answer .answer ):
You can’t perform that action at this time.
0 commit comments