WEB API independent

This commit is contained in:
tuyang.yhj 2023-07-04 13:45:06 +08:00
parent c23a32b906
commit 72de9b2fa8

View File

@ -339,7 +339,7 @@ def http_bot(
state.messages[-1][-1] = f"ERROR: Can't support scene!{scene}"
yield (state, state.to_gradio_chatbot()) + (enable_btn,) * 5
chat: BaseChat = CHAT_FACTORY.get_implementation(scene.value, **chat_param)
chat: BaseChat = CHAT_FACTORY.get_implementation(scene.value(), **chat_param)
if not chat.prompt_template.stream_out:
logger.info("not stream out, wait model response!")
state.messages[-1][-1] = chat.nostream_call()