-
Notifications
You must be signed in to change notification settings - Fork 15
add: commands to export datasets and to import/query them #38
Conversation
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.
💯 🚀
So is it expected that when using archive, user shouldn't be ingesting files since those file ingestion won't be made into archive anyway?
if _, err := io.Copy(f, rc); err != nil { | ||
return nil, err | ||
} | ||
_ = f.Close() |
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 like f and rc shoud be closed with defer so no longer need to close it here?
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'm closing them right there to prevent possible resource leaks while defer
'ing within the for-loop (pretty unlikely with only two expected files, but still 😬
Yeah, if you want to "update" an archive, you would do |
knowledge export <dataset> --output foo.zip
knowledge retrieve -d <dataset> --archive foo.zip "some question"
knowledge list-datasets --archive foo.zip
knowledge get-dataset <dataset> --archive foo.zip
knowledge import foo.zip
Depends On (currently using fork): philippgille/chromem-go#88
NOTE: there are quite a few rough edges and missing pieces, e.g. the server-mode version of this is not yet implemented.. we'll follow up on this in the future!