update log_llm_stream in log_llm_stream.py/ollama_api.py

This commit is contained in:
shenchucheng 2023-12-25 17:22:30 +08:00
parent ddc0d3faa4
commit b113aa246f
2 changed files with 2 additions and 2 deletions

View file

@ -119,7 +119,7 @@ class GeminiGPTAPI(BaseGPTAPI):
collected_content = []
async for chunk in resp:
content = chunk.text
log_llm_stream(content, end="")
log_llm_stream(content)
collected_content.append(content)
full_content = "".join(collected_content)

View file

@ -127,7 +127,7 @@ class OllamaGPTAPI(BaseGPTAPI):
if not chunk.get("done", False):
content = self.get_choice_text(chunk)
collected_content.append(content)
log_llm_stream(content, end="")
log_llm_stream(content)
else:
# stream finished
usage = self.get_usage(chunk)