From 55563c83a68fbc55dd18b23d0aa09b5a006bc385 Mon Sep 17 00:00:00 2001 From: Gui Quental Date: Tue, 15 Oct 2024 10:21:11 -0300 Subject: [PATCH 1/4] Update gemini version to 1.5 --- src/vanna/google/gemini_chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vanna/google/gemini_chat.py b/src/vanna/google/gemini_chat.py index b33ce5bd..95bffb70 100644 --- a/src/vanna/google/gemini_chat.py +++ b/src/vanna/google/gemini_chat.py @@ -15,7 +15,7 @@ def __init__(self, config=None): if "model_name" in config: model_name = config["model_name"] else: - model_name = "gemini-1.0-pro" + model_name = "gemini-1.5-pro" self.google_api_key = None From baf3dbeec1b10c3bb2111f39f5a9d53ebaaa1f39 Mon Sep 17 00:00:00 2001 From: Gui Quental Date: Tue, 15 Oct 2024 10:21:24 -0300 Subject: [PATCH 2/4] Change SDK to GA instead of preview --- src/vanna/google/gemini_chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vanna/google/gemini_chat.py b/src/vanna/google/gemini_chat.py index 95bffb70..60732472 100644 --- a/src/vanna/google/gemini_chat.py +++ b/src/vanna/google/gemini_chat.py @@ -30,7 +30,7 @@ def __init__(self, config=None): self.chat_model = genai.GenerativeModel(model_name) else: # Authenticate using VertexAI - from vertexai.preview.generative_models import GenerativeModel + from vertexai.generative_models import GenerativeModel self.chat_model = GenerativeModel(model_name) def system_message(self, message: str) -> any: From e93e5d39ee6bc285dedfaae2bd551d396ef9d997 Mon Sep 17 00:00:00 2001 From: eux Date: Wed, 23 Oct 2024 12:01:29 +0800 Subject: [PATCH 3/4] fix: some tests due to missing modules --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a4fb927..af25d8ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ bigquery = ["google-cloud-bigquery"] snowflake = ["snowflake-connector-python"] duckdb = ["duckdb"] google = ["google-generativeai", "google-cloud-aiplatform"] -all = ["psycopg2-binary", "db-dtypes", "PyMySQL", "google-cloud-bigquery", "snowflake-connector-python", "duckdb", "openai", "qianfan", "mistralai>=1.0.0", "chromadb", "anthropic", "zhipuai", "marqo", "google-generativeai", "google-cloud-aiplatform", "qdrant-client", "fastembed", "ollama", "httpx", "opensearch-py", "opensearch-dsl", "transformers", "pinecone-client", "pymilvus[model]","weaviate-client", "azure-search-documents", "azure-identity", "azure-common", "faiss-cpu", "boto", "botocore"] +all = ["psycopg2-binary", "db-dtypes", "PyMySQL", "google-cloud-bigquery", "snowflake-connector-python", "duckdb", "openai", "qianfan", "mistralai>=1.0.0", "chromadb", "anthropic", "zhipuai", "marqo", "google-generativeai", "google-cloud-aiplatform", "qdrant-client", "fastembed", "ollama", "httpx", "opensearch-py", "opensearch-dsl", "transformers", "pinecone-client", "pymilvus[model]","weaviate-client", "azure-search-documents", "azure-identity", "azure-common", "faiss-cpu", "boto", "boto3", "botocore", "langchain_core", "langchain_postgres"] test = ["tox"] chromadb = ["chromadb"] openai = ["openai"] From 932131f7e571f6a28ddf1ec1dcfe8ac206ed7c0a Mon Sep 17 00:00:00 2001 From: Zain Hoda <7146154+zainhoda@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:02:07 -0400 Subject: [PATCH 4/4] remove pgvector tests --- tests/test_pgvector.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/test_pgvector.py b/tests/test_pgvector.py index 4bc1dea9..8c9344a5 100644 --- a/tests/test_pgvector.py +++ b/tests/test_pgvector.py @@ -2,23 +2,23 @@ from dotenv import load_dotenv -from vanna.pgvector import PG_VectorStore +# from vanna.pgvector import PG_VectorStore load_dotenv() +# Removing thiese tests for now until the dependencies are sorted out +# def get_vanna_connection_string(): +# server = os.environ.get("PG_SERVER") +# driver = "psycopg" +# port = 5434 +# database = os.environ.get("PG_DATABASE") +# username = os.environ.get("PG_USERNAME") +# password = os.environ.get("PG_PASSWORD") -def get_vanna_connection_string(): - server = os.environ.get("PG_SERVER") - driver = "psycopg" - port = 5434 - database = os.environ.get("PG_DATABASE") - username = os.environ.get("PG_USERNAME") - password = os.environ.get("PG_PASSWORD") +# return f"postgresql+psycopg://{username}:{password}@{server}:{port}/{database}" - return f"postgresql+psycopg://{username}:{password}@{server}:{port}/{database}" - -def test_pgvector(): - connection_string = get_vanna_connection_string() - pgclient = PG_VectorStore(config={"connection_string": connection_string}) - assert pgclient is not None +# def test_pgvector(): +# connection_string = get_vanna_connection_string() +# pgclient = PG_VectorStore(config={"connection_string": connection_string}) +# assert pgclient is not None