You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
current_object=0accumlated_chunks=""forchunkinstream:
accumulated_chunks+=chunkobjects=from_json(accumulated_chunks)
# Current object is complete when next object is being generatediflen(objects) >current_object+1:
yieldobjects[-1]
current_object+=1yieldobjects[-1]
Performance is probably not a concern as the LLM generation will most likely be the bottleneck.
The text was updated successfully, but these errors were encountered:
Use
from_json
from pydantic to replace the existing streamed JSON parsing:magentic/src/magentic/streaming.py
Lines 125 to 209 in ee082fc
https://docs.pydantic.dev/latest/concepts/json/#partial-json-parsing
Something like
Performance is probably not a concern as the LLM generation will most likely be the bottleneck.
The text was updated successfully, but these errors were encountered: