pub struct ChatCompletionRequestMessage {
pub role: String,
pub content: Option<String>,
pub name: Option<String>,
pub function_call: Option<FunctionCall>,
}
Fields§
§role: String
The role of the messages author. One of system
, user
, assistant
, or function
.
content: Option<String>
The contents of the message.
content
is required for all messages except assistant messages with function calls.
name: Option<String>
The name of the author of this message. name
is required if role is function,
and it should be the name of the function whose response is in the content
.
May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.
function_call: Option<FunctionCall>
The name and arguments of a function that should be called, as generated by the model.
Trait Implementations§
Source§impl Clone for ChatCompletionRequestMessage
impl Clone for ChatCompletionRequestMessage
Source§fn clone(&self) -> ChatCompletionRequestMessage
fn clone(&self) -> ChatCompletionRequestMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ChatCompletionRequestMessage
impl Debug for ChatCompletionRequestMessage
Source§impl Default for ChatCompletionRequestMessage
impl Default for ChatCompletionRequestMessage
Source§fn default() -> ChatCompletionRequestMessage
fn default() -> ChatCompletionRequestMessage
Returns the “default value” for a type. Read more
Source§impl PartialEq for ChatCompletionRequestMessage
impl PartialEq for ChatCompletionRequestMessage
Source§fn eq(&self, other: &ChatCompletionRequestMessage) -> bool
fn eq(&self, other: &ChatCompletionRequestMessage) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Eq for ChatCompletionRequestMessage
impl StructuralPartialEq for ChatCompletionRequestMessage
Auto Trait Implementations§
impl Freeze for ChatCompletionRequestMessage
impl RefUnwindSafe for ChatCompletionRequestMessage
impl Send for ChatCompletionRequestMessage
impl Sync for ChatCompletionRequestMessage
impl Unpin for ChatCompletionRequestMessage
impl UnwindSafe for ChatCompletionRequestMessage
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