Class: LMRequest
Normalized request handed to a BaseLM (dspy.LMRequest).
URI: dspy:LMRequest
classDiagram
class LMRequest
click LMRequest href "../LMRequest/"
LMRequest : config
LMRequest --> "0..1" LMConfig : config
click LMConfig href "../LMConfig/"
LMRequest : messages
LMRequest --> "1..*" LMMessage : messages
click LMMessage href "../LMMessage/"
LMRequest : metadata
LMRequest --> "0..1" Any : metadata
click Any href "../Any/"
LMRequest : model
LMRequest : tool_specs
LMRequest --> "*" LMToolSpec : tool_specs
click LMToolSpec href "../LMToolSpec/"
Slots
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| model | 1 ModelName |
LiteLLM-style provider/model identifier |
direct |
| messages | 1..* LMMessage |
Ordered list of LM messages | direct |
| tool_specs | * LMToolSpec |
Provider-independent tool schemas attached to an LMRequest |
direct |
| config | 0..1 LMConfig |
Default keyword arguments forwarded to the underlying LM | direct |
| metadata | 0..1 Any |
Opaque key/value metadata passed alongside an object | direct |
Usages
| used by | used in | type | used |
|---|---|---|---|
| LMHistoryEntry | request | range | LMRequest |
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:LMRequest |
| native | dspy:LMRequest |
LinkML Source
Direct
name: LMRequest
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: Normalized request handed to a ``BaseLM`` (``dspy.LMRequest``).
in_subset:
- lm_contract
from_schema: https://w3id.org/lmodel/dspy
slots:
- model
- messages
- tool_specs
- config
- metadata
slot_usage:
model:
name: model
required: true
messages:
name: messages
required: true
config:
name: config
range: LMConfig
Induced
name: LMRequest
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: Normalized request handed to a ``BaseLM`` (``dspy.LMRequest``).
in_subset:
- lm_contract
from_schema: https://w3id.org/lmodel/dspy
slot_usage:
model:
name: model
required: true
messages:
name: messages
required: true
config:
name: config
range: LMConfig
attributes:
model:
name: model
description: LiteLLM-style ``provider/model`` identifier.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: LMRequest
domain_of:
- LMRequest
- LMResponse
- BaseLM
- TrainingJob
range: ModelName
required: true
messages:
name: messages
description: Ordered list of LM messages.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: LMRequest
domain_of:
- LMRequest
range: LMMessage
required: true
multivalued: true
inlined: true
inlined_as_list: true
tool_specs:
name: tool_specs
description: Provider-independent tool schemas attached to an ``LMRequest``.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: LMRequest
domain_of:
- LMRequest
range: LMToolSpec
multivalued: true
inlined: true
inlined_as_list: true
config:
name: config
description: Default keyword arguments forwarded to the underlying LM.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: LMRequest
domain_of:
- LMRequest
- Predictor
range: LMConfig
metadata:
name: metadata
description: Opaque key/value metadata passed alongside an object.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: LMRequest
domain_of:
- ToolResult
- Citation
- LMPart
- LMMessage
- LMToolSpec
- LMRequest
- LMUsage
- LMOutput
- LMResponse
range: Any