Skip to content

Commit 14b969f

Browse files
authored
feat: add configuration field to chroma collection (#19)
1 parent dbb6bad commit 14b969f

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/client.rs

+1
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ mod tests {
234234

235235
let collection = client.get_collection(GET_TEST_COLLECTION).await.unwrap();
236236
assert_eq!(collection.name(), GET_TEST_COLLECTION);
237+
assert!(collection.configuration_json.is_some());
237238
}
238239

239240
#[tokio::test]

src/collection.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::{collections::HashSet, sync::Arc, vec};
55

66
use super::{
77
api::APIClientAsync,
8-
commons::{Documents, Embedding, Embeddings, Metadata, Metadatas, Result},
8+
commons::{Documents, Embedding, Embeddings, Metadata, Metadatas, Result, ConfigurationJson},
99
embeddings::EmbeddingFunction,
1010
};
1111

@@ -17,6 +17,7 @@ pub struct ChromaCollection {
1717
pub(super) id: String,
1818
pub(super) metadata: Option<Metadata>,
1919
pub(super) name: String,
20+
pub(super) configuration_json: Option<ConfigurationJson>
2021
}
2122

2223
impl ChromaCollection {

src/commons.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use serde_json::{Map, Value};
22

33
pub(super) type Result<T> = anyhow::Result<T>;
4+
pub(super) type ConfigurationJson = Map<String, Value>;
45
pub(super) type Metadata = Map<String, Value>;
56
pub(super) type Metadatas = Vec<Metadata>;
67
pub(super) type Embedding = Vec<f32>;

0 commit comments

Comments
 (0)