core: basemessage.text() (#29078)

This commit is contained in:
Erick Friis
2025-02-18 17:45:44 -08:00
committed by GitHub
parent e2ba336e72
commit 6c1e21d128
10 changed files with 87 additions and 8 deletions

View File

@@ -228,7 +228,7 @@ class ChatOllama(BaseChatModel):
("human", "Return the words Hello World!"),
]
for chunk in llm.stream(messages):
print(chunk)
print(chunk.text(), end="")
.. code-block:: python