pub struct ChatGpt { /* private fields */ }Implementations§
Source§impl ChatGpt
impl ChatGpt
pub fn new(oepenai_api_key: &str) -> Self
pub fn new_org(oepenai_api_key: String, org_id: String) -> Self
pub fn new_with_base_url(oepenai_api_key: &str, base_url: &str) -> Self
pub fn new_org_with_base_url( oepenai_api_key: String, org_id: String, base_url: String, ) -> Self
pub async fn models_list( &self, ) -> Result<ChatGptResponseModelList, ChatGptError>
pub async fn models_retrieve( &self, model: &str, ) -> Result<ChatGptResponseModelRetrieve, ChatGptError>
pub async fn completions_create( &self, request: &ChatGptRequestCompletionsCreate, ) -> Result<ChatGptResponseModelRetrieve, ChatGptError>
pub async fn chat_completions( &self, request: &ChatGptRequestChatCompletions, ) -> Result<ChatGptResponseChatCompletions, ChatGptError>
pub async fn edits( &self, request: &ChatGptRequestEdits, ) -> Result<Value, ChatGptError>
pub async fn images_generations( &self, request: &ChatGptRequestImagesGenerations, ) -> Result<ChatGptResponseImagesGenerations, ChatGptError>
pub async fn images_edits( &self, request: &ChatGptRequestImagesEdits, ) -> Result<ChatGptResponseImagesEdits, ChatGptError>
pub async fn images_variations( &self, request: &ChatGptRequestImagesVariation, ) -> Result<ChatGptResponseImagesVariation, ChatGptError>
pub async fn embeddings( &self, request: &ChatGptRequestEmbeddingsGenerations, ) -> Result<Value, ChatGptError>
pub async fn audio_transcriptions( &self, request: &ChatGptRequestAudioTranscriptions, ) -> Result<ChatGptResponseAudioTranscriptions, ChatGptError>
pub async fn audio_translations( &self, request: &ChatGptRequestAudioTranslations, ) -> Result<ChatGptResponseAudioTranslations, ChatGptError>
Auto Trait Implementations§
impl Freeze for ChatGpt
impl RefUnwindSafe for ChatGpt
impl Send for ChatGpt
impl Sync for ChatGpt
impl Unpin for ChatGpt
impl UnwindSafe for ChatGpt
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