nemo_relay.typed
nemo_relay.typed
Generated from python/nemo_relay/typed.py.
Module nemo_relay.typed.
Typed wrappers around the JSON-based NeMo Relay execution APIs.
Classes
Codec(Generic[T])
Bidirectional conversion protocol between a Python type and JSON.
Methods
to_json
Convert a typed value to a JSON-serializable object.
from_json
Reconstruct a typed value from a JSON-serializable object.
JsonPassthrough(Codec[Json])
Identity codec for callers already working with JSON values.
Methods
to_json
Return value unchanged.
from_json
Return data unchanged.
PydanticCodec(Codec[T])
Codec for models exposing model_dump and model_validate.
Methods
PydanticCodec
Create an instance.
to_json
Serialize a Pydantic model to a JSON-serializable dict.
from_json
Deserialize JSON data into a Pydantic model.
DataclassCodec(Codec[T])
Codec for dataclasses.dataclass models.
Methods
DataclassCodec
Create an instance.
to_json
Serialize a dataclass instance to a JSON-compatible dictionary.
from_json
Deserialize JSON data into a dataclass instance.
BestEffortAnyCodec(Codec[object])
Best-effort codec for arbitrary Python values.
Methods
to_json
Serialize an arbitrary Python value to a JSON-serializable form.
from_json
Reconstruct a Python value from its tagged JSON representation.
Functions
tool_execute
tool_execute
tool_execute
Run nemo_relay.tools.execute with typed arguments and results.
llm_execute
llm_execute
llm_execute
Run nemo_relay.llm.execute and decode the returned response type.
llm_stream_execute
Run nemo_relay.llm.stream_execute with typed chunks and final output.
Type Aliases And Constants
TTArgsTResponseTResponseChunkTResult