Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide embedding manager #16

Merged
merged 7 commits into from
Apr 10, 2024
Merged

Provide embedding manager #16

merged 7 commits into from
Apr 10, 2024

Conversation

trducng
Copy link
Contributor

@trducng trducng commented Apr 10, 2024

image

@trducng trducng requested a review from lone17 April 10, 2024 05:58
libs/ktem/flowsettings.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lone17 lone17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant

    KH_EMBEDDINGS["local"] = {
        "spec": {
            "__type__": "kotaemon.embeddings.EndpointEmbeddings",
            "endpoint_url": "http://localhost:31415/v1/embeddings",
        },
        "default": False,
        "cost": 0,
    }
if len(KH_EMBEDDINGS) < 1:
    KH_EMBEDDINGS["local-mxbai-large-v1"] = {
        "spec": {
            "__type__": "kotaemon.embeddings.FastEmbedEmbeddings",
            "model_name": "mixedbread-ai/mxbai-embed-large-v1",
        },
        "default": True,
    }

we add all preconfigured models into the pool, then only set up a default one if no models were set up.

@trducng
Copy link
Contributor Author

trducng commented Apr 10, 2024

But this model is local, shouldn't it reside in the LOCAL_MODEL?

@lone17
Copy link
Contributor

lone17 commented Apr 10, 2024

But this model is local, shouldn't it reside in the LOCAL_MODEL?

the LOCAL_MODEL is a path I used to set up the local endpoint model. not necessarily a flag for using local models. Since your model is small and doesn't need external setting up, I don't think we need a flag for that anyway.

@lone17 lone17 self-requested a review April 10, 2024 08:10
Copy link
Contributor

@lone17 lone17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lone17 lone17 merged commit 7b3307e into main Apr 10, 2024
6 checks passed
@lone17 lone17 deleted the feat/embedding-manager branch April 10, 2024 08:11
phv2312 pushed a commit to phv2312/kotaemon that referenced this pull request Sep 11, 2024
* Provide the Embedding management UI

* Update Fastembed documentation

* Add validation when adding / updating embeddings

* Stop using the old ktem embeddings manager

* Set default local embedding models

* Move the local embeddings below in flowsettings

* Update flowsettings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants