pub struct OpenAI {
pub completion_body: ChatCompletionRequestBody,
/* private fields */
}
Fields§
§completion_body: ChatCompletionRequestBody
Implementations§
Source§impl OpenAI
impl OpenAI
pub fn new() -> Self
pub fn model_id(&mut self, model_id: String) -> &mut Self
pub fn messages(&mut self, messages: Vec<Message>) -> &mut Self
pub fn store(&mut self, store: bool) -> &mut Self
pub fn frequency_penalty(&mut self, frequency_penalty: f32) -> &mut Self
pub fn logit_bias(&mut self, logit_bias: FxHashMap<String, i32>) -> &mut Self
pub fn logprobs(&mut self, logprobs: bool) -> &mut Self
pub fn top_logprobs(&mut self, top_logprobs: u8) -> &mut Self
pub fn max_completion_tokens(&mut self, max_completion_tokens: u64) -> &mut Self
pub fn n(&mut self, n: u32) -> &mut Self
pub fn modalities(&mut self, modalities: Vec<String>) -> &mut Self
pub fn presence_penalty(&mut self, presence_penalty: f32) -> &mut Self
pub fn temperature(&mut self, temperature: f32) -> &mut Self
pub fn response_format(&mut self, response_format: ResponseFormat) -> &mut Self
pub fn chat(&mut self) -> Result<Response>
Auto Trait Implementations§
impl Freeze for OpenAI
impl RefUnwindSafe for OpenAI
impl Send for OpenAI
impl Sync for OpenAI
impl Unpin for OpenAI
impl UnwindSafe for OpenAI
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