From 7a0f037deeb2e2ee4ae48f8014d82375d659286f Mon Sep 17 00:00:00 2001 From: Collin Dutter Date: Thu, 23 May 2024 11:45:35 -0700 Subject: [PATCH 1/2] Add missing extra note --- docs/griptape-framework/drivers/web-scraper-drivers.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/griptape-framework/drivers/web-scraper-drivers.md b/docs/griptape-framework/drivers/web-scraper-drivers.md index e1a3f53b3..888605b73 100644 --- a/docs/griptape-framework/drivers/web-scraper-drivers.md +++ b/docs/griptape-framework/drivers/web-scraper-drivers.md @@ -66,6 +66,9 @@ agent.run("List all email addresses on griptape.ai in a flat numbered markdown l ## Trafilatura Web Scraper Driver +!!! info + This driver requires the `drivers-web-scraper-trafilatura` [extra](../index.md#extras). + The [TrafilaturaWebScraperDriver](../../reference/griptape/drivers/web_scraper/trafilatura_web_scraper_driver.md) scrapes text from a webpage using the [Trafilatura](https://trafilatura.readthedocs.io) library. Example of using `TrafilaturaWebScraperDriver` directly: From 6e7afd9f3413b9e05df5f23963250996a819f780 Mon Sep 17 00:00:00 2001 From: Collin Dutter Date: Thu, 23 May 2024 11:46:32 -0700 Subject: [PATCH 2/2] Update error message for optional dependencies --- CHANGELOG.md | 3 ++- griptape/utils/import_utils.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a15137e..fb2e5636a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `AzureOpenAiVisionImageQueryDriver` to support queries on images using Azure's OpenAI Vision models. ### Changed +- **BREAKING**: Updated OpenAI-based image query drivers to remove Vision from the name. - Default the value of `azure_deployment` on all Azure Drivers to the model the Driver is using. - Field `azure_ad_token` on all Azure Drivers is no longer serializable. - Default standard OpenAI and Azure OpenAI image query model to `gpt-4o`. -- **BREAKING**: Updated OpenAI-based image query drivers to remove Vision from the name. +- Error message to be more helpful when importing optional dependencies. ## [0.25.1] - 2024-05-15 diff --git a/griptape/utils/import_utils.py b/griptape/utils/import_utils.py index dd5b5b68e..5e00551f8 100644 --- a/griptape/utils/import_utils.py +++ b/griptape/utils/import_utils.py @@ -26,7 +26,10 @@ def import_optional_dependency(name: str) -> Optional[ModuleType]: package_name = INSTALL_MAPPING.get(name) install_name = package_name if package_name is not None else name - msg = f"Missing optional dependency: '{install_name}'. " f"Use poetry or pip to install '{install_name}'." + msg = ( + f"Missing optional dependency: '{install_name}'. " + f"Please install the appropriate extra: https://docs.griptape.ai/stable/griptape-framework/#extras." + ) try: module = import_module(name) except ImportError: