Skip to content

Class: StreamListener

Per-field listener that turns provider chunks into StreamResponse events (dspy.streaming.StreamListener).

URI: dspy:StreamListener

 classDiagram
    class StreamListener
    click StreamListener href "../StreamListener/"
      NamedThing <|-- StreamListener
        click NamedThing href "../NamedThing/"

      StreamListener : description

      StreamListener : id

      StreamListener : name

      StreamListener : predict_name

      StreamListener : signature_field_name

Inheritance

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
id 1
Identifier
Stable opaque identifier for an instance NamedThing
name 0..1
String
Short human-readable name NamedThing
description 0..1
String
Free-form description NamedThing

In Subsets

Identifier and Mapping Information

Annotations

property value
dspy_source_paths ['dspy/streaming/streaming_listener.py']
dspy_source_urls ['https://github.com/stanfordnlp/dspy/blob/main/dspy/streaming/streaming_listener.py']

Schema Source

Mappings

Mapping Type Mapped Value
self dspy:StreamListener
native dspy:StreamListener
close mellea:PluginSpec

LinkML Source

Direct

name: StreamListener
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/streaming/streaming_listener.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/streaming/streaming_listener.py
description: Per-field listener that turns provider chunks into ``StreamResponse``
  events (``dspy.streaming.StreamListener``).
in_subset:
- streaming
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mellea:PluginSpec
is_a: NamedThing
slots:
- predict_name
- signature_field_name

Induced

name: StreamListener
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/streaming/streaming_listener.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/streaming/streaming_listener.py
description: Per-field listener that turns provider chunks into ``StreamResponse``
  events (``dspy.streaming.StreamListener``).
in_subset:
- streaming
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mellea:PluginSpec
is_a: NamedThing
attributes:
  predict_name:
    name: predict_name
    description: Name of the originating predictor.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: StreamListener
    domain_of:
    - StreamResponse
    - StreamListener
    range: string
  signature_field_name:
    name: signature_field_name
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: StreamListener
    domain_of:
    - StreamResponse
    - StreamListener
    range: string
  id:
    name: id
    description: Stable opaque identifier for an instance.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: schema:identifier
    identifier: true
    owner: StreamListener
    domain_of:
    - NamedThing
    range: Identifier
    required: true
  name:
    name: name
    description: Short human-readable name.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: rdfs:label
    owner: StreamListener
    domain_of:
    - NamedThing
    - LMToolCallPart
    - LMMessage
    - LMToolSpec
    range: string
  description:
    name: description
    description: Free-form description.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: dct:description
    owner: StreamListener
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string