pub struct ChatCompletionRequest {
pub stream: Option<bool>,
/* private fields */
}
Fields§
§stream: Option<bool>
If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.
Implementations§
Source§impl ChatCompletionRequest
impl ChatCompletionRequest
pub fn new( model: ChatCompleteModel, messages: impl Into<Vec<ChatCompletionMessage>>, ) -> Self
pub fn new_with_tools( model: ChatCompleteModel, messages: impl Into<Vec<ChatCompletionMessage>>, tools: impl Into<Vec<Tool>>, ) -> Self
Trait Implementations§
Source§impl Clone for ChatCompletionRequest
impl Clone for ChatCompletionRequest
Source§fn clone(&self) -> ChatCompletionRequest
fn clone(&self) -> ChatCompletionRequest
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 ChatCompletionRequest
impl Debug for ChatCompletionRequest
Source§impl IntoRequest for ChatCompletionRequest
impl IntoRequest for ChatCompletionRequest
fn into_request( self, base_url: &str, client: ClientWithMiddleware, ) -> RequestBuilder
Auto Trait Implementations§
impl Freeze for ChatCompletionRequest
impl RefUnwindSafe for ChatCompletionRequest
impl Send for ChatCompletionRequest
impl Sync for ChatCompletionRequest
impl Unpin for ChatCompletionRequest
impl UnwindSafe for ChatCompletionRequest
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