Fix linting
This commit is contained in:
parent
1508dcb403
commit
4bdb8e30de
1 changed files with 1 additions and 2 deletions
|
|
@ -208,7 +208,6 @@ class OllamaAPI:
|
||||||
total_response = ""
|
total_response = ""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
# Ensure response is an async generator
|
# Ensure response is an async generator
|
||||||
if isinstance(response, str):
|
if isinstance(response, str):
|
||||||
# If it's a string, send in two parts
|
# If it's a string, send in two parts
|
||||||
|
|
@ -282,7 +281,7 @@ class OllamaAPI:
|
||||||
"done": True,
|
"done": True,
|
||||||
}
|
}
|
||||||
yield f"{json.dumps(final_data, ensure_ascii=False)}\n"
|
yield f"{json.dumps(final_data, ensure_ascii=False)}\n"
|
||||||
return
|
return
|
||||||
|
|
||||||
completion_tokens = estimate_tokens(total_response)
|
completion_tokens = estimate_tokens(total_response)
|
||||||
total_time = last_chunk_time - start_time
|
total_time = last_chunk_time - start_time
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue