Skip to content

Class: SignatureField

A single typed field belonging to a dspy.Signature.

URI: dspy:SignatureField

 classDiagram
    class SignatureField
    click SignatureField href "../SignatureField/"
      SignatureField : constraints

      SignatureField : default





        SignatureField --> "0..1" Any : default
        click Any href "../Any/"



      SignatureField : desc

      SignatureField : field_kind





        SignatureField --> "1" FieldKind : field_kind
        click FieldKind href "../FieldKind/"



      SignatureField : field_name

      SignatureField : python_type

Slots

Name Cardinality and Range Description Inheritance
field_kind 1
FieldKind
Whether this Signature field is an input or output direct
python_type 0..1
String
Python type annotation as a string (e direct
desc 0..1
String
Field description as passed to ``InputField(desc= direct
default 0..1
Any
Default value expressed as JSON direct
constraints *
String
Pydantic constraints translated to human-readable text direct
field_name 1
String
Field name direct

Usages

used by used in type used
Signature input_fields range SignatureField
Signature output_fields range SignatureField

In Subsets

Identifier and Mapping Information

Annotations

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

Schema Source

Mappings

Mapping Type Mapped Value
self dspy:SignatureField
native dspy:SignatureField
close mellea:ApiFieldSpec

LinkML Source

Direct

name: SignatureField
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/signatures/field.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/signatures/field.py
description: A single typed field belonging to a ``dspy.Signature``.
in_subset:
- core
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mellea:ApiFieldSpec
slots:
- field_kind
- python_type
- desc
- default
- constraints
attributes:
  field_name:
    name: field_name
    description: Field name.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    identifier: true
    domain_of:
    - SignatureField
    range: string
    required: true

Induced

name: SignatureField
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/signatures/field.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/signatures/field.py
description: A single typed field belonging to a ``dspy.Signature``.
in_subset:
- core
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mellea:ApiFieldSpec
attributes:
  field_name:
    name: field_name
    description: Field name.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    identifier: true
    owner: SignatureField
    domain_of:
    - SignatureField
    range: string
    required: true
  field_kind:
    name: field_kind
    description: Whether this Signature field is an input or output.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: SignatureField
    domain_of:
    - SignatureField
    range: FieldKind
    required: true
  python_type:
    name: python_type
    description: Python type annotation as a string (e.g. ``str``, ``list[int]``,
      ``dspy.Image``).
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: SignatureField
    domain_of:
    - SignatureField
    range: string
  desc:
    name: desc
    description: Field description as passed to ``InputField(desc=...)`` / ``OutputField(desc=...)``.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: SignatureField
    domain_of:
    - SignatureField
    - Tool
    range: string
  default:
    name: default
    description: Default value expressed as JSON.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: SignatureField
    domain_of:
    - SignatureField
    range: Any
  constraints:
    name: constraints
    description: Pydantic constraints translated to human-readable text.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: SignatureField
    domain_of:
    - SignatureField
    range: string
    multivalued: true