yangdx
commited on
Commit
·
301e403
1
Parent(s):
7e30fcd
Fix linting
Browse files
lightrag/api/ollama_api.py
CHANGED
@@ -208,7 +208,6 @@ class OllamaAPI:
|
|
208 |
total_response = ""
|
209 |
|
210 |
try:
|
211 |
-
|
212 |
# Ensure response is an async generator
|
213 |
if isinstance(response, str):
|
214 |
# If it's a string, send in two parts
|
@@ -282,7 +281,7 @@ class OllamaAPI:
|
|
282 |
"done": True,
|
283 |
}
|
284 |
yield f"{json.dumps(final_data, ensure_ascii=False)}\n"
|
285 |
-
return
|
286 |
|
287 |
completion_tokens = estimate_tokens(total_response)
|
288 |
total_time = last_chunk_time - start_time
|
|
|
208 |
total_response = ""
|
209 |
|
210 |
try:
|
|
|
211 |
# Ensure response is an async generator
|
212 |
if isinstance(response, str):
|
213 |
# If it's a string, send in two parts
|
|
|
281 |
"done": True,
|
282 |
}
|
283 |
yield f"{json.dumps(final_data, ensure_ascii=False)}\n"
|
284 |
+
return
|
285 |
|
286 |
completion_tokens = estimate_tokens(total_response)
|
287 |
total_time = last_chunk_time - start_time
|