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

Prefill dimension if known remote model found; onboard search connectors API #330

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Aug 29, 2024

Description

This PR adds a set of constants for common embedding models from popular remote services. If a model name is found in the connector blueprint, and it is a model that we persist a constant for, we prefill the dimensions with the known value.

More details:

  • onboards the search connectors API to fetch connector details (in this case, any specified 'model' name found)
  • adds dimensions constants for OpenAI and Cohere popular embedding models
  • adds basic Connector-based interfaces
  • adds a hook in QuickConfigureInputs to try to derive the dimensions when a model is selected. this is done by traversing to the associated connector ID, extracting out the details, and looking for the model name
  • minor tuning of the select dropdown in the maps

Demo video, showing the "Embedding length" field being auto-populated:

screen-capture.8.webm

Issues Resolved

N/A

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@saimedhi
Copy link
Collaborator

Looks good to me

@saimedhi saimedhi merged commit 8461369 into opensearch-project:main Aug 30, 2024
6 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 30, 2024
…ors API (#330)

* onboard search connectors api; add auto-fetching of dimensions

Signed-off-by: Tyler Ohlsen <[email protected]>

* Reset to undefined if no values found

Signed-off-by: Tyler Ohlsen <[email protected]>

* add comment

Signed-off-by: Tyler Ohlsen <[email protected]>

* minor tuning of select autofill in maps

Signed-off-by: Tyler Ohlsen <[email protected]>

---------

Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 8461369)
@ohltyler ohltyler deleted the presets-5 branch August 30, 2024 16:48
ohltyler added a commit that referenced this pull request Aug 30, 2024
…ors API (#330) (#335)

* onboard search connectors api; add auto-fetching of dimensions

Signed-off-by: Tyler Ohlsen <[email protected]>

* Reset to undefined if no values found

Signed-off-by: Tyler Ohlsen <[email protected]>

* add comment

Signed-off-by: Tyler Ohlsen <[email protected]>

* minor tuning of select autofill in maps

Signed-off-by: Tyler Ohlsen <[email protected]>

---------

Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 8461369)

Co-authored-by: Tyler Ohlsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants