Add streaming support to Gemini provider and update example script

This commit is contained in:
2024-11-02 16:54:49 -04:00
parent a68bd74fd8
commit c21f68aad6
+1 -1
View File
@@ -1,7 +1,7 @@
from _context import sm
# Defaults to the default provider (openai)
r = sm.generate_text("Write a poem about the moon", llm_provider="gemini", stream=True)
r = sm.generate_text("Write a poem about the moon", stream=True)
for chunk in r:
print(chunk, end="", flush=True)