pub struct ClientApi<'a>(/* private fields */);
Expand description
ClientApi
struct to interact with the models endpoint of the API.
Implementations§
Source§impl<'a> ClientApi<'a>
impl<'a> ClientApi<'a>
Sourcepub async fn get_models(&self) -> OpenAIResult<Value>
pub async fn get_models(&self) -> OpenAIResult<Value>
Fetch the list of available models from the API.
§Returns
A Result containing the JSON response as serde_json::Value
on success, or an OpenAIError
on failure.
Auto Trait Implementations§
impl<'a> Freeze for ClientApi<'a>
impl<'a> !RefUnwindSafe for ClientApi<'a>
impl<'a> Send for ClientApi<'a>
impl<'a> Sync for ClientApi<'a>
impl<'a> Unpin for ClientApi<'a>
impl<'a> !UnwindSafe for ClientApi<'a>
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