Skip to content

How can I change embedding model for chromadb? #517

Discussion options

You must be logged in to vote
from chromadb.utils import embedding_functions
bge_embeddingFunction = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="intfloat/multilingual-e5-large") # your new model

class MyVanna(ChromaDB_VectorStore, OpenAI_Chat):
    def __init__(self, config=None):
        ChromaDB_VectorStore.__init__(self, config=config)
        OpenAI_Chat.__init__(self, client=client, config=config)

vn = MyVanna(config={'model': 'gpt-4o', 'temperature':0, 'embedding_function':bge_embeddingFunction})

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jinwook-chang
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jinwook-chang
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants