Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/extras naming #1008

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
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
Loading