vector-inspector 0.2.6__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/PKG-INFO +3 -1
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/pyproject.toml +3 -1
- vector_inspector-0.3.1/src/vector_inspector/config/__init__.py +4 -0
- vector_inspector-0.3.1/src/vector_inspector/config/known_embedding_models.json +432 -0
- vector_inspector-0.3.1/src/vector_inspector/core/cache_manager.py +159 -0
- vector_inspector-0.3.1/src/vector_inspector/core/connection_manager.py +277 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/core/connections/__init__.py +2 -1
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/core/connections/base_connection.py +42 -1
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/core/connections/chroma_connection.py +137 -16
- vector_inspector-0.3.1/src/vector_inspector/core/connections/pinecone_connection.py +768 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/core/connections/qdrant_connection.py +62 -8
- vector_inspector-0.3.1/src/vector_inspector/core/embedding_providers/__init__.py +14 -0
- vector_inspector-0.3.1/src/vector_inspector/core/embedding_providers/base_provider.py +128 -0
- vector_inspector-0.3.1/src/vector_inspector/core/embedding_providers/clip_provider.py +260 -0
- vector_inspector-0.3.1/src/vector_inspector/core/embedding_providers/provider_factory.py +176 -0
- vector_inspector-0.3.1/src/vector_inspector/core/embedding_providers/sentence_transformer_provider.py +203 -0
- vector_inspector-0.3.1/src/vector_inspector/core/embedding_utils.py +167 -0
- vector_inspector-0.3.1/src/vector_inspector/core/model_registry.py +205 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/services/backup_restore_service.py +19 -29
- vector_inspector-0.3.1/src/vector_inspector/services/credential_service.py +130 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/services/filter_service.py +1 -1
- vector_inspector-0.3.1/src/vector_inspector/services/profile_service.py +409 -0
- vector_inspector-0.3.1/src/vector_inspector/services/settings_service.py +195 -0
- vector_inspector-0.3.1/src/vector_inspector/ui/components/connection_manager_panel.py +327 -0
- vector_inspector-0.3.1/src/vector_inspector/ui/components/profile_manager_panel.py +565 -0
- vector_inspector-0.3.1/src/vector_inspector/ui/dialogs/__init__.py +6 -0
- vector_inspector-0.3.1/src/vector_inspector/ui/dialogs/cross_db_migration.py +383 -0
- vector_inspector-0.3.1/src/vector_inspector/ui/dialogs/embedding_config_dialog.py +315 -0
- vector_inspector-0.3.1/src/vector_inspector/ui/dialogs/provider_type_dialog.py +189 -0
- vector_inspector-0.3.1/src/vector_inspector/ui/main_window.py +610 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/views/connection_view.py +55 -10
- vector_inspector-0.3.1/src/vector_inspector/ui/views/info_panel.py +504 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/views/metadata_view.py +71 -3
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/views/search_view.py +44 -4
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/views/visualization_view.py +19 -5
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/tests/test_connections.py +12 -1
- vector_inspector-0.3.1/tests/test_pinecone_connection.py +405 -0
- vector_inspector-0.2.6/src/vector_inspector/services/settings_service.py +0 -60
- vector_inspector-0.2.6/src/vector_inspector/ui/main_window.py +0 -344
- vector_inspector-0.2.6/src/vector_inspector/ui/views/info_panel.py +0 -287
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/README.md +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/__init__.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/__main__.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/core/__init__.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/core/connections/template_connection.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/main.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/services/__init__.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/services/import_export_service.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/services/visualization_service.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/__init__.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/components/__init__.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/components/backup_restore_dialog.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/components/filter_builder.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/components/item_dialog.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/components/loading_dialog.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/views/__init__.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/ui/views/collection_browser.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/utils/__init__.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/src/vector_inspector/utils/lazy_imports.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/tests/test_filter_service.py +0 -0
- /vector_inspector-0.2.6/tests/vector_inspector.py → /vector_inspector-0.3.1/tests/test_runner.py +0 -0
- {vector_inspector-0.2.6 → vector_inspector-0.3.1}/tests/test_settings_service.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vector-inspector
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A comprehensive desktop application for visualizing, querying, and managing vector database data
|
|
5
5
|
Author-Email: Anthony Dawson <anthonypdawson+github@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -22,6 +22,8 @@ Requires-Dist: sentence-transformers>=2.2.0
|
|
|
22
22
|
Requires-Dist: fastembed>=0.7.4
|
|
23
23
|
Requires-Dist: pyarrow>=14.0.0
|
|
24
24
|
Requires-Dist: pinecone>=8.0.0
|
|
25
|
+
Requires-Dist: keyring>=25.7.0
|
|
26
|
+
Requires-Dist: hf-xet>=1.2.0
|
|
25
27
|
Description-Content-Type: text/markdown
|
|
26
28
|
|
|
27
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "vector-inspector"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.1"
|
|
4
4
|
description = "A comprehensive desktop application for visualizing, querying, and managing vector database data"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Anthony Dawson", email = "anthonypdawson+github@gmail.com" },
|
|
@@ -19,6 +19,8 @@ dependencies = [
|
|
|
19
19
|
"fastembed>=0.7.4",
|
|
20
20
|
"pyarrow>=14.0.0",
|
|
21
21
|
"pinecone>=8.0.0",
|
|
22
|
+
"keyring>=25.7.0",
|
|
23
|
+
"hf-xet>=1.2.0",
|
|
22
24
|
]
|
|
23
25
|
requires-python = ">=3.10,<3.13"
|
|
24
26
|
readme = "README.md"
|
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
{
|
|
2
|
+
"models": [
|
|
3
|
+
{
|
|
4
|
+
"name": "all-MiniLM-L6-v2",
|
|
5
|
+
"type": "sentence-transformer",
|
|
6
|
+
"dimension": 384,
|
|
7
|
+
"modality": "text",
|
|
8
|
+
"normalization": "l2",
|
|
9
|
+
"source": "huggingface",
|
|
10
|
+
"description": "Fast, small-footprint text embeddings (good default for text search)"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "openai/clip-vit-base-patch32",
|
|
14
|
+
"type": "clip",
|
|
15
|
+
"dimension": 512,
|
|
16
|
+
"modality": "multimodal",
|
|
17
|
+
"normalization": "l2",
|
|
18
|
+
"source": "huggingface",
|
|
19
|
+
"description": "Standard CLIP ViT-B/32 model; supports matching text ↔ images"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "paraphrase-albert-small-v2",
|
|
23
|
+
"type": "sentence-transformer",
|
|
24
|
+
"dimension": 768,
|
|
25
|
+
"modality": "text",
|
|
26
|
+
"normalization": "l2",
|
|
27
|
+
"source": "huggingface",
|
|
28
|
+
"description": "Smaller paraphrase-specialized model"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "all-mpnet-base-v2",
|
|
32
|
+
"type": "sentence-transformer",
|
|
33
|
+
"dimension": 768,
|
|
34
|
+
"modality": "text",
|
|
35
|
+
"normalization": "l2",
|
|
36
|
+
"source": "huggingface",
|
|
37
|
+
"description": "High-quality text embeddings; recommended for semantic tasks"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "all-roberta-large-v1",
|
|
41
|
+
"type": "sentence-transformer",
|
|
42
|
+
"dimension": 1024,
|
|
43
|
+
"modality": "text",
|
|
44
|
+
"normalization": "l2",
|
|
45
|
+
"source": "huggingface",
|
|
46
|
+
"description": "Large model — high quality, larger memory and compute"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "gtr-t5-large",
|
|
50
|
+
"type": "sentence-transformer",
|
|
51
|
+
"dimension": 1536,
|
|
52
|
+
"modality": "text",
|
|
53
|
+
"normalization": "l2",
|
|
54
|
+
"source": "huggingface",
|
|
55
|
+
"description": "Very large embeddings useful for specialized high-recall tasks"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "sentence-transformers/multi-qa-MiniLM-L6-cos-v1",
|
|
59
|
+
"type": "sentence-transformer",
|
|
60
|
+
"dimension": 384,
|
|
61
|
+
"modality": "text",
|
|
62
|
+
"normalization": "l2",
|
|
63
|
+
"source": "huggingface",
|
|
64
|
+
"description": "Optimized for semantic search and question-answering tasks"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
|
|
68
|
+
"type": "sentence-transformer",
|
|
69
|
+
"dimension": 384,
|
|
70
|
+
"modality": "text",
|
|
71
|
+
"normalization": "l2",
|
|
72
|
+
"source": "huggingface",
|
|
73
|
+
"description": "Multilingual support for 50+ languages"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "sentence-transformers/msmarco-distilbert-base-v4",
|
|
77
|
+
"type": "sentence-transformer",
|
|
78
|
+
"dimension": 768,
|
|
79
|
+
"modality": "text",
|
|
80
|
+
"normalization": "l2",
|
|
81
|
+
"source": "huggingface",
|
|
82
|
+
"description": "Trained on MS MARCO dataset, good for passage retrieval"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "sentence-transformers/all-distilroberta-v1",
|
|
86
|
+
"type": "sentence-transformer",
|
|
87
|
+
"dimension": 768,
|
|
88
|
+
"modality": "text",
|
|
89
|
+
"normalization": "l2",
|
|
90
|
+
"source": "huggingface",
|
|
91
|
+
"description": "Distilled RoBERTa model, balance of speed and quality"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "sentence-transformers/paraphrase-mpnet-base-v2",
|
|
95
|
+
"type": "sentence-transformer",
|
|
96
|
+
"dimension": 768,
|
|
97
|
+
"modality": "text",
|
|
98
|
+
"normalization": "l2",
|
|
99
|
+
"source": "huggingface",
|
|
100
|
+
"description": "High-quality paraphrase detection and semantic similarity"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "BAAI/bge-small-en-v1.5",
|
|
104
|
+
"type": "sentence-transformer",
|
|
105
|
+
"dimension": 384,
|
|
106
|
+
"modality": "text",
|
|
107
|
+
"normalization": "l2",
|
|
108
|
+
"source": "huggingface",
|
|
109
|
+
"description": "Beijing Academy of AI model, strong performance for size"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "BAAI/bge-base-en-v1.5",
|
|
113
|
+
"type": "sentence-transformer",
|
|
114
|
+
"dimension": 768,
|
|
115
|
+
"modality": "text",
|
|
116
|
+
"normalization": "l2",
|
|
117
|
+
"source": "huggingface",
|
|
118
|
+
"description": "High-quality English embeddings, MTEB benchmark leader"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "BAAI/bge-large-en-v1.5",
|
|
122
|
+
"type": "sentence-transformer",
|
|
123
|
+
"dimension": 1024,
|
|
124
|
+
"modality": "text",
|
|
125
|
+
"normalization": "l2",
|
|
126
|
+
"source": "huggingface",
|
|
127
|
+
"description": "Large model with excellent retrieval performance"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "thenlper/gte-small",
|
|
131
|
+
"type": "sentence-transformer",
|
|
132
|
+
"dimension": 384,
|
|
133
|
+
"modality": "text",
|
|
134
|
+
"normalization": "l2",
|
|
135
|
+
"source": "huggingface",
|
|
136
|
+
"description": "General Text Embeddings (GTE) small variant"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "thenlper/gte-base",
|
|
140
|
+
"type": "sentence-transformer",
|
|
141
|
+
"dimension": 768,
|
|
142
|
+
"modality": "text",
|
|
143
|
+
"normalization": "l2",
|
|
144
|
+
"source": "huggingface",
|
|
145
|
+
"description": "General Text Embeddings (GTE) base model"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "thenlper/gte-large",
|
|
149
|
+
"type": "sentence-transformer",
|
|
150
|
+
"dimension": 1024,
|
|
151
|
+
"modality": "text",
|
|
152
|
+
"normalization": "l2",
|
|
153
|
+
"source": "huggingface",
|
|
154
|
+
"description": "General Text Embeddings (GTE) large variant"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "intfloat/e5-small-v2",
|
|
158
|
+
"type": "sentence-transformer",
|
|
159
|
+
"dimension": 384,
|
|
160
|
+
"modality": "text",
|
|
161
|
+
"normalization": "l2",
|
|
162
|
+
"source": "huggingface",
|
|
163
|
+
"description": "E5 family small model, prefix with 'query: ' or 'passage: '"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "intfloat/e5-base-v2",
|
|
167
|
+
"type": "sentence-transformer",
|
|
168
|
+
"dimension": 768,
|
|
169
|
+
"modality": "text",
|
|
170
|
+
"normalization": "l2",
|
|
171
|
+
"source": "huggingface",
|
|
172
|
+
"description": "E5 family base model, strong asymmetric retrieval"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "intfloat/e5-large-v2",
|
|
176
|
+
"type": "sentence-transformer",
|
|
177
|
+
"dimension": 1024,
|
|
178
|
+
"modality": "text",
|
|
179
|
+
"normalization": "l2",
|
|
180
|
+
"source": "huggingface",
|
|
181
|
+
"description": "E5 family large model, top MTEB performance"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "intfloat/multilingual-e5-small",
|
|
185
|
+
"type": "sentence-transformer",
|
|
186
|
+
"dimension": 384,
|
|
187
|
+
"modality": "text",
|
|
188
|
+
"normalization": "l2",
|
|
189
|
+
"source": "huggingface",
|
|
190
|
+
"description": "Multilingual E5 model supporting 100+ languages"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "intfloat/multilingual-e5-base",
|
|
194
|
+
"type": "sentence-transformer",
|
|
195
|
+
"dimension": 768,
|
|
196
|
+
"modality": "text",
|
|
197
|
+
"normalization": "l2",
|
|
198
|
+
"source": "huggingface",
|
|
199
|
+
"description": "Multilingual E5 base model, excellent cross-lingual retrieval"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "intfloat/multilingual-e5-large",
|
|
203
|
+
"type": "sentence-transformer",
|
|
204
|
+
"dimension": 1024,
|
|
205
|
+
"modality": "text",
|
|
206
|
+
"normalization": "l2",
|
|
207
|
+
"source": "huggingface",
|
|
208
|
+
"description": "Multilingual E5 large model, best-in-class multilingual embeddings"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "openai/clip-vit-large-patch14",
|
|
212
|
+
"type": "clip",
|
|
213
|
+
"dimension": 768,
|
|
214
|
+
"modality": "multimodal",
|
|
215
|
+
"normalization": "l2",
|
|
216
|
+
"source": "huggingface",
|
|
217
|
+
"description": "Larger CLIP ViT-L/14 model, better quality than base"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "openai/clip-vit-large-patch14-336",
|
|
221
|
+
"type": "clip",
|
|
222
|
+
"dimension": 768,
|
|
223
|
+
"modality": "multimodal",
|
|
224
|
+
"normalization": "l2",
|
|
225
|
+
"source": "huggingface",
|
|
226
|
+
"description": "Higher resolution (336x336) variant of ViT-L/14"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "laion/CLIP-ViT-B-32-laion2B-s34B-b79K",
|
|
230
|
+
"type": "clip",
|
|
231
|
+
"dimension": 512,
|
|
232
|
+
"modality": "multimodal",
|
|
233
|
+
"normalization": "l2",
|
|
234
|
+
"source": "huggingface",
|
|
235
|
+
"description": "LAION's CLIP trained on 2B image-text pairs"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "laion/CLIP-ViT-H-14-laion2B-s32B-b79K",
|
|
239
|
+
"type": "clip",
|
|
240
|
+
"dimension": 1024,
|
|
241
|
+
"modality": "multimodal",
|
|
242
|
+
"normalization": "l2",
|
|
243
|
+
"source": "huggingface",
|
|
244
|
+
"description": "LAION's huge CLIP model, excellent quality"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "text-embedding-ada-002",
|
|
248
|
+
"type": "openai",
|
|
249
|
+
"dimension": 1536,
|
|
250
|
+
"modality": "text",
|
|
251
|
+
"normalization": "l2",
|
|
252
|
+
"source": "openai-api",
|
|
253
|
+
"description": "OpenAI's production embedding model (legacy). Requires API key."
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "text-embedding-3-small",
|
|
257
|
+
"type": "openai",
|
|
258
|
+
"dimension": 1536,
|
|
259
|
+
"modality": "text",
|
|
260
|
+
"normalization": "l2",
|
|
261
|
+
"source": "openai-api",
|
|
262
|
+
"description": "OpenAI's newer small model, better than ada-002. Requires API key."
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "text-embedding-3-large",
|
|
266
|
+
"type": "openai",
|
|
267
|
+
"dimension": 3072,
|
|
268
|
+
"modality": "text",
|
|
269
|
+
"normalization": "l2",
|
|
270
|
+
"source": "openai-api",
|
|
271
|
+
"description": "OpenAI's large embedding model, highest quality. Requires API key."
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "embed-english-v3.0",
|
|
275
|
+
"type": "cohere",
|
|
276
|
+
"dimension": 1024,
|
|
277
|
+
"modality": "text",
|
|
278
|
+
"normalization": "none",
|
|
279
|
+
"source": "cohere-api",
|
|
280
|
+
"description": "Cohere's English embedding model. Requires API key."
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "embed-english-light-v3.0",
|
|
284
|
+
"type": "cohere",
|
|
285
|
+
"dimension": 384,
|
|
286
|
+
"modality": "text",
|
|
287
|
+
"normalization": "none",
|
|
288
|
+
"source": "cohere-api",
|
|
289
|
+
"description": "Cohere's lightweight English model. Requires API key."
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "embed-multilingual-v3.0",
|
|
293
|
+
"type": "cohere",
|
|
294
|
+
"dimension": 1024,
|
|
295
|
+
"modality": "text",
|
|
296
|
+
"normalization": "none",
|
|
297
|
+
"source": "cohere-api",
|
|
298
|
+
"description": "Cohere's multilingual model supporting 100+ languages. Requires API key."
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "embed-multilingual-light-v3.0",
|
|
302
|
+
"type": "cohere",
|
|
303
|
+
"dimension": 384,
|
|
304
|
+
"modality": "text",
|
|
305
|
+
"normalization": "none",
|
|
306
|
+
"source": "cohere-api",
|
|
307
|
+
"description": "Cohere's lightweight multilingual model. Requires API key."
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "textembedding-gecko@003",
|
|
311
|
+
"type": "vertex-ai",
|
|
312
|
+
"dimension": 768,
|
|
313
|
+
"modality": "text",
|
|
314
|
+
"normalization": "l2",
|
|
315
|
+
"source": "google-cloud",
|
|
316
|
+
"description": "Google's Gecko model for text embeddings. Requires Google Cloud credentials."
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "text-embedding-004",
|
|
320
|
+
"type": "vertex-ai",
|
|
321
|
+
"dimension": 768,
|
|
322
|
+
"modality": "text",
|
|
323
|
+
"normalization": "l2",
|
|
324
|
+
"source": "google-cloud",
|
|
325
|
+
"description": "Google's latest text embedding model. Requires Google Cloud credentials."
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "text-multilingual-embedding-002",
|
|
329
|
+
"type": "vertex-ai",
|
|
330
|
+
"dimension": 768,
|
|
331
|
+
"modality": "text",
|
|
332
|
+
"normalization": "l2",
|
|
333
|
+
"source": "google-cloud",
|
|
334
|
+
"description": "Google's multilingual embedding model. Requires Google Cloud credentials."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "multimodalembedding@001",
|
|
338
|
+
"type": "vertex-ai",
|
|
339
|
+
"dimension": 1408,
|
|
340
|
+
"modality": "multimodal",
|
|
341
|
+
"normalization": "l2",
|
|
342
|
+
"source": "google-cloud",
|
|
343
|
+
"description": "Google's multimodal embedding model. Requires Google Cloud credentials."
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "voyage-large-2",
|
|
347
|
+
"type": "voyage",
|
|
348
|
+
"dimension": 1536,
|
|
349
|
+
"modality": "text",
|
|
350
|
+
"normalization": "l2",
|
|
351
|
+
"source": "voyage-api",
|
|
352
|
+
"description": "Voyage AI's large model. Requires API key."
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "voyage-code-2",
|
|
356
|
+
"type": "voyage",
|
|
357
|
+
"dimension": 1536,
|
|
358
|
+
"modality": "text",
|
|
359
|
+
"normalization": "l2",
|
|
360
|
+
"source": "voyage-api",
|
|
361
|
+
"description": "Voyage AI's code-optimized model. Requires API key."
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "voyage-2",
|
|
365
|
+
"type": "voyage",
|
|
366
|
+
"dimension": 1024,
|
|
367
|
+
"modality": "text",
|
|
368
|
+
"normalization": "l2",
|
|
369
|
+
"source": "voyage-api",
|
|
370
|
+
"description": "Voyage AI's general-purpose model. Requires API key."
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "jinaai/jina-embeddings-v2-base-en",
|
|
374
|
+
"type": "sentence-transformer",
|
|
375
|
+
"dimension": 768,
|
|
376
|
+
"modality": "text",
|
|
377
|
+
"normalization": "l2",
|
|
378
|
+
"source": "huggingface",
|
|
379
|
+
"description": "Jina AI's 8k context length model, good for long documents"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"name": "jinaai/jina-embeddings-v2-small-en",
|
|
383
|
+
"type": "sentence-transformer",
|
|
384
|
+
"dimension": 512,
|
|
385
|
+
"modality": "text",
|
|
386
|
+
"normalization": "l2",
|
|
387
|
+
"source": "huggingface",
|
|
388
|
+
"description": "Jina AI's small model with 8k context length"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"name": "nomic-ai/nomic-embed-text-v1",
|
|
392
|
+
"type": "sentence-transformer",
|
|
393
|
+
"dimension": 768,
|
|
394
|
+
"modality": "text",
|
|
395
|
+
"normalization": "l2",
|
|
396
|
+
"source": "huggingface",
|
|
397
|
+
"description": "Nomic's open-source text embedding model with 8k context"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"name": "nomic-ai/nomic-embed-text-v1.5",
|
|
401
|
+
"type": "sentence-transformer",
|
|
402
|
+
"dimension": 768,
|
|
403
|
+
"modality": "text",
|
|
404
|
+
"normalization": "l2",
|
|
405
|
+
"source": "huggingface",
|
|
406
|
+
"description": "Nomic's improved model with better performance"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"name": "Alibaba-NLP/gte-Qwen2-7B-instruct",
|
|
410
|
+
"type": "sentence-transformer",
|
|
411
|
+
"dimension": 3584,
|
|
412
|
+
"modality": "text",
|
|
413
|
+
"normalization": "l2",
|
|
414
|
+
"source": "huggingface",
|
|
415
|
+
"description": "Very large instruction-following embedding model, SOTA on many benchmarks"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "nvidia/NV-Embed-v1",
|
|
419
|
+
"type": "sentence-transformer",
|
|
420
|
+
"dimension": 4096,
|
|
421
|
+
"modality": "text",
|
|
422
|
+
"normalization": "l2",
|
|
423
|
+
"source": "huggingface",
|
|
424
|
+
"description": "NVIDIA's embedding model, excellent for retrieval tasks"
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
"metadata": {
|
|
428
|
+
"version": "1.0.0",
|
|
429
|
+
"last_updated": "2026-01-24",
|
|
430
|
+
"description": "Known embedding models registry for Vector Inspector"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Cache manager for storing databrowser and search panel state by database and collection.
|
|
3
|
+
Provides fast switching between collections with automatic invalidation on refresh or settings changes.
|
|
4
|
+
"""
|
|
5
|
+
from typing import Dict, Any, Optional, Tuple
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
|
+
from datetime import datetime
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass
|
|
11
|
+
class CacheEntry:
|
|
12
|
+
"""Represents a cached state for a specific database and collection."""
|
|
13
|
+
data: Any
|
|
14
|
+
timestamp: datetime = field(default_factory=datetime.now)
|
|
15
|
+
|
|
16
|
+
# Browser state
|
|
17
|
+
scroll_position: int = 0
|
|
18
|
+
selected_indices: list = field(default_factory=list)
|
|
19
|
+
|
|
20
|
+
# Search panel state
|
|
21
|
+
search_query: str = ""
|
|
22
|
+
search_filters: Dict[str, Any] = field(default_factory=dict)
|
|
23
|
+
search_results: Optional[Any] = None
|
|
24
|
+
|
|
25
|
+
# User inputs
|
|
26
|
+
user_inputs: Dict[str, Any] = field(default_factory=dict)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class CacheManager:
|
|
30
|
+
"""
|
|
31
|
+
Manages cache for databrowser and search panel by (database, collection) key.
|
|
32
|
+
Supports invalidation on refresh or settings changes.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self):
|
|
36
|
+
self._cache: Dict[Tuple[str, str], CacheEntry] = {}
|
|
37
|
+
self._enabled = True
|
|
38
|
+
|
|
39
|
+
def get(self, database: str, collection: str) -> Optional[CacheEntry]:
|
|
40
|
+
"""Retrieve cached entry for a database and collection."""
|
|
41
|
+
if not self._enabled:
|
|
42
|
+
return None
|
|
43
|
+
|
|
44
|
+
key = (database, collection)
|
|
45
|
+
return self._cache.get(key)
|
|
46
|
+
|
|
47
|
+
def set(self, database: str, collection: str, entry: CacheEntry) -> None:
|
|
48
|
+
"""Store a cache entry for a database and collection."""
|
|
49
|
+
if not self._enabled:
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
key = (database, collection)
|
|
53
|
+
entry.timestamp = datetime.now()
|
|
54
|
+
self._cache[key] = entry
|
|
55
|
+
|
|
56
|
+
def update(self, database: str, collection: str, **kwargs) -> None:
|
|
57
|
+
"""Update specific fields in an existing cache entry."""
|
|
58
|
+
key = (database, collection)
|
|
59
|
+
if key in self._cache:
|
|
60
|
+
entry = self._cache[key]
|
|
61
|
+
for field_name, value in kwargs.items():
|
|
62
|
+
if hasattr(entry, field_name):
|
|
63
|
+
setattr(entry, field_name, value)
|
|
64
|
+
entry.timestamp = datetime.now()
|
|
65
|
+
else:
|
|
66
|
+
# Create new entry with provided fields
|
|
67
|
+
entry = CacheEntry(data=None)
|
|
68
|
+
for field_name, value in kwargs.items():
|
|
69
|
+
if hasattr(entry, field_name):
|
|
70
|
+
setattr(entry, field_name, value)
|
|
71
|
+
self._cache[key] = entry
|
|
72
|
+
|
|
73
|
+
def invalidate(self, database: Optional[str] = None, collection: Optional[str] = None) -> None:
|
|
74
|
+
"""
|
|
75
|
+
Invalidate cache entries.
|
|
76
|
+
- If both database and collection are provided, invalidate that specific entry.
|
|
77
|
+
- If only database is provided, invalidate all collections in that database.
|
|
78
|
+
- If neither is provided, invalidate all entries (global refresh).
|
|
79
|
+
"""
|
|
80
|
+
if database is None and collection is None:
|
|
81
|
+
# Clear all cache
|
|
82
|
+
self._cache.clear()
|
|
83
|
+
elif collection is None and database is not None:
|
|
84
|
+
# Clear all collections in the specified database
|
|
85
|
+
keys_to_remove = [key for key in self._cache.keys() if key[0] == database]
|
|
86
|
+
for key in keys_to_remove:
|
|
87
|
+
del self._cache[key]
|
|
88
|
+
elif database is not None and collection is not None:
|
|
89
|
+
# Clear specific database/collection combination
|
|
90
|
+
key = (database, collection)
|
|
91
|
+
if key in self._cache:
|
|
92
|
+
del self._cache[key]
|
|
93
|
+
|
|
94
|
+
def clear(self) -> None:
|
|
95
|
+
"""Clear all cached entries."""
|
|
96
|
+
self._cache.clear()
|
|
97
|
+
|
|
98
|
+
def enable(self) -> None:
|
|
99
|
+
"""Enable caching."""
|
|
100
|
+
self._enabled = True
|
|
101
|
+
|
|
102
|
+
def disable(self) -> None:
|
|
103
|
+
"""Disable caching and clear all entries."""
|
|
104
|
+
self._enabled = False
|
|
105
|
+
self._cache.clear()
|
|
106
|
+
|
|
107
|
+
def is_enabled(self) -> bool:
|
|
108
|
+
"""Check if caching is enabled."""
|
|
109
|
+
return self._enabled
|
|
110
|
+
|
|
111
|
+
def get_cache_info(self) -> Dict[str, Any]:
|
|
112
|
+
"""Get information about the current cache state."""
|
|
113
|
+
return {
|
|
114
|
+
"enabled": self._enabled,
|
|
115
|
+
"entry_count": len(self._cache),
|
|
116
|
+
"entries": [
|
|
117
|
+
{
|
|
118
|
+
"database": db,
|
|
119
|
+
"collection": coll,
|
|
120
|
+
"timestamp": entry.timestamp.isoformat(),
|
|
121
|
+
"has_data": entry.data is not None,
|
|
122
|
+
"has_search_results": entry.search_results is not None,
|
|
123
|
+
}
|
|
124
|
+
for (db, coll), entry in self._cache.items()
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# Global cache manager instance
|
|
130
|
+
_cache_manager: Optional[CacheManager] = None
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def get_cache_manager() -> CacheManager:
|
|
134
|
+
"""Get or create the global cache manager instance."""
|
|
135
|
+
global _cache_manager
|
|
136
|
+
if _cache_manager is None:
|
|
137
|
+
_cache_manager = CacheManager()
|
|
138
|
+
# Initialize from settings
|
|
139
|
+
try:
|
|
140
|
+
from vector_inspector.services.settings_service import SettingsService
|
|
141
|
+
settings = SettingsService()
|
|
142
|
+
if not settings.get_cache_enabled():
|
|
143
|
+
_cache_manager.disable()
|
|
144
|
+
except Exception:
|
|
145
|
+
# If settings can't be loaded, default to enabled
|
|
146
|
+
pass
|
|
147
|
+
return _cache_manager
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def invalidate_cache_on_settings_change() -> None:
|
|
151
|
+
"""Invalidate all cache when settings change."""
|
|
152
|
+
cache = get_cache_manager()
|
|
153
|
+
cache.invalidate()
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def invalidate_cache_on_refresh(database: Optional[str] = None, collection: Optional[str] = None) -> None:
|
|
157
|
+
"""Invalidate cache on refresh action."""
|
|
158
|
+
cache = get_cache_manager()
|
|
159
|
+
cache.invalidate(database, collection)
|