Fix stream respone error for naive query mode
This commit is contained in:
parent
99522a088d
commit
1a7b225e90
1 changed files with 2 additions and 1 deletions
|
|
@ -2011,9 +2011,10 @@ async def naive_query(
|
|||
response = await use_model_func(
|
||||
query,
|
||||
system_prompt=sys_prompt,
|
||||
stream=query_param.stream,
|
||||
)
|
||||
|
||||
if len(response) > len(sys_prompt):
|
||||
if isinstance(response, str) and len(response) > len(sys_prompt):
|
||||
response = (
|
||||
response[len(sys_prompt) :]
|
||||
.replace(sys_prompt, "")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue