Skip to main content

ChatClient

Trait ChatClient 

pub trait ChatClient {
    // Required methods
    fn complete(&self, system: &str, user: &str) -> Result<String>;
    fn model_id(&self) -> &str;
}
Expand description

A model that turns one system + user exchange into assistant text.

Required Methods§

fn complete(&self, system: &str, user: &str) -> Result<String>

Complete a single system/user exchange, returning the assistant’s text.

fn model_id(&self) -> &str

The model identifier this client targets, for the advisory stamp.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§