Skip to content

Allow custom embeddings ? #203

@zimdin12

Description

@zimdin12

I am not sure if it is a good idea.. just AI amateur-enthusiast here. but i would like to try different embeddings. selecting ollama as embedding defaults to llama2.. but could we mb use env var for that
mb allow modifying dimension also?

option 1: separate variable for name
EMBEDDING_MODEL=ollama
EMBEDDING_MODEL_NAME=nomic-embed-text

option 2: spliting value (not ideal i guess)
EMBEDDING_MODEL=ollama/nomic-embed-text

Alt: mb allow fully custom HuggingFaceEmbeddings ?

in load_embedding_model (chains.py@L36-39):
if embedding_model_name == "ollama":
embeddings = OllamaEmbeddings(
base_url=config["ollama_base_url"], model="llama2"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions