Skip to content

Class: TwoStepAdapter

Two-step plan + finalize adapter (dspy.TwoStepAdapter).

URI: dspy:TwoStepAdapter

 classDiagram
    class TwoStepAdapter
    click TwoStepAdapter href "../TwoStepAdapter/"
      Adapter <|-- TwoStepAdapter
        click Adapter href "../Adapter/"

      TwoStepAdapter : adapter_kind

      TwoStepAdapter : callbacks

      TwoStepAdapter : description

      TwoStepAdapter : extraction_model





        TwoStepAdapter --> "0..1" BaseLM : extraction_model
        click BaseLM href "../BaseLM/"



      TwoStepAdapter : id

      TwoStepAdapter : name

      TwoStepAdapter : native_response_types

      TwoStepAdapter : parallel_tool_calls

      TwoStepAdapter : use_native_function_calling

Inheritance

Slots

Name Cardinality and Range Description Inheritance
extraction_model 0..1
BaseLM
direct
adapter_kind 1
String
Concrete adapter implementation (matches an AdapterKind value) Adapter
callbacks *
String
Dotted import paths of callbacks registered on the module Adapter
use_native_function_calling 0..1
Boolean
Adapter
parallel_tool_calls 0..1
Boolean
Adapter
native_response_types *
String
Output field types handled by native LM features rather than adapter parsing Adapter
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

Schema Source

Mappings

Mapping Type Mapped Value
self dspy:TwoStepAdapter
native dspy:TwoStepAdapter

LinkML Source

Direct

name: TwoStepAdapter
description: Two-step plan + finalize adapter (``dspy.TwoStepAdapter``).
in_subset:
- adapters
from_schema: https://w3id.org/lmodel/dspy
is_a: Adapter
slot_usage:
  adapter_kind:
    name: adapter_kind
    ifabsent: string(two_step)
    equals_string: two_step
attributes:
  extraction_model:
    name: extraction_model
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    domain_of:
    - TwoStepAdapter
    range: BaseLM
    inlined: true

Induced

name: TwoStepAdapter
description: Two-step plan + finalize adapter (``dspy.TwoStepAdapter``).
in_subset:
- adapters
from_schema: https://w3id.org/lmodel/dspy
is_a: Adapter
slot_usage:
  adapter_kind:
    name: adapter_kind
    ifabsent: string(two_step)
    equals_string: two_step
attributes:
  extraction_model:
    name: extraction_model
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: TwoStepAdapter
    domain_of:
    - TwoStepAdapter
    range: BaseLM
    inlined: true
  adapter_kind:
    name: adapter_kind
    description: Concrete adapter implementation (matches an ``AdapterKind`` value).
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: string(two_step)
    owner: TwoStepAdapter
    domain_of:
    - Adapter
    range: string
    required: true
    equals_string: two_step
  callbacks:
    name: callbacks
    description: Dotted import paths of callbacks registered on the module.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: TwoStepAdapter
    domain_of:
    - BaseLM
    - Adapter
    - Module
    - Settings
    range: string
    multivalued: true
  use_native_function_calling:
    name: use_native_function_calling
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: boolean(False)
    owner: TwoStepAdapter
    domain_of:
    - Adapter
    range: boolean
  parallel_tool_calls:
    name: parallel_tool_calls
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: TwoStepAdapter
    domain_of:
    - Adapter
    range: boolean
  native_response_types:
    name: native_response_types
    description: Output field types handled by native LM features rather than adapter
      parsing.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: TwoStepAdapter
    domain_of:
    - Adapter
    range: string
    multivalued: true
  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: TwoStepAdapter
    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: TwoStepAdapter
    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: TwoStepAdapter
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string