-
Notifications
You must be signed in to change notification settings - Fork 34
Fix argument validation for extractOpenAIEmbeddings #19
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
Conversation
extractOpenAIEmbeddings.m
Outdated
nvp.ModelName (1,1) {mustBeMember(nvp.ModelName,["text-embedding-ada-002", ... | ||
"text-embedding-3-large", "text-embedding-3-small"])} = "text-embedding-ada-002" | ||
nvp.TimeOut (1,1) {mustBeReal,mustBePositive} = 10 | ||
nvp.Dimensions (1,1) {mustBeInteger} | ||
nvp.Dimensions (1,1) {mustBeInteger,mustBePositive, mustBeLessThanOrEqual(nvp.Dimensions, 1536)} |
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.
Do we need mustBeReal
as well or is it covered by mustBeInteger
? It's worth checking.
extractOpenAIEmbeddings.m
Outdated
nvp.ModelName (1,1) {mustBeMember(nvp.ModelName,["text-embedding-ada-002", ... | ||
"text-embedding-3-large", "text-embedding-3-small"])} = "text-embedding-ada-002" | ||
nvp.TimeOut (1,1) {mustBeReal,mustBePositive} = 10 | ||
nvp.Dimensions (1,1) {mustBeInteger} | ||
nvp.Dimensions (1,1) {mustBeInteger,mustBePositive, mustBeLessThanOrEqual(nvp.Dimensions, 1536)} |
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.
Is 1536 the upper limit for all accepted models?
tests/textractOpenAIEmbeddings.m
Outdated
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.
% Copyright 2023-2024 The MathWorks, Inc.
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.
Thanks Deborah, the changes look good. I left a couple of comments above.
Here what this change fixes: