pub struct LlmSdk { /* private fields */ }Implementations§
source§impl LlmSdk
impl LlmSdk
pub fn new(base_url: impl Into<String>, token: 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 !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