Skip to content

Commit edc834d

Browse files
committed
feat: add state parameter to LLMRails stream method
1 parent 6374198 commit edc834d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nemoguardrails/rails/llm/llmrails.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,7 @@ def stream_async(
939939
prompt: Optional[str] = None,
940940
messages: Optional[List[dict]] = None,
941941
options: Optional[Union[dict, GenerationOptions]] = None,
942+
state: Optional[Union[dict, State]] = None,
942943
) -> AsyncIterator[str]:
943944
"""Simplified interface for getting directly the streamed tokens from the LLM."""
944945
streaming_handler = StreamingHandler()
@@ -951,6 +952,7 @@ def stream_async(
951952
messages=messages,
952953
streaming_handler=streaming_handler,
953954
options=options,
955+
state=state,
954956
)
955957
)
956958
# TODO:

0 commit comments

Comments
 (0)