-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Add openai embedding #36366
base: master
Are you sure you want to change the base?
feat: Add openai embedding #36366
Conversation
Welcome @junjiejiangjjj! It looks like this is your first PR to milvus-io/milvus 🎉 |
@junjiejiangjjj Please associate the related issue to the body of your Pull Request. (eg. “issue: #”) |
fd701cd
to
5407f22
Compare
200bc3b
to
ed7d332
Compare
38243dd
to
0d0286e
Compare
0f30960
to
7950316
Compare
dc9f47d
to
aa4932c
Compare
@junjiejiangjjj E2e jenkins job failed, comment |
@junjiejiangjjj go-sdk check failed, comment |
aa4932c
to
e7e5e7c
Compare
@junjiejiangjjj go-sdk check failed, comment |
@junjiejiangjjj E2e jenkins job failed, comment |
67e5b51
to
6334590
Compare
@junjiejiangjjj cpp-unit-test check failed, comment |
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjiejiangjjj <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
Signed-off-by: junjie.jiang <[email protected]>
477d85e
to
b482b3c
Compare
@junjiejiangjjj go-sdk check failed, comment |
@junjiejiangjjj cpp-unit-test check failed, comment |
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.
I also see several comments from last review nor addressed neither replied, please take a look. Thanks!
apiKey: apiKey, | ||
url: url, | ||
}, | ||
apiVersion: "2024-06-01", |
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.
does it make sense to pass in this apiVersion instead of hard coding?
based on https://learn.microsoft.com/en-us/azure/ai-services/openai/api-version-deprecation seems there is little breaking change introduced to the API, mostly new features.
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.
New features brought by the new version generally require code adaptation, so it is not very meaningful to open the configuration of apiVersion.
@@ -416,14 +417,24 @@ func (t *searchTask) initAdvancedSearchRequest(ctx context.Context) error { | |||
zap.Stringer("plan", plan)) // may be very large if large term passed. | |||
} | |||
|
|||
var err error | |||
if function.HasFunctions(t.schema.CollectionSchema.Functions, []int64{}) { |
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.
ping
|
||
// TODO: unify the function implementation, storage/utils.go & proxy/util.go | ||
func IsBM25FunctionOutputField(field *schemapb.FieldSchema) bool { | ||
return field.GetIsFunctionOutput() && field.GetDataType() == schemapb.DataType_SparseFloatVector |
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.
this is not true? other models can also have sparse float vector output
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.
There is no problem right now. After the implementation of bm25 and the model function is unified, the relevant code will not be needed.
OutputType string `json:"output_type,omitempty"` | ||
} | ||
|
||
type EmbeddingRequest struct { |
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.
EmbeddingRequest can be private? by lowercase the first letter embeddingRequest
. I did a quick search and find no usage of this class outside this file. correct me IIW. This comment applies to many other structs in this and other files.
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.
Only used in test files under milvus/internal/util/function/
Signed-off-by: junjie.jiang <[email protected]>
#35856