mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-19 23:19:15 +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()
|
json_response = response.json()
|
||||||
completion = json_response["responses"][0]
|
completion = json_response["responses"][0]
|
||||||
|
completion = completion.lstrip(prompt)
|
||||||
|
|
||||||
if stop is not None:
|
if stop is not None:
|
||||||
completion = enforce_stop_tokens(completion, stop)
|
completion = enforce_stop_tokens(completion, stop)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user