@@ -193,7 +193,6 @@ def _format_request(
193193 tool_specs : Optional [list [ToolSpec ]] = None ,
194194 system_prompt_content : Optional [list [SystemContentBlock ]] = None ,
195195 tool_choice : ToolChoice | None = None ,
196- ** kwargs : Any ,
197196 ) -> dict [str , Any ]:
198197 """Format a Bedrock converse stream request.
199198
@@ -203,7 +202,6 @@ def _format_request(
203202 system_prompt: System prompt to provide context to the model.
204203 tool_choice: Selection strategy for tool invocation.
205204 system_prompt_content: System prompt content blocks to provide context to the model.
206- **kwargs: Additional keyword arguments
207205
208206 Returns:
209207 A Bedrock converse stream request.
@@ -627,9 +625,7 @@ def callback(event: Optional[StreamEvent] = None) -> None:
627625 if system_prompt and system_prompt_content is None :
628626 system_prompt_content = [{"text" : system_prompt }]
629627
630- thread = asyncio .to_thread (
631- self ._stream , callback , messages , tool_specs , system_prompt_content , tool_choice , ** kwargs
632- )
628+ thread = asyncio .to_thread (self ._stream , callback , messages , tool_specs , system_prompt_content , tool_choice )
633629 task = asyncio .create_task (thread )
634630
635631 while True :
@@ -648,7 +644,6 @@ def _stream(
648644 tool_specs : Optional [list [ToolSpec ]] = None ,
649645 system_prompt_content : Optional [list [SystemContentBlock ]] = None ,
650646 tool_choice : ToolChoice | None = None ,
651- ** kwargs : Any ,
652647 ) -> None :
653648 """Stream conversation with the Bedrock model.
654649
@@ -661,15 +656,14 @@ def _stream(
661656 tool_specs: List of tool specifications to make available to the model.
662657 system_prompt_content: System prompt content blocks to provide context to the model.
663658 tool_choice: Selection strategy for tool invocation.
664- **kwargs: Additional keyword arguments
665659
666660 Raises:
667661 ContextWindowOverflowException: If the input exceeds the model's context window.
668662 ModelThrottledException: If the model service is throttling requests.
669663 """
670664 try :
671665 logger .debug ("formatting request" )
672- request = self ._format_request (messages , tool_specs , system_prompt_content , tool_choice , ** kwargs )
666+ request = self ._format_request (messages , tool_specs , system_prompt_content , tool_choice )
673667 logger .debug ("request=<%s>" , request )
674668
675669 logger .debug ("invoking model" )
0 commit comments