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(
125
125
prompt_tokens = answer .prompt_tokens ,
126
126
completion_tokens = answer .completion_tokens ,
127
127
)
128
+ else :
129
+ logger .info ("Unknown function call detected" )
130
+ text = result .choices [0 ].message .content
131
+ answer = Answer (question = user_message , answer = text )
128
132
else :
129
133
logger .info ("No function call detected" )
130
134
text = result .choices [0 ].message .content
131
135
answer = Answer (question = user_message , answer = text )
132
136
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
+
133
140
# Call Content Safety tool
134
141
if self .config .prompts .enable_content_safety :
135
142
if response := self .call_content_safety_output (user_message , answer .answer ):
You can’t perform that action at this time.
0 commit comments