Skip to content

Class: Code

Code content typed by programming language (dspy.Code).

URI: dspy:Code

 classDiagram
    class Code
    click Code href "../Code/"
      Type <|-- Code
        click Type href "../Type/"

      Code : code

      Code : description

      Code : id

      Code : language

      Code : name

Inheritance

Slots

Name Cardinality and Range Description Inheritance
code 0..1
String
Source code payload direct
language 0..1
String
Language tag (programming language or BCP-47) 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/adapters/types/code.py']
dspy_source_urls ['https://github.com/stanfordnlp/dspy/blob/main/dspy/adapters/types/code.py']

Schema Source

Mappings

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

LinkML Source

Direct

name: Code
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/adapters/types/code.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/adapters/types/code.py
description: Code content typed by programming language (``dspy.Code``).
in_subset:
- custom_types
from_schema: https://w3id.org/lmodel/dspy
is_a: Type
slots:
- code
- language

Induced

name: Code
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/adapters/types/code.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/adapters/types/code.py
description: Code content typed by programming language (``dspy.Code``).
in_subset:
- custom_types
from_schema: https://w3id.org/lmodel/dspy
is_a: Type
attributes:
  code:
    name: code
    description: Source code payload.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: Code
    domain_of:
    - Code
    range: string
  language:
    name: language
    description: Language tag (programming language or BCP-47).
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: Code
    domain_of:
    - Code
    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: Code
    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: Code
    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: Code
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string