weaviate-cli 3.0.1__tar.gz → 3.0.2__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.
Files changed (55) hide show
  1. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/PKG-INFO +16 -2
  2. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/README.md +15 -1
  3. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/commands/create.py +21 -2
  4. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/commands/get.py +6 -1
  5. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/commands/update.py +3 -1
  6. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/defaults.py +1 -0
  7. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/managers/collection_manager.py +4 -0
  8. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/managers/config_manager.py +4 -1
  9. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/managers/data_manager.py +7 -2
  10. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/managers/tenant_manager.py +10 -1
  11. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli.egg-info/PKG-INFO +16 -2
  12. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/.github/workflows/main.yaml +0 -0
  13. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/.github/workflows/release.yaml +0 -0
  14. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/.gitignore +0 -0
  15. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/.pre-commit-config.yaml +0 -0
  16. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/CONTRIBUTING.md +0 -0
  17. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/Dockerfile +0 -0
  18. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/LICENSE +0 -0
  19. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/MANIFEST.in +0 -0
  20. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/Makefile +0 -0
  21. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/cli.py +0 -0
  22. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/publish.md +0 -0
  23. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/pyproject.toml +0 -0
  24. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/requirements-dev.txt +0 -0
  25. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/setup.cfg +0 -0
  26. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/setup.py +0 -0
  27. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/README.md +0 -0
  28. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/__init__.py +0 -0
  29. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/integration/test_integration.py +0 -0
  30. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/unittests/conftest.py +0 -0
  31. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/unittests/test_cli.py +0 -0
  32. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/unittests/test_defaults.py +0 -0
  33. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/unittests/test_managers/test_collection_manager.py +0 -0
  34. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/unittests/test_managers/test_config_manager.py +0 -0
  35. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/unittests/test_managers/test_data_manager.py +0 -0
  36. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/unittests/test_managers/test_shard_manager.py +0 -0
  37. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/test/unittests/test_utils.py +0 -0
  38. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/__init__.py +0 -0
  39. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/commands/__init__.py +0 -0
  40. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/commands/cancel.py +0 -0
  41. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/commands/delete.py +0 -0
  42. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/commands/query.py +0 -0
  43. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/commands/restore.py +0 -0
  44. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/datasets/__init__.py +0 -0
  45. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/datasets/movies.json +0 -0
  46. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/managers/__init__.py +0 -0
  47. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/managers/backup_manager.py +0 -0
  48. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/managers/shard_manager.py +0 -0
  49. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli/utils.py +0 -0
  50. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli.egg-info/SOURCES.txt +0 -0
  51. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli.egg-info/dependency_links.txt +0 -0
  52. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli.egg-info/entry_points.txt +0 -0
  53. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli.egg-info/not-zip-safe +0 -0
  54. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli.egg-info/requires.txt +0 -0
  55. {weaviate_cli-3.0.1 → weaviate_cli-3.0.2}/weaviate_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: weaviate-cli
3
- Version: 3.0.1
3
+ Version: 3.0.2
4
4
  Summary: Command line interface to interact with weaviate
5
5
  Home-page: https://github.com/weaviate/weaviate-cli
6
6
  Download-URL: https://github.com/weaviate/weaviate-cli
@@ -125,7 +125,12 @@ Here you can see an example on how the configuration file should look like if yo
125
125
  "auth": {
126
126
  "type": "api_key",
127
127
  "api_key": "jfeRFsdfRfSasgsDoNOtTrYToUsErRQwqqdZfghasd"
128
- }
128
+ },
129
+ "headers":{
130
+ "X-OpenAI-Api-Key":"OPEN_AI_KEY",
131
+ "X-Cohere-Api-Key":"Cohere_AI_KEY",
132
+ "X-JinaAI-Api-Key":"JINA_AI_KEY"
133
+ }
129
134
  }
130
135
  ```
131
136
 
@@ -138,6 +143,15 @@ Here you can see an example on how the configuration file should look like if yo
138
143
 
139
144
  Detailed documentation will be added soon.
140
145
 
146
+ ## Supported Model Provider
147
+
148
+ - Contextionary
149
+ - Transformers
150
+ - OpenAI
151
+ - Ollama
152
+ - Cohere
153
+ - JinaAI
154
+
141
155
  ## Community & Support
142
156
 
143
157
  - [Slack Community](https://weaviate.io/slack) - Join our active community
@@ -89,7 +89,12 @@ Here you can see an example on how the configuration file should look like if yo
89
89
  "auth": {
90
90
  "type": "api_key",
91
91
  "api_key": "jfeRFsdfRfSasgsDoNOtTrYToUsErRQwqqdZfghasd"
92
- }
92
+ },
93
+ "headers":{
94
+ "X-OpenAI-Api-Key":"OPEN_AI_KEY",
95
+ "X-Cohere-Api-Key":"Cohere_AI_KEY",
96
+ "X-JinaAI-Api-Key":"JINA_AI_KEY"
97
+ }
93
98
  }
94
99
  ```
95
100
 
@@ -102,6 +107,15 @@ Here you can see an example on how the configuration file should look like if yo
102
107
 
103
108
  Detailed documentation will be added soon.
104
109
 
110
+ ## Supported Model Provider
111
+
112
+ - Contextionary
113
+ - Transformers
114
+ - OpenAI
115
+ - Ollama
116
+ - Cohere
117
+ - JinaAI
118
+
105
119
  ## Community & Support
106
120
 
107
121
  - [Slack Community](https://weaviate.io/slack) - Join our active community
@@ -91,13 +91,17 @@ def create() -> None:
91
91
  @click.option(
92
92
  "--vectorizer",
93
93
  default=CreateCollectionDefaults.vectorizer,
94
- type=click.Choice(["contextionary", "transformers", "openai", "ollama"]),
94
+ type=click.Choice(
95
+ ["contextionary", "transformers", "openai", "ollama", "cohere", "jinaai"]
96
+ ),
95
97
  help="Vectorizer to use.",
96
98
  )
97
99
  @click.option(
98
100
  "--replication_deletion_strategy",
99
101
  default=CreateCollectionDefaults.replication_deletion_strategy,
100
- type=click.Choice(["delete_on_conflict", "no_automated_resolution"]),
102
+ type=click.Choice(
103
+ ["delete_on_conflict", "no_automated_resolution", "time_based_resolution"]
104
+ ),
101
105
  help="Replication deletion strategy (default: 'delete_on_conflict').",
102
106
  )
103
107
  @click.pass_context
@@ -281,6 +285,11 @@ def create_backup_cli(ctx, backend, backup_id, include, exclude, wait, cpu_for_b
281
285
  default=CreateDataDefaults.vector_dimensions,
282
286
  help="Number of vector dimensions to be used when the data is randomized.",
283
287
  )
288
+ @click.option(
289
+ "--uuid",
290
+ default=None,
291
+ help="UUID of the object to be used when the data is randomized. It requires --limit=1 and --randomize to be enabled.",
292
+ )
284
293
  @click.pass_context
285
294
  def create_data_cli(
286
295
  ctx,
@@ -290,6 +299,7 @@ def create_data_cli(
290
299
  randomize,
291
300
  auto_tenants,
292
301
  vector_dimensions,
302
+ uuid,
293
303
  ):
294
304
  """Ingest data into a collection in Weaviate."""
295
305
 
@@ -299,6 +309,14 @@ def create_data_cli(
299
309
  )
300
310
  sys.exit(1)
301
311
 
312
+ if uuid is not None and not randomize:
313
+ click.echo("Error: --uuid has no effect unless --randomize is enabled.")
314
+ sys.exit(1)
315
+
316
+ if uuid is not None and limit != 1:
317
+ click.echo("Error: --uuid has no effect unless --limit=1 is enabled.")
318
+ sys.exit(1)
319
+
302
320
  client = None
303
321
  try:
304
322
  client = get_client_from_context(ctx)
@@ -311,6 +329,7 @@ def create_data_cli(
311
329
  randomize=randomize,
312
330
  auto_tenants=auto_tenants,
313
331
  vector_dimensions=vector_dimensions,
332
+ uuid=uuid,
314
333
  )
315
334
  except Exception as e:
316
335
  click.echo(f"Error: {e}")
@@ -51,9 +51,13 @@ def get_collection_cli(ctx, collection):
51
51
  default=GetTenantsDefaults.collection,
52
52
  help="The name of the collection to get tenants from.",
53
53
  )
54
+ @click.option(
55
+ "--tenant_id",
56
+ help="The tenant ID to get.",
57
+ )
54
58
  @click.option("--verbose", is_flag=True, help="Print verbose output.")
55
59
  @click.pass_context
56
- def get_tenants_cli(ctx, collection, verbose):
60
+ def get_tenants_cli(ctx, collection, tenant_id, verbose):
57
61
  """Get tenants from a collection in Weaviate."""
58
62
 
59
63
  client = None
@@ -62,6 +66,7 @@ def get_tenants_cli(ctx, collection, verbose):
62
66
  tenant_manager = TenantManager(client)
63
67
  tenant_manager.get_tenants(
64
68
  collection=collection,
69
+ tenant_id=tenant_id,
65
70
  verbose=verbose,
66
71
  )
67
72
  except Exception as e:
@@ -65,7 +65,9 @@ def update() -> None:
65
65
  @click.option(
66
66
  "--replication_deletion_strategy",
67
67
  default=UpdateCollectionDefaults.replication_deletion_strategy,
68
- type=click.Choice(["delete_on_conflict", "no_automated_resolution"]),
68
+ type=click.Choice(
69
+ ["delete_on_conflict", "no_automated_resolution", "time_based_resolution"]
70
+ ),
69
71
  help="Replication deletion strategy.",
70
72
  )
71
73
  @click.pass_context
@@ -82,6 +82,7 @@ class GetCollectionDefaults:
82
82
  @dataclass
83
83
  class GetTenantsDefaults:
84
84
  collection: str = "Movies"
85
+ tenant_id: Optional[str] = None
85
86
  verbose: bool = False
86
87
 
87
88
 
@@ -124,6 +124,8 @@ class CollectionManager:
124
124
  "ollama": wvc.Configure.Vectorizer.text2vec_ollama(
125
125
  model="snowflake-arctic-embed:33m"
126
126
  ),
127
+ "cohere": wvc.Configure.Vectorizer.text2vec_cohere(),
128
+ "jinaai": wvc.Configure.Vectorizer.text2vec_jinaai(),
127
129
  }
128
130
 
129
131
  inverted_index_map: Dict[str, wvc.InvertedIndexConfig] = {
@@ -168,6 +170,7 @@ class CollectionManager:
168
170
  rds_map = {
169
171
  "delete_on_conflict": wvc.ReplicationDeletionStrategy.DELETE_ON_CONFLICT,
170
172
  "no_automated_resolution": wvc.ReplicationDeletionStrategy.NO_AUTOMATED_RESOLUTION,
173
+ "time_based_resolution": wvc.ReplicationDeletionStrategy.TIME_BASED_RESOLUTION,
171
174
  }
172
175
 
173
176
  try:
@@ -258,6 +261,7 @@ class CollectionManager:
258
261
  rds_map = {
259
262
  "delete_on_conflict": wvc.ReplicationDeletionStrategy.DELETE_ON_CONFLICT,
260
263
  "no_automated_resolution": wvc.ReplicationDeletionStrategy.NO_AUTOMATED_RESOLUTION,
264
+ "time_based_resolution": wvc.ReplicationDeletionStrategy.TIME_BASED_RESOLUTION,
261
265
  }
262
266
  mt = col_obj.config.get().multi_tenancy_config.enabled
263
267
  auto_tenant_creation = (
@@ -98,8 +98,11 @@ class ConfigManager:
98
98
  port=self.config["http_port"],
99
99
  grpc_port=self.config["grpc_port"],
100
100
  auth_credentials=auth_config,
101
+ headers=self.config["headers"] if "headers" in self.config else None,
101
102
  )
102
103
  else:
103
104
  return weaviate.connect_to_wcs(
104
- cluster_url=self.config["host"], auth_credentials=auth_config
105
+ cluster_url=self.config["host"],
106
+ auth_credentials=auth_config,
107
+ headers=self.config["headers"] if "headers" in self.config else None,
105
108
  )
@@ -145,6 +145,7 @@ class DataManager:
145
145
  cl: wvc.ConsistencyLevel,
146
146
  randomize: bool,
147
147
  vector_dimensions: Optional[int] = 1536,
148
+ uuid: Optional[str] = None,
148
149
  ) -> int:
149
150
  if randomize:
150
151
  counter = 0
@@ -160,15 +161,16 @@ class DataManager:
160
161
  vector_dimensions = 300
161
162
  elif vectorizer == "text2vec-transformers":
162
163
  (
163
- print("Warning: Using vector dimensions: 768")
164
+ print("Warning: Using vector dimensions: 384")
164
165
  if vector_dimensions != 1536
165
166
  else None
166
167
  )
167
- vector_dimensions = 768
168
+ vector_dimensions = 384
168
169
  with cl_collection.batch.dynamic() as batch:
169
170
  for obj in data_objects:
170
171
  batch.add_object(
171
172
  properties=obj,
173
+ uuid=uuid,
172
174
  vector=(
173
175
  2 * np.random.rand(1, vector_dimensions)[0] - 1
174
176
  ).tolist(),
@@ -200,6 +202,7 @@ class DataManager:
200
202
  randomize: bool = CreateDataDefaults.randomize,
201
203
  auto_tenants: int = CreateDataDefaults.auto_tenants,
202
204
  vector_dimensions: Optional[int] = CreateDataDefaults.vector_dimensions,
205
+ uuid: Optional[str] = None,
203
206
  ) -> None:
204
207
 
205
208
  if not self.client.collections.exists(collection):
@@ -252,6 +255,7 @@ class DataManager:
252
255
  cl_map[consistency_level],
253
256
  randomize,
254
257
  vector_dimensions,
258
+ uuid,
255
259
  )
256
260
  else:
257
261
  click.echo(f"Processing tenant '{tenant}'")
@@ -261,6 +265,7 @@ class DataManager:
261
265
  cl_map[consistency_level],
262
266
  randomize,
263
267
  vector_dimensions,
268
+ uuid,
264
269
  )
265
270
 
266
271
  if ret == -1:
@@ -184,6 +184,7 @@ class TenantManager:
184
184
  def get_tenants(
185
185
  self,
186
186
  collection: str = GetTenantsDefaults.collection,
187
+ tenant_id: str = GetTenantsDefaults.tenant_id,
187
188
  verbose: bool = GetTenantsDefaults.verbose,
188
189
  ) -> dict:
189
190
  """
@@ -191,6 +192,7 @@ class TenantManager:
191
192
 
192
193
  Args:
193
194
  collection (str): The name of the collection to retrieve tenants from.
195
+ tenant_id (str): The ID of the tenant to retrieve. If None, retrieves all tenants.
194
196
  verbose (bool): If True, prints detailed tenant information. If False, prints summary.
195
197
 
196
198
  Returns:
@@ -199,7 +201,14 @@ class TenantManager:
199
201
  Raises:
200
202
  Exception: If the collection does not exist or multi-tenancy is not enabled.
201
203
  """
202
- tenants = self.client.collections.get(collection).tenants.get()
204
+ if tenant_id:
205
+ tenants = self.client.collections.get(collection).tenants.get_by_names(
206
+ [tenant_id]
207
+ )
208
+ if not tenants:
209
+ raise Exception(f"Tenant '{tenant_id}' not found in class {collection}")
210
+ else:
211
+ tenants = self.client.collections.get(collection).tenants.get()
203
212
 
204
213
  if verbose:
205
214
  click.echo(f"{'Tenant Name':<20}{'Activity Status':<20}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: weaviate-cli
3
- Version: 3.0.1
3
+ Version: 3.0.2
4
4
  Summary: Command line interface to interact with weaviate
5
5
  Home-page: https://github.com/weaviate/weaviate-cli
6
6
  Download-URL: https://github.com/weaviate/weaviate-cli
@@ -125,7 +125,12 @@ Here you can see an example on how the configuration file should look like if yo
125
125
  "auth": {
126
126
  "type": "api_key",
127
127
  "api_key": "jfeRFsdfRfSasgsDoNOtTrYToUsErRQwqqdZfghasd"
128
- }
128
+ },
129
+ "headers":{
130
+ "X-OpenAI-Api-Key":"OPEN_AI_KEY",
131
+ "X-Cohere-Api-Key":"Cohere_AI_KEY",
132
+ "X-JinaAI-Api-Key":"JINA_AI_KEY"
133
+ }
129
134
  }
130
135
  ```
131
136
 
@@ -138,6 +143,15 @@ Here you can see an example on how the configuration file should look like if yo
138
143
 
139
144
  Detailed documentation will be added soon.
140
145
 
146
+ ## Supported Model Provider
147
+
148
+ - Contextionary
149
+ - Transformers
150
+ - OpenAI
151
+ - Ollama
152
+ - Cohere
153
+ - JinaAI
154
+
141
155
  ## Community & Support
142
156
 
143
157
  - [Slack Community](https://weaviate.io/slack) - Join our active community
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes