Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

fix: bot cookbook format (#1286)

Wendong-Fan27b9b54f1c55
diff --git a/docs/cookbooks/customer_service_Discord_bot_with_agentic_RAG.ipynb b/docs/cookbooks/customer_service_Discord_bot_with_agentic_RAG.ipynb
index 0b2179b07..dc5259225 100644
--- a/docs/cookbooks/customer_service_Discord_bot_with_agentic_RAG.ipynb
+++ b/docs/cookbooks/customer_service_Discord_bot_with_agentic_RAG.ipynb
@@ -11,18 +11,11 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
- "metadata": {
- "id": "Df83ecULZgqM"
- },
+ "metadata": {},
"source": [
- "To run this, press \"*Runtime*\" and press \"*Run all*\" on a **free** Tesla T4 Google Colab instance!\n",
- "<div class=\"align-center\">\n",
- " <a href=\"https://www.camel-ai.org/\"><img src=\"https://i.postimg.cc/KzQ5rfBC/button.png\"width=\"150\"></a>\n",
- " <a href=\"https://discord.camel-ai.org\"><img src=\"https://i.postimg.cc/L4wPdG9N/join-2.png\" width=\"150\"></a></a>\n",
- " \n",
- " Join our Discord if you need help + ⭐ <i>Star us on <a href=\"https://github.com/camel-ai/camel\">Github</a> </i> ⭐\n",
- "</div>\n"
+ "You can also check this cookbook in colab [here](https://colab.research.google.com/drive/1C0ew2B3gn3BGJs9PMfa79CUGdXCICO_v?usp=sharing)"
]
},
{
@@ -30,7 +23,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "You can also check this cookbook in colab [here](https://colab.research.google.com/drive/1C0ew2B3gn3BGJs9PMfa79CUGdXCICO_v?usp=sharing)"
+ "⭐ **Star the Repo**\n",
+ "\n",
+ "If you find CAMEL useful or interesting, please consider giving it a star on our [CAMEL GitHub Repo](https://github.com/camel-ai/camel)! Your stars help others find this project and motivate us to continue improving it."
]
},
{
@@ -64,7 +59,7 @@
},
"outputs": [],
"source": [
- "!pip install \"camel-ai[all]==0.2.10\"\n",
+ "!pip install \"camel-ai[all]==0.2.11\"\n",
"!pip install starlette\n",
"!pip install nest_asyncio"
]
@@ -79,15 +74,20 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "KBajuNl3akJ_"
},
"source": [
"If you don't have a FireCrawl API key, you can obtain one by following these steps:\n",
+ "\n",
"1. Visit the FireCrawl API Key page https://www.firecrawl.dev/app/api-keys\n",
+ "\n",
"2. Log in or sign up for a FireCrawl account.\n",
+ "\n",
"3. Navigate to the 'API Keys' section.\n",
+ "\n",
"4. Click on 'Create API Key' button to generate a new API key.\n",
"\n",
"For more details, you can also check the Firecrawl documentation: https://docs.firecrawl.dev/api-reference/introduction"
@@ -121,6 +121,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "zzG0KAvrezOG"
@@ -129,8 +130,11 @@
"If you want to choose Mistral as the model, skip below part for Qwen.\n",
"\n",
"If you don't have a Qwen API key, you can obtain one by following these steps:\n",
+ "\n",
"1. Visit the Alibaba Cloud Model Studio Console (https://www.alibabacloud.com/en?_p_lc=1) and follow the on-screen instructions to activate the model services.\n",
+ "\n",
"2. In the upper-right corner of the console, click on your account name and select API-KEY.\n",
+ "\n",
"3. On the API Key management page, click on the Create API Key button to generate a new key.\n",
"\n",
"For more details, you can also check the Qwen documentation: https://www.alibabacloud.com/help/en/model-studio/developer-reference/use-qwen-by-calling-api"
@@ -164,6 +168,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "HPenxbN91eZy"
@@ -172,8 +177,11 @@
"Alternatively, use Mistral.\n",
"\n",
"If you don't have a Mistral API key, you can obtain one by following these steps:\n",
+ "\n",
"1. Visit the Mistral Console (https://console.mistral.ai/)\n",
+ "\n",
"2. In the left panel, click on API keys under API section\n",
+ "\n",
"3. Choose your plan\n",
"\n",
"For more details, you can also check the Mistral documentation: https://docs.mistral.ai/getting-started/quickstart/"
@@ -199,9 +207,6 @@
}
],
"source": [
- "import os\n",
- "from getpass import getpass\n",
- "\n",
"mistral_api_key = getpass('Enter your API key')\n",
"os.environ[\"MISTRAL_API_KEY\"] = mistral_api_key"
]
@@ -246,8 +251,6 @@
],
"source": [
"import os\n",
- "from typing import List\n",
- "from pydantic import BaseModel, Field\n",
"from camel.loaders import Firecrawl\n",
"\n",
"os.makedirs('local_data', exist_ok=True)\n",
@@ -402,6 +405,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "E2J4DJXtIOLa"
@@ -410,22 +414,35 @@
"To build a discord bot, a discord bot token is necessary.\n",
"\n",
"If you don't have a bot token, you can obtain one by following these steps:\n",
+ "\n",
"1. Go to the Discord Developer Portal:https://discord.com/developers/applications\n",
+ "\n",
"2. Log in with your Discord account, or create an account if you don't have one\n",
+ "\n",
"3. Click on 'New Application' to create a new bot.\n",
+ "\n",
"4. Give your application a name and click 'Create'.\n",
+ "\n",
"5. Navigate to the 'Bot' tab on the left sidebar and click 'Add Bot'.\n",
+ "\n",
"6. Once the bot is created, you will find a 'Token' section. Click 'Reset Token' to generate a new token.\n",
+ "\n",
"7. Copy the generated token securely.\n",
"\n",
"To invite the bot:\n",
+ "\n",
"1. Navigate to the 'OAuth2' tab, then to 'URL Generator'.\n",
+ "\n",
"2. Under 'Scopes', select 'bot'.\n",
+ "\n",
"3. Under 'Bot Permissions', select the permissions your bot will need (e.g., 'Send Messages', 'Read Messages' for our bot use)\n",
+ "\n",
"4. Copy the generated URL and paste it into your browser to invite the bot to your server.\n",
"\n",
"To grant the bot permissions:\n",
+ "\n",
"1. Navigate to the 'Bot' tab\n",
+ "\n",
"2. Under 'Privileged Gateway Intents', check 'Server Members Intent' and 'Message Content Intent'.\n",
"\n",
"For more details, you can also check the official Discord bot documentation: https://discord.com/developers/docs/intro\n"
@@ -838,7 +855,6 @@
],
"source": [
"from camel.embeddings import SentenceTransformerEncoder\n",
- "from camel.types import EmbeddingModelType\n",
"\n",
"sentence_encoder = SentenceTransformerEncoder(model_name='intfloat/e5-large-v2')"
]
@@ -961,6 +977,7 @@
]
},
{
+ "attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "xyK95yTFYku_"
@@ -969,21 +986,27 @@
"That's everything: Got questions about 🐫 CAMEL-AI? Join us on [Discord](https://discord.camel-ai.org)! Whether you want to share feedback, explore the latest in multi-agent systems, get support, or connect with others on exciting projects, we’d love to have you in the community! 🤝\n",
"\n",
"Check out some of our other work:\n",
+ "\n",
"1. 🐫 Creating Your First CAMEL Agent [free Colab](https://docs.camel-ai.org/cookbooks/create_your_first_agent.html)\n",
+ "\n",
"2. Graph RAG Cookbook [free Colab](https://colab.research.google.com/drive/1uZKQSuu0qW6ukkuSv9TukLB9bVaS1H0U?usp=sharing)\n",
+ "\n",
"3. 🧑‍⚖️ Create A Hackathon Judge Committee with Workforce [free Colab](https://colab.research.google.com/drive/18ajYUMfwDx3WyrjHow3EvUMpKQDcrLtr?usp=sharing)\n",
+ "\n",
"4. 🔥 3 ways to ingest data from websites with Firecrawl & CAMEL [free Colab](https://colab.research.google.com/drive/1lOmM3VmgR1hLwDKdeLGFve_75RFW0R9I?usp=sharing)\n",
- "5. 🦥 Agentic SFT Data Generation with CAMEL and Mistral Models, Fine-Tuned with Unsloth [free Colab](https://colab.research.google.com/drive/1lYgArBw7ARVPSpdwgKLYnp_NEXiNDOd-?usp=sharingg)\n",
"\n",
- "Thanks from everyone at 🐫 CAMEL-AI\n",
+ "5. 🦥 Agentic SFT Data Generation with CAMEL and Mistral Models, Fine-Tuned with Unsloth [free Colab](https://colab.research.google.com/drive/1lYgArBw7ARVPSpdwgKLYnp_NEXiNDOd-?usp=sharingg)\n",
"\n",
+ "Thanks from everyone at 🐫 CAMEL-AI"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "⭐ **Star the Repo**\n",
"\n",
- "<div class=\"align-center\">\n",
- " <a href=\"https://www.camel-ai.org/\"><img src=\"https://i.postimg.cc/KzQ5rfBC/button.png\"width=\"150\"></a>\n",
- " <a href=\"https://discord.camel-ai.org\"><img src=\"https://i.postimg.cc/L4wPdG9N/join-2.png\" width=\"150\"></a></a>\n",
- " \n",
- "⭐ <i>Star us on <a href=\"https://github.com/camel-ai/camel\">Github</a> </i>, join our [*Discord*](https://discord.camel-ai.org) or follow our [*X*](https://x.com/camelaiorg) ⭐\n",
- "</div>\n"
+ "If you find CAMEL useful or interesting, please consider giving it a star on our [CAMEL GitHub Repo](https://github.com/camel-ai/camel)! Your stars help others find this project and motivate us to continue improving it."
]
}
],