Skip to content

Commit 4167c5c

Browse files
authored
docstrings - fix formatting (strands-agents#456)
1 parent 4001eb6 commit 4167c5c

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

src/strands/agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,10 @@ async def stream_async(self, prompt: Union[str, list[ContentBlock]], **kwargs: A
479479
prompt: User input as text or list of ContentBlock objects for multi-modal content.
480480
**kwargs: Additional parameters to pass to the event loop.
481481
482-
Returns:
482+
Yields:
483483
An async iterator that yields events. Each event is a dictionary containing
484484
information about the current state of processing, such as:
485+
485486
- data: Text content being generated
486487
- complete: Whether this is the final chunk
487488
- current_tool_use: Information about tools being executed

src/strands/event_loop/streaming.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ async def process_stream(chunks: AsyncIterable[StreamEvent]) -> AsyncGenerator[d
253253
Args:
254254
chunks: The chunks of the response stream from the model.
255255
256-
Returns:
256+
Yields:
257257
The reason for stopping, the constructed message, and the usage metrics.
258258
"""
259259
stop_reason: StopReason = "end_turn"
@@ -306,7 +306,7 @@ async def stream_messages(
306306
messages: List of messages to send.
307307
tool_specs: The list of tool specs.
308308
309-
Returns:
309+
Yields:
310310
The reason for stopping, the final message, and the usage metrics
311311
"""
312312
logger.debug("model=<%s> | streaming messages", model)

src/strands/models/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def stream(
7474
"""Stream conversation with the model.
7575
7676
This method handles the full lifecycle of conversing with the model:
77+
7778
1. Format the messages, tool specs, and configuration into a streaming request
7879
2. Send the request to the model
7980
3. Yield the formatted message chunks

src/strands/tools/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ async def stream(self, tool_use: ToolUse, invocation_state: dict[str, Any], **kw
207207
**kwargs: Additional keyword arguments for future extensibility.
208208
209209
Yields:
210-
Tool events with the last being the tool result.
210+
Tool events with the last being the tool result.
211211
"""
212212
if inspect.iscoroutinefunction(self._tool_func):
213213
result = await self._tool_func(tool_use, **invocation_state)

src/strands/types/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def stream(self, tool_use: ToolUse, invocation_state: dict[str, Any], **kwargs:
224224
invocation_state: Context for the tool invocation, including agent state.
225225
**kwargs: Additional keyword arguments for future extensibility.
226226
227-
Yield:
227+
Yields:
228228
Tool events with the last being the tool result.
229229
"""
230230
...

0 commit comments

Comments
 (0)