pub struct LlmSdk { /* private fields */ }
Implementations§
Source§impl LlmSdk
impl LlmSdk
pub fn new(token: impl Into<String>) -> Self
pub fn new_with_base_url( token: impl Into<String>, base_url: impl Into<String>, ) -> Self
pub async fn chat_completion( &self, req: ChatCompletionRequest, ) -> Result<ChatCompletionResponse>
pub async fn create_image( &self, req: CreateImageRequest, ) -> Result<CreateImageResponse>
pub async fn speech(&self, req: SpeechRequest) -> Result<Bytes>
pub async fn whisper(&self, req: WhisperRequest) -> Result<WhisperResponse>
pub async fn embedding( &self, req: EmbeddingRequest, ) -> Result<EmbeddingResponse>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlmSdk
impl !RefUnwindSafe for LlmSdk
impl Send for LlmSdk
impl Sync for LlmSdk
impl Unpin for LlmSdk
impl !UnwindSafe for LlmSdk
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