mirror of
https://github.com/Mintplex-Labs/vector-admin.git
synced 2026-07-19 21:23:38 -04:00
get dimensions from vector db connector and all functionality/UI complete
This commit is contained in:
@@ -170,12 +170,13 @@ const WorkspaceDocument = {
|
||||
include: { organization: true },
|
||||
});
|
||||
|
||||
|
||||
const connector = await OrganizationConnection.get({
|
||||
organization_id: workspace.organization.id
|
||||
});
|
||||
|
||||
const vectorDb = selectConnector(connector);
|
||||
const dimensions = await vectorDb.indexDimensions();
|
||||
const dimensions = await vectorDb.indexDimensions(workspace.fname);
|
||||
|
||||
return dimensions;
|
||||
} catch (e) {
|
||||
|
||||
@@ -72,6 +72,11 @@ class Chroma {
|
||||
return { result: totalVectors, error: null };
|
||||
}
|
||||
|
||||
async indexDimensions() {
|
||||
// Chroma does not support this, defaulting to openai's 1536
|
||||
return 1536;
|
||||
}
|
||||
|
||||
// Collections === namespaces for Chroma to normalize interfaces
|
||||
async collections() {
|
||||
return await this.namespaces();
|
||||
|
||||
@@ -27,7 +27,7 @@ const Statistics = ({
|
||||
});
|
||||
const [dimensions, setDimensions] = useState({
|
||||
status: 'loading',
|
||||
value: 0,
|
||||
value: '-',
|
||||
});
|
||||
|
||||
const [clipboardMessage, setClipboardMessage] = useState('');
|
||||
|
||||
Reference in New Issue
Block a user