mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
fix: openllm generate cutoff (#945)
This commit is contained in:
parent
e8039a7da8
commit
866ee5da91
|
@ -67,9 +67,6 @@ class OpenLLM(LLM):
|
||||||
json_response = response.json()
|
json_response = response.json()
|
||||||
completion = json_response["responses"][0]
|
completion = json_response["responses"][0]
|
||||||
|
|
||||||
if completion:
|
|
||||||
completion = completion[len(prompt):]
|
|
||||||
|
|
||||||
if stop is not None:
|
if stop is not None:
|
||||||
completion = enforce_stop_tokens(completion, stop)
|
completion = enforce_stop_tokens(completion, stop)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user