get dimensions from vector db connector and all functionality/UI complete

This commit is contained in:
shatfield4
2023-12-15 01:25:18 -08:00
parent 7c41488f3f
commit 5aea60a4f5
3 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -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('');