pub struct Client { /* private fields */ }Implementations§
source§impl Client
impl Client
pub fn new(api_key: &str) -> Self
pub fn from_url(api_key: &str, base_url: &str) -> Self
pub fn post(&self, path: &str) -> RequestBuilder
pub fn embedding_model(&self, model: &str) -> EmbeddingModel
pub fn embeddings(&self, model: &str) -> EmbeddingsBuilder<EmbeddingModel>
pub fn completion_model(&self, model: &str) -> CompletionModel
pub fn model(&self, model: &str) -> ModelBuilder<CompletionModel>
pub fn agent(&self, model: &str) -> AgentBuilder<CompletionModel>
pub fn extractor<T: JsonSchema + for<'a> Deserialize<'a> + Send + Sync>( &self, model: &str, ) -> ExtractorBuilder<T, CompletionModel>
pub fn rag_agent<C: VectorStoreIndex, T: VectorStoreIndex>( &self, model: &str, ) -> RagAgentBuilder<CompletionModel, C, T>
pub fn tool_rag_agent<T: VectorStoreIndex>( &self, model: &str, ) -> RagAgentBuilder<CompletionModel, NoIndex, T>
pub fn context_rag_agent<C: VectorStoreIndex>( &self, model: &str, ) -> RagAgentBuilder<CompletionModel, C, NoIndex>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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