mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-01 13:18:10 +00:00
Unify flow streaming frame items
This commit is contained in:
@@ -21,11 +21,12 @@ messages = [
|
||||
}
|
||||
]
|
||||
|
||||
chunks = llm.stream_call(messages=messages)
|
||||
stream = llm.stream_events(messages=messages)
|
||||
|
||||
print("--- chunks ---")
|
||||
for chunk in chunks:
|
||||
print(chunk.content, end="", flush=True)
|
||||
with stream:
|
||||
for chunk in stream:
|
||||
print(chunk.content, end="", flush=True)
|
||||
|
||||
# print("\n\n--- result ---")
|
||||
# print(chunks.result)
|
||||
print("\n\n--- result ---")
|
||||
print(stream.result)
|
||||
|
||||
Reference in New Issue
Block a user