Class: StreamResponse
Streaming text chunk for a specific predictor field (dspy.streaming.StreamResponse).
URI: dspy:StreamResponse
classDiagram
class StreamResponse
click StreamResponse href "../StreamResponse/"
StreamEvent <|-- StreamResponse
click StreamEvent href "../StreamEvent/"
StreamResponse : chunk
StreamResponse : is_last_chunk
StreamResponse : predict_name
StreamResponse : signature_field_name
StreamResponse : stream_event_kind
Inheritance
- StreamEvent
- StreamResponse
Slots
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| predict_name | 0..1 String |
Name of the originating predictor | direct |
| signature_field_name | 0..1 String |
direct | |
| chunk | 0..1 String |
Partial output text emitted by streaming | direct |
| is_last_chunk | 0..1 Boolean |
direct | |
| stream_event_kind | 1 String |
Kind of stream event (matches a StreamEventKind value) |
StreamEvent |
In Subsets
Identifier and Mapping Information
Annotations
| property | value |
|---|---|
| dspy_source_paths | ['dspy/streaming/messages.py'] |
| dspy_source_urls | ['https://github.com/stanfordnlp/dspy/blob/main/dspy/streaming/messages.py'] |
Schema Source
- from schema: https://w3id.org/lmodel/dspy
Mappings
| Mapping Type | Mapped Value |
|---|---|
| self | dspy:StreamResponse |
| native | dspy:StreamResponse |
| related | mcp:ProgressNotification |
LinkML Source
Direct
name: StreamResponse
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/streaming/messages.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/streaming/messages.py
description: Streaming text chunk for a specific predictor field (``dspy.streaming.StreamResponse``).
in_subset:
- streaming
from_schema: https://w3id.org/lmodel/dspy
related_mappings:
- mcp:ProgressNotification
is_a: StreamEvent
slots:
- predict_name
- signature_field_name
- chunk
- is_last_chunk
slot_usage:
stream_event_kind:
name: stream_event_kind
ifabsent: string(stream_response)
equals_string: stream_response
Induced
name: StreamResponse
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/streaming/messages.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/streaming/messages.py
description: Streaming text chunk for a specific predictor field (``dspy.streaming.StreamResponse``).
in_subset:
- streaming
from_schema: https://w3id.org/lmodel/dspy
related_mappings:
- mcp:ProgressNotification
is_a: StreamEvent
slot_usage:
stream_event_kind:
name: stream_event_kind
ifabsent: string(stream_response)
equals_string: stream_response
attributes:
predict_name:
name: predict_name
description: Name of the originating predictor.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: StreamResponse
domain_of:
- StreamResponse
- StreamListener
range: string
signature_field_name:
name: signature_field_name
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: StreamResponse
domain_of:
- StreamResponse
- StreamListener
range: string
chunk:
name: chunk
description: Partial output text emitted by streaming.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: StreamResponse
domain_of:
- StreamResponse
range: string
is_last_chunk:
name: is_last_chunk
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
ifabsent: boolean(False)
owner: StreamResponse
domain_of:
- StreamResponse
range: boolean
stream_event_kind:
name: stream_event_kind
description: Kind of stream event (matches a ``StreamEventKind`` value).
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
ifabsent: string(stream_response)
owner: StreamResponse
domain_of:
- StreamEvent
range: string
required: true
equals_string: stream_response