An embedding is a vectorized numerical representation of data, where the relatedness between different pieces of information is captured through measurable distances. These embeddings are commonly used in applications such as recommendation systems, classification, and search.The Mistral embedding model powers our system, providing high-quality vector representations for various applications.For setup and integration:
The SambaNova Embeddings API is designed for seamless integration with existing applications and follows OpenAI’s embeddings API structure, simplifying migration and adoption.The model takes in text as input and outputs a vector of floating-point numbers, which can be used for tasks like similarity searches.
import openaiclient = openai.OpenAI( base_url="https://api.sambanova.ai/v1", api_key="<your-api-key>",)response = client.embeddings.create( model="E5-Mistral-7B-Instruct", input="The quick brown fox jumps over the lazy dog")print(response)
import openaiclient = openai.OpenAI( base_url="https://api.sambanova.ai/v1", api_key="<your-api-key>",)response = client.embeddings.create( model="E5-Mistral-7B-Instruct", input=[ "Our solar system orbits the Milky Way galaxy at about 515,000 mph", "Jupiter's Great Red Spot is a storm that has been raging for at least 350 years." ])print(response)