#embedding model

1 messages · Page 1 of 1 (latest)

devout junco
#

What should i pass in the embedding model if i wanna use 1024 dimensions of 3 large?

polar sageBOT
#

Hi @devout junco. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

To use the text-embedding-3-large model with 1024 dimensions, you would need to pass the model name and the dimensions parameter to the embeddings API endpoint. However, the exact way to do this would depend on the specific API or library you are using.

Here is an example of how you might do this using the OpenAI API:

import openai
from llama_index.embeddings import OpenAIEmbedding
from llama_index import ServiceContext

embed_model = OpenAIEmbedding(
    model="text-embedding-3-large",
    dimensions=1024,
)

service_context = ServiceContext.from_defaults(embed_model=embed_model)

Please note that this is just an example and the actual code might vary depending on your specific use case and the libraries you are using.

For more information, you can refer to the OpenAI Embeddings Guide (https://platform.openai.com/docs/guides/embeddings) and the OpenAI API documentation (https://platform.openai.com/docs/api-reference/embeddings/create#embeddings-create-dimensions).

Source: Can't enable 'text-embedding-3-large' (https://community.openai.com/t/616021), How to get embeddings (https://platform.openai.com/docs/guides/embeddings)

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: