Skip to content

Commit

Permalink
Clean up extras
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed Jul 22, 2024
1 parent 4b8ded8 commit 44763b9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ 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`
- **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**: Renamed `drivers-prompt-huggingface` extra to `drivers-prompt-huggingface-hub` for consistency.
- **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.
Expand Down
13 changes: 8 additions & 5 deletions docs/griptape-framework/drivers/sql-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/griptape-framework/drivers/vector-store-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ 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"]
Expand All @@ -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"]
Expand Down

0 comments on commit 44763b9

Please sign in to comment.