fix: openllm completion start with prompt, remove it (#1303)

This commit is contained in:
takatost 2023-10-10 17:44:19 +08:00 committed by GitHub
parent 9e7efa45d4
commit 875dfbbf0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)