diff --git a/CHANGELOG.md b/CHANGELOG.md index e7d2f757a..a9f150036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,9 +32,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **BREAKING**: Renamed `DummyException` to `DummyError` for pep8 naming compliance. - **BREAKING**: Migrate to `sqlalchemy` 2.0. - **BREAKING**: Make `sqlalchemy` an optional dependency. -- **BREAKING**: Rename `drivers-sql-redshift` to `drivers-sql-amazon-redshift` -- Removed unnecessary `sqlalchemy-redshift` dependency in `drivers-sql-amazon-redshift` extra. +- **BREAKING**: Renamed `drivers-sql-redshift` to `drivers-sql-amazon-redshift` +- **BREAKING**: Renamed `drivers-prompt-huggingface` extra to `drivers-prompt-huggingface-hub`. +- **BREAKING**: Renamed `drivers-vector-postgresql` extra to `drivers-vector-pgvector`. - **BREAKING**: Update `marqo` dependency to `^3.7.0`. +- **BREAKING**: Removed `drivers-sql-postgresql` extra. Use `drivers-sql` extra and install necessary drivers (i.e. `psycopg2`) separately. +- Removed unnecessary `sqlalchemy-redshift` dependency in `drivers-sql-amazon-redshift` extra. - Removed unnecessary `transformers` dependency in `drivers-prompt-huggingface` extra. - Removed unnecessary `huggingface-hub` dependency in `drivers-prompt-huggingface-pipeline` extra. diff --git a/docs/griptape-framework/drivers/sql-drivers.md b/docs/griptape-framework/drivers/sql-drivers.md index 2ca249fec..814112a12 100644 --- a/docs/griptape-framework/drivers/sql-drivers.md +++ b/docs/griptape-framework/drivers/sql-drivers.md @@ -10,14 +10,17 @@ SQL drivers can be used to make SQL queries and load table schemas. They are use * `execute_query_row()` executes a query and returns a raw result from SQL. * `get_table_schema()` returns a table schema. -!!! info - More database-specific SQL drivers are coming soon. - ## SQL Drivers ### SQL -This is a basic SQL loader based on [SQLAlchemy 1.x](https://docs.sqlalchemy.org/en/14/). Here is an example of how to use it: +!!! info + This driver requires the `drivers-sql` [extra](../index.md#extras). + +Note that you may need to install the appropriate database driver for your SQL database. +For example, to use the `psycopg2` driver for PostgreSQL, you can install it with `pip install psycopg2-binary`. + +This is a basic SQL loader based on [SQLAlchemy 2.0](https://docs.sqlalchemy.org/en/20/). Here is an example of how to use it: ```python from griptape.drivers import SqlDriver @@ -32,7 +35,7 @@ driver.execute_query("select 'foo', 'bar';") ### Amazon Redshift !!! info - This driver requires the `drivers-sql-redshift` [extra](../index.md#extras). + This driver requires the `drivers-sql-amazon-redshift` [extra](../index.md#extras). This is a SQL driver for interacting with the [Amazon Redshift Data API](https://docs.aws.amazon.com/redshift-data/latest/APIReference/Welcome.html) to execute statements. Here is an example of how to use it for Redshift Serverless: diff --git a/docs/griptape-framework/drivers/vector-store-drivers.md b/docs/griptape-framework/drivers/vector-store-drivers.md index d88e5fc33..2b76119b3 100644 --- a/docs/griptape-framework/drivers/vector-store-drivers.md +++ b/docs/griptape-framework/drivers/vector-store-drivers.md @@ -386,7 +386,7 @@ The body mappings for creating a vector index should look similar to the followi ### PGVector !!! info - This Driver requires the `drivers-vector-postgresql` [extra](../index.md#extras). + This Driver requires the `drivers-vector-pgvector` [extra](../index.md#extras). The [PGVectorVectorStoreDriver](../../reference/griptape/drivers/vector/pgvector_vector_store_driver.md) integrates with PGVector, a vector storage and search extension for Postgres. While Griptape will handle enabling the extension, PGVector must be installed and ready for use in your Postgres instance before using this Vector Store Driver. diff --git a/poetry.lock b/poetry.lock index 29a00ee32..2738d6c97 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6707,19 +6707,19 @@ drivers-prompt-amazon-sagemaker = ["boto3", "transformers"] drivers-prompt-anthropic = ["anthropic"] drivers-prompt-cohere = ["cohere"] drivers-prompt-google = ["google-generativeai"] -drivers-prompt-huggingface = ["huggingface-hub", "transformers"] +drivers-prompt-huggingface-hub = ["huggingface-hub", "transformers"] drivers-prompt-huggingface-pipeline = ["transformers"] drivers-prompt-ollama = ["ollama"] drivers-rerank-cohere = ["cohere"] +drivers-sql = ["sqlalchemy"] drivers-sql-amazon-redshift = ["boto3"] -drivers-sql-postgres = ["pgvector", "psycopg2-binary", "sqlalchemy"] drivers-sql-snowflake = ["snowflake-sqlalchemy", "sqlalchemy"] drivers-vector-amazon-opensearch = ["boto3", "opensearch-py"] drivers-vector-marqo = ["marqo"] drivers-vector-mongodb = ["pymongo"] drivers-vector-opensearch = ["opensearch-py"] +drivers-vector-pgvector = ["pgvector", "psycopg2-binary", "sqlalchemy"] drivers-vector-pinecone = ["pinecone-client"] -drivers-vector-postgresql = ["pgvector", "psycopg2-binary", "sqlalchemy"] drivers-vector-qdrant = ["qdrant-client"] drivers-vector-redis = ["redis"] drivers-web-scraper-markdownify = ["beautifulsoup4", "markdownify", "playwright"] @@ -6735,4 +6735,4 @@ loaders-sql = ["sqlalchemy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "2709e2b4622507351d69ed483b96910b001046759c1f02d70c24e014a617bce9" +content-hash = "214d3ce5365f5ce4d852e44019dbbea4659422bdc0231f7cf745a47eeb90ae18" diff --git a/pyproject.toml b/pyproject.toml index 1c66d4095..2b11746d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,16 +70,16 @@ filetype = {version = "^1.2", optional = true} [tool.poetry.extras] drivers-prompt-cohere = ["cohere"] drivers-prompt-anthropic = ["anthropic"] -drivers-prompt-huggingface = ["huggingface-hub", "transformers"] +drivers-prompt-huggingface-hub = ["huggingface-hub", "transformers"] drivers-prompt-huggingface-pipeline = ["transformers"] drivers-prompt-amazon-bedrock = ["boto3", "anthropic"] drivers-prompt-amazon-sagemaker = ["boto3", "transformers"] drivers-prompt-google = ["google-generativeai"] drivers-prompt-ollama = ["ollama"] +drivers-sql = ["sqlalchemy"] drivers-sql-amazon-redshift = ["boto3"] drivers-sql-snowflake = ["sqlalchemy", "snowflake-sqlalchemy", "snowflake"] -drivers-sql-postgres = ["sqlalchemy", "pgvector", "psycopg2-binary"] drivers-memory-conversation-amazon-dynamodb = ["boto3"] drivers-memory-conversation-redis = ["redis"] @@ -90,7 +90,7 @@ drivers-vector-mongodb = ["pymongo"] drivers-vector-redis = ["redis"] drivers-vector-opensearch = ["opensearch-py"] drivers-vector-amazon-opensearch = ["opensearch-py", "boto3"] -drivers-vector-postgresql = ["sqlalchemy", "pgvector", "psycopg2-binary"] +drivers-vector-pgvector = ["sqlalchemy", "pgvector", "psycopg2-binary"] drivers-vector-qdrant = ["qdrant-client"] drivers-embedding-amazon-bedrock = ["boto3"]