Struct async_openai::Embeddings
source · pub struct Embeddings<'c> { /* private fields */ }
Expand description
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
Related guide: Embeddings
Implementations§
source§impl<'c> Embeddings<'c>
impl<'c> Embeddings<'c>
pub fn new(client: &'c Client) -> Self
sourcepub async fn create(
&self,
request: CreateEmbeddingRequest
) -> Result<CreateEmbeddingResponse, OpenAIError>
pub async fn create( &self, request: CreateEmbeddingRequest ) -> Result<CreateEmbeddingResponse, OpenAIError>
Creates an embedding vector representing the input text.