Crate llmvm_protocol

Source
Expand description

This module contains protocol types and utilities used for communicating with llmvm core & backends.

Uses multilink to communicate with local & remote processes.

Modules§

error
Protocol error types.
http
jsonrpc
JSON-RPC types and methods.
service
stdio
tower
async fn(Request) -> Result<Response, Error>
util
Miscellaneous utility functions.

Structs§

BackendGenerationRequest
Request for language model generation.
BackendGenerationResponse
Response for language model generation.
GenerationParameters
Parameters used for generation via core service. Can be saved in a preset and/or directly provided within the GenerationRequest.
GenerationRequest
Request for text generation via core service.
GenerationResponse
Response for text generation via core service.
Message
A prompt or generated message from a thread.
ModelDescription
A parsed model id data structure.
ProtocolError
A “one size fits all” error type for the protocol. Contains a boxed error, and the error type.
ThreadInfo
Metadata for a thread.

Enums§

MessageRole
The actor who presented the message.
ServiceResponse
A response container returned by a multilink service.

Constants§

CHAT_MODEL_PROVIDER_SUFFIX
DEFAULT_TIMEOUT_SECS
Default request timeout.

Traits§

Backend
The backend service which the core uses to generate text. Implements a low-level interface for interacting with language models.
ConfigExampleSnippet
A configuration data structure that provides an example for generating new TOML configuration files. The example should include customizable fields with comments explaining their purpose.
Core
The core service which frontends use to interact with language models. Manages & uses threads, presets, prompt templates and backend connections to create & send backend requests.

Type Aliases§

BoxedService
A boxed dynamic type for multilink services. The service must return a result with a ServiceResponse or ServiceError.
NotificationStream
A stream of multiple response results returned by the service.
ServiceError
A boxed error type that may be returned by service calls.
ServiceFuture
A future that returns a result with a generic response and ServiceError. This is returned by service calls.

Attribute Macros§

async_trait