Class: LMPart
Abstract base for a single content item carried by an LM message or output.
- NOTE: this is an abstract class and should not be instantiated directly
URI: dspy:LMPart
classDiagram
class LMPart
click LMPart href "../LMPart/"
LMPart <|-- LMSourcePart
click LMSourcePart href "../LMSourcePart/"
LMPart <|-- LMTextPart
click LMTextPart href "../LMTextPart/"
LMPart <|-- LMDocumentPart
click LMDocumentPart href "../LMDocumentPart/"
LMPart <|-- LMToolCallPart
click LMToolCallPart href "../LMToolCallPart/"
LMPart <|-- LMToolResultPart
click LMToolResultPart href "../LMToolResultPart/"
LMPart <|-- LMThinkingPart
click LMThinkingPart href "../LMThinkingPart/"
LMPart <|-- LMCitationPart
click LMCitationPart href "../LMCitationPart/"
LMPart <|-- LMRefusalPart
click LMRefusalPart href "../LMRefusalPart/"
LMPart : metadata
LMPart --> "0..1" Any : metadata
click Any href "../Any/"
LMPart : part_type
Inheritance
- LMPart
Slots
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| metadata | 0..1 Any |
Opaque key/value metadata passed alongside an object | direct |
| part_type | 1 String |
Discriminator for the LMPart subclass | direct |
Usages
| used by | used in | type | used |
|---|---|---|---|
| ToolResult | content_parts | range | LMPart |
| LMToolResultPart | content_parts | range | LMPart |
| LMMessage | parts | range | LMPart |
| LMOutput | parts | range | LMPart |
In Subsets
Identifier and Mapping Information
Annotations
| property | value |
|---|---|
| dspy_source_paths | ['dspy/core/types.py'] |
| dspy_source_urls | ['https://github.com/stanfordnlp/dspy/blob/main/dspy/core/types.py'] |
Schema Source
- from schema: https://w3id.org/lmodel/dspy
Mappings
| Mapping Type | Mapped Value |
|---|---|
| self | dspy:LMPart |
| native | dspy:LMPart |
LinkML Source
Direct
name: LMPart
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/core/types.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/core/types.py
description: Abstract base for a single content item carried by an LM message or output.
in_subset:
- lm_contract
from_schema: https://w3id.org/lmodel/dspy
abstract: true
slots:
- metadata
attributes:
part_type:
name: part_type
description: Discriminator for the LMPart subclass. One of the ``LMPartType``
permissible values.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
domain_of:
- LMPart
range: string
required: true
Induced
name: LMPart
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/core/types.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/core/types.py
description: Abstract base for a single content item carried by an LM message or output.
in_subset:
- lm_contract
from_schema: https://w3id.org/lmodel/dspy
abstract: true
attributes:
part_type:
name: part_type
description: Discriminator for the LMPart subclass. One of the ``LMPartType``
permissible values.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: LMPart
domain_of:
- LMPart
range: string
required: true
metadata:
name: metadata
description: Opaque key/value metadata passed alongside an object.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: LMPart
domain_of:
- ToolResult
- Citation
- LMPart
- LMMessage
- LMToolSpec
- LMRequest
- LMUsage
- LMOutput
- LMResponse
range: Any