forked from phoenix/litellm-mirror
update proxy cli
This commit is contained in:
parent
c5bed0c9fd
commit
09b8c08cad
7 changed files with 92 additions and 35 deletions
|
@ -2876,9 +2876,10 @@ class CustomStreamWrapper:
|
|||
text = ""
|
||||
is_finished = False
|
||||
finish_reason = ""
|
||||
print_verbose(f"chunk: {chunk}")
|
||||
if chunk.startswith("data:"):
|
||||
data_json = json.loads(chunk[5:])
|
||||
print(f"data json: {data_json}")
|
||||
print_verbose(f"data json: {data_json}")
|
||||
if "token" in data_json and "text" in data_json["token"]:
|
||||
text = data_json["token"]["text"]
|
||||
if "meta-llama/Llama-2" in self.model: #clean eos tokens like </s> from the returned output text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue