v0.5.0
What's Changed
-
BREAKING CHANGE: Although there is no change in the database API, the underlying storage format has been changed to save the collection data to dedicated files directly. The details of the new persistent system and how to migrate from v0.4.x to v0.5.0 can be found in this migration guide.
-
By adding the feature
gen, you can now use theEmbeddingModeltrait and OpenAI's embedding models to generate vectors or records from text without external dependencies. This feature is optional and can be enabled by adding the feature to theCargo.tomlfile.[dependencies] oasysdb = { version = "0.5.0", features = ["gen"] }
use oasysdb::vectorgen::*; fn main() { // Change the API key to your own. let api_key = "xxx"; let model = OpenAI::new(api_key, "text-embedding-3-small"); let content = "OasysDB is awesome!"; let vector = model.create_vector(content).unwrap(); assert_eq!(vector.len(), 1536); }