-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add huggingface dedicated provider support #1157
Conversation
...va/io/stargate/sgv2/jsonapi/service/resolver/model/impl/CreateCollectionCommandResolver.java
Outdated
Show resolved
Hide resolved
...va/io/stargate/sgv2/jsonapi/service/resolver/model/impl/CreateCollectionCommandResolver.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I was wondering if the 2 new checks (for not requiring model name; for requiring dimensions) could be based only on embedding provider configuration and not require hard-coded checks for newly added provider.
…api into yuqi/huggingface-dedicated
src/main/java/io/stargate/sgv2/jsonapi/api/model/command/impl/CreateCollectionCommand.java
Outdated
Show resolved
Hide resolved
...va/io/stargate/sgv2/jsonapi/service/resolver/model/impl/CreateCollectionCommandResolver.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added minor comments.
@Yuqi-Du , here is content for the form fields for Hugging Face — Dedicated create collection: Label: User access token Label: Embedding model Label: Endpoint name Label: Region name Label: Cloud provider the dedicated endpoint is deployed to Label: Dimensions |
since provider huggingfaceDedicated does not require model, modelName field in createCollectionCommand will be changed as allow null. Other providers still need model specified, so validations move down to createCollectionCommandResolver.
For huggingFace dedicated, the endpoint we use is:
We do not require modelName, but dimension is still needed, and will error out is not provided.
Also, parameters: endpointName, regionName, cloudName are needed to compute the url.
Fixes #1145
Checklist