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

feat(embeddingModel): add embedding model into mongodb #1362

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

neven4
Copy link
Contributor

@neven4 neven4 commented Jul 25, 2024

Hi there,

I decided to create the first PR which migrate config management from .env file to UI.

How do I see it:

  • Migrate the EmbeddingModel
  • Migrate the Model
  • Create UI for EmbeddingModel and Model

WDYT?

Part of #1286

@gary149 gary149 requested a review from nsarrazin August 2, 2024 13:52
@KartikGS
Copy link
Contributor

KartikGS commented Aug 5, 2024

Will the default embedding model setting be inserted in the database every time the server restarts?

@neven4
Copy link
Contributor Author

neven4 commented Aug 5, 2024

Will the default embedding model setting be inserted in the database every time the server restarts?

For now - yes, in order to support the current behavior and allow users to edit embedding models via .env file (until the UI for editing is created)

@neven4
Copy link
Contributor Author

neven4 commented Aug 20, 2024

Hi @nsarrazin, what do you think about this?

Copy link
Collaborator

@nsarrazin nsarrazin left a comment

Choose a reason for hiding this comment

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

Hi, thanks for the contrib, this looks like a nice feature, will do a deeper review soon but just curious, how do you handle the API keys stored in the env variable? Do you copy these over in the DB?

@neven4
Copy link
Contributor Author

neven4 commented Aug 26, 2024

Hi, thanks for the contrib, this looks like a nice feature, will do a deeper review soon but just curious, how do you handle the API keys stored in the env variable? Do you copy these over in the DB?

Hi there, I hope I got the question right.

I'm not touching API keys at all, I just parse TEXT_EMBEDDING_MODELS from the .env file and populate database with it.

@nsarrazin
Copy link
Collaborator

I meant for example the OpenAI embedding endpoint has an apiKey property (permalink) would it get copied over into the DB ? 👀

@neven4
Copy link
Contributor Author

neven4 commented Aug 26, 2024

Oh, good catch, I missed that part. In this case we need to encrypt/decrypt api keys using some encryption key 👍

@neven4 neven4 force-pushed the feat-add-embedding-model-into-mongodb branch from f09dcd0 to ea01acd Compare September 23, 2024 18:02
@neven4
Copy link
Contributor Author

neven4 commented Sep 23, 2024

Hi @nsarrazin, I added an encryption for sensitive data 👍

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.

3 participants