mirascope.core.base.structured_stream | Mirascope
MirascopeLilypad

mirascope.core.base.structured_stream

Module structured_stream

This module defines the base class for structured streams.

Class BaseStructuredStream

A base class for streaming structured outputs from LLMs.

Bases:

Generic[_ResponseModelT]

Attributes

NameTypeDescription
streamBaseStream-
response_modeltype[_ResponseModelT]-
constructed_response_model_ResponseModelT-
fields_from_call_argsfields_from_call_args-

Function structured_stream_factory

Parameters

NameTypeDescription
TCallResponsetype[_BaseCallResponseT]-
TCallResponseChunktype[_BaseCallResponseChunkT]-
TStreamtype[BaseStream]-
TToolTypetype[_BaseToolT]-
setup_callSameSyncAndAsyncClientSetupCall[_SameSyncAndAsyncClientT, _BaseDynamicConfigT, _AsyncBaseDynamicConfigT, _BaseCallParamsT, _ResponseT, _ResponseChunkT, _AsyncResponseT, _AsyncResponseChunkT, _BaseToolT] | SetupCall[_SyncBaseClientT, _AsyncBaseClientT, _BaseDynamicConfigT, _AsyncBaseDynamicConfigT, _BaseCallParamsT, _ResponseT, _ResponseChunkT, _AsyncResponseT, _AsyncResponseChunkT, _BaseToolT]-
get_json_outputGetJsonOutput[_BaseCallResponseChunkT]-