File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
core_backend/app/question_answer Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,10 @@ async def search(
143
143
asession = asession ,
144
144
)
145
145
146
- if isinstance (response , QueryResponse ) :
146
+ if type (response ) is QueryResponse :
147
147
return response
148
148
149
- if isinstance (response , QueryResponseError ) :
149
+ if type (response ) is QueryResponseError :
150
150
return JSONResponse (
151
151
status_code = status .HTTP_400_BAD_REQUEST , content = response .model_dump ()
152
152
)
@@ -259,10 +259,10 @@ async def voice_search(
259
259
os .remove (file_path )
260
260
file_stream .close ()
261
261
262
- if isinstance (response , QueryAudioResponse ) :
262
+ if type (response ) is QueryAudioResponse :
263
263
return response
264
264
265
- if isinstance (response , QueryResponseError ) :
265
+ if type (response ) is QueryResponseError :
266
266
return JSONResponse (
267
267
status_code = status .HTTP_400_BAD_REQUEST , content = response .model_dump ()
268
268
)
You can’t perform that action at this time.
0 commit comments