mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-11-30 10:18:13 +08:00
fix: openllm completion start with prompt, remove it (#1303)
This commit is contained in:
parent
9e7efa45d4
commit
875dfbbf0e
@ -66,6 +66,7 @@ class OpenLLM(LLM):
|
||||
|
||||
json_response = response.json()
|
||||
completion = json_response["responses"][0]
|
||||
completion = completion.lstrip(prompt)
|
||||
|
||||
if stop is not None:
|
||||
completion = enforce_stop_tokens(completion, stop)
|
||||
|
Loading…
Reference in New Issue
Block a user