fix: query empty not allow (#255)

This commit is contained in:
John Wang 2023-05-30 12:24:51 +08:00 committed by GitHub
parent 5ca88a4fd9
commit ccd80653ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,10 @@ class CompletionService:
# is streaming mode # is streaming mode
inputs = args['inputs'] inputs = args['inputs']
query = args['query'] query = args['query']
if not query:
raise ValueError('query is required')
conversation_id = args['conversation_id'] if 'conversation_id' in args else None conversation_id = args['conversation_id'] if 'conversation_id' in args else None
conversation = None conversation = None