Struct cohere_rust::api::chat::ChatRequest
source · pub struct ChatRequest<'input> {
pub message: &'input str,
pub model: Option<GenerateModel>,
pub prompt_truncation: Option<PromptTruncation>,
pub temperature: Option<f64>,
pub citation_quality: Option<CitationQuality>,
pub conversation_id: Option<String>,
}
Fields§
§message: &'input str
The chat message from the user to the model.
model: Option<GenerateModel>
optional - The model to use for text generation. Custom models can also be supplied with their full ID. Defaults to ‘command’.
prompt_truncation: Option<PromptTruncation>
optional - Dictates how the prompt will be constructed. When set to ‘AUTO’ some parts of chat history and documents will be dropped to construct a prompt that fits within the model’s context length limit.
temperature: Option<f64>
optional - A non-negative float that tunes the degree of randomness in generation.
citation_quality: Option<CitationQuality>
optional - Dictates the approach taken to generating citations during RAG chat.
conversation_id: Option<String>
optional - Previous conversations can be stored and resumed by providing the conversation’s identifier. If a conversation with this id does not already exist, a new conversation will be created.
Trait Implementations§
source§impl<'input> Debug for ChatRequest<'input>
impl<'input> Debug for ChatRequest<'input>
source§impl<'input> Default for ChatRequest<'input>
impl<'input> Default for ChatRequest<'input>
source§fn default() -> ChatRequest<'input>
fn default() -> ChatRequest<'input>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'input> RefUnwindSafe for ChatRequest<'input>
impl<'input> Send for ChatRequest<'input>
impl<'input> Sync for ChatRequest<'input>
impl<'input> Unpin for ChatRequest<'input>
impl<'input> UnwindSafe for ChatRequest<'input>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more