We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
milvus-sdk-go/entity/rows.go
Line 552 in 626c1fe
reflectValueCandi reflect array of wrong length, it trim the last byte.
If I define a struct like:
type PromptTemplate struct { Id int64 `xorm:"pk autoincr" json:"id" milvus:"primary_key;name:id"` CreatedAt time.Time `json:"created_at" xorm:"created" milvus:"-"` ActionType int32 `json:"action_type" milvus:"name:action_type"` ProcessCode string `json:"process_code" milvus:"name:process_code"` Vectors [384]float32 `milvus:"name:prompt_vector" json:"-" xorm:"-"` //用于存储向量 }
It will reflect Vectors to 383 lengths slice.
remove -1 in
-1
It should reflect Vectors to 384 lengths slice.
Define a type with array like: type PromptTemplate struct { Id int64 `xorm:"pk autoincr" json:"id" milvus:"primary_key;name:id"` CreatedAt time.Time `json:"created_at" xorm:"created" milvus:"-"` ActionType int32 `json:"action_type" milvus:"name:action_type"` ProcessCode string `json:"process_code" milvus:"name:process_code"` Vectors [384]float32 `milvus:"name:prompt_vector" json:"-" xorm:"-"` //用于存储向量 }
call InsertRows to insert objects of the test type like:
_, err = mclient.InsertRows( context.Background(), // ctx "cpzx_rag_prompt", // CollectionName "", // partitionName interfaces, // rows ) return err
It will show a error like
the length(383) of float data should divide the dim(384)
### Environment _No response_ ### Anything else? _No response_
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out! I'll fix this asap
Sorry, something went wrong.
fix: Use correct index range for refect Slice method
8586848
See also milvus-io#734 Signed-off-by: Congqi Xia <[email protected]>
7a81beb
fix: Use correct index range for refect Slice method (#735)
d3dec3b
See also #734 Signed-off-by: Congqi Xia <[email protected]>
No branches or pull requests
Is there an existing issue for this?
Current Behavior
milvus-sdk-go/entity/rows.go
Line 552 in 626c1fe
reflectValueCandi reflect array of wrong length, it trim the last byte.
If I define a struct like:
It will reflect Vectors to 383 lengths slice.
remove
-1
inmilvus-sdk-go/entity/rows.go
Line 552 in 626c1fe
will fix the bug
Expected Behavior
It should reflect Vectors to 384 lengths slice.
Steps To Reproduce
call InsertRows to insert objects of the test type like:
It will show a error like
The text was updated successfully, but these errors were encountered: