From 13fda2efe1792aace5efa00b896f441e2213096e Mon Sep 17 00:00:00 2001 From: Dev Khant Date: Fri, 8 Sep 2023 08:12:55 +0530 Subject: [PATCH] fix: --upgrade flag for all pip instances (#557) --- docs/advanced/app_types.mdx | 2 +- docs/advanced/data_types.mdx | 2 +- docs/examples/discord_bot.mdx | 2 +- docs/examples/poe_bot.mdx | 2 +- docs/examples/whatsapp_bot.mdx | 2 +- docs/quickstart.mdx | 2 +- embedchain/bots/slack.py | 3 ++- embedchain/llm/gpt4all_llm.py | 2 +- embedchain/loaders/notion.py | 4 +++- embedchain/vectordb/elasticsearch_db.py | 2 +- 10 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/advanced/app_types.mdx b/docs/advanced/app_types.mdx index 147d769f..757fb058 100644 --- a/docs/advanced/app_types.mdx +++ b/docs/advanced/app_types.mdx @@ -63,7 +63,7 @@ app = OpenSourceApp() - Here there is no need to setup any api keys. You just need to install embedchain package and these will get automatically installed. 📦 - Once you have imported and instantiated the app, every functionality from here onwards is the same for either type of app. 📚 - `OpenSourceApp` is opinionated. It uses the best open source embedding model and LLM on the market. -- extra dependencies are required for this app type. Install them with `pip install embedchain[opensource]`. +- extra dependencies are required for this app type. Install them with `pip install --upgrade embedchain[opensource]`. ### CustomApp diff --git a/docs/advanced/data_types.mdx b/docs/advanced/data_types.mdx index 2e8043fd..7ce176a7 100644 --- a/docs/advanced/data_types.mdx +++ b/docs/advanced/data_types.mdx @@ -91,7 +91,7 @@ app.add("https://docs.embedchain.ai/", data_type="docs_site") ``` ### Notion -To use notion you must install the extra dependencies with `pip install embedchain[notion]`. +To use notion you must install the extra dependencies with `pip install --upgrade embedchain[notion]`. To load a notion page, use the data_type as `notion`. Since it is hard to automatically detect, forcing this is advised. The next argument must **end** with the `notion page id`. The id is a 32-character string. Eg: diff --git a/docs/examples/discord_bot.mdx b/docs/examples/discord_bot.mdx index 9c9f3b4b..200810e9 100644 --- a/docs/examples/discord_bot.mdx +++ b/docs/examples/discord_bot.mdx @@ -26,7 +26,7 @@ Send Messages (under Text Permissions) 1. Install embedchain python package: ```bash -pip install "embedchain[discord]" +pip install --upgrade "embedchain[discord]" ``` 2. Launch your Discord bot: diff --git a/docs/examples/poe_bot.mdx b/docs/examples/poe_bot.mdx index 705350cc..42754553 100644 --- a/docs/examples/poe_bot.mdx +++ b/docs/examples/poe_bot.mdx @@ -7,7 +7,7 @@ title: '🔮 Poe Bot' 1. Install embedchain python package: ```bash -pip install "embedchain[poe]" +pip install --upgrade "embedchain[poe]" ``` 2. Create a free account on [Poe](https://www.poe.com?utm_source=embedchain). diff --git a/docs/examples/whatsapp_bot.mdx b/docs/examples/whatsapp_bot.mdx index cdeb8128..3d7553f2 100644 --- a/docs/examples/whatsapp_bot.mdx +++ b/docs/examples/whatsapp_bot.mdx @@ -7,7 +7,7 @@ title: '💬 WhatsApp Bot' 1. Install embedchain python package: ```bash -pip install embedchain +pip install --upgrade embedchain ``` 2. Launch your WhatsApp bot: diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index 99a85707..55d4f5a0 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -6,7 +6,7 @@ description: '💡 Start building LLM powered bots under 30 seconds' Install embedchain python package: ```bash -pip install embedchain +pip install --upgrade embedchain ``` Creating a chatbot involves 3 steps: diff --git a/embedchain/bots/slack.py b/embedchain/bots/slack.py index db2e9bb6..a00ec8b0 100644 --- a/embedchain/bots/slack.py +++ b/embedchain/bots/slack.py @@ -14,7 +14,8 @@ try: from slack_sdk import WebClient except ModuleNotFoundError: raise ModuleNotFoundError( - "The required dependencies for Slack are not installed." 'Please install with `pip install "embedchain[slack]"`' + "The required dependencies for Slack are not installed." + 'Please install with `pip install --upgrade "embedchain[slack]"`' ) from None diff --git a/embedchain/llm/gpt4all_llm.py b/embedchain/llm/gpt4all_llm.py index 36ea325b..d08ea91f 100644 --- a/embedchain/llm/gpt4all_llm.py +++ b/embedchain/llm/gpt4all_llm.py @@ -22,7 +22,7 @@ class GPT4ALLLlm(BaseLlm): from gpt4all import GPT4All except ModuleNotFoundError: raise ModuleNotFoundError( - "The GPT4All python package is not installed. Please install it with `pip install embedchain[opensource]`" # noqa E501 + "The GPT4All python package is not installed. Please install it with `pip install --upgrade embedchain[opensource]`" # noqa E501 ) from None return GPT4All(model_name=model) diff --git a/embedchain/loaders/notion.py b/embedchain/loaders/notion.py index bc7e7a37..b9f894df 100644 --- a/embedchain/loaders/notion.py +++ b/embedchain/loaders/notion.py @@ -4,7 +4,9 @@ import os try: from llama_index import download_loader except ImportError: - raise ImportError("Notion requires extra dependencies. Install with `pip install embedchain[community]`") from None + raise ImportError( + "Notion requires extra dependencies. Install with `pip install --upgrade embedchain[community]`" + ) from None from embedchain.helper_classes.json_serializable import register_deserializable diff --git a/embedchain/vectordb/elasticsearch_db.py b/embedchain/vectordb/elasticsearch_db.py index 227f4117..2125e701 100644 --- a/embedchain/vectordb/elasticsearch_db.py +++ b/embedchain/vectordb/elasticsearch_db.py @@ -5,7 +5,7 @@ try: from elasticsearch.helpers import bulk except ImportError: raise ImportError( - "Elasticsearch requires extra dependencies. Install with `pip install embedchain[elasticsearch]`" + "Elasticsearch requires extra dependencies. Install with `pip install --upgrade embedchain[elasticsearch]`" ) from None from embedchain.config import ElasticsearchDBConfig