vanna 0.7.0__py3-none-any.whl → 0.7.1__py3-none-any.whl

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.
@@ -26,6 +26,7 @@ class WeaviateDatabase(VannaBase):
26
26
  if config is None:
27
27
  raise ValueError("config is required")
28
28
 
29
+ self.n_results = config.get("n_results", 3)
29
30
  self.fastembed_model = config.get("fastembed_model", "BAAI/bge-small-en-v1.5")
30
31
  self.weaviate_api_key = config.get("weaviate_api_key")
31
32
  self.weaviate_url = config.get("weaviate_url")
@@ -120,12 +121,12 @@ class WeaviateDatabase(VannaBase):
120
121
  response = self._insert_data('sql', data_object, self.generate_embedding(question))
121
122
  return f'{response}-sql'
122
123
 
123
- def _query_collection(self, cluster_key: str, vector_input: list, return_properties: list, limit: int = 3) -> list:
124
+ def _query_collection(self, cluster_key: str, vector_input: list, return_properties: list) -> list:
124
125
  self.weaviate_client.connect()
125
126
  collection = self.weaviate_client.collections.get(self.training_data_cluster[cluster_key])
126
127
  response = collection.query.near_vector(
127
128
  near_vector=vector_input,
128
- limit=limit,
129
+ limit=self.n_results,
129
130
  return_properties=return_properties
130
131
  )
131
132
  response_list = [item.properties for item in response.objects]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vanna
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Generate SQL queries from natural language
5
5
  Author-email: Zain Hoda <zain@vanna.ai>
6
6
  Requires-Python: >=3.9
@@ -58,7 +58,7 @@ vanna/vannadb/vannadb_vector.py,sha256=N8poMYvAojoaOF5gI4STD5pZWK9lBKPvyIjbh9dPB
58
58
  vanna/vllm/__init__.py,sha256=aNlUkF9tbURdeXAJ8ytuaaF1gYwcG3ny1MfNl_cwQYg,23
59
59
  vanna/vllm/vllm.py,sha256=oM_aA-1Chyl7T_Qc_yRKlL6oSX1etsijY9zQdjeMGMQ,2827
60
60
  vanna/weaviate/__init__.py,sha256=HL6PAl7ePBAkeG8uln-BmM7IUtWohyTPvDfcPzSGSCg,46
61
- vanna/weaviate/weaviate_vector.py,sha256=GEiu4Vd9w-7j10aB-zTxJ8gefqe_F-LUUGvttFs1vlg,7539
62
- vanna-0.7.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
63
- vanna-0.7.0.dist-info/METADATA,sha256=O-4tGHTmtlFTk-JMoYMNw0S3R6rfcu8geWDIUojQ36U,12407
64
- vanna-0.7.0.dist-info/RECORD,,
61
+ vanna/weaviate/weaviate_vector.py,sha256=tUJIZjEy2mda8CB6C8zeN2SKkEO-UJdLsIqy69skuF0,7584
62
+ vanna-0.7.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
63
+ vanna-0.7.1.dist-info/METADATA,sha256=3u_bTszt64VtEBVQbfmUCBvUV7OZk2df07eAhN8mZa4,12407
64
+ vanna-0.7.1.dist-info/RECORD,,
File without changes