From e61cba995a43c311a726c66000c123a9dc620d72 Mon Sep 17 00:00:00 2001 From: asher Date: Mon, 16 Dec 2024 20:51:32 -0800 Subject: [PATCH 1/3] update --- docs/cookbooks/customer_slack_bot.ipynb | 546 ++++++++++++++++++ ..._evaluation&filter_with_reward_model.ipynb | 393 +++++++++++++ examples/reward/nemotron_model_example.py | 4 +- 3 files changed, 941 insertions(+), 2 deletions(-) create mode 100644 docs/cookbooks/customer_slack_bot.ipynb create mode 100644 docs/cookbooks/synthetic_data_evaluation&filter_with_reward_model.ipynb diff --git a/docs/cookbooks/customer_slack_bot.ipynb b/docs/cookbooks/customer_slack_bot.ipynb new file mode 100644 index 0000000000..bbf578f783 --- /dev/null +++ b/docs/cookbooks/customer_slack_bot.ipynb @@ -0,0 +1,546 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Customer Service Discord Bot with Agentic RAG" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can also check this cookbook in colab [here]()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "⭐ **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." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "########Picture" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Installation and Setup\n", + "First, install the CAMEL package with all its dependencies" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!pip install \"camel-ai[all]==0.2.12\"\n", + "!pip install nest_asyncio" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next, set up your API keys for Firecrawl and the model (Qwen or Mistral)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "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" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "from getpass import getpass\n", + "\n", + "firecrawl_api_key = getpass('Enter your API key: ')\n", + "os.environ[\"FIRECRAWL_API_KEY\"] = firecrawl_api_key" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "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" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "from getpass import getpass\n", + "\n", + "qwen_api_key = getpass('Enter your API key: ')\n", + "os.environ[\"QWEN_API_KEY\"] = qwen_api_key" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "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/" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "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" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Knowledge Crawling and Storage" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Use Firecrawl to crawl a website and store the content in a markdown file:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "from camel.loaders import Firecrawl\n", + "\n", + "os.makedirs('local_data', exist_ok=True)\n", + "\n", + "firecrawl = Firecrawl()\n", + "\n", + "knowledge = firecrawl.crawl(\n", + " url=\"https://qdrant.tech/documentation/overview/\"\n", + ")[\"data\"][0][\"markdown\"]\n", + "\n", + "with open('local_data/qdrant_overview.md', 'w') as file:\n", + " file.write(knowledge)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Basic Agent Setup" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Qwen is a large language model developed by Alibaba Cloud. It is trained on a massive dataset of text and code and can generate text, translate languages, write different kinds of creative content, and answer your questions in an informative way.\n", + "\n", + "Use QWen model:" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "from camel.configs import QwenConfig, MistralConfig\n", + "from camel.models import ModelFactory\n", + "from camel.types import ModelPlatformType, ModelType\n", + "\n", + "qwen_model = ModelFactory.create(\n", + " model_platform=ModelPlatformType.QWEN,\n", + " model_type=ModelType.QWEN_TURBO,\n", + " model_config_dict=QwenConfig(temperature=0.2).as_dict(),\n", + ")\n", + "\n", + "mistral_model = ModelFactory.create(\n", + " model_platform=ModelPlatformType.MISTRAL,\n", + " model_type=ModelType.MISTRAL_LARGE,\n", + " model_config_dict=MistralConfig(temperature=0.0).as_dict(),\n", + ")\n", + "\n", + "# Use Qwen model\n", + "model = qwen_model\n", + "\n", + "# Replace with mistral_model if you want to choose mistral mode instead\n", + "# model = mistral_model" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "from camel.agents import ChatAgent\n", + "from camel.messages import BaseMessage\n", + "\n", + "agent = ChatAgent(\n", + " system_message=\"You're a helpful assistant\",\n", + " message_window_size=10,\n", + " model=model\n", + ")\n", + "\n", + "knowledge_message = BaseMessage.make_user_message(\n", + " role_name=\"User\", content=f\"Based on the following knowledge: {knowledge}\"\n", + ")\n", + "agent.update_memory(knowledge_message, \"user\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Basic Chatbot Setup" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Start chatting! Type 'exit' to end the conversation.\n", + "2024-12-16 17:10:14,437 - httpx - INFO - HTTP Request: POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 17:10:14,447 - camel.agents.chat_agent - INFO - Model qwen-turbo, index 0, processed these messages: [{'role': 'system', 'content': \"You're a helpful assistant\"}, {'role': 'user', 'content': 'Based on the following knowledge: ## Docs Menu\\n\\n- [Documentation](https://qdrant.tech/documentation/)\\n- [Overview](https://qdrant.tech/documentation/overview/)\\n- Understanding Vector Search in Qdrant\\n\\n# [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#how-does-vector-search-work-in-qdrant) How Does Vector Search Work in Qdrant?\\n\\nHow Vector Search Algorithms Work: An Intro to Qdrant - YouTube\\n\\nQdrant - Vector Database & Search Engine\\n\\n6.22K subscribers\\n\\n[How Vector Search Algorithms Work: An Intro to Qdrant](https://www.youtube.com/watch?v=mXNrhyw4q84)\\n\\nQdrant - Vector Database & Search Engine\\n\\nSearch\\n\\nWatch later\\n\\nShare\\n\\nCopy link\\n\\nInfo\\n\\nShopping\\n\\nTap to unmute\\n\\nIf playback doesn\\'t begin shortly, try restarting your device.\\n\\nMore videos\\n\\n## More videos\\n\\nYou\\'re signed out\\n\\nVideos you watch may be added to the TV\\'s watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.\\n\\nCancelConfirm\\n\\nShare\\n\\nInclude playlist\\n\\nAn error occurred while retrieving sharing information. Please try again later.\\n\\n[Watch on](https://www.youtube.com/watch?v=mXNrhyw4q84&embeds_referring_euri=https%3A%2F%2Fqdrant.tech%2F)\\n\\n0:00\\n\\n0:00 / 3:29•Live\\n\\n•\\n\\n[Watch on YouTube](https://www.youtube.com/watch?v=mXNrhyw4q84 \"Watch on YouTube\")\\n\\nIf you are still trying to figure out how vector search works, please read ahead. This document describes how vector search is used, covers Qdrant’s place in the larger ecosystem, and outlines how you can use Qdrant to augment your existing projects.\\n\\nFor those who want to start writing code right away, visit our [Complete Beginners tutorial](https://qdrant.tech/documentation/tutorials/search-beginners/) to build a search engine in 5-15 minutes.\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#a-brief-history-of-search) A Brief History of Search\\n\\nHuman memory is unreliable. Thus, as long as we have been trying to collect ‘knowledge’ in written form, we had to figure out how to search for relevant content without rereading the same books repeatedly. That’s why some brilliant minds introduced the inverted index. In the simplest form, it’s an appendix to a book, typically put at its end, with a list of the essential terms-and links to pages they occur at. Terms are put in alphabetical order. Back in the day, that was a manually crafted list requiring lots of effort to prepare. Once digitalization started, it became a lot easier, but still, we kept the same general principles. That worked, and still, it does.\\n\\nIf you are looking for a specific topic in a particular book, you can try to find a related phrase and quickly get to the correct page. Of course, assuming you know the proper term. If you don’t, you must try and fail several times or find somebody else to help you form the correct query.\\n\\n![A simplified version of the inverted index.](https://qdrant.tech/docs/gettingstarted/inverted-index.png)\\n\\nA simplified version of the inverted index.\\n\\nTime passed, and we haven’t had much change in that area for quite a long time. But our textual data collection started to grow at a greater pace. So we also started building up many processes around those inverted indexes. For example, we allowed our users to provide many words and started splitting them into pieces. That allowed finding some documents which do not necessarily contain all the query words, but possibly part of them. We also started converting words into their root forms to cover more cases, removing stopwords, etc. Effectively we were becoming more and more user-friendly. Still, the idea behind the whole process is derived from the most straightforward keyword-based search known since the Middle Ages, with some tweaks.\\n\\n![The process of tokenization with an additional stopwords removal and converstion to root form of a word.](https://qdrant.tech/docs/gettingstarted/tokenization.png)\\n\\nThe process of tokenization with an additional stopwords removal and converstion to root form of a word.\\n\\nTechnically speaking, we encode the documents and queries into so-called sparse vectors where each position has a corresponding word from the whole dictionary. If the input text contains a specific word, it gets a non-zero value at that position. But in reality, none of the texts will contain more than hundreds of different words. So the majority of vectors will have thousands of zeros and a few non-zero values. That’s why we call them sparse. And they might be already used to calculate some word-based similarity by finding the documents which have the biggest overlap.\\n\\n![An example of a query vectorized to sparse format.](https://qdrant.tech/docs/gettingstarted/query.png)\\n\\nAn example of a query vectorized to sparse format.\\n\\nSparse vectors have relatively **high dimensionality**; equal to the size of the dictionary. And the dictionary is obtained automatically from the input data. So if we have a vector, we are able to partially reconstruct the words used in the text that created that vector.\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#the-tower-of-babel) The Tower of Babel\\n\\nEvery once in a while, when we discover new problems with inverted indexes, we come up with a new heuristic to tackle it, at least to some extent. Once we realized that people might describe the same concept with different words, we started building lists of synonyms to convert the query to a normalized form. But that won’t work for the cases we didn’t foresee. Still, we need to craft and maintain our dictionaries manually, so they can support the language that changes over time. Another difficult issue comes to light with multilingual scenarios. Old methods require setting up separate pipelines and keeping humans in the loop to maintain the quality.\\n\\n![The Tower of Babel, Pieter Bruegel.](https://qdrant.tech/docs/gettingstarted/babel.jpg)\\n\\nThe Tower of Babel, Pieter Bruegel.\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#the-representation-revolution) The Representation Revolution\\n\\nThe latest research in Machine Learning for NLP is heavily focused on training Deep Language Models. In this process, the neural network takes a large corpus of text as input and creates a mathematical representation of the words in the form of vectors. These vectors are created in such a way that words with similar meanings and occurring in similar contexts are grouped together and represented by similar vectors. And we can also take, for example, an average of all the word vectors to create the vector for a whole text (e.g query, sentence, or paragraph).\\n\\n![deep neural](https://qdrant.tech/docs/gettingstarted/deep-neural.png)\\n\\nWe can take those **dense vectors** produced by the network and use them as a **different data representation**. They are dense because neural networks will rarely produce zeros at any position. In contrary to sparse ones, they have a relatively low dimensionality — hundreds or a few thousand only. Unfortunately, if we want to have a look and understand the content of the document by looking at the vector it’s no longer possible. Dimensions are no longer representing the presence of specific words.\\n\\nDense vectors can capture the meaning, not the words used in a text. That being said, **Large Language Models can automatically handle synonyms**. Moreso, since those neural networks might have been trained with multilingual corpora, they translate the same sentence, written in different languages, to similar vector representations, also called **embeddings**. And we can compare them to find similar pieces of text by calculating the distance to other vectors in our database.\\n\\n![Input queries contain different words, but they are still converted into similar vector representations, because the neural encoder can capture the meaning of the sentences. That feature can capture synonyms but also different languages..](https://qdrant.tech/docs/gettingstarted/input.png)\\n\\nInput queries contain different words, but they are still converted into similar vector representations, because the neural encoder can capture the meaning of the sentences. That feature can capture synonyms but also different languages..\\n\\n**Vector search** is a process of finding similar objects based on their embeddings similarity. The good thing is, you don’t have to design and train your neural network on your own. Many pre-trained models are available, either on **HuggingFace** or by using libraries like [SentenceTransformers](https://www.sbert.net/?ref=hackernoon.com). If you, however, prefer not to get your hands dirty with neural models, you can also create the embeddings with SaaS tools, like [co.embed API](https://docs.cohere.com/reference/embed?ref=hackernoon.com).\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#why-qdrant) Why Qdrant?\\n\\nThe challenge with vector search arises when we need to find similar documents in a big set of objects. If we want to find the closest examples, the naive approach would require calculating the distance to every document. That might work with dozens or even hundreds of examples but may become a bottleneck if we have more than that. When we work with relational data, we set up database indexes to speed things up and avoid full table scans. And the same is true for vector search. Qdrant is a fully-fledged vector database that speeds up the search process by using a graph-like structure to find the closest objects in sublinear time. So you don’t calculate the distance to every object from the database, but some candidates only.\\n\\n![Vector search with Qdrant. Thanks to HNSW graph we are able to compare the distance to some of the objects from the database, not to all of them.](https://qdrant.tech/docs/gettingstarted/vector-search.png)\\n\\nVector search with Qdrant. Thanks to HNSW graph we are able to compare the distance to some of the objects from the database, not to all of them.\\n\\nWhile doing a semantic search at scale, because this is what we sometimes call the vector search done on texts, we need a specialized tool to do it effectively — a tool like Qdrant.\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#next-steps) Next Steps\\n\\nVector search is an exciting alternative to sparse methods. It solves the issues we had with the keyword-based search without needing to maintain lots of heuristics manually. It requires an additional component, a neural encoder, to convert text into vectors.\\n\\n[**Tutorial 1 - Qdrant for Complete Beginners**](https://qdrant.tech/documentation/tutorials/search-beginners/)\\nDespite its complicated background, vectors search is extraordinarily simple to set up. With Qdrant, you can have a search engine up-and-running in five minutes. Our [Complete Beginners tutorial](https://qdrant.tech/documentation/tutorials/search-beginners/) will show you how.\\n\\n[**Tutorial 2 - Question and Answer System**](https://qdrant.tech/articles/qa-with-cohere-and-qdrant/)\\nHowever, you can also choose SaaS tools to generate them and avoid building your model. Setting up a vector search project with Qdrant Cloud and Cohere co.embed API is fairly easy if you follow the [Question and Answer system tutorial](https://qdrant.tech/articles/qa-with-cohere-and-qdrant/).\\n\\nThere is another exciting thing about vector search. You can search for any kind of data as long as there is a neural network that would vectorize your data type. Do you think about a reverse image search? That’s also possible with vector embeddings.\\n\\n##### Was this page useful?\\n\\n![Thumb up icon](https://qdrant.tech/icons/outline/thumb-up.svg)\\nYes\\n![Thumb down icon](https://qdrant.tech/icons/outline/thumb-down.svg)\\nNo\\n\\nThank you for your feedback! 🙏\\n\\nWe are sorry to hear that. 😔 You can [edit](https://qdrant.tech/github.com/qdrant/landing_page/tree/master/qdrant-landing/content/documentation/overview/vector-search.md) this page on GitHub, or [create](https://github.com/qdrant/landing_page/issues/new/choose) a GitHub issue.\\n\\nOn this page:\\n\\n- [Edit on Github](https://github.com/qdrant/landing_page/tree/master/qdrant-landing/content/documentation/overview/vector-search.md)\\n- [Create an issue](https://github.com/qdrant/landing_page/issues/new/choose)\\n\\n×\\n\\n[Powered by](https://qdrant.tech/)\\n\\nWe use cookies to learn more about you. At any time you can delete or block cookies through your browser settings.\\n\\n[Learn more](https://qdrant.tech/legal/privacy-policy/) [I accept](https://qdrant.tech/documentation/overview/vector-search/#)'}, {'role': 'user', 'content': 'Hey, what is Qdrant?'}]\n", + "Assistant: Qdrant is a vector database designed to accelerate vector search and similarity search operations at scale. Here are the key points about Qdrant:\n", + "\n", + "1. **Vector Database**: Unlike traditional databases that store structured data, Qdrant specializes in storing and querying high-dimensional vectors, which are often generated from machine learning models.\n", + "\n", + "2. **Speed**: Qdrant uses advanced indexing techniques like Hierarchical Navigable Small World graphs (HNSW) to perform fast approximate nearest neighbor searches, making it suitable for real-time applications.\n", + "\n", + "3. **Scalability**: It can handle large datasets and high query volumes efficiently, making it ideal for applications that require searching through millions or billions of vectors.\n", + "\n", + "4. **Versatility**: Qdrant supports various types of data, including text, images, audio, and more, as long as they can be converted into vector representations.\n", + "\n", + "5. **Integration**: It integrates well with popular machine learning frameworks and services, allowing you to easily incorporate vector search into your existing workflows.\n", + "\n", + "6. **Ease of Use**: Despite its powerful capabilities, Qdrant is designed to be user-friendly, with tutorials and documentation to help beginners get started quickly.\n", + "\n", + "7. **Flexibility**: You can run Qdrant locally, in the cloud, or in a hybrid environment, providing flexibility in deployment options.\n", + "\n", + "In summary, Qdrant is a specialized database optimized for vector search, offering speed, scalability, and ease of integration for applications that rely on similarity search and machine learning models.\n", + "Ending conversation.\n" + ] + } + ], + "source": [ + "print(\"Start chatting! Type 'exit' to end the conversation.\")\n", + "while True:\n", + " user_input = input(\"User: \")\n", + " print(f\"User: {user_input}\")\n", + "\n", + " if user_input.lower() == \"exit\":\n", + " print(\"Ending conversation.\")\n", + " break\n", + "\n", + " assistant_response = agent.step(user_input)\n", + " print(f\"Assistant: {assistant_response.msgs[0].content}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Basic Slack Bot Integration" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To build a slack bot, you need to access these following informations.\n", + "1. Go to the slack app website: https://api.slack.com/apps\n", + "2. Log in with your slack account, or create an account if you don't have one\n", + "3. Click on 'Create New App' to create a new bot" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "from getpass import getpass\n", + "slack_token = getpass('Enter your slack token: ')\n", + "slack_scopes = getpass('Enter your slack scopes: ')\n", + "slack_signing_secret = getpass('Enter your slack signing secret')\n", + "slack_client_id = getpass('Enter your slack client id')\n", + "slack_client_secret = getpass('Enter your slack client secret')\n", + "\n", + "os.environ['SLACK_TOKEN'] = slack_token\n", + "os.environ['SLACK_SCOPES'] = slack_scopes\n", + "os.environ['SLACK_SIGNING_SECRET'] = slack_signing_secret\n", + "os.environ['SLACK_CLIENT_ID'] = slack_client_id\n", + "os.environ['SLACK_CLIENT_SECRET'] = slack_client_secret" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2024-12-16 17:38:55,499 - camel.bots.slack.slack_app - WARNING - As `installation_store` or `authorize` has been used, `token` (or SLACK_BOT_TOKEN env variable) will be ignored.\n" + ] + } + ], + "source": [ + "from camel.bots import SlackApp\n", + "\n", + "slack_bot = SlackApp(\n", + " token=slack_token,\n", + " scopes=slack_scopes,\n", + " signing_secret=slack_signing_secret,\n", + " client_id=slack_client_id,\n", + " client_secret=slack_client_secret\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Rewrite on_message method to custom message processing flow" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2024-12-16 17:43:45,490 - camel.bots.slack.slack_app - INFO - ⚡️ Bolt app is running!\n" + ] + }, + { + "ename": "RuntimeError", + "evalue": "web.Application instance initialized with different loop", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[16], line 10\u001b[0m\n\u001b[1;32m 4\u001b[0m nest_asyncio\u001b[38;5;241m.\u001b[39mapply()\n\u001b[1;32m 6\u001b[0m \u001b[38;5;66;03m# async def custom_on_message(self, event, say):\u001b[39;00m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;66;03m# print(f\"User: {event}\")\u001b[39;00m\n\u001b[1;32m 8\u001b[0m \n\u001b[1;32m 9\u001b[0m \u001b[38;5;66;03m# slack_bot.on_message = types.MethodType(custom_on_message, slack_bot)\u001b[39;00m\n\u001b[0;32m---> 10\u001b[0m \u001b[43mslack_bot\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/data/camel/camel/bots/slack/slack_app.py:164\u001b[0m, in \u001b[0;36mSlackApp.run\u001b[0;34m(self, port, path, host)\u001b[0m\n\u001b[1;32m 147\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrun\u001b[39m(\n\u001b[1;32m 148\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 149\u001b[0m port: \u001b[38;5;28mint\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m3000\u001b[39m,\n\u001b[1;32m 150\u001b[0m path: \u001b[38;5;28mstr\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m/slack/events\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 151\u001b[0m host: Optional[\u001b[38;5;28mstr\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[1;32m 152\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 153\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124;03m\"\"\"Starts the Slack Bolt app server to listen for incoming Slack\u001b[39;00m\n\u001b[1;32m 154\u001b[0m \u001b[38;5;124;03m events.\u001b[39;00m\n\u001b[1;32m 155\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[38;5;124;03m None).\u001b[39;00m\n\u001b[1;32m 163\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 164\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_app\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstart\u001b[49m\u001b[43m(\u001b[49m\u001b[43mport\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mport\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhost\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mhost\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/slack_bolt/app/async_app.py:559\u001b[0m, in \u001b[0;36mAsyncApp.start\u001b[0;34m(self, port, path, host)\u001b[0m\n\u001b[1;32m 550\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mstart\u001b[39m(\u001b[38;5;28mself\u001b[39m, port: \u001b[38;5;28mint\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m3000\u001b[39m, path: \u001b[38;5;28mstr\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m/slack/events\u001b[39m\u001b[38;5;124m\"\u001b[39m, host: Optional[\u001b[38;5;28mstr\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 551\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Start a web server using AIOHTTP.\u001b[39;00m\n\u001b[1;32m 552\u001b[0m \u001b[38;5;124;03m Refer to https://docs.aiohttp.org/ for more details about AIOHTTP.\u001b[39;00m\n\u001b[1;32m 553\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 557\u001b[0m \u001b[38;5;124;03m host: The hostname to serve the web endpoints. (Default: 0.0.0.0)\u001b[39;00m\n\u001b[1;32m 558\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 559\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mserver\u001b[49m\u001b[43m(\u001b[49m\u001b[43mport\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mport\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhost\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mhost\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstart\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/slack_bolt/app/async_server.py:86\u001b[0m, in \u001b[0;36mAsyncSlackAppServer.start\u001b[0;34m(self, host)\u001b[0m\n\u001b[1;32m 83\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbolt_app\u001b[38;5;241m.\u001b[39mlogger\u001b[38;5;241m.\u001b[39minfo(get_boot_message())\n\u001b[1;32m 85\u001b[0m _host \u001b[38;5;241m=\u001b[39m host \u001b[38;5;28;01mif\u001b[39;00m host \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhost\n\u001b[0;32m---> 86\u001b[0m \u001b[43mweb\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun_app\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mweb_app\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhost\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m_host\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mport\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mport\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web.py:526\u001b[0m, in \u001b[0;36mrun_app\u001b[0;34m(app, host, port, path, sock, shutdown_timeout, keepalive_timeout, ssl_context, print, backlog, access_log_class, access_log_format, access_log, handle_signals, reuse_address, reuse_port, handler_cancellation, loop)\u001b[0m\n\u001b[1;32m 524\u001b[0m main_task\u001b[38;5;241m.\u001b[39mcancel()\n\u001b[1;32m 525\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m suppress(asyncio\u001b[38;5;241m.\u001b[39mCancelledError):\n\u001b[0;32m--> 526\u001b[0m \u001b[43mloop\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun_until_complete\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmain_task\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 527\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[1;32m 528\u001b[0m _cancel_tasks(asyncio\u001b[38;5;241m.\u001b[39mall_tasks(loop), loop)\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/nest_asyncio.py:98\u001b[0m, in \u001b[0;36m_patch_loop..run_until_complete\u001b[0;34m(self, future)\u001b[0m\n\u001b[1;32m 95\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m f\u001b[38;5;241m.\u001b[39mdone():\n\u001b[1;32m 96\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 97\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mEvent loop stopped before Future completed.\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m---> 98\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mf\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mresult\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/anaconda3/lib/python3.11/asyncio/futures.py:203\u001b[0m, in \u001b[0;36mFuture.result\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 201\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m__log_traceback \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[1;32m 202\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_exception \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m--> 203\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_exception\u001b[38;5;241m.\u001b[39mwith_traceback(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_exception_tb)\n\u001b[1;32m 204\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_result\n", + "File \u001b[0;32m~/anaconda3/lib/python3.11/asyncio/tasks.py:267\u001b[0m, in \u001b[0;36mTask.__step\u001b[0;34m(***failed resolving arguments***)\u001b[0m\n\u001b[1;32m 263\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 264\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m exc \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 265\u001b[0m \u001b[38;5;66;03m# We use the `send` method directly, because coroutines\u001b[39;00m\n\u001b[1;32m 266\u001b[0m \u001b[38;5;66;03m# don't have `__iter__` and `__next__` methods.\u001b[39;00m\n\u001b[0;32m--> 267\u001b[0m result \u001b[38;5;241m=\u001b[39m coro\u001b[38;5;241m.\u001b[39msend(\u001b[38;5;28;01mNone\u001b[39;00m)\n\u001b[1;32m 268\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 269\u001b[0m result \u001b[38;5;241m=\u001b[39m coro\u001b[38;5;241m.\u001b[39mthrow(exc)\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web.py:338\u001b[0m, in \u001b[0;36m_run_app\u001b[0;34m(app, host, port, path, sock, shutdown_timeout, keepalive_timeout, ssl_context, print, backlog, access_log_class, access_log_format, access_log, handle_signals, reuse_address, reuse_port, handler_cancellation)\u001b[0m\n\u001b[1;32m 325\u001b[0m app \u001b[38;5;241m=\u001b[39m cast(Application, app)\n\u001b[1;32m 327\u001b[0m runner \u001b[38;5;241m=\u001b[39m AppRunner(\n\u001b[1;32m 328\u001b[0m app,\n\u001b[1;32m 329\u001b[0m handle_signals\u001b[38;5;241m=\u001b[39mhandle_signals,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 335\u001b[0m handler_cancellation\u001b[38;5;241m=\u001b[39mhandler_cancellation,\n\u001b[1;32m 336\u001b[0m )\n\u001b[0;32m--> 338\u001b[0m \u001b[38;5;28;01mawait\u001b[39;00m runner\u001b[38;5;241m.\u001b[39msetup()\n\u001b[1;32m 340\u001b[0m sites: List[BaseSite] \u001b[38;5;241m=\u001b[39m []\n\u001b[1;32m 342\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web_runner.py:287\u001b[0m, in \u001b[0;36mBaseRunner.setup\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 283\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mNotImplementedError\u001b[39;00m: \u001b[38;5;66;03m# pragma: no cover\u001b[39;00m\n\u001b[1;32m 284\u001b[0m \u001b[38;5;66;03m# add_signal_handler is not implemented on Windows\u001b[39;00m\n\u001b[1;32m 285\u001b[0m \u001b[38;5;28;01mpass\u001b[39;00m\n\u001b[0;32m--> 287\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_server \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mawait\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_make_server()\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web_runner.py:389\u001b[0m, in \u001b[0;36mAppRunner._make_server\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 387\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_make_server\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Server:\n\u001b[1;32m 388\u001b[0m loop \u001b[38;5;241m=\u001b[39m asyncio\u001b[38;5;241m.\u001b[39mget_event_loop()\n\u001b[0;32m--> 389\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_app\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_set_loop\u001b[49m\u001b[43m(\u001b[49m\u001b[43mloop\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 390\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_app\u001b[38;5;241m.\u001b[39mon_startup\u001b[38;5;241m.\u001b[39mfreeze()\n\u001b[1;32m 391\u001b[0m \u001b[38;5;28;01mawait\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_app\u001b[38;5;241m.\u001b[39mstartup()\n", + "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web_app.py:275\u001b[0m, in \u001b[0;36mApplication._set_loop\u001b[0;34m(self, loop)\u001b[0m\n\u001b[1;32m 273\u001b[0m loop \u001b[38;5;241m=\u001b[39m asyncio\u001b[38;5;241m.\u001b[39mget_event_loop()\n\u001b[1;32m 274\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_loop \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_loop \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m loop:\n\u001b[0;32m--> 275\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 276\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mweb.Application instance initialized with different loop\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 277\u001b[0m )\n\u001b[1;32m 279\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_loop \u001b[38;5;241m=\u001b[39m loop\n\u001b[1;32m 281\u001b[0m \u001b[38;5;66;03m# set loop debug\u001b[39;00m\n", + "\u001b[0;31mRuntimeError\u001b[0m: web.Application instance initialized with different loop" + ] + } + ], + "source": [ + "import nest_asyncio\n", + "import types\n", + "\n", + "nest_asyncio.apply()\n", + "\n", + "# async def custom_on_message(self, event, say):\n", + "# print(f\"User: {event}\")\n", + "\n", + "# slack_bot.on_message = types.MethodType(custom_on_message, slack_bot)\n", + "slack_bot.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Integrating Qdrant for Large Files to build a more powerful Discord bot" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Qdrant is a vector similarity search engine and vector database. It is designed to perform fast and efficient similarity searches on large datasets of vectors. This enables the chatbot to access and utilize external information to provide more comprehensive and accurate responses. By storing knowledge as vectors, Qdrant enables efficient semantic search, allowing the chatbot to find relevant information based on the meaning of the user's query.\n", + "\n", + "Set up an embedding model and retriever for Qdrant:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from camel.embeddings import SentenceTransformerEncoder\n", + "\n", + "sentence_encoder = SentenceTransformerEncoder(model_name='intfloat/e5-large-v2')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from camel.retrievers import AutoRetriever\n", + "from camel.types import StorageType\n", + "\n", + "assistant_sys_msg = \"\"\"You are a helpful assistant to answer question,\n", + " I will give you the Original Query and Retrieved Context,\n", + " answer the Original Query based on the Retrieved Context,\n", + " if you can't answer the question just say I don't know.\"\"\"\n", + "auto_retriever = AutoRetriever(\n", + " vector_storage_local_path=\"local_data2/\",\n", + " storage_type=StorageType.QDRANT,\n", + " embedding_model=sentence_encoder\n", + " )\n", + "qdrant_agent = ChatAgent(system_message=assistant_sys_msg, model=model)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Use Auto RAG to retrieve first and then answer the user's query using CAMEL `ChatAgent` based on the retrieved info:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from camel.bots import DiscordApp\n", + "import nest_asyncio\n", + "import discord\n", + "\n", + "nest_asyncio.apply()\n", + "discord_q_bot = DiscordApp(token=discord_bot_token)\n", + "\n", + "@discord_q_bot.client.event # triggers when a message is sent in the channel\n", + "async def on_message(message: discord.Message):\n", + " if message.author == discord_q_bot.client.user:\n", + " return\n", + "\n", + " if message.type != discord.MessageType.default:\n", + " return\n", + "\n", + " if message.author.bot:\n", + " return\n", + " user_input = message.content\n", + "\n", + " retrieved_info = auto_retriever.run_vector_retriever(\n", + " query=user_input,\n", + " contents=[\n", + " \"local_data/qdrant_overview.md\",\n", + " ],\n", + " top_k=3,\n", + " return_detailed_info=False,\n", + " similarity_threshold=0.5\n", + " )\n", + "\n", + " user_msg = str(retrieved_info)\n", + " assistant_response = qdrant_agent.step(user_msg)\n", + " response_content = assistant_response.msgs[0].content\n", + "\n", + " if len(response_content) > 2000: # discord message length limit\n", + " for chunk in [response_content[i:i+2000] for i in range(0, len(response_content), 2000)]:\n", + " await message.channel.send(chunk)\n", + " else:\n", + " await message.channel.send(response_content)\n", + "\n", + "discord_q_bot.run()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "camel-ai-8RlHKqzd-py3.11", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/cookbooks/synthetic_data_evaluation&filter_with_reward_model.ipynb b/docs/cookbooks/synthetic_data_evaluation&filter_with_reward_model.ipynb new file mode 100644 index 0000000000..8863285c18 --- /dev/null +++ b/docs/cookbooks/synthetic_data_evaluation&filter_with_reward_model.ipynb @@ -0,0 +1,393 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Installation and Setup\n", + "First, install the CAMEL package with all its dependencies" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!pip install \"camel-ai[all]==0.2.12\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next, we need to securely input and store the required API keys for accessing OpenAI, Firecrawl, and NVIDIA services." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "from getpass import getpass\n", + "import os\n", + "\n", + "openai_api_key = getpass('Enter your OpenAI API key: ')\n", + "os.environ[\"OPENAI_API_KEY\"] = openai_api_key\n", + "\n", + "# Generate an API key at https://www.firecrawl.dev/app/api-keys\n", + "firecrawl_api_key = getpass('Enter your Firecrawl API key: ')\n", + "os.environ[\"FIRECRAWL_API_KEY\"] = firecrawl_api_key\n", + "\n", + "nvidia_api_key = getpass('Enter your NVIDIA API key: ')\n", + "os.environ[\"NVIDIA_API_KEY\"] = nvidia_api_key" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To work effectively with the Alpaca format and manage items systematically, we define a set of models using Pydantic. These models ensure that the data is well-structured, type-safe, and validated." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "from pydantic import BaseModel\n", + "from camel.messages.conversion import AlpacaItem\n", + "\n", + "class NumberedAlpacaItem(BaseModel):\n", + " number: int\n", + " item: AlpacaItem\n", + "\n", + "\n", + "class AlpacaItemResponse(BaseModel):\n", + " \"\"\"\n", + " Represents an instruction-response item in the Alpaca format.\n", + " \"\"\"\n", + " items: list[NumberedAlpacaItem]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Data generation\n", + "Next, we define our data generation function. It takes a source content and generates a list of instruction-input-response triplets based on it.\n", + "\n", + "Later, we will use a reward model to filter this list." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "from typing import List\n", + "from camel.loaders import Firecrawl\n", + "from camel.models import ModelFactory\n", + "from camel.types import ModelPlatformType, ModelType\n", + "from camel.configs import ChatGPTConfig\n", + "from camel.agents import ChatAgent\n", + "\n", + "from typing import List\n", + "from camel.loaders import Firecrawl\n", + "from camel.models import ModelFactory\n", + "from camel.types import ModelPlatformType, ModelType\n", + "from camel.configs import ChatGPTConfig\n", + "from camel.agents import ChatAgent\n", + "import json\n", + "\n", + "\n", + "def generate_alpaca_items(content: str, n_items: int, start_num: int = 1, examples: List[AlpacaItem] = None) -> List[AlpacaItem]:\n", + " system_msg = \"\"\"\n", + "You are an AI assistant generating detailed, accurate responses based on the provided content.\n", + "You will be given a reference content, and you must generate a specific number of AlpacaItems.\n", + "These are instruction-input-response triplets, where the input is the context or examples.\n", + "\n", + "Add a number to the items to keep track of the order. Generate exactly that many.\n", + "\n", + "For each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\n", + "\n", + "Include multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\n", + "\n", + "Leave the input field blank.\n", + "\n", + "Ensure all of the most significant parts of the context are covered.\n", + "\n", + "Start with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\n", + " \"\"\"\n", + "\n", + " examples_str = \"\"\n", + " if examples:\n", + " examples_str = \"\\n\\nHere are some example items for reference:\\n\" + \\\n", + " \"\\n\".join(ex.model_dump_json() for ex in examples)\n", + "\n", + " model = ModelFactory.create(\n", + " model_platform=ModelPlatformType.OPENAI,\n", + " model_type=ModelType.GPT_4O_MINI,\n", + " model_config_dict=ChatGPTConfig(\n", + " temperature=0.6, response_format=AlpacaItemResponse\n", + " ).as_dict(),\n", + " )\n", + "\n", + " agent = ChatAgent(\n", + " system_message=system_msg,\n", + " model=model,\n", + " )\n", + "\n", + " prompt = f\"Content reference:\\n{content}{examples_str}\\n\\n Generate {n_items} AlpacaItems. The first should start numbering at {start_num}.\"\n", + " response = agent.step(prompt)\n", + "\n", + " # Parse the generated JSON to our wrapper class\n", + " alpaca_items = [n_item.item for n_item in\n", + " AlpacaItemResponse.\n", + " model_validate_json(response.msgs[0].content).items]\n", + "\n", + " return alpaca_items\n", + "\n", + "# Few shot examples to ensure the right amount of detail\n", + "examples = [\n", + " AlpacaItem(\n", + " instruction=\"Explain the process for sprint planning and review in CAMEL.\",\n", + " input=\"\",\n", + " output=\"The process for sprint planning and review in CAMEL includes:\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"\n", + " )\n", + "]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Point to content and generate data!\n", + "Now we point to the content that we wish to generate SFT data around and use CAMEL's Firecrawl integration to get this content in a nice markdown format.\n", + "\n", + "You can get a Firecrawl API key from [here](https://www.firecrawl.dev/app/api-keys)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2024-12-16 17:51:01,479 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 17:51:01,495 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 1.'}]\n", + "Generated 50 items\n", + "2024-12-16 17:51:41,828 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 17:51:41,840 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"What is the importance of maintaining a clean and readable codebase?\",\"input\":\"\",\"output\":\"Maintaining a clean and readable codebase is important because:\\\\n1. **Ease of Maintenance**: It simplifies future maintenance and updates to the code.\\\\n2. **Collaboration**: It facilitates collaboration among multiple contributors by making the code easier to understand.\\\\n3. **Bug Reduction**: Clean code helps reduce the likelihood of bugs and errors.\"}\\n{\"instruction\":\"What should be included in the documentation for new features?\",\"input\":\"\",\"output\":\"The documentation for new features should include:\\\\n1. **Feature Description**: A clear explanation of what the feature does and its purpose.\\\\n2. **Usage Examples**: Practical examples of how to use the feature in code.\\\\n3. **Related Documentation**: Links to any related documentation or resources for further reading.\"}\\n{\"instruction\":\"What should contributors do if they find outdated issues in CAMEL?\",\"input\":\"\",\"output\":\"If contributors find outdated issues in CAMEL, they should:\\\\n1. **Notify Maintainers**: Give a heads-up to maintainers so they can review and address the issue.\\\\n2. **Comment on the Issue**: Add a comment on the issue to indicate its status and suggest updates.\"}\\n{\"instruction\":\"What does the \\'Common Actions\\' section in CAMEL documentation cover?\",\"input\":\"\",\"output\":\"The \\'Common Actions\\' section in CAMEL documentation covers various routine tasks, including:\\\\n1. **Updating Dependencies**: Instructions for managing project dependencies.\\\\n2. **Linting & Formatting**: Guidelines for checking and formatting code.\\\\n3. **Coverage**: How to measure code coverage for tests.\\\\n4. **Tests**: Instructions for running different types of tests.\"}\\n{\"instruction\":\"How can contributors ensure their code passes formatting checks?\",\"input\":\"\",\"output\":\"Contributors can ensure their code passes formatting checks by:\\\\n1. Running `poetry run ruff check .` to check for formatting issues.\\\\n2. Using `poetry run ruff format .` to automatically format the code according to the project\\'s style guidelines.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 51.'}]\n", + "Generated 50 items\n", + "2024-12-16 17:52:16,948 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 17:52:16,966 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"How can contributors effectively communicate updates about their pull requests?\",\"input\":\"\",\"output\":\"Contributors can effectively communicate updates about their pull requests by:\\\\n1. **Commenting**: Adding comments on the pull request to describe changes made.\\\\n2. **Labeling**: Using appropriate labels to indicate the status of the pull request.\\\\n3. **Engaging with Reviewers**: Actively engaging with reviewers to address feedback and questions.\"}\\n{\"instruction\":\"How can contributors effectively provide feedback during code reviews?\",\"input\":\"\",\"output\":\"Contributors can effectively provide feedback during code reviews by:\\\\n1. **Being Constructive**: Offer clear and actionable suggestions rather than just pointing out issues.\\\\n2. **Focusing on Code Quality**: Emphasize best practices in coding, documentation, and testing.\\\\n3. **Encouraging Discussion**: Engage in discussions about the code to foster collaboration and learning.\"}\\n{\"instruction\":\"What is the purpose of code reviews in CAMEL?\",\"input\":\"\",\"output\":\"The purpose of code reviews in CAMEL includes:\\\\n1. **Maintain Code Quality**: Ensure the codebase remains clean, readable, and maintainable.\\\\n2. **Knowledge Sharing**: Facilitate knowledge sharing among contributors and assist new contributors in learning best practices.\\\\n3. **Bug Prevention**: Catch potential bugs and issues before they are merged into the main branch.\\\\n4. **Consistency**: Ensure consistency in style, design patterns, and architecture across the project.\"}\\n{\"instruction\":\"What is the recommended workflow for contributing code to CAMEL?\",\"input\":\"\",\"output\":\"The recommended workflow for contributing code to CAMEL includes:\\\\n1. **Fork-and-Pull-Request**: Use the Fork-and-Pull-Request workflow if you are a community contributor.\\\\n2. **Checkout-and-Pull-Request**: If you are a member of CAMEL-AI.org, follow the Checkout-and-Pull-Request workflow.\\\\n3. **Mention Issues**: Always mention any related issues and tag relevant maintainers in your pull request.\"}\\n{\"instruction\":\"What is the workflow for creating a board item in CAMEL?\",\"input\":\"\",\"output\":\"The workflow for creating a board item in CAMEL involves:\\\\n1. **Issue Creation**: Create a new issue on the GitHub Issues page, ensuring it has a proper title and description.\\\\n2. **Assigning Issues**: Assign the issue to yourself to indicate it\\'s being worked on.\\\\n3. **Linking Issues**: If related to other issues, link them instead of merging into one.\\\\n4. **Sprint Planning**: Discuss the issue during team meetings and move it to the appropriate status column.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 101.'}]\n", + "Generated 50 items\n", + "2024-12-16 17:52:57,807 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 17:52:57,814 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"What are the steps to schedule an introduction call for CAMEL?\",\"input\":\"\",\"output\":\"To schedule an introduction call for CAMEL, follow these steps:\\\\n1. **Choose Language**: Select the appropriate link based on your language preference (English or Chinese).\\\\n2. **Select Date and Time**: Pick a suitable date and time from the available slots.\\\\n3. **Provide Information**: Fill in any required information on the scheduling platform.\"}\\n{\"instruction\":\"What is the significance of maintaining a changelog in CAMEL?\",\"input\":\"\",\"output\":\"The significance of maintaining a changelog in CAMEL is to:\\\\n1. **Track Changes**: Provide a clear record of all changes made to the project over time.\\\\n2. **Inform Users**: Keep users informed about new features, bug fixes, and improvements.\\\\n3. **Facilitate Version Control**: Help contributors and maintainers understand the evolution of the project.\"}\\n{\"instruction\":\"What is the recommended approach for documenting new features?\",\"input\":\"\",\"output\":\"The recommended approach for documenting new features includes:\\\\n1. **Feature Overview**: Provide a clear explanation of what the feature does and its purpose.\\\\n2. **Usage Examples**: Include practical examples demonstrating how to use the feature in code.\\\\n3. **Linking Related Documentation**: Reference any related documentation for further reading and context.\"}\\n{\"instruction\":\"What are the responsibilities of a reviewer during the code review process?\",\"input\":\"\",\"output\":\"The responsibilities of a reviewer during the code review process include:\\\\n1. **Timely Reviews**: Strive to review pull requests promptly to keep the project moving.\\\\n2. **Constructive Feedback**: Provide clear and constructive feedback to help the contributor improve.\\\\n3. **Collaboration**: Work collaboratively with the contributor to address any issues.\"}\\n{\"instruction\":\"What is the significance of using a logging module instead of print statements?\",\"input\":\"\",\"output\":\"The significance of using a logging module instead of print statements includes:\\\\n1. **Configurability**: Logging provides more control over how messages are emitted and where they are directed.\\\\n2. **Professionalism**: Using a logging framework leads to cleaner, more maintainable code.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 151.'}]\n", + "Generated 50 items\n", + "2024-12-16 17:53:30,467 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 17:53:30,474 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"What is the purpose of having a checklist for code reviews?\",\"input\":\"\",\"output\":\"The purpose of having a checklist for code reviews is to:\\\\n1. **Maintain Code Quality**: Ensure that all contributions meet the project\\'s standards for quality and functionality.\\\\n2. **Promote Consistency**: Foster consistency in the review process across different contributions.\"}\\n{\"instruction\":\"How can contributors effectively provide feedback during code reviews?\",\"input\":\"\",\"output\":\"Contributors can effectively provide feedback during code reviews by:\\\\n1. **Being Constructive**: Offer clear and actionable suggestions rather than just pointing out issues.\\\\n2. **Focusing on Code Quality**: Emphasize best practices in coding, documentation, and testing.\\\\n3. **Encouraging Discussion**: Engage in discussions about the code to foster collaboration and learning.\"}\\n{\"instruction\":\"What guidelines should contributors follow when creating new issues on GitHub?\",\"input\":\"\",\"output\":\"When creating new issues on GitHub, contributors should follow these guidelines:\\\\n1. **Clear Titles**: Use clear and descriptive titles that summarize the issue.\\\\n2. **Detailed Descriptions**: Provide detailed descriptions, including steps to reproduce the issue and any relevant context.\"}\\n{\"instruction\":\"What is the importance of the `Args:` section in docstrings?\",\"input\":\"\",\"output\":\"The `Args:` section in docstrings is important because it clearly documents the parameters of a function or class, including their names, types, descriptions, and default values. This helps users understand how to use the function or class correctly.\"}\\n{\"instruction\":\"What should you do if you encounter issues during the development setup for CAMEL?\",\"input\":\"\",\"output\":\"If you encounter issues during the development setup for CAMEL, you should:\\\\n1. **Consult Documentation**: Refer to the setup documentation for troubleshooting tips and guidelines.\\\\n2. **Ask for Help**: Reach out to a maintainer via the communication channels provided, such as Discord or Slack.\\\\n3. **Provide Details**: When asking for help, provide specific details about the issues you\\'re facing, including error messages and steps taken.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 201.'}]\n", + "Generated 50 items\n", + "2024-12-16 17:54:10,837 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 17:54:10,851 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"Explain the significance of the `coverage` tool in CAMEL.\",\"input\":\"\",\"output\":\"The `coverage` tool in CAMEL is significant because it helps:\\\\n1. **Measure Test Coverage**: Assess the extent to which unit tests cover the codebase.\\\\n2. **Identify Weak Areas**: Highlight parts of the code that lack sufficient testing, guiding improvements.\\\\n3. **Maintain Code Quality**: Ensure robust testing practices are in place to maintain code quality.\"}\\n{\"instruction\":\"How can contributors ensure effective communication in the CAMEL project?\",\"input\":\"\",\"output\":\"Contributors can ensure effective communication in the CAMEL project by:\\\\n1. **Utilizing Communication Channels**: Actively use Discord, Slack, and other platforms for discussions and updates.\\\\n2. **Being Clear and Concise**: Communicate ideas clearly and concisely to avoid misunderstandings.\\\\n3. **Encouraging Feedback**: Foster an environment where feedback is welcomed and constructive, promoting open dialogue.\"}\\n{\"instruction\":\"What are the best practices for writing effective commit messages in CAMEL?\",\"input\":\"\",\"output\":\"Best practices for writing effective commit messages in CAMEL include:\\\\n1. **Use Imperative Mood**: Write messages in the imperative mood (e.g., \\'Add feature\\' instead of \\'Added feature\\').\\\\n2. **Be Concise**: Keep messages clear and to the point, summarizing the changes made.\\\\n3. **Reference Issues**: Link to any related issues in the commit message for clarity.\"}\\n{\"instruction\":\"How can contributors ensure that their contributions are recognized?\",\"input\":\"\",\"output\":\"Contributors can ensure recognition of their contributions by:\\\\n1. Mentioning their achievements in the pull request comments.\\\\n2. Providing their social media handles if they wish to receive public acknowledgment.\"}\\n{\"instruction\":\"What practices should be followed when adding unit tests?\",\"input\":\"\",\"output\":\"When adding unit tests, contributors should follow these practices:\\\\n1. **Test Coverage**: Ensure tests cover all relevant functionality, including edge cases.\\\\n2. **Isolation**: Keep tests isolated from external systems to ensure reliability.\\\\n3. **Descriptive Names**: Use clear and descriptive names for test functions to indicate their purpose.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 251.'}]\n", + "Generated 50 items\n", + "[AlpacaItem(instruction='What are the steps to contribute to the CAMEL project?', input='', output='To contribute to the CAMEL project, follow these steps:\\n1. **Fork the Repository**: Create a personal copy of the CAMEL repository on GitHub.\\n2. **Clone the Forked Repo**: Use `git clone` to download your forked version to your local machine.\\n3. **Create a Branch**: Make a new branch for your changes using `git checkout -b `.\\n4. **Make Changes**: Implement your features or bug fixes in the code.\\n5. **Commit Changes**: Use `git commit` to save your changes with a descriptive message.\\n6. **Push Changes**: Push your branch back to your GitHub fork using `git push origin `.\\n7. **Open a Pull Request**: Go to the original CAMEL repository and open a pull request to propose your changes.'), AlpacaItem(instruction='What is the purpose of code reviews in CAMEL?', input='', output='The purpose of code reviews in CAMEL includes:\\n1. **Maintain Code Quality**: Ensure the codebase remains clean, readable, and maintainable.\\n2. **Knowledge Sharing**: Facilitate knowledge sharing among contributors and assist new contributors in learning best practices.\\n3. **Bug Prevention**: Catch potential bugs and issues before they are merged into the main branch.\\n4. **Consistency**: Ensure consistency in style, design patterns, and architecture across the project.'), AlpacaItem(instruction='Describe the guidelines for writing docstrings in CAMEL.', input='', output='The guidelines for writing docstrings in CAMEL are as follows:\\n1. **Use Triple-Quoted String**: Begin with `r\"\"\"` to indicate a raw docstring, preventing issues with special characters.\\n2. **Brief Description**: Provide a concise summary of the class or method\\'s purpose and functionality.\\n3. **Document Parameters**: Use an `Args:` section to document parameters, including their type, description, and default value.'), AlpacaItem(instruction='What are the communication channels available for CAMEL contributors?', input='', output='The communication channels available for CAMEL contributors include:\\n1. **Discord**: Join the CAMEL Discord server for real-time communication.\\n2. **WeChat**: Scan the provided QR code to connect with the CAMEL community on WeChat.\\n3. **Slack**: Join the CAMEL Slack workspace for discussions and updates.'), AlpacaItem(instruction='How should contributions to documentation be handled in CAMEL?', input='', output='Contributions to documentation in CAMEL should be handled by providing comprehensive documentation for all classes and methods. The documentation is primarily generated using Sphinx, so ensure that your contributions are clear and improve the overall quality.'), AlpacaItem(instruction='What is the workflow for creating a board item in CAMEL?', input='', output=\"The workflow for creating a board item in CAMEL involves:\\n1. **Issue Creation**: Create a new issue on the GitHub Issues page, ensuring it has a proper title and description.\\n2. **Assigning Issues**: Assign the issue to yourself to indicate it's being worked on.\\n3. **Linking Issues**: If related to other issues, link them instead of merging into one.\\n4. **Sprint Planning**: Discuss the issue during team meetings and move it to the appropriate status column.\"), AlpacaItem(instruction='Explain the significance of logging over print statements in CAMEL.', input='', output='In CAMEL, using logging (`logger`) instead of print statements is significant because:\\n1. **Consistency**: Logging provides a consistent approach to capturing runtime information.\\n2. **Configurability**: The logging level can be configured, allowing for different levels of detail in output.\\n3. **Professionalism**: It ensures a more professional method of debugging and monitoring applications.'), AlpacaItem(instruction='What steps should be taken if a contributor encounters issues during setup?', input='', output='If a contributor encounters issues during setup, they should:\\n1. **Reach Out**: Contact a maintainer for assistance with the setup process.\\n2. **Seek Guidance**: Ask about specific guidelines for code linting, formatting, and documentation.\\n3. **Provide Feedback**: Let maintainers know if the guidelines are difficult, so they can work to find a solution.'), AlpacaItem(instruction='What is the recommended approach for sprint planning in CAMEL?', input='', output='The recommended approach for sprint planning in CAMEL includes:\\n1. **Duration**: Each sprint lasts two weeks for development and one week for review.\\n2. **Biweekly Meetings**: Conduct planning meetings biweekly to discuss goals and select items for the sprint.\\n3. **Feedback Loop**: Incorporate feedback from stakeholders during the review phase to improve future sprints.'), AlpacaItem(instruction='How should pull requests be labeled in CAMEL?', input='', output='Pull requests in CAMEL should be labeled according to their purpose:\\n- **feat**: For new features.\\n- **fix**: For bug fixes.\\n- **docs**: For documentation updates.\\n- **style**: For code style changes.\\n- **refactor**: For code refactoring.\\n- **test**: For adding or updating tests.\\n- **chore**: For maintenance tasks.'), AlpacaItem(instruction='What is the process for running unit tests in CAMEL?', input='', output='To run unit tests in CAMEL, execute the following command:\\n```\\npytest .\\n```\\nThis command will run all tests, including those that use external APIs. For isolating local unit tests, use:\\n```\\npytest --fast-test-mode .\\n```'), AlpacaItem(instruction='Describe the process for updating dependencies in CAMEL.', input='', output='To update dependencies in CAMEL, follow these steps:\\n1. Modify the `pyproject.toml` file to add, update, or delete dependencies.\\n2. Run `poetry lock` to synchronize the dependencies with the lock file.'), AlpacaItem(instruction='What are the principles for naming variables in CAMEL?', input='', output='The principles for naming variables in CAMEL include:\\n1. **Avoid Abbreviations**: Use clear, descriptive names that convey meaning without requiring additional explanation.\\n2. **Clarity**: Ensure that variable names are understandable to both developers and AI agents, improving both human readability and code interpretation.'), AlpacaItem(instruction='What guidelines should be followed when conducting code reviews?', input='', output='When conducting code reviews in CAMEL, follow these guidelines:\\n1. **Timely Reviews**: Review pull requests promptly to maintain project momentum.\\n2. **Constructive Feedback**: Provide clear, constructive feedback aimed at helping the contributor improve.\\n3. **Collaboration**: Work with the contributor to address any issues and ensure the final code meets standards.'), AlpacaItem(instruction='How to build documentation locally for CAMEL?', input='', output='To build documentation locally for CAMEL, navigate to the `docs` directory and run:\\n```\\nmake html\\n```\\nThis command will generate the HTML documentation files.'), AlpacaItem(instruction='What is the importance of the `Args:` section in docstrings?', input='', output='The `Args:` section in docstrings is important because it clearly documents the parameters of a function or class, including their names, types, descriptions, and default values. This helps users understand how to use the function or class correctly.'), AlpacaItem(instruction='What is the significance of using `pytest` for testing in CAMEL?', input='', output='Using `pytest` for testing in CAMEL is significant because:\\n1. **Ease of Use**: `pytest` provides a simple syntax for writing tests.\\n2. **Rich Features**: It offers powerful features such as fixtures, parameterization, and extensive plugins.\\n3. **Integration**: It integrates well with other tools and frameworks, making it suitable for both unit and integration testing.'), AlpacaItem(instruction='What steps are involved in the code review checklist?', input='', output='The code review checklist in CAMEL includes the following steps:\\n1. **Functionality**: Check for correctness and edge case handling.\\n2. **Testing**: Ensure sufficient test coverage and that all tests pass.\\n3. **Code Quality**: Assess readability, maintainability, and adherence to style guidelines.\\n4. **Documentation**: Verify that complex logic and public methods are well-documented.'), AlpacaItem(instruction='How can contributors ensure their code passes formatting checks?', input='', output=\"Contributors can ensure their code passes formatting checks by:\\n1. Running `poetry run ruff check .` to check for formatting issues.\\n2. Using `poetry run ruff format .` to automatically format the code according to the project's style guidelines.\"), AlpacaItem(instruction='What are the common pitfalls to avoid during code reviews?', input='', output='Common pitfalls to avoid during code reviews include:\\n1. **Large Pull Requests**: Avoid submitting overly large PRs; break them into smaller, manageable pieces.\\n2. **Ignoring Feedback**: Address all feedback provided by reviewers; discuss rather than ignore.\\n3. **Rushed Reviews**: Take the time to thoroughly review code to maintain quality.'), AlpacaItem(instruction=\"What does the 'Common Actions' section in CAMEL documentation cover?\", input='', output=\"The 'Common Actions' section in CAMEL documentation covers various routine tasks, including:\\n1. **Updating Dependencies**: Instructions for managing project dependencies.\\n2. **Linting & Formatting**: Guidelines for checking and formatting code.\\n3. **Coverage**: How to measure code coverage for tests.\\n4. **Tests**: Instructions for running different types of tests.\"), AlpacaItem(instruction='What are the recommended practices for sprint review in CAMEL?', input='', output='Recommended practices for sprint review in CAMEL include:\\n1. **Feedback Collection**: Gather feedback from stakeholders on delivered features.\\n2. **Improvement Identification**: Identify areas for improvement in both processes and product.\\n3. **Document Outcomes**: Ensure outcomes of the review are documented for future reference.'), AlpacaItem(instruction='What is the role of the CAMEL community in the development process?', input='', output='The CAMEL community plays a crucial role in the development process by:\\n1. **Encouraging Contributions**: Welcoming diverse contributions from developers.\\n2. **Providing Support**: Offering assistance and guidance to new contributors.\\n3. **Fostering Collaboration**: Facilitating communication and collaboration among contributors.'), AlpacaItem(instruction='How can contributors ensure their contributions are recognized?', input='', output='Contributors can ensure their contributions are recognized by:\\n1. **Mentioning Twitter Handles**: Informing maintainers if they wish to be credited on Twitter.\\n2. **Participating Actively**: Engaging consistently in discussions and contributions to the project.'), AlpacaItem(instruction='What are the benefits of joining the CAMEL Discord community?', input='', output='Joining the CAMEL Discord community offers several benefits:\\n1. **Real-Time Communication**: Engage with other contributors and maintainers in real-time.\\n2. **Collaboration Opportunities**: Find potential collaborators for projects and features.\\n3. **Support Network**: Access a support network for troubleshooting and sharing knowledge.'), AlpacaItem(instruction='What should be included in the documentation for new features?', input='', output='The documentation for new features should include:\\n1. **Feature Description**: A clear explanation of what the feature does and its purpose.\\n2. **Usage Examples**: Practical examples of how to use the feature in code.\\n3. **Related Documentation**: Links to any related documentation or resources for further reading.'), AlpacaItem(instruction='What are the steps to schedule an introduction call for CAMEL?', input='', output='To schedule an introduction call for CAMEL, follow these steps:\\n1. **Choose Language**: Select the appropriate link based on your language preference (English or Chinese).\\n2. **Select Date and Time**: Pick a suitable date and time from the available slots.\\n3. **Provide Information**: Fill in any required information on the scheduling platform.'), AlpacaItem(instruction='What practices should be followed when adding unit tests?', input='', output='When adding unit tests, contributors should follow these practices:\\n1. **Test Coverage**: Ensure tests cover all relevant functionality, including edge cases.\\n2. **Isolation**: Keep tests isolated from external systems to ensure reliability.\\n3. **Descriptive Names**: Use clear and descriptive names for test functions to indicate their purpose.'), AlpacaItem(instruction='How can contributors manage their issues effectively in CAMEL?', input='', output='Contributors can manage their issues effectively in CAMEL by:\\n1. **Assigning Issues**: Assign issues to themselves when they start working on them.\\n2. **Linking Related Issues**: Link related issues instead of merging them into one for clarity.\\n3. **Keeping Issues Updated**: Regularly update the status of issues to reflect current progress.'), AlpacaItem(instruction='What is the purpose of the `logger` in CAMEL?', input='', output='The purpose of the `logger` in CAMEL is to provide a standardized method for tracking and recording application events, which includes:\\n1. **Debugging**: Assisting in debugging by logging important runtime information.\\n2. **Monitoring**: Offering insights into application behavior and performance.\\n3. **Configurability**: Allowing configurable logging levels to control the amount of logged information.'), AlpacaItem(instruction='Explain the significance of the `pre-commit` hook in CAMEL.', input='', output='The significance of the `pre-commit` hook in CAMEL is that it:\\n1. **Automates Checks**: Automatically runs formatting and linting checks before each commit.\\n2. **Ensures Code Quality**: Helps maintain a consistent code style and quality across contributions.\\n3. **Saves Time**: Reduces the need for manual checks, streamlining the development workflow.'), AlpacaItem(instruction='What should contributors do if they find outdated issues in CAMEL?', input='', output='If contributors find outdated issues in CAMEL, they should:\\n1. **Notify Maintainers**: Give a heads-up to maintainers so they can review and address the issue.\\n2. **Comment on the Issue**: Add a comment on the issue to indicate its status and suggest updates.'), AlpacaItem(instruction=\"How can contributors ensure compliance with the project's coding standards?\", input='', output=\"Contributors can ensure compliance with the project's coding standards by:\\n1. **Reviewing Guidelines**: Familiarizing themselves with the project's coding standards and best practices.\\n2. **Using Linting Tools**: Running linting tools such as `ruff` to check for style issues.\\n3. **Participating in Code Reviews**: Engaging in code reviews to learn from others and share knowledge about coding standards.\"), AlpacaItem(instruction='What is the role of the `test` directory in CAMEL?', input='', output='The role of the `test` directory in CAMEL is to house all unit tests for the project, which includes:\\n1. **Organizing Tests**: Keeping tests organized for easy access and management.\\n2. **Facilitating Testing**: Allowing contributors to run tests easily to verify functionality and catch bugs.'), AlpacaItem(instruction='What should be done before merging a pull request in CAMEL?', input='', output='Before merging a pull request in CAMEL, the following steps should be taken:\\n1. **Review**: Ensure the code has been reviewed and approved by at least two reviewers.\\n2. **Check Tests**: Confirm that all tests pass successfully.\\n3. **Verify Documentation**: Ensure that any relevant documentation has been updated accordingly.'), AlpacaItem(instruction='What is the process for running coverage reports in CAMEL?', input='', output='The process for running coverage reports in CAMEL involves:\\n1. **Erase Previous Coverage**: Run `coverage erase` to clear previous coverage data.\\n2. **Run Tests with Coverage**: Execute `coverage run --source=. -m pytest .` to run tests while collecting coverage data.\\n3. **Generate Report**: Use `coverage html` to create an HTML report, which can be viewed in a browser.'), AlpacaItem(instruction='What are the key components of the CAMEL community?', input='', output='The key components of the CAMEL community include:\\n1. **Contributors**: Individuals who contribute code, documentation, and support.\\n2. **Maintainers**: Experienced contributors who oversee project development and guide the community.\\n3. **Users**: Individuals who use the CAMEL project and provide feedback or report issues.'), AlpacaItem(instruction='How can contributors effectively communicate updates about their pull requests?', input='', output='Contributors can effectively communicate updates about their pull requests by:\\n1. **Commenting**: Adding comments on the pull request to describe changes made.\\n2. **Labeling**: Using appropriate labels to indicate the status of the pull request.\\n3. **Engaging with Reviewers**: Actively engaging with reviewers to address feedback and questions.'), AlpacaItem(instruction='What should contributors do if they need to change an already submitted pull request?', input='', output='If contributors need to change an already submitted pull request, they should:\\n1. **Make Changes Locally**: Update their local branch with the necessary changes.\\n2. **Push Changes**: Push the updated branch to their GitHub fork, which will automatically update the pull request.\\n3. **Notify Reviewers**: Optionally, leave a comment on the pull request to notify reviewers about the changes.'), AlpacaItem(instruction='What guidelines should be followed when creating new issues in CAMEL?', input='', output='When creating new issues in CAMEL, follow these guidelines:\\n1. **Clear Title**: Provide a clear and descriptive title for the issue.\\n2. **Detailed Description**: Include a detailed description of the problem or feature request.\\n3. **Assign Labels**: Use appropriate labels to categorize the issue correctly.'), AlpacaItem(instruction='What is the importance of maintaining a clean and readable codebase?', input='', output='Maintaining a clean and readable codebase is important because:\\n1. **Ease of Maintenance**: It simplifies future maintenance and updates to the code.\\n2. **Collaboration**: It facilitates collaboration among multiple contributors by making the code easier to understand.\\n3. **Bug Reduction**: Clean code helps reduce the likelihood of bugs and errors.'), AlpacaItem(instruction=\"How can contributors participate in CAMEL's developer meetings?\", input='', output=\"Contributors can participate in CAMEL's developer meetings by:\\n1. **Joining Scheduled Meetings**: Attending the meetings at the designated time for their language group.\\n2. **Contributing to Discussions**: Actively engaging in discussions and providing input on project decisions.\"), AlpacaItem(instruction='What is the function of the `chore` label in pull requests?', input='', output=\"The `chore` label in pull requests is used to categorize maintenance tasks that do not affect the application's functionality, such as:\\n1. **Dependency Updates**: Updating project dependencies.\\n2. **Configuration Changes**: Modifying configuration files or settings.\"), AlpacaItem(instruction='What should contributors do after their pull request is merged?', input='', output='After their pull request is merged, contributors should:\\n1. **Clean Up Branches**: Delete the branch used for the pull request to keep the repository organized.\\n2. **Monitor for Feedback**: Stay engaged to monitor any feedback or issues that may arise from the merged changes.'), AlpacaItem(instruction='Explain the significance of the `coverage` tool in CAMEL.', input='', output='The `coverage` tool in CAMEL is significant because it helps:\\n1. **Measure Test Coverage**: Assess the extent to which unit tests cover the codebase.\\n2. **Identify Weak Areas**: Highlight parts of the code that lack sufficient testing, guiding improvements.\\n3. **Maintain Code Quality**: Ensure robust testing practices are in place to maintain code quality.'), AlpacaItem(instruction='What is the process for adding a new feature to CAMEL?', input='', output='The process for adding a new feature to CAMEL includes:\\n1. **Feature Proposal**: Discuss the proposed feature with the community or maintainers.\\n2. **Implementation**: Develop the feature while adhering to coding standards and guidelines.\\n3. **Documentation and Tests**: Update documentation and add relevant tests for the feature.\\n4. **Open a Pull Request**: Submit the changes through a pull request for review.'), AlpacaItem(instruction='What are the best practices for using Git in CAMEL?', input='', output='Best practices for using Git in CAMEL include:\\n1. **Frequent Commits**: Make frequent commits with clear messages to track changes effectively.\\n2. **Branching Strategy**: Use branches for features, fixes, and experiments to keep the main branch stable.\\n3. **Pull Requests**: Always use pull requests to propose changes and facilitate code reviews.'), AlpacaItem(instruction='How should contributors handle conflicts in pull requests?', input='', output='Contributors should handle conflicts in pull requests by:\\n1. **Identifying Conflicts**: Reviewing the conflict messages provided by Git.\\n2. **Resolving Conflicts Locally**: Pulling the latest changes from the main branch and resolving conflicts in their local environment.\\n3. **Pushing Resolved Changes**: Once resolved, pushing the changes back to the branch to update the pull request.'), AlpacaItem(instruction='What is the importance of using descriptive commit messages?', input='', output='Using descriptive commit messages is important because:\\n1. **Clarity**: They provide clarity on what changes were made and why.\\n2. **History Tracking**: They help in tracking the history of changes over time, making it easier to understand the evolution of the codebase.\\n3. **Collaboration**: They facilitate better collaboration by informing other contributors about the context of changes.'), AlpacaItem(instruction='What is the role of the CAMEL maintainers?', input='', output='The role of the CAMEL maintainers includes:\\n1. **Overseeing Development**: Guiding the overall development process and ensuring project goals are met.\\n2. **Reviewing Contributions**: Reviewing pull requests and providing feedback to contributors.\\n3. **Community Engagement**: Engaging with the community to foster participation and support contributors.'), AlpacaItem(instruction='What should a contributor do to get started with CAMEL?', input='', output='To get started with CAMEL, a contributor should:\\n1. **Clone the Repository**: Use the command `git clone https://github.com/camel-ai/camel.git`.\\n2. **Change Directory**: Navigate to the project directory using `cd camel`.\\n3. **Activate Virtual Environment**: Run `poetry shell` to activate the virtual environment.\\n4. **Install Dependencies**: Use `poetry install --with dev,docs -E all` to install all necessary dependencies.\\n5. **Set Up Pre-Commit Hooks**: Run `pre-commit install` to install Git hooks for auto-formatting and linting.\\n6. **Run Tests**: Execute `pytest test` to ensure all tests pass.'), AlpacaItem(instruction='How can a contributor effectively engage with issues in CAMEL?', input='', output='Contributors can effectively engage with issues in CAMEL by:\\n1. **Assigning Issues**: Assign issues to themselves when starting work to inform others.\\n2. **Creating Focused Issues**: Keep new issues focused on specific bugs, improvements, or features.\\n3. **Linking Related Issues**: Link related issues instead of merging them into one.\\n4. **Updating Issue Status**: Regularly update the status of issues and discuss them during team meetings.'), AlpacaItem(instruction='What is the purpose of code reviews in CAMEL?', input='', output='The purpose of code reviews in CAMEL includes:\\n1. **Maintaining Code Quality**: Ensure the codebase remains clean, readable, and maintainable.\\n2. **Knowledge Sharing**: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n3. **Bug Prevention**: Catch potential bugs and issues before they are merged into the main branch.'), AlpacaItem(instruction='What are the key points to consider when writing docstrings for CAMEL?', input='', output='When writing docstrings for CAMEL, consider the following key points:\\n1. **Use Triple-Quoted Strings**: Start with `r\"\"\"` to prevent issues with special characters.\\n2. **Brief Descriptions**: Provide a concise summary of the purpose and functionality.\\n3. **Document Parameters**: Use an `Args` section for documenting constructor or function parameters.'), AlpacaItem(instruction='How often are sprint planning and review meetings held in CAMEL?', input='', output='Sprint planning and review meetings in CAMEL are held biweekly. Each sprint lasts two weeks for development and one week for review.'), AlpacaItem(instruction='What is the recommended workflow for contributing code to CAMEL?', input='', output='The recommended workflow for contributing code to CAMEL includes:\\n1. **Fork-and-Pull-Request**: Use the Fork-and-Pull-Request workflow if you are a community contributor.\\n2. **Checkout-and-Pull-Request**: If you are a member of CAMEL-AI.org, follow the Checkout-and-Pull-Request workflow.\\n3. **Mention Issues**: Always mention any related issues and tag relevant maintainers in your pull request.'), AlpacaItem(instruction='What should a contributor do if they encounter challenges during the setup process?', input='', output='If contributors encounter challenges during the setup process, they should:\\n1. **Reach Out to Maintainers**: Contact a maintainer for assistance to ensure a smooth experience.\\n2. **Discuss Guidelines**: If the setup requirements are difficult, discuss them with maintainers for potential solutions.'), AlpacaItem(instruction='What is the significance of using the logger instead of print statements in CAMEL?', input='', output='Using the logger instead of print statements in CAMEL is significant because:\\n1. **Consistent Logging**: It ensures consistent and configurable logging across the application.\\n2. **Professional Output**: Logging provides a more professional approach to outputting information, which can be adjusted easily based on log levels.'), AlpacaItem(instruction='How should contributors handle outdated issues they come across in CAMEL?', input='', output='Contributors should handle outdated issues in CAMEL by:\\n1. **Notifying Maintainers**: Inform maintainers about the outdated issues for review.\\n2. **Commenting on Issues**: Leave a comment to indicate the status and suggest updates.'), AlpacaItem(instruction='What should be included in the documentation for bug fixes?', input='', output='The documentation for bug fixes should include:\\n1. **Description of the Bug**: A clear explanation of the bug that was fixed.\\n2. **Steps to Reproduce**: Instructions on how to reproduce the bug before the fix.\\n3. **Impact of the Fix**: Information on how the fix improves functionality or resolves issues.'), AlpacaItem(instruction='What actions should a contributor take after their pull request is merged?', input='', output='After a pull request is merged, a contributor should:\\n1. **Close Related Issues**: Ensure that any linked issues are closed automatically.\\n2. **Update Documentation**: If applicable, update documentation to reflect any changes made.\\n3. **Celebrate Contributions**: Acknowledge their contribution and share it with the community.'), AlpacaItem(instruction=\"What is covered in the 'Common Actions' section of the CAMEL documentation?\", input='', output=\"The 'Common Actions' section of the CAMEL documentation covers:\\n1. **Updating Dependencies**: Instructions for managing and updating project dependencies.\\n2. **Linting & Formatting**: Guidelines for checking and formatting code to maintain quality.\\n3. **Coverage**: How to measure code coverage for tests and ensure robustness.\\n4. **Tests**: Instructions for running various types of tests to verify code functionality.\"), AlpacaItem(instruction='What are the responsibilities of a reviewer during the code review process?', input='', output='The responsibilities of a reviewer during the code review process include:\\n1. **Timely Reviews**: Strive to review pull requests promptly to keep the project moving.\\n2. **Constructive Feedback**: Provide clear and constructive feedback to help the contributor improve.\\n3. **Collaboration**: Work collaboratively with the contributor to address any issues.'), AlpacaItem(instruction='How can contributors ensure their code is well-tested before submission?', input='', output='Contributors can ensure their code is well-tested before submission by:\\n1. **Writing Unit Tests**: Include relevant unit tests in the `test` directory for new features or bug fixes.\\n2. **Running Tests Locally**: Execute `pytest .` to run all tests and verify functionality.\\n3. **Checking Test Coverage**: Use coverage tools to ensure adequate test coverage for new changes.'), AlpacaItem(instruction=\"What is the purpose of the 'Guidelines for Writing Docstrings' section?\", input='', output=\"The purpose of the 'Guidelines for Writing Docstrings' section is to provide contributors with structured instructions on how to write clear, concise, and effective docstrings for their code, ensuring high-quality documentation coverage.\"), AlpacaItem(instruction='What should contributors do to maintain consistency in coding style?', input='', output=\"To maintain consistency in coding style, contributors should:\\n1. **Follow Style Guidelines**: Adhere to the project's coding style guidelines, such as using Ruff for format checks.\\n2. **Use Linting Tools**: Regularly run linting tools to identify and correct style issues in the code.\\n3. **Review Code Consistency**: During code reviews, check for adherence to style guidelines and provide feedback when necessary.\"), AlpacaItem(instruction='What is the role of documentation in the CAMEL project?', input='', output='The role of documentation in the CAMEL project is to:\\n1. **Facilitate Understanding**: Help contributors and users understand how to use the project effectively.\\n2. **Provide Reference Material**: Serve as a reference for the codebase, including features, functions, and usage examples.\\n3. **Support Onboarding**: Assist new contributors in getting up to speed with the project and its guidelines.'), AlpacaItem(instruction='How should unit tests be structured in CAMEL?', input='', output='Unit tests in CAMEL should be structured by:\\n1. **Organizing Tests**: Place them in the `test` directory, with clear naming conventions for test files.\\n2. **Isolating Tests**: Ensure that tests are modular and do not depend on external systems to facilitate quick execution.\\n3. **Covering Edge Cases**: Include tests for various scenarios, including edge cases, to ensure robustness.'), AlpacaItem(instruction='What is the recommended approach for documenting new features?', input='', output='The recommended approach for documenting new features includes:\\n1. **Feature Overview**: Provide a clear explanation of what the feature does and its purpose.\\n2. **Usage Examples**: Include practical examples demonstrating how to use the feature in code.\\n3. **Linking Related Documentation**: Reference any related documentation for further reading and context.'), AlpacaItem(instruction='What actions are part of the Pull Request Item Stage?', input='', output='The actions part of the Pull Request Item Stage include:\\n1. **Creating a PR**: Go to GitHub Pulls, create a new PR, and choose the appropriate branch.\\n2. **Updating Details**: Fill in the necessary information, linking any related issues.\\n3. **Labeling**: Ensure the PR has a proper title and update the Reviewers, Assignees, and Labels.'), AlpacaItem(instruction='What should contributors do if they want to improve documentation?', input='', output='If contributors want to improve documentation, they should:\\n1. **Identify Gaps**: Review existing documentation for areas that need clarification or additional information.\\n2. **Make Updates**: Edit documentation files to include new information, examples, or corrections.\\n3. **Submit Changes**: Open a pull request with the documentation updates for review.'), AlpacaItem(instruction=\"What is the significance of the 'Giving Credit' section in CAMEL?\", input='', output=\"The significance of the 'Giving Credit' section in CAMEL is to:\\n1. **Recognize Contributions**: Acknowledge and celebrate the contributions of individuals to the project.\\n2. **Encourage Participation**: Motivate contributors to engage with the project by highlighting their efforts publicly.\\n3. **Build Community**: Foster a sense of community and appreciation among contributors.\"), AlpacaItem(instruction='What are the best practices for conducting code reviews?', input='', output='Best practices for conducting code reviews include:\\n1. **Thorough Checks**: Review the code for functionality, readability, consistency, and compliance with coding standards.\\n2. **Provide Constructive Feedback**: Leave clear and actionable feedback for the contributor.\\n3. **Avoid Rushing**: Take time to thoroughly review the code to maintain quality.'), AlpacaItem(instruction='How can contributors ensure their changes are compatible with the existing codebase?', input='', output='Contributors can ensure their changes are compatible with the existing codebase by:\\n1. **Running Tests**: Execute all existing tests to verify that no functionality is broken.\\n2. **Adhering to Guidelines**: Follow coding and documentation guidelines to maintain consistency.\\n3. **Reviewing Related Code**: Examine related code sections to understand dependencies and interactions.'), AlpacaItem(instruction='What is the process for updating dependencies in CAMEL?', input='', output='The process for updating dependencies in CAMEL involves:\\n1. **Editing pyproject.toml**: Make necessary changes to the `pyproject.toml` file to add, update, or remove dependencies.\\n2. **Running Poetry Lock**: Execute `poetry lock` to synchronize the changes with the lock file.\\n3. **Testing Changes**: After updating dependencies, run tests to ensure that everything works correctly.'), AlpacaItem(instruction='What should contributors do to prepare for a developer meeting?', input='', output='To prepare for a developer meeting, contributors should:\\n1. **Review Agenda**: Familiarize themselves with the meeting agenda and topics to be discussed.\\n2. **Prepare Updates**: Be ready to provide updates on their contributions and any challenges faced.\\n3. **Gather Feedback**: Think about any feedback or questions they may want to bring up during the meeting.'), AlpacaItem(instruction='What are the goals of sprint planning in CAMEL?', input='', output=\"The goals of sprint planning in CAMEL include:\\n1. **Defining Deliverables**: Determine what can be delivered in the upcoming sprint.\\n2. **Setting Goals**: Establish a clear sprint goal to guide the team's efforts.\\n3. **Assigning Tasks**: Allow developers to choose items from the backlog for the sprint.\"), AlpacaItem(instruction='How can contributors ensure their pull requests are ready for review?', input='', output='Contributors can ensure their pull requests are ready for review by:\\n1. **Passing Checks**: Making sure that all formatting, linting, and testing checks pass.\\n2. **Providing Context**: Including a clear description of the changes made and any relevant issues.\\n3. **Labeling Appropriately**: Using the correct labels to indicate the nature of the changes.'), AlpacaItem(instruction=\"What is the purpose of the 'License' section in CAMEL documentation?\", input='', output=\"The purpose of the 'License' section in CAMEL documentation is to inform contributors and users about the licensing terms under which the source code of the CAMEL project is released, specifically under the Apache 2.0 license.\"), AlpacaItem(instruction='What is the recommended structure for a pull request description?', input='', output='The recommended structure for a pull request description includes:\\n1. **Title**: A concise title summarizing the changes.\\n2. **Description**: A detailed explanation of what the PR does and why changes were made.\\n3. **Related Issues**: Links to any related issues that the PR addresses.\\n4. **Testing Instructions**: Instructions on how to test the changes made.'), AlpacaItem(instruction='What should be included in the documentation for code refactoring?', input='', output='The documentation for code refactoring should include:\\n1. **Purpose of Refactoring**: An explanation of why the code was refactored and what issues it addressed.\\n2. **Changes Made**: A summary of the specific changes implemented during the refactoring process.\\n3. **Impact on Functionality**: Information on how the refactoring improves code quality or performance.'), AlpacaItem(instruction='How can contributors effectively communicate in the CAMEL community?', input='', output=\"Contributors can effectively communicate in the CAMEL community by:\\n1. **Using Discord**: Engaging in discussions on the community Discord server for real-time communication.\\n2. **Participating in Meetings**: Attending developer meetings to share updates and feedback.\\n3. **Providing Feedback**: Offering constructive feedback on others' contributions to foster a collaborative environment.\"), AlpacaItem(instruction='What should contributors consider when creating a new feature?', input='', output='When creating a new feature, contributors should consider:\\n1. **User Needs**: Ensure the feature addresses a real user need or improves functionality.\\n2. **Impact on Codebase**: Assess how the feature will integrate with the existing code and its potential impact.\\n3. **Testing Requirements**: Plan for how the feature will be tested and documented.'), AlpacaItem(instruction=\"What is the significance of the 'Developer Meeting Time & Link' section?\", input='', output=\"The significance of the 'Developer Meeting Time & Link' section is to provide contributors with the schedule and access information for regular meetings, ensuring they can participate in discussions about project development and planning.\"), AlpacaItem(instruction='How should contributors document their changes in a pull request?', input='', output='Contributors should document their changes in a pull request by:\\n1. **Describing Changes**: Clearly explaining what changes were made and their purpose.\\n2. **Referencing Related Issues**: Linking any related issues to provide context.\\n3. **Highlighting Testing**: Mentioning any tests that were added or modified as part of the changes.'), AlpacaItem(instruction='What is the process for building documentation locally in CAMEL?', input='', output='The process for building documentation locally in CAMEL involves:\\n1. **Changing Directory**: Navigate to the `docs` directory using `cd docs`.\\n2. **Building Documentation**: Run `make html` to generate the HTML documentation.\\n3. **Viewing Documentation**: Open the generated HTML files to review the documentation.'), AlpacaItem(instruction='How can contributors contribute to the CAMEL project beyond coding?', input='', output='Contributors can contribute to the CAMEL project beyond coding by:\\n1. **Improving Documentation**: Writing and updating documentation to enhance clarity and usability.\\n2. **Reporting Issues**: Identifying and reporting bugs or feature requests to help improve the project.\\n3. **Participating in Discussions**: Engaging in community discussions to share ideas and provide feedback.'), AlpacaItem(instruction='What guidelines should be followed when submitting a bug fix?', input='', output='When submitting a bug fix, contributors should follow these guidelines:\\n1. **Describe the Bug**: Clearly explain the bug and how it was identified.\\n2. **Include Tests**: Provide relevant unit tests to verify that the bug has been fixed.\\n3. **Update Documentation**: If applicable, update any related documentation to reflect the fix.'), AlpacaItem(instruction='What should contributors do to prepare for a sprint review?', input='', output='To prepare for a sprint review, contributors should:\\n1. **Compile Updates**: Gather information on what was accomplished during the sprint.\\n2. **Prepare Demonstrations**: Be ready to demonstrate completed features and provide feedback on their development.\\n3. **Reflect on Feedback**: Consider any feedback received during the sprint and how it can be addressed.'), AlpacaItem(instruction='How can contributors ensure that their code is secure?', input='', output='Contributors can ensure that their code is secure by:\\n1. **Reviewing Security Guidelines**: Familiarizing themselves with security best practices relevant to the project.\\n2. **Conducting Security Tests**: Running security tests to identify vulnerabilities before merging changes.\\n3. **Minimizing Dependencies**: Keeping dependencies to a minimum to reduce potential security risks.'), AlpacaItem(instruction=\"What is the role of the 'Quick Start' section in CAMEL documentation?\", input='', output=\"The role of the 'Quick Start' section in CAMEL documentation is to provide new contributors with a straightforward guide to set up the project quickly, helping them to get started with the development environment and understand the basic commands required.\"), AlpacaItem(instruction='What should contributors do if they want to suggest a new feature?', input='', output='If contributors want to suggest a new feature, they should:\\n1. **Create a New Issue**: Open a new issue in the GitHub repository detailing the proposed feature.\\n2. **Provide Context**: Explain the rationale behind the feature and its potential benefits.\\n3. **Solicit Feedback**: Encourage discussion around the feature to gather input from other contributors.'), AlpacaItem(instruction='How can contributors stay updated on project changes and discussions?', input='', output='Contributors can stay updated on project changes and discussions by:\\n1. **Following GitHub Notifications**: Subscribing to notifications for the repository to receive updates on issues and pull requests.\\n2. **Joining Community Channels**: Participating in community channels like Discord or Slack for real-time discussions.\\n3. **Reviewing Meeting Notes**: Checking notes from developer meetings to catch up on key discussions and decisions.'), AlpacaItem(instruction=\"What is the purpose of the 'Contributing to Code Reviews' section?\", input='', output=\"The purpose of the 'Contributing to Code Reviews' section is to outline the best practices and guidelines for conducting effective code reviews, ensuring that contributions meet project standards and maintain high code quality.\"), AlpacaItem(instruction='What are the principles behind naming conventions in CAMEL?', input='', output='The principles behind naming conventions in CAMEL include:\\n1. **Avoiding Abbreviations**: Use clear, descriptive names to avoid ambiguity.\\n2. **Clarity and Readability**: Ensure variable names and function names convey their purpose without needing additional explanation.\\n3. **Consistency**: Maintain consistency in naming across the codebase to improve readability and maintainability.'), AlpacaItem(instruction='How can contributors effectively provide feedback during code reviews?', input='', output='Contributors can effectively provide feedback during code reviews by:\\n1. **Being Constructive**: Offer clear and actionable suggestions rather than just pointing out issues.\\n2. **Focusing on Code Quality**: Emphasize best practices in coding, documentation, and testing.\\n3. **Encouraging Discussion**: Engage in discussions about the code to foster collaboration and learning.'), AlpacaItem(instruction='What should contributors do if they are unsure about a coding guideline?', input='', output=\"If contributors are unsure about a coding guideline, they should:\\n1. **Consult Documentation**: Review the project's documentation for clarification on guidelines.\\n2. **Ask the Community**: Reach out to maintainers or community members for guidance.\\n3. **Refer to Examples**: Look at existing code for examples of how guidelines are applied.\"), AlpacaItem(instruction='What is the significance of maintaining a changelog in CAMEL?', input='', output='The significance of maintaining a changelog in CAMEL is to:\\n1. **Track Changes**: Provide a clear record of all changes made to the project over time.\\n2. **Inform Users**: Keep users informed about new features, bug fixes, and improvements.\\n3. **Facilitate Version Control**: Help contributors and maintainers understand the evolution of the project.'), AlpacaItem(instruction='How can contributors ensure their documentation is comprehensive?', input='', output='Contributors can ensure their documentation is comprehensive by:\\n1. **Including Examples**: Providing practical examples of how to use features or functions.\\n2. **Covering Edge Cases**: Documenting edge cases and potential pitfalls in using the code.\\n3. **Reviewing for Clarity**: Ensuring that the language used is clear and accessible to both technical and non-technical users.'), AlpacaItem(instruction='What should contributors do to engage with the CAMEL community effectively?', input='', output='To engage with the CAMEL community effectively, contributors should:\\n1. **Participate Actively**: Join discussions on community platforms like Discord and attend meetings.\\n2. **Share Knowledge**: Offer insights and help others by sharing knowledge and experiences.\\n3. **Be Open to Feedback**: Be receptive to feedback and use it as an opportunity for growth.'), AlpacaItem(instruction='What are the guidelines for writing docstrings in CAMEL?', input='', output='The guidelines for writing docstrings in CAMEL include:\\n1. **Use the Triple-Quoted String with `r\"\"\"`**: Start the docstring with `r\"\"\"` to indicate a raw docstring, preventing issues with special characters.\\n2. **Provide a Brief Class or Method Description**: Include a concise summary of the functionality and keep each line under 79 characters.\\n3. **Document Parameters in the Args Section**: Use an `Args` section to document parameters, including their names, types, descriptions, and default values.'), AlpacaItem(instruction='How should contributors handle large pull requests in CAMEL?', input='', output='Contributors should handle large pull requests by:\\n1. **Breaking Down Changes**: Avoid submitting overly large PRs; instead, break them into smaller, manageable changes.\\n2. **Addressing Feedback**: Ensure to address all feedback provided by reviewers thoroughly, discussing any disagreements instead of ignoring them.'), AlpacaItem(instruction='What is the process for scheduling an introduction call for new contributors?', input='', output='The process for scheduling an introduction call for new contributors includes:\\n1. **Selecting Language**: Choose the appropriate link based on your language preference—either English or Chinese.\\n2. **Accessing Calendly**: Use the provided Calendly links to book a time slot that works for you.'), AlpacaItem(instruction='What are the responsibilities of reviewers during code reviews in CAMEL?', input='', output='Reviewers have several responsibilities during code reviews in CAMEL, including:\\n1. **Timely Reviews**: Striving to review PRs promptly to keep the project moving forward.\\n2. **Constructive Feedback**: Providing clear and constructive feedback aimed at helping contributors improve their code.\\n3. **Collaboration**: Working collaboratively with contributors to address any issues until the final code meets project standards.'), AlpacaItem(instruction='What steps should contributors take if they encounter difficulties during the setup process?', input='', output='If contributors encounter difficulties during the setup process, they should:\\n1. **Reach Out for Help**: Contact a maintainer for assistance.\\n2. **Provide Feedback**: Share any specific guidelines or requirements that are causing issues to find a suitable solution.'), AlpacaItem(instruction='How are contributions recognized in CAMEL?', input='', output='Contributions are recognized in CAMEL by:\\n1. **Credit on Twitter**: Contributors can opt to receive recognition on Twitter if their contribution is included in a release.\\n2. **Communication**: Contributors should inform the team of their Twitter handle to ensure proper acknowledgment.'), AlpacaItem(instruction='What is the importance of maintaining code quality in CAMEL?', input='', output='Maintaining code quality in CAMEL is important because it:\\n1. **Ensures Readability**: Keeps the codebase clean and easy to read.\\n2. **Facilitates Maintenance**: Makes the code easier to maintain and modify in the future.\\n3. **Prevents Bugs**: Helps catch potential bugs and issues before they are merged into the main branch.'), AlpacaItem(instruction='What should be included in the documentation for new features?', input='', output='Documentation for new features should include:\\n1. **Usage Instructions**: Clear instructions on how to use the new feature.\\n2. **Examples**: Examples demonstrating the feature in action.\\n3. **API Changes**: Any changes to the API that relate to the new feature.'), AlpacaItem(instruction='How can contributors ensure their code is well-tested before submission?', input='', output='Contributors can ensure their code is well-tested before submission by:\\n1. **Writing Unit Tests**: Adding relevant unit tests that cover new features or bug fixes.\\n2. **Running Tests Locally**: Executing `pytest` to verify that all tests pass before creating a pull request.'), AlpacaItem(instruction='What are the recommended practices for managing project dependencies in CAMEL?', input='', output='Recommended practices for managing project dependencies in CAMEL include:\\n1. **Using Poetry**: Utilize Poetry to manage dependencies and ensure they are up to date.\\n2. **Running `poetry lock`**: When adding, updating, or deleting dependencies in `pyproject.toml`, always run `poetry lock` to synchronize with the lock file.'), AlpacaItem(instruction='How should contributors document changes made in their pull requests?', input='', output='Contributors should document changes made in their pull requests by:\\n1. **Writing Descriptive Titles**: Using clear and descriptive titles for the pull request.\\n2. **Providing Context**: Including a detailed description of the changes and any related issues.'), AlpacaItem(instruction='What is the purpose of having a checklist for code reviews?', input='', output=\"The purpose of having a checklist for code reviews is to:\\n1. **Maintain Code Quality**: Ensure that all contributions meet the project's standards for quality and functionality.\\n2. **Promote Consistency**: Foster consistency in the review process across different contributions.\"), AlpacaItem(instruction='What steps should be taken to build documentation locally in CAMEL?', input='', output='To build documentation locally in CAMEL, follow these steps:\\n1. **Navigate to the Docs Directory**: Change directory to `docs`.\\n2. **Run the Build Command**: Execute `make html` to generate the HTML documentation.'), AlpacaItem(instruction='How can contributors add unit tests when fixing bugs?', input='', output='Contributors can add unit tests when fixing bugs by:\\n1. **Identifying the Bug**: Understanding the bug and its context.\\n2. **Creating Relevant Tests**: Writing unit tests that specifically check for the bug and ensure it does not occur again.'), AlpacaItem(instruction='What is the recommended approach for handling documentation updates?', input='', output='The recommended approach for handling documentation updates includes:\\n1. **Updating Affected Sections**: Modifying documentation to reflect any changes made to the code or features.\\n2. **Ensuring Clarity**: Making sure that the documentation is clear, concise, and easy to follow.'), AlpacaItem(instruction='What guidelines should be followed when contributing to the codebase?', input='', output='Guidelines for contributing to the codebase include:\\n1. **Fork-and-Pull-Request Workflow**: Follow the Fork-and-Pull-Request workflow for community contributors.\\n2. **Mention Related Issues**: Always mention any related issues and tag relevant maintainers in your pull request.'), AlpacaItem(instruction='What is the significance of using a logging module instead of print statements?', input='', output='The significance of using a logging module instead of print statements includes:\\n1. **Configurability**: Logging provides more control over how messages are emitted and where they are directed.\\n2. **Professionalism**: Using a logging framework leads to cleaner, more maintainable code.'), AlpacaItem(instruction='What is the procedure for submitting a pull request in CAMEL?', input='', output='The procedure for submitting a pull request in CAMEL involves:\\n1. **Creating a Pull Request**: Go to GitHub Pulls, create a new PR, and fill in the required information.\\n2. **Linking Issues**: Ensure to link the related issue and update the necessary fields.'), AlpacaItem(instruction='How can contributors effectively communicate their ideas for new features?', input='', output='Contributors can effectively communicate their ideas for new features by:\\n1. **Opening Discussions**: Initiating discussions on Discord or through GitHub issues to share and refine ideas.\\n2. **Providing Detailed Proposals**: Writing detailed proposals that outline the feature, its benefits, and potential implementation strategies.'), AlpacaItem(instruction='What is the recommended method for running tests in CAMEL?', input='', output='The recommended method for running tests in CAMEL is to use the command:\\n```\\npytest .\\n```\\nThis command runs all tests, including those that utilize external APIs.'), AlpacaItem(instruction='How should contributors handle security concerns in their code contributions?', input='', output='Contributors should handle security concerns in their code contributions by:\\n1. **Reviewing Code for Vulnerabilities**: Conducting thorough reviews of their code to identify any potential security issues.\\n2. **Documenting Security Features**: Clearly documenting any security-related features and considerations in their contributions.'), AlpacaItem(instruction=\"What is the purpose of the CAMEL community's communication channels?\", input='', output=\"The purpose of the CAMEL community's communication channels is to:\\n1. **Facilitate Collaboration**: Provide platforms for contributors to discuss ideas, issues, and solutions.\\n2. **Enhance Support**: Allow contributors to seek help and share experiences with others in the community.\"), AlpacaItem(instruction='What should be done if a contributor encounters an outdated issue on GitHub?', input='', output='If a contributor encounters an outdated issue on GitHub, they should:\\n1. **Notify Maintainers**: Inform the maintainers about the outdated issue so they can address it.\\n2. **Check for Related Discussions**: Look for any related discussions or updates that may have occurred since the issue was created.'), AlpacaItem(instruction='What are the key components of a successful sprint review in CAMEL?', input='', output='The key components of a successful sprint review in CAMEL include:\\n1. **Feedback from Stakeholders**: Gathering feedback on delivered features from stakeholders.\\n2. **Discussion of Improvements**: Identifying areas for improvement based on the review of recent work.'), AlpacaItem(instruction='How can contributors ensure their documentation is comprehensive?', input='', output='Contributors can ensure their documentation is comprehensive by:\\n1. **Covering All Aspects**: Addressing all relevant aspects of the code or feature being documented.\\n2. **Seeking Feedback**: Asking peers for feedback on the documentation to identify any gaps or areas for improvement.'), AlpacaItem(instruction='What is the importance of code formatting in CAMEL?', input='', output='The importance of code formatting in CAMEL includes:\\n1. **Improving Readability**: Proper formatting enhances the readability of the code, making it easier for contributors to understand.\\n2. **Ensuring Consistency**: Consistent formatting helps maintain a uniform style across the codebase.'), AlpacaItem(instruction='What are the guidelines for submitting documentation contributions?', input='', output='The guidelines for submitting documentation contributions include:\\n1. **Clarity and Precision**: Ensure that documentation is clear and precise, avoiding ambiguities.\\n2. **Alignment with Code Changes**: Update documentation to align with any changes made to the codebase.'), AlpacaItem(instruction='How can contributors effectively manage their time during sprints?', input='', output='Contributors can effectively manage their time during sprints by:\\n1. **Setting Clear Goals**: Establishing clear goals for what they intend to accomplish during the sprint.\\n2. **Prioritizing Tasks**: Prioritizing tasks based on their importance and deadlines.'), AlpacaItem(instruction='What is the role of the founder in sprint planning?', input='', output='The role of the founder in sprint planning includes:\\n1. **Highlighting Sprint Goals**: Outlining the key objectives and goals for the upcoming sprint.\\n2. **Facilitating Discussions**: Leading discussions to help developers select items for the sprint.'), AlpacaItem(instruction='What should contributors do when they want to propose a significant change to the codebase?', input='', output='When proposing a significant change to the codebase, contributors should:\\n1. **Create a Proposal**: Write a detailed proposal outlining the change, its benefits, and how it aligns with project goals.\\n2. **Engage the Community**: Discuss the proposal with the community to gather feedback and build consensus.'), AlpacaItem(instruction='What is the recommended approach for code reviews in CAMEL?', input='', output='The recommended approach for code reviews in CAMEL includes:\\n1. **Thorough Examination**: Review the code for functionality, readability, and adherence to coding standards.\\n2. **Providing Constructive Feedback**: Offer clear, constructive feedback to help the contributor improve their code.'), AlpacaItem(instruction='How can contributors contribute to improving documentation in CAMEL?', input='', output='Contributors can improve documentation in CAMEL by:\\n1. **Identifying Gaps**: Reviewing existing documentation to identify gaps or outdated information.\\n2. **Providing Updates**: Submitting updates to documentation based on their own experiences and insights.'), AlpacaItem(instruction='What should be included in a pull request description?', input='', output='A pull request description should include:\\n1. **Summary of Changes**: A brief overview of the changes made in the pull request.\\n2. **Related Issues**: Links to any related issues or discussions.\\n3. **Testing Instructions**: Instructions on how to test the changes.'), AlpacaItem(instruction='How can contributors foster a welcoming community in CAMEL?', input='', output='Contributors can foster a welcoming community in CAMEL by:\\n1. **Encouraging New Contributors**: Offering help and guidance to new contributors to help them get started.\\n2. **Being Respectful**: Maintaining a respectful and supportive tone in all communications.'), AlpacaItem(instruction='What are the best practices for running pre-commit hooks in CAMEL?', input='', output='Best practices for running pre-commit hooks in CAMEL include:\\n1. **Setting Up Hooks**: Ensure pre-commit hooks are set up correctly in the local repository using `pre-commit install`.\\n2. **Running Hooks Before Push**: Always run `pre-commit run --all-files` before pushing changes to catch any issues early.'), AlpacaItem(instruction='What is the significance of using semantic versioning in CAMEL?', input='', output='The significance of using semantic versioning in CAMEL includes:\\n1. **Clear Communication**: It provides clear communication regarding the nature of changes in each release (major, minor, or patch).\\n2. **Predictable Updates**: Users can predict the impact of updates on their projects based on version numbers.'), AlpacaItem(instruction='What are the responsibilities of maintainers in the CAMEL project?', input='', output='The responsibilities of maintainers in the CAMEL project include:\\n1. **Overseeing Contributions**: Managing and reviewing contributions from the community.\\n2. **Ensuring Project Quality**: Ensuring that the codebase remains high-quality and aligned with project goals.'), AlpacaItem(instruction='How can contributors effectively collaborate on issues in CAMEL?', input='', output='Contributors can effectively collaborate on issues in CAMEL by:\\n1. **Commenting on Issues**: Actively commenting on issues to provide updates, insights, and suggestions.\\n2. **Assigning Issues**: Assigning themselves to issues they are working on to keep the team informed.'), AlpacaItem(instruction='What is the best way to handle feedback received during code reviews?', input='', output='The best way to handle feedback received during code reviews is to:\\n1. **Be Open-Minded**: Approach feedback with an open mind, considering the suggestions seriously.\\n2. **Engage in Discussion**: If there are disagreements, engage in constructive discussions to reach a consensus.'), AlpacaItem(instruction='How can contributors help ensure that the CAMEL documentation stays up to date?', input='', output='Contributors can help ensure that the CAMEL documentation stays up to date by:\\n1. **Regularly Reviewing Documentation**: Periodically reviewing documentation for accuracy and relevance.\\n2. **Submitting Updates**: Promptly submitting updates whenever they make changes to the code that affect documentation.'), AlpacaItem(instruction='What should contributors do if they discover a security vulnerability in CAMEL?', input='', output='If contributors discover a security vulnerability in CAMEL, they should:\\n1. **Report Immediately**: Report the vulnerability to the maintainers as soon as possible.\\n2. **Provide Details**: Include as much detail as possible about the vulnerability and how to reproduce it.'), AlpacaItem(instruction='What is the role of documentation in the CAMEL project?', input='', output='The role of documentation in the CAMEL project includes:\\n1. **Guiding Contributors**: Providing clear guidelines for contributors to understand how to engage with the project.\\n2. **Explaining Features**: Offering explanations and usage examples for features to help users effectively utilize the software.'), AlpacaItem(instruction=\"How can contributors ensure their code adheres to the project's style guidelines?\", input='', output=\"Contributors can ensure their code adheres to the project's style guidelines by:\\n1. **Using Linting Tools**: Utilizing tools like Ruff to check for style compliance.\\n2. **Reviewing Guidelines**: Familiarizing themselves with the project's style guidelines before submitting code.\"), AlpacaItem(instruction='What is the process for conducting a sprint planning meeting in CAMEL?', input='', output='The process for conducting a sprint planning meeting in CAMEL involves:\\n1. **Setting the Agenda**: The founder sets the agenda by highlighting the sprint goal.\\n2. **Choosing Items**: Developers discuss and choose items to work on during the sprint.'), AlpacaItem(instruction='How can contributors effectively share their experiences with the CAMEL community?', input='', output='Contributors can effectively share their experiences with the CAMEL community by:\\n1. **Participating in Discussions**: Engaging in discussions on Discord or GitHub issues to share insights.\\n2. **Writing Blog Posts**: Consider writing blog posts or articles about their experiences and contributions.'), AlpacaItem(instruction='What should contributors include in their pull request titles?', input='', output='Contributors should include the following in their pull request titles:\\n1. **Concise Description**: A concise description of the changes made.\\n2. **Type of Change**: An indication of whether it is a feature, fix, or documentation update.'), AlpacaItem(instruction='What are the advantages of participating in the CAMEL community?', input='', output='The advantages of participating in the CAMEL community include:\\n1. **Collaborative Learning**: Opportunities to learn from others and share knowledge.\\n2. **Networking**: Building connections with other developers and contributors.'), AlpacaItem(instruction='How can contributors improve their coding skills through CAMEL?', input='', output='Contributors can improve their coding skills through CAMEL by:\\n1. **Engaging in Code Reviews**: Participating in code reviews to learn from feedback and best practices.\\n2. **Taking on Challenges**: Tackling challenging issues and features to stretch their coding abilities.'), AlpacaItem(instruction='What is the significance of maintaining a clean codebase in CAMEL?', input='', output='The significance of maintaining a clean codebase in CAMEL includes:\\n1. **Ease of Maintenance**: A clean codebase is easier to maintain and update over time.\\n2. **Enhanced Collaboration**: It facilitates collaboration among contributors by making the code more understandable.'), AlpacaItem(instruction='What guidelines should contributors follow when creating new issues on GitHub?', input='', output='When creating new issues on GitHub, contributors should follow these guidelines:\\n1. **Clear Titles**: Use clear and descriptive titles that summarize the issue.\\n2. **Detailed Descriptions**: Provide detailed descriptions, including steps to reproduce the issue and any relevant context.'), AlpacaItem(instruction='Explain the process of contributing to the CAMEL codebase.', input='', output=\"To contribute to the CAMEL codebase, follow these steps:\\n1. **Fork the Repository**: Create a personal copy of the CAMEL repository on GitHub.\\n2. **Clone Your Fork**: Use `git clone` to download the forked repository to your local machine.\\n3. **Create a Branch**: Develop your feature or fix in a new branch to keep your changes organized.\\n4. **Make Changes**: Implement your changes, ensuring to follow the project's coding standards and guidelines.\\n5. **Test Your Changes**: Run the appropriate tests to confirm that everything works as expected.\\n6. **Commit and Push**: Commit your changes and push the branch back to your forked repository.\\n7. **Open a Pull Request**: Navigate to the original repository and create a pull request from your branch, detailing the changes made.\"), AlpacaItem(instruction='What are the guidelines for writing docstrings in CAMEL?', input='', output='The guidelines for writing docstrings in CAMEL include:\\n1. **Use Triple-Quoted Strings**: Start with `r\"\"\"` to create a raw docstring, preventing issues with special characters.\\n2. **Provide a Brief Description**: Summarize the purpose and functionality of the class or method clearly, keeping each line under 79 characters.\\n3. **Document Parameters**: Use an `Args:` section to document parameters, including their names, types, descriptions, and default values.'), AlpacaItem(instruction='Describe the process for creating a pull request in CAMEL.', input='', output='The process for creating a pull request in CAMEL includes:\\n1. **Navigate to Pull Requests**: Go to the Pull Requests section of the CAMEL GitHub repository.\\n2. **Click on New Pull Request**: Initiate the creation of a new pull request from your branch.\\n3. **Fill Out Details**: Provide a clear title and description of the changes made, linking any related issues.\\n4. **Assign Reviewers**: Assign relevant team members to review your pull request.\\n5. **Submit the Pull Request**: Once everything is filled out, submit the pull request for review.'), AlpacaItem(instruction='What should you do if you encounter issues during the development setup for CAMEL?', input='', output=\"If you encounter issues during the development setup for CAMEL, you should:\\n1. **Consult Documentation**: Refer to the setup documentation for troubleshooting tips and guidelines.\\n2. **Ask for Help**: Reach out to a maintainer via the communication channels provided, such as Discord or Slack.\\n3. **Provide Details**: When asking for help, provide specific details about the issues you're facing, including error messages and steps taken.\"), AlpacaItem(instruction='What are the recommended practices for testing new features in CAMEL?', input='', output='The recommended practices for testing new features in CAMEL include:\\n1. **Write Unit Tests**: Ensure that new features are accompanied by relevant unit tests located in the `test` directory.\\n2. **Run Tests Locally**: Execute the testing suite locally using `pytest` to confirm that all tests pass.\\n3. **Check Coverage**: Generate a coverage report to ensure that the new features are adequately tested.'), AlpacaItem(instruction='Explain the importance of code reviews in CAMEL.', input='', output='The importance of code reviews in CAMEL includes:\\n1. **Maintaining Code Quality**: Code reviews help ensure that the codebase remains clean and maintainable.\\n2. **Knowledge Sharing**: They facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n3. **Bug Prevention**: Code reviews can catch potential bugs before they are merged into the main branch.'), AlpacaItem(instruction='What is the purpose of using GitHub Secrets in CAMEL?', input='', output='The purpose of using GitHub Secrets in CAMEL includes:\\n1. **Security**: They allow for the secure storage of sensitive data, such as API keys, that should not be exposed in the codebase.\\n2. **Access Control**: GitHub Secrets ensure that only authorized workflows can access sensitive information during CI/CD processes.'), AlpacaItem(instruction='Outline the steps to build documentation locally for CAMEL.', input='', output='To build documentation locally for CAMEL, follow these steps:\\n1. **Change Directory**: Navigate to the `docs` directory of the CAMEL project.\\n2. **Run Build Command**: Execute the command `make html` to generate the HTML documentation.\\n3. **View Documentation**: Open the generated HTML files in a browser to view the documentation.'), AlpacaItem(instruction='What are the key elements of the CAMEL contribution guidelines?', input='', output='The key elements of the CAMEL contribution guidelines include:\\n1. **Fork-and-Pull-Request Workflow**: Contributors should follow this workflow for submitting changes.\\n2. **Issue Tracking**: Before starting work, assign issues to yourself to avoid duplication of effort.\\n3. **Documentation and Testing**: Emphasize the importance of thorough documentation and testing for all contributions.'), AlpacaItem(instruction='How should contributors handle feedback during code reviews?', input='', output='Contributors should handle feedback during code reviews by:\\n1. **Acknowledging Feedback**: Read and understand the feedback provided by reviewers.\\n2. **Making Necessary Changes**: Implement changes based on the feedback to improve the code quality.\\n3. **Engaging in Discussion**: If there are disagreements, discuss the feedback constructively with the reviewers.'), AlpacaItem(instruction='What is the significance of maintaining a changelog in CAMEL?', input='', output='The significance of maintaining a changelog in CAMEL is to:\\n1. **Track Changes**: Provide a clear record of all changes made to the project over time.\\n2. **Inform Users**: Keep users informed about new features, bug fixes, and improvements.\\n3. **Facilitate Version Control**: Help contributors and maintainers understand the evolution of the project.'), AlpacaItem(instruction='Describe how to engage with issues effectively in CAMEL.', input='', output=\"To engage with issues effectively in CAMEL, you should:\\n1. **Check GitHub Issues**: Regularly review the issues page for bugs, improvements, and feature requests.\\n2. **Assign Yourself**: When starting work on an issue, assign it to yourself to indicate it's being addressed.\\n3. **Link Related Issues**: If issues are related, link them instead of merging them into one.\"), AlpacaItem(instruction='What are the steps to update dependencies in CAMEL?', input='', output='To update dependencies in CAMEL, follow these steps:\\n1. **Modify pyproject.toml**: Add, update, or delete dependencies as needed in the `pyproject.toml` file.\\n2. **Run Poetry Lock**: Execute `poetry lock` to synchronize the dependencies with the lock file.\\n3. **Test Changes**: Run the tests to ensure that the updates do not introduce any issues.'), AlpacaItem(instruction='Explain the process for sprint planning in CAMEL.', input='', output='The process for sprint planning in CAMEL includes:\\n1. **Duration**: Each sprint lasts two weeks for development.\\n2. **Planning Meetings**: Conduct biweekly meetings where the founder highlights the sprint goal and developers select items for the sprint.\\n3. **Review Process**: At the start of each sprint, review previously analyzed issues to determine which will be tackled.'), AlpacaItem(instruction='What is the role of a maintainer in the CAMEL project?', input='', output='The role of a maintainer in the CAMEL project includes:\\n1. **Overseeing Contributions**: Review and manage pull requests to ensure they meet project standards.\\n2. **Guiding Contributors**: Provide support and guidance to contributors, especially new ones.\\n3. **Maintaining Project Direction**: Ensure that the project continues to move in a direction that aligns with its goals.'), AlpacaItem(instruction='What guidelines should be followed for logging in CAMEL?', input='', output=\"The guidelines for logging in CAMEL include:\\n1. **Use the Logger Module**: Avoid using print statements; instead, use Python's logging module for output.\\n2. **Log Levels**: Use appropriate log levels (e.g., info, debug, error) to categorize log messages.\\n3. **Consistent Formatting**: Ensure that logging messages are formatted consistently throughout the code.\"), AlpacaItem(instruction='How can contributors ensure their code is compatible with the project’s standards?', input='', output=\"Contributors can ensure their code is compatible with the project’s standards by:\\n1. **Following Style Guidelines**: Adhere to the project's coding style guidelines, such as those outlined in the Google Python Style Guide.\\n2. **Running Linting Tools**: Use linting tools like Ruff to check for style issues before submitting code.\\n3. **Conducting Local Tests**: Test their code locally to verify that it functions correctly and passes all tests.\"), AlpacaItem(instruction='What are the best practices for writing effective commit messages in CAMEL?', input='', output=\"Best practices for writing effective commit messages in CAMEL include:\\n1. **Use Imperative Mood**: Write messages in the imperative mood (e.g., 'Add feature' instead of 'Added feature').\\n2. **Be Concise**: Keep messages clear and to the point, summarizing the changes made.\\n3. **Reference Issues**: Link to any related issues in the commit message for clarity.\"), AlpacaItem(instruction='What is the significance of using unit tests in CAMEL?', input='', output='The significance of using unit tests in CAMEL includes:\\n1. **Code Reliability**: Unit tests help ensure that individual components of the code function correctly.\\n2. **Regression Prevention**: They catch regressions early, preventing the reintroduction of old bugs.\\n3. **Documentation of Functionality**: Unit tests serve as documentation for the expected behavior of code.'), AlpacaItem(instruction='Explain how to manage dependencies in the CAMEL project.', input='', output='To manage dependencies in the CAMEL project, follow these steps:\\n1. **Use Poetry**: Utilize the Poetry dependency manager to handle project dependencies.\\n2. **Update pyproject.toml**: Modify the `pyproject.toml` file to add or update dependencies.\\n3. **Run Poetry Lock**: Execute `poetry lock` to synchronize the lock file with the current dependencies.'), AlpacaItem(instruction='What should be included in a pull request description in CAMEL?', input='', output='A pull request description in CAMEL should include:\\n1. **Summary of Changes**: A clear and concise summary of what changes were made and why.\\n2. **Related Issues**: Links to any issues that the pull request addresses.\\n3. **Testing Information**: Details on how the changes were tested and any relevant test results.'), AlpacaItem(instruction='How can contributors improve the documentation in CAMEL?', input='', output='Contributors can improve the documentation in CAMEL by:\\n1. **Providing Comprehensive Coverage**: Ensure that all classes and methods are well-documented.\\n2. **Updating Existing Documentation**: Revise outdated documentation to reflect current functionality.\\n3. **Adding Examples**: Include practical examples demonstrating how to use features effectively.'), AlpacaItem(instruction='What is the process for resolving conflicts in pull requests?', input='', output='The process for resolving conflicts in pull requests involves:\\n1. **Identifying Conflicts**: Check for any merge conflicts indicated by GitHub.\\n2. **Locally Resolving Conflicts**: Pull the latest changes from the base branch and resolve conflicts locally using a code editor.\\n3. **Committing Resolved Changes**: Commit the resolved changes and push them back to the pull request.'), AlpacaItem(instruction='Describe how to use environment variables in the CAMEL project.', input='', output='To use environment variables in the CAMEL project, follow these steps:\\n1. **Define Variables**: Create a `.env` file in the project root to define necessary environment variables.\\n2. **Load Variables**: Use libraries like `python-dotenv` to load the environment variables into your application.\\n3. **Access Variables**: Access the variables in your code using `os.getenv()` to ensure sensitive data is not hardcoded.'), AlpacaItem(instruction='What are the steps to run tests in CAMEL?', input='', output='To run tests in CAMEL, follow these steps:\\n1. **Activate Virtual Environment**: Ensure that the CAMEL virtual environment is active.\\n2. **Run Pytest**: Execute the command `pytest .` in the project directory to run all tests.\\n3. **Check Test Results**: Review the output to identify any failed tests and address them accordingly.'), AlpacaItem(instruction='How should contributors document their changes when fixing bugs?', input='', output='When fixing bugs, contributors should document their changes by:\\n1. **Describing the Bug**: Clearly state the issue that was fixed in the commit message or pull request description.\\n2. **Linking to Issues**: Reference the related issue in the documentation to provide context.\\n3. **Adding Tests**: Include relevant unit tests that verify the bug fix.'), AlpacaItem(instruction='What are the benefits of using a virtual environment for CAMEL development?', input='', output='The benefits of using a virtual environment for CAMEL development include:\\n1. **Dependency Management**: Isolate project dependencies to avoid conflicts with other projects.\\n2. **Environment Consistency**: Ensure consistent development environments across different machines.\\n3. **Easy Setup**: Simplify the setup process for new contributors by providing a clear environment configuration.'), AlpacaItem(instruction='Explain the significance of the `pre-commit` hook in CAMEL.', input='', output='The significance of the `pre-commit` hook in CAMEL includes:\\n1. **Automated Checks**: Automatically run linting and formatting checks before each commit to maintain code quality.\\n2. **Error Prevention**: Reduce the chances of committing code that does not adhere to project standards.\\n3. **Consistency**: Ensure consistent code style across the codebase, making it easier to read and maintain.'), AlpacaItem(instruction='What is the importance of keeping the CAMEL project updated with the latest dependencies?', input='', output='The importance of keeping the CAMEL project updated with the latest dependencies includes:\\n1. **Security**: Address security vulnerabilities that may be present in outdated dependencies.\\n2. **Performance Improvements**: Benefit from performance enhancements and bug fixes provided in newer versions of libraries.\\n3. **Compatibility**: Ensure compatibility with other tools and frameworks that may depend on updated libraries.'), AlpacaItem(instruction='How should contributors approach feature requests in CAMEL?', input='', output='Contributors should approach feature requests in CAMEL by:\\n1. **Reviewing Existing Issues**: Check if the feature request has already been submitted or discussed.\\n2. **Discussing with Maintainers**: Engage with project maintainers to gauge interest and feasibility before starting work.\\n3. **Providing Clear Specifications**: When implementing a feature, provide clear specifications and rationale in the pull request.'), AlpacaItem(instruction='What steps should be taken to ensure that code changes do not introduce new bugs?', input='', output='To ensure that code changes do not introduce new bugs, take the following steps:\\n1. **Write Unit Tests**: Implement unit tests that cover the new changes and edge cases.\\n2. **Run Existing Tests**: Execute the full test suite to verify that existing functionality remains intact.\\n3. **Conduct Code Reviews**: Participate in code reviews to catch potential issues before merging changes.'), AlpacaItem(instruction='What is the process for merging pull requests in CAMEL?', input='', output='The process for merging pull requests in CAMEL includes:\\n1. **Review Approval**: Ensure that the pull request has been approved by at least two reviewers.\\n2. **Check for Conflicts**: Confirm that there are no merge conflicts with the base branch.\\n3. **Merge the PR**: Use the GitHub interface to merge the pull request into the main branch.'), AlpacaItem(instruction='How can contributors effectively communicate in the CAMEL community?', input='', output='Contributors can effectively communicate in the CAMEL community by:\\n1. **Using Discord and Slack**: Engage with other contributors and maintainers through the provided communication channels.\\n2. **Being Respectful and Constructive**: Maintain a respectful tone and provide constructive feedback during discussions.\\n3. **Participating in Meetings**: Join scheduled meetings to discuss progress, issues, and feature requests.'), AlpacaItem(instruction='What are the key practices for ensuring code quality in CAMEL?', input='', output='Key practices for ensuring code quality in CAMEL include:\\n1. **Regular Code Reviews**: Implement a thorough review process for all code changes.\\n2. **Automated Testing**: Utilize automated testing frameworks to validate functionality.\\n3. **Adhering to Style Guidelines**: Follow established style guidelines to maintain consistency across the codebase.'), AlpacaItem(instruction='Explain the significance of using version control in the CAMEL project.', input='', output='The significance of using version control in the CAMEL project includes:\\n1. **History Tracking**: Version control allows tracking of all changes made to the codebase over time.\\n2. **Collaboration**: It facilitates collaboration among multiple contributors, allowing simultaneous work on different features.\\n3. **Rollback Capability**: Provides the ability to revert to previous versions of the code in case of issues.'), AlpacaItem(instruction=\"What should be included in the CAMEL project's README file?\", input='', output=\"The CAMEL project's README file should include:\\n1. **Project Overview**: A brief description of what the project does and its goals.\\n2. **Installation Instructions**: Clear guidelines on how to install and set up the project.\\n3. **Usage Examples**: Practical examples demonstrating how to use the project effectively.\\n4. **Contribution Guidelines**: Information on how to contribute to the project, including links to relevant documentation.\"), AlpacaItem(instruction='How can contributors ensure their pull requests are ready for review?', input='', output='Contributors can ensure their pull requests are ready for review by:\\n1. **Completing All Tasks**: Ensure that all tasks outlined in the pull request checklist are completed.\\n2. **Providing Clear Descriptions**: Include a detailed description of the changes made and any relevant context.\\n3. **Testing Thoroughly**: Run all tests to confirm that the changes do not break existing functionality.'), AlpacaItem(instruction=\"What is the purpose of the `chore` label in CAMEL's issue tracking?\", input='', output=\"The purpose of the `chore` label in CAMEL's issue tracking is to categorize maintenance tasks that do not add features or fix bugs. This can include tasks such as:\\n1. **Updating Dependencies**: Tasks related to keeping the project dependencies up to date.\\n2. **Refactoring Code**: Improvements to code structure without changing its functionality.\\n3. **General Maintenance**: Any other non-feature related tasks that contribute to the project's health.\"), AlpacaItem(instruction='Explain the process of resolving merge conflicts in CAMEL.', input='', output='The process of resolving merge conflicts in CAMEL involves:\\n1. **Identifying Conflicts**: When merging, Git will notify you of any conflicts that need resolution.\\n2. **Editing the Conflicted Files**: Open the files with conflicts, identify the conflicting sections, and manually resolve the differences.\\n3. **Marking as Resolved**: After resolving the conflicts, mark the files as resolved using `git add`.\\n4. **Completing the Merge**: Commit the changes to complete the merge process.'), AlpacaItem(instruction='What steps should contributors follow when submitting a feature request?', input='', output='When submitting a feature request, contributors should follow these steps:\\n1. **Check Existing Requests**: Review the issues page to ensure the feature has not already been requested.\\n2. **Provide Detailed Description**: Clearly describe the feature, its purpose, and how it would benefit the project.\\n3. **Engage with Community**: Discuss the request in the community channels to gather feedback and gauge interest before formal submission.'), AlpacaItem(instruction='What are the best practices for maintaining a clean Git history in CAMEL?', input='', output='Best practices for maintaining a clean Git history in CAMEL include:\\n1. **Use Descriptive Commit Messages**: Write clear and concise commit messages that reflect the changes made.\\n2. **Squash Commits**: Combine multiple related commits into a single commit before merging to keep the history tidy.\\n3. **Avoid WIP Commits**: Do not commit work-in-progress changes; instead, use branches for ongoing work.'), AlpacaItem(instruction='Explain the significance of testing in the development process of CAMEL.', input='', output='The significance of testing in the development process of CAMEL includes:\\n1. **Ensuring Functionality**: Tests verify that the code behaves as expected and meets requirements.\\n2. **Identifying Bugs Early**: Early detection of bugs helps reduce the cost and effort of fixing them later in the development cycle.\\n3. **Supporting Refactoring**: A robust test suite allows for safe refactoring by ensuring that existing functionality is not broken.'), AlpacaItem(instruction='How can contributors effectively onboard new developers in CAMEL?', input='', output='Contributors can effectively onboard new developers in CAMEL by:\\n1. **Providing Clear Documentation**: Ensure that onboarding documentation is comprehensive and easy to understand.\\n2. **Offering Support**: Be available to answer questions and provide guidance as new developers get acclimated.\\n3. **Encouraging Participation**: Invite new developers to participate in discussions and contribute to issues to foster engagement.'), AlpacaItem(instruction='What is the role of automated testing in the CAMEL project?', input='', output='The role of automated testing in the CAMEL project includes:\\n1. **Continuous Validation**: Automatically run tests to validate code changes continuously.\\n2. **Reducing Manual Effort**: Minimize the need for manual testing, saving time and resources.\\n3. **Ensuring Consistency**: Maintain consistent testing practices across different environments and contributors.'), AlpacaItem(instruction='What are the key components of a successful pull request in CAMEL?', input='', output='Key components of a successful pull request in CAMEL include:\\n1. **Clear Title and Description**: A descriptive title and detailed description explaining the changes and their purpose.\\n2. **Link to Related Issues**: References to any related issues that the pull request addresses.\\n3. **Thorough Testing**: Evidence that the changes have been tested and do not break existing functionality.'), AlpacaItem(instruction='How should contributors handle updates to existing documentation?', input='', output='Contributors should handle updates to existing documentation by:\\n1. **Reviewing Current Content**: Identify areas that are outdated or inaccurate.\\n2. **Making Necessary Revisions**: Update the documentation to reflect current functionality and best practices.\\n3. **Adding Examples**: Include relevant examples to clarify usage and improve understanding.'), AlpacaItem(instruction='What is the importance of community engagement in CAMEL?', input='', output='The importance of community engagement in CAMEL includes:\\n1. **Fostering Collaboration**: Encourages collaboration among contributors and maintainers, enhancing project quality.\\n2. **Gathering Feedback**: Provides valuable feedback from users and contributors that can inform project direction and improvements.\\n3. **Building a Supportive Environment**: Creates a welcoming atmosphere for new contributors, promoting growth and participation.'), AlpacaItem(instruction='Explain the process of adding a new feature to CAMEL.', input='', output=\"The process of adding a new feature to CAMEL includes:\\n1. **Discussing the Feature**: Engage with maintainers and the community to discuss the feature's feasibility and value.\\n2. **Creating an Issue**: Document the feature request in an issue to track progress and gather input.\\n3. **Implementing the Feature**: Develop the feature in a dedicated branch, ensuring to follow coding standards and practices.\\n4. **Testing and Documentation**: Write tests and update documentation to reflect the new feature.\\n5. **Submitting a Pull Request**: Create a pull request for review, linking to the original feature request.\"), AlpacaItem(instruction='What are the best practices for managing project milestones in CAMEL?', input='', output='Best practices for managing project milestones in CAMEL include:\\n1. **Defining Clear Objectives**: Set specific, measurable goals for each milestone to guide progress.\\n2. **Regularly Reviewing Progress**: Conduct regular check-ins to assess progress towards milestones and adjust plans as necessary.\\n3. **Communicating Changes**: Keep the community informed about any changes to milestones or timelines.'), AlpacaItem(instruction='How can contributors ensure effective communication in the CAMEL project?', input='', output='Contributors can ensure effective communication in the CAMEL project by:\\n1. **Utilizing Communication Channels**: Actively use Discord, Slack, and other platforms for discussions and updates.\\n2. **Being Clear and Concise**: Communicate ideas clearly and concisely to avoid misunderstandings.\\n3. **Encouraging Feedback**: Foster an environment where feedback is welcomed and constructive, promoting open dialogue.'), AlpacaItem(instruction='What are the key principles for naming variables in CAMEL?', input='', output='The key principles for naming variables in CAMEL include:\\n1. **Avoiding Abbreviations**: Abbreviations can lead to ambiguity, so clear and descriptive names should be used.\\n2. **Descriptive Names**: Variable names should convey meaning without requiring additional explanation to improve readability.'), AlpacaItem(instruction='Describe the steps to build documentation locally for CAMEL.', input='', output='To build documentation locally for CAMEL, follow these steps:\\n1. Navigate to the `docs` directory: `cd docs`\\n2. Run the command to build HTML documentation: `make html`.'), AlpacaItem(instruction='What is the significance of using `logger` instead of `print` in CAMEL?', input='', output='Using `logger` instead of `print` is significant because:\\n1. **Consistency**: `logger` provides a consistent logging interface across the application.\\n2. **Configurability**: It allows for configurable log levels and formats, improving the professionalism of logging.'), AlpacaItem(instruction='What should contributors do before submitting a pull request?', input='', output='Before submitting a pull request, contributors should:\\n1. Ensure all tests pass and the code is properly formatted.\\n2. Mention any related issues and tag relevant maintainers in the pull request.'), AlpacaItem(instruction='How can contributors get help if they face challenges during the setup process?', input='', output='Contributors can get help by:\\n1. Consulting the documentation for troubleshooting guidance.\\n2. Reaching out to maintainers through communication channels like Discord or Slack.'), AlpacaItem(instruction='What are the main communication channels available for CAMEL contributors?', input='', output='The main communication channels available for CAMEL contributors include:\\n1. **Discord**: For real-time discussions and community engagement.\\n2. **WeChat**: For Chinese-speaking contributors.\\n3. **Slack**: For organized communication and collaboration.'), AlpacaItem(instruction='Explain the Fork-and-Pull-Request workflow for community contributors.', input='', output='The Fork-and-Pull-Request workflow involves:\\n1. **Forking the Repository**: Contributors create a personal copy of the repository.\\n2. **Making Changes**: They make their changes in a branch of their fork.\\n3. **Submitting a Pull Request**: After committing changes, they submit a pull request to the original repository.'), AlpacaItem(instruction='What is the importance of unit tests when fixing bugs in CAMEL?', input='', output='The importance of unit tests when fixing bugs includes:\\n1. **Verification**: They help verify that the bug is fixed and that the code performs as intended.\\n2. **Preventing Regression**: Unit tests ensure that the same bug does not reoccur in future updates.'), AlpacaItem(instruction='Describe the process for conducting code reviews in CAMEL.', input='', output='The process for conducting code reviews in CAMEL includes:\\n1. **Reviewing Functionality**: Check if the code performs its intended task correctly.\\n2. **Providing Feedback**: Leave constructive feedback for contributors to address.\\n3. **Approval**: Once changes are made, the reviewer re-evaluates and approves the code if it meets standards.'), AlpacaItem(instruction='What guidelines should be followed when adding new features to CAMEL?', input='', output='When adding new features, contributors should:\\n1. Include relevant unit tests in the `test` directory.\\n2. Update documentation and example scripts to reflect the new feature.'), AlpacaItem(instruction='What are some common pitfalls to avoid during code reviews?', input='', output='Common pitfalls to avoid during code reviews include:\\n1. **Large Pull Requests**: Submitting overly large PRs that are difficult to review.\\n2. **Ignoring Feedback**: Not addressing feedback from reviewers can lead to unmerged PRs.'), AlpacaItem(instruction='What is the purpose of having a structured workflow for managing project items in CAMEL?', input='', output='The purpose of having a structured workflow includes:\\n1. **Efficiency**: It streamlines the process of issue creation, pull requests, and sprint planning.\\n2. **Clarity**: It ensures clear communication and organization within the development team.'), AlpacaItem(instruction='How should contributors handle outdated issues in the CAMEL GitHub repository?', input='', output='Contributors should handle outdated issues by:\\n1. **Flagging Outdated Issues**: Inform maintainers about issues that may no longer be relevant.\\n2. **Linking Related Issues**: If issues are related, linking them instead of merging can help maintain clarity.'), AlpacaItem(instruction='What are the guidelines for writing docstrings in CAMEL?', input='', output='Guidelines for writing docstrings include:\\n1. **Use Triple-Quoted Strings**: Begin with `r\"\"\"` for raw strings to avoid special character issues.\\n2. **Brief Descriptions**: Provide concise summaries of classes or methods without exceeding 79 characters per line.'), AlpacaItem(instruction='What is the significance of sprint planning in CAMEL?', input='', output='The significance of sprint planning includes:\\n1. **Defining Deliverables**: It outlines what can be delivered in the upcoming sprint.\\n2. **Collaboration**: It fosters collaboration among team members to align on goals and priorities.'), AlpacaItem(instruction='What steps should be taken to ensure code quality during contributions?', input='', output=\"To ensure code quality, contributors should:\\n1. Follow the project's coding standards and style guidelines.\\n2. Conduct thorough testing and include documentation for any new features or changes.\"), AlpacaItem(instruction='How can contributors contribute to documentation in CAMEL?', input='', output='Contributors can contribute to documentation by:\\n1. Providing comprehensive documentation for all classes and methods.\\n2. Updating existing documentation to reflect any changes made in the codebase.'), AlpacaItem(instruction='What is the process for merging pull requests in CAMEL?', input='', output='The process for merging pull requests includes:\\n1. **Approval**: The pull request must be approved by at least two reviewers.\\n2. **Merging**: A maintainer or authorized contributor merges the approved PR into the main branch.'), AlpacaItem(instruction='Why is it important to document parameters in the `Args:` section of docstrings?', input='', output='Documenting parameters in the `Args:` section is important because:\\n1. **Clarity**: It provides clear information about the function or class parameters, helping users understand their roles.\\n2. **Usage Guidance**: It aids in correctly utilizing the function or class by specifying expected types and default values.'), AlpacaItem(instruction='What should contributors do if they want to give credit for their contributions?', input='', output='Contributors should:\\n1. Inform maintainers of their Twitter handle in the pull request if they want to receive credit.\\n2. Ensure they are comfortable with being mentioned publicly.'), AlpacaItem(instruction='What steps should be taken when updating dependencies in CAMEL?', input='', output='When updating dependencies, contributors should:\\n1. Modify the `pyproject.toml` file as needed.\\n2. Run `poetry lock` to synchronize the dependencies with the lock file.'), AlpacaItem(instruction='Explain the importance of security checks during code reviews.', input='', output='Security checks during code reviews are important because:\\n1. **Vulnerability Prevention**: They help identify and mitigate potential security vulnerabilities introduced by new code.\\n2. **Code Integrity**: Ensuring that the code adheres to security best practices maintains the integrity of the application.'), AlpacaItem(instruction='What is the purpose of the `Common Actions` section in CAMEL documentation?', input='', output='The `Common Actions` section serves to provide quick references for frequent tasks, such as:\\n1. **Updating Dependencies**: Steps to ensure dependencies are synchronized.\\n2. **Running Tests**: Guidelines for executing tests to verify code functionality.'), AlpacaItem(instruction='How can contributors ensure their code adheres to style guidelines?', input='', output='Contributors can ensure adherence to style guidelines by:\\n1. Running formatting tools like `ruff` to check and format their code before submission.\\n2. Reviewing the project’s style guide to understand the expected conventions.'), AlpacaItem(instruction='What is the significance of using the `pre-commit` hook in CAMEL?', input='', output='The significance of using the `pre-commit` hook includes:\\n1. **Automation**: It automatically formats and lints the code before every commit, ensuring consistency.\\n2. **Error Reduction**: It helps catch errors early in the development process, improving overall code quality.'), AlpacaItem(instruction='What is the role of the `test` directory in CAMEL?', input='', output='The `test` directory plays a crucial role in CAMEL by:\\n1. **Housing Unit Tests**: It contains unit tests that verify the functionality of individual components.\\n2. **Supporting Quality Assurance**: Running these tests ensures that code changes do not introduce new bugs.'), AlpacaItem(instruction='How should contributors respond to feedback received during code reviews?', input='', output='Contributors should respond to feedback by:\\n1. **Addressing Suggestions**: Making necessary changes based on the feedback provided.\\n2. **Engaging in Discussion**: If they disagree with feedback, discussing their perspective constructively.'), AlpacaItem(instruction='What are the benefits of attending developer meetings in CAMEL?', input='', output='The benefits of attending developer meetings include:\\n1. **Collaboration**: Opportunities to collaborate with other contributors and share ideas.\\n2. **Updates**: Staying informed about project developments and upcoming features.'), AlpacaItem(instruction='What actions should be taken when creating a new issue on GitHub?', input='', output='When creating a new issue on GitHub, the following actions should be taken:\\n1. **Clear Title**: Provide a clear and descriptive title for the issue.\\n2. **Detailed Description**: Include a detailed description outlining the issue, steps to reproduce it, and any relevant context.'), AlpacaItem(instruction='How can contributors ensure that their contributions are recognized?', input='', output='Contributors can ensure recognition of their contributions by:\\n1. Mentioning their achievements in the pull request comments.\\n2. Providing their social media handles if they wish to receive public acknowledgment.'), AlpacaItem(instruction='What should contributors include in their pull requests to facilitate reviews?', input='', output='Contributors should include the following in their pull requests:\\n1. **Descriptive Title**: A clear title summarizing the changes made.\\n2. **Link to Related Issues**: Reference any related issues to provide context.'), AlpacaItem(instruction='Describe the importance of maintaining code quality in CAMEL.', input='', output='Maintaining code quality is important because:\\n1. **Readability**: High-quality code is easier to read and understand for current and future contributors.\\n2. **Maintainability**: It ensures the codebase can be easily updated and modified without introducing errors.'), AlpacaItem(instruction='What is the significance of the `License` section in CAMEL documentation?', input='', output='The `License` section is significant because:\\n1. **Legal Clarity**: It provides clarity on the legal terms under which the code can be used and modified.\\n2. **Contributor Rights**: It specifies the rights of contributors regarding their contributions to the project.'), AlpacaItem(instruction='What guidelines should be followed when submitting bug fixes?', input='', output='When submitting bug fixes, contributors should:\\n1. Add relevant unit tests to verify the fix.\\n2. Update documentation if the fix affects any user-facing features.'), AlpacaItem(instruction='What steps should be taken to ensure proper testing of new features?', input='', output='To ensure proper testing of new features, contributors should:\\n1. Write unit tests that cover various scenarios related to the new feature.\\n2. Run all tests to verify that existing functionality remains unaffected.'), AlpacaItem(instruction='How can contributors effectively communicate during the development process?', input='', output='Contributors can effectively communicate by:\\n1. Utilizing designated communication channels like Discord or Slack for discussions.\\n2. Providing regular updates on their progress during team meetings.'), AlpacaItem(instruction='What are the best practices for conducting code reviews?', input='', output='Best practices for conducting code reviews include:\\n1. **Timely Reviews**: Aim to review pull requests promptly to keep the development process moving.\\n2. **Constructive Feedback**: Provide clear, actionable feedback to help contributors improve their code.'), AlpacaItem(instruction='What should contributors do if they encounter a security vulnerability?', input='', output='If contributors encounter a security vulnerability, they should:\\n1. Report it immediately to the maintainers through the appropriate channels.\\n2. Avoid publicly disclosing the vulnerability until it has been addressed.'), AlpacaItem(instruction='What is the role of the `Quick Start` section in documentation?', input='', output='The `Quick Start` section serves to provide new contributors with a streamlined introduction to setting up the project, including:\\n1. **Installation Instructions**: Step-by-step guidance on how to clone the repository and install dependencies.\\n2. **Initial Setup Commands**: Commands to run for setting up the environment and verifying the installation.'), AlpacaItem(instruction='What should be included in the `Contributing to Documentation` section?', input='', output='The `Contributing to Documentation` section should include:\\n1. **Documentation Standards**: Guidelines for writing and updating documentation.\\n2. **Submission Process**: Instructions on how to submit documentation changes, including any relevant links to tools or resources.'), AlpacaItem(instruction='How can contributors ensure that their pull requests are ready for review?', input='', output='Contributors can ensure their pull requests are ready for review by:\\n1. Running all tests and ensuring they pass.\\n2. Formatting the code according to project style guidelines.'), AlpacaItem(instruction='What is the purpose of the `Giving Credit` section in CAMEL documentation?', input='', output='The purpose of the `Giving Credit` section is to acknowledge contributors for their work and provide a way for them to receive recognition, particularly on social media platforms like Twitter.'), AlpacaItem(instruction='What actions should be taken during sprint reviews?', input='', output='During sprint reviews, the following actions should be taken:\\n1. **Demonstration of Features**: Showcase the completed features to stakeholders for feedback.\\n2. **Feedback Collection**: Gather feedback from stakeholders regarding the work completed.'), AlpacaItem(instruction='What is the significance of using the `pull request` template in CAMEL?', input='', output='The significance of using the `pull request` template includes:\\n1. **Consistency**: It ensures all necessary information is provided for reviewers.\\n2. **Guidance**: It helps contributors understand what details are important to include.'), AlpacaItem(instruction='How can contributors maintain effective communication with maintainers?', input='', output=\"Contributors can maintain effective communication by:\\n1. Being proactive in discussing their contributions and seeking feedback.\\n2. Respecting maintainers' time and being concise in their communications.\"), AlpacaItem(instruction='What should contributors do if they disagree with feedback on their pull request?', input='', output='If contributors disagree with feedback, they should:\\n1. Engage in a constructive discussion with the reviewers to understand their perspective.\\n2. Present their reasoning clearly and respectfully.'), AlpacaItem(instruction='How can the `Common Actions` section help new contributors?', input='', output='The `Common Actions` section can help new contributors by providing:\\n1. **Quick References**: Easy access to frequently needed commands and procedures.\\n2. **Guidance**: Clear instructions on how to perform common tasks within the project.'), AlpacaItem(instruction='What steps should be taken when preparing for a developer meeting?', input='', output='When preparing for a developer meeting, participants should:\\n1. Review agenda items and come prepared with updates on their tasks.\\n2. Be ready to discuss any blockers or challenges they are facing.'), AlpacaItem(instruction='What is the purpose of the `Board Item Create Workflow` in CAMEL?', input='', output='The purpose of the `Board Item Create Workflow` is to streamline the process of managing project items, ensuring that:\\n1. **Clarity**: Each item is tracked and organized effectively.\\n2. **Efficiency**: Contributors can easily navigate through issues and pull requests.'), AlpacaItem(instruction='What should be included in the `Review Process Overview` section?', input='', output='The `Review Process Overview` section should include:\\n1. **Functionality Checks**: Guidelines on what to review regarding code functionality.\\n2. **Feedback Process**: Steps on how to provide and address feedback during the review.'), AlpacaItem(instruction='What steps should a contributor follow to create a new issue in CAMEL?', input='', output=\"To create a new issue in CAMEL, a contributor should follow these steps:\\n1. Navigate to the [GitHub Issues](https://github.com/camel-ai/camel/issues) page.\\n2. Click on 'New Issue' and select the relevant category (bug, improvement, feature).\\n3. Fill in the required information, ensuring the issue has a descriptive title.\\n4. Assign the issue to themselves to indicate it's being worked on.\\n5. Discuss the issue during team meetings and move it to the appropriate columns in the project board.\"), AlpacaItem(instruction='Explain the workflow for submitting a pull request in the CAMEL project.', input='', output=\"The workflow for submitting a pull request in the CAMEL project involves several steps:\\n1. Ensure your branch is up to date with the main branch.\\n2. Make your code changes and commit them with a clear message following best practices.\\n3. Push your branch to the remote repository.\\n4. Navigate to the 'Pull Requests' section on GitHub and click 'New Pull Request'.\\n5. Select your branch and compare it with the main branch, providing a detailed description of the changes.\\n6. Link any related issues and assign reviewers before submitting the pull request.\"), AlpacaItem(instruction='What guidelines should contributors follow when writing documentation for CAMEL?', input='', output='Contributors should follow these guidelines when writing documentation for CAMEL:\\n1. **Clarity**: Ensure that documentation is clear, concise, and easy to understand.\\n2. **Structure**: Organize content logically, using headings and sections for better readability.\\n3. **Examples**: Include examples to illustrate complex concepts or code snippets.\\n4. **Consistency**: Use consistent terminology and formatting throughout the documentation.'), AlpacaItem(instruction='How can contributors test their changes locally before submitting a pull request?', input='', output='Contributors can test their changes locally by following these steps:\\n1. Clone the repository and navigate to the project directory.\\n2. Activate the virtual environment using `poetry shell`.\\n3. Install the necessary dependencies using `poetry install --with dev,docs -E all`.\\n4. Run the pre-commit hooks to check for formatting and linting issues with `pre-commit run --all-files`.\\n5. Execute the unit tests using `pytest .` to ensure all tests pass.'), AlpacaItem(instruction='What is the purpose of the `logger` in CAMEL, and how should it be used?', input='', output='The purpose of the `logger` in CAMEL is to provide a consistent and configurable way to output log messages, replacing `print` statements. Contributors should use it as follows:\\n1. Import the logging module and configure the logger at the beginning of the code.\\n2. Use `logger.info()`, `logger.debug()`, and other logging methods to log messages instead of `print`.\\n3. Ensure that log messages are clear and provide useful information for debugging.'), AlpacaItem(instruction='Describe the importance of following code style guidelines in CAMEL.', input='', output='Following code style guidelines in CAMEL is important for several reasons:\\n1. **Consistency**: It ensures a consistent codebase, making it easier for contributors to read and understand the code.\\n2. **Maintainability**: Well-styled code is easier to maintain and modify over time, reducing the likelihood of introducing bugs.\\n3. **Collaboration**: Adhering to style guidelines fosters better collaboration among contributors, as everyone is on the same page regarding code formatting.'), AlpacaItem(instruction='What is the role of code reviews in the CAMEL project?', input='', output=\"Code reviews in the CAMEL project serve several key roles:\\n1. **Quality Assurance**: They help maintain code quality by ensuring that all contributions meet the project's standards.\\n2. **Knowledge Sharing**: Code reviews facilitate knowledge sharing among contributors, allowing them to learn from each other.\\n3. **Bug Prevention**: They catch potential bugs and issues before the code is merged into the main branch, enhancing overall project stability.\"), AlpacaItem(instruction='Explain the process for conducting a sprint review in CAMEL.', input='', output='The process for conducting a sprint review in CAMEL includes:\\n1. **Participants**: Involve all stakeholders, including developers and project maintainers.\\n2. **Feedback Session**: Review the features delivered during the sprint and gather feedback from stakeholders on their functionality.\\n3. **Improvement Discussion**: Identify areas for improvement based on the feedback received and plan for future sprints.'), AlpacaItem(instruction='What should contributors do if they encounter outdated issues on GitHub?', input='', output='If contributors encounter outdated issues on GitHub, they should:\\n1. Notify the maintainers by commenting on the issue to bring it to their attention.\\n2. Provide any relevant context or updates that may help in resolving the issue.\\n3. If they believe the issue is no longer relevant, suggest closing it with a brief explanation.'), AlpacaItem(instruction='How should contributors handle feedback received during code reviews?', input='', output='Contributors should handle feedback received during code reviews by:\\n1. **Reading Carefully**: Take time to read and understand the feedback provided by reviewers.\\n2. **Addressing Concerns**: Make the necessary changes to the code based on the feedback.\\n3. **Engaging in Discussion**: If there are disagreements or questions about the feedback, engage in a constructive discussion with the reviewers to reach a consensus.'), AlpacaItem(instruction='What is the significance of using `pre-commit` hooks in the CAMEL project?', input='', output='The significance of using `pre-commit` hooks in the CAMEL project includes:\\n1. **Automated Checks**: They automate formatting and linting checks before code is committed, ensuring adherence to style guidelines.\\n2. **Quality Assurance**: This helps maintain high code quality and reduces the chances of introducing errors into the codebase.\\n3. **Efficiency**: Contributors save time by catching potential issues early in the development process.'), AlpacaItem(instruction='Explain the steps to build documentation locally for CAMEL.', input='', output='To build documentation locally for CAMEL, follow these steps:\\n1. Navigate to the `docs` directory using the command line.\\n2. Run the command `make html` to generate the HTML documentation.\\n3. Open the generated documentation in a web browser by navigating to `htmlcov/index.html`.'), AlpacaItem(instruction='What are the common pitfalls to avoid when submitting pull requests?', input='', output='Common pitfalls to avoid when submitting pull requests include:\\n1. **Large Pull Requests**: Avoid submitting overly large PRs; break them down into smaller, manageable changes.\\n2. **Ignoring Feedback**: Always address feedback provided by reviewers instead of ignoring it.\\n3. **Rushed Reviews**: Take the time to thoroughly review your own code before submitting to ensure quality.'), AlpacaItem(instruction='What is the process for updating dependencies in the CAMEL project?', input='', output='The process for updating dependencies in the CAMEL project is as follows:\\n1. Modify the `pyproject.toml` file to add, update, or delete dependencies.\\n2. Run the command `poetry lock` to synchronize the dependencies with the lock file.\\n3. Test the project to ensure that all functionalities work with the updated dependencies.'), AlpacaItem(instruction='How can contributors ensure their contributions align with project goals?', input='', output=\"Contributors can ensure their contributions align with project goals by:\\n1. **Reviewing Project Documentation**: Familiarize themselves with the project's mission, guidelines, and current goals.\\n2. **Participating in Discussions**: Engage in community discussions to understand ongoing priorities and needs.\\n3. **Linking Issues**: When submitting PRs, link them to relevant issues that reflect the project goals.\"), AlpacaItem(instruction='What are the best practices for writing effective unit tests in CAMEL?', input='', output='Best practices for writing effective unit tests in CAMEL include:\\n1. **Coverage**: Ensure that tests cover all relevant functionality, including edge cases and error scenarios.\\n2. **Isolation**: Keep tests isolated from external dependencies to ensure they run reliably and quickly.\\n3. **Descriptive Names**: Use clear and descriptive names for test functions to indicate their purpose and expected behavior.'), AlpacaItem(instruction='What guidelines should contributors follow when creating new features for CAMEL?', input='', output='When creating new features for CAMEL, contributors should follow these guidelines:\\n1. **Documentation**: Provide comprehensive documentation for the new feature, including usage examples.\\n2. **Testing**: Include unit tests that cover the new feature to ensure its reliability.\\n3. **Code Quality**: Adhere to the project’s coding standards and style guidelines to maintain consistency.'), AlpacaItem(instruction='How can contributors effectively manage their time while working on CAMEL?', input='', output='Contributors can effectively manage their time while working on CAMEL by:\\n1. **Setting Priorities**: Identify and prioritize tasks based on their importance and deadlines.\\n2. **Creating a Schedule**: Allocate specific time blocks for working on issues or features and stick to the schedule.\\n3. **Breaking Down Tasks**: Divide larger tasks into smaller, manageable pieces to avoid feeling overwhelmed.'), AlpacaItem(instruction='What should contributors do if they encounter a merge conflict?', input='', output='If contributors encounter a merge conflict, they should:\\n1. **Identify Conflicted Files**: Review the files with conflicts and understand the changes made in both branches.\\n2. **Resolve Conflicts**: Manually edit the conflicted files to resolve discrepancies, ensuring the final version is correct.\\n3. **Test Changes**: After resolving conflicts, run tests to ensure the code behaves as expected before proceeding with the merge.'), AlpacaItem(instruction=\"What are the consequences of not following the project's coding standards?\", input='', output=\"Not following the project's coding standards can lead to several consequences:\\n1. **Code Quality Issues**: It may result in poorly structured or hard-to-read code, making it difficult for others to maintain.\\n2. **Increased Review Time**: Reviewers may spend more time addressing style issues, delaying the review process.\\n3. **Integration Challenges**: Inconsistent coding styles can create integration challenges, leading to potential bugs and conflicts.\"), AlpacaItem(instruction='How can contributors ensure that their pull requests are merged in a timely manner?', input='', output=\"Contributors can ensure that their pull requests are merged in a timely manner by:\\n1. **Being Responsive**: Actively respond to feedback from reviewers and make necessary changes promptly.\\n2. **Following Guidelines**: Adhere to the project's contribution guidelines to avoid delays caused by style or format issues.\\n3. **Communicating**: Maintain open communication with maintainers regarding the status and urgency of the pull request.\"), AlpacaItem(instruction='What is the role of the `test` directory in the CAMEL project?', input='', output='The `test` directory in the CAMEL project plays a crucial role by:\\n1. **Housing Unit Tests**: It contains unit tests that verify the functionality of various components and features within the project.\\n2. **Ensuring Code Reliability**: The tests help ensure that changes do not introduce new bugs, maintaining the integrity of the codebase.\\n3. **Facilitating Continuous Integration**: The tests can be run automatically in CI/CD pipelines to validate contributions before merging.'), AlpacaItem(instruction='What strategies can be employed to improve collaboration among contributors in CAMEL?', input='', output='Strategies to improve collaboration among contributors in CAMEL include:\\n1. **Regular Meetings**: Hold regular meetings to discuss progress, share updates, and address challenges.\\n2. **Utilizing Communication Tools**: Leverage platforms like Discord and Slack for real-time communication and discussions.\\n3. **Encouraging Pair Programming**: Promote pair programming sessions to foster collaboration and knowledge sharing.'), AlpacaItem(instruction='What is the significance of maintaining a changelog in the CAMEL project?', input='', output='Maintaining a changelog in the CAMEL project is significant because it:\\n1. **Tracks Changes**: Provides a clear record of changes made to the project over time, including new features, bug fixes, and improvements.\\n2. **Enhances Transparency**: Keeps contributors and users informed about the evolution of the project and upcoming changes.\\n3. **Facilitates Versioning**: Assists in managing version releases by documenting the history of changes associated with each release.'), AlpacaItem(instruction='How can contributors effectively use issues to manage their work in CAMEL?', input='', output='Contributors can effectively use issues to manage their work in CAMEL by:\\n1. **Creating Clear Issues**: Write clear and descriptive issues that outline the problem or feature request.\\n2. **Assigning Issues**: Assign issues to themselves when they start working on them to indicate ownership.\\n3. **Commenting on Progress**: Use comments to update the status of the issue and discuss any challenges faced during development.'), AlpacaItem(instruction='What best practices should be followed when writing commit messages?', input='', output=\"Best practices for writing commit messages include:\\n1. **Use the Imperative Mood**: Write in the imperative mood (e.g., 'Fix bug' instead of 'Fixed bug').\\n2. **Be Concise**: Keep messages short and to the point, summarizing the changes in a single sentence.\\n3. **Reference Related Issues**: Include references to any related issues or pull requests to provide context.\"), AlpacaItem(instruction='What is the purpose of the `examples` directory in CAMEL?', input='', output='The `examples` directory in CAMEL serves the purpose of:\\n1. **Demonstrating Features**: Providing practical examples of how to use the various features and functionalities of the project.\\n2. **Assisting New Contributors**: Helping new contributors understand how to implement features by offering reference code.\\n3. **Testing Ground**: Serving as a testing ground for new ideas and implementations before they are fully integrated into the main codebase.'), AlpacaItem(instruction='How can contributors contribute to improving documentation in CAMEL?', input='', output=\"Contributors can improve documentation in CAMEL by:\\n1. **Reviewing Existing Documentation**: Regularly reviewing and updating existing documentation to ensure it is accurate and up to date.\\n2. **Adding Examples**: Including examples and use cases that illustrate how to use the project's features effectively.\\n3. **Suggesting Improvements**: Providing feedback and suggestions for improving the structure and clarity of the documentation.\"), AlpacaItem(instruction='What is the significance of the `LICENSE` file in the CAMEL project?', input='', output='The significance of the `LICENSE` file in the CAMEL project includes:\\n1. **Legal Clarity**: It provides legal clarity regarding the rights and responsibilities of contributors and users of the code.\\n2. **Open Source Compliance**: Ensures compliance with open-source licensing standards, allowing others to use, modify, and distribute the software.\\n3. **Attraction of Contributors**: A clear license can attract more contributors who are assured of their rights regarding their contributions.'), AlpacaItem(instruction='What steps should be taken to prepare for a successful sprint planning meeting?', input='', output='To prepare for a successful sprint planning meeting, the following steps should be taken:\\n1. **Review Backlog**: Ensure that the backlog is up to date with prioritized items ready for discussion.\\n2. **Set Goals**: Define clear goals for the upcoming sprint to guide the planning process.\\n3. **Gather Input**: Collect input from team members on what items they believe should be included in the sprint.'), AlpacaItem(instruction='How can contributors effectively track their progress on tasks in CAMEL?', input='', output='Contributors can effectively track their progress on tasks in CAMEL by:\\n1. **Using Project Boards**: Utilize GitHub project boards to visualize the status of tasks and their progress.\\n2. **Updating Issues**: Regularly update the status of issues they are working on to reflect current progress.\\n3. **Setting Milestones**: Establish milestones for larger tasks to break them down into manageable parts and track completion.'), AlpacaItem(instruction='What are the benefits of having a well-defined contribution process in CAMEL?', input='', output='The benefits of having a well-defined contribution process in CAMEL include:\\n1. **Clarity**: It provides clarity for contributors on how to get involved and what is expected of them.\\n2. **Efficiency**: A clear process streamlines contributions, reducing the time spent on administrative tasks.\\n3. **Quality Control**: It helps maintain the quality of contributions through established guidelines and review processes.'), AlpacaItem(instruction='What is the role of the `docs` directory in the CAMEL project?', input='', output='The `docs` directory in the CAMEL project plays a crucial role by:\\n1. **Housing Documentation**: It contains all project documentation, including usage guides, API references, and contribution guidelines.\\n2. **Facilitating User Understanding**: The documentation helps users understand how to use the project effectively.\\n3. **Supporting Contributor Onboarding**: It serves as a resource for new contributors to learn about the project and how to contribute.'), AlpacaItem(instruction='What should contributors do if they want to suggest a new feature for CAMEL?', input='', output=\"If contributors want to suggest a new feature for CAMEL, they should:\\n1. **Create a New Issue**: Open a new issue on GitHub detailing the feature request, including its purpose and potential benefits.\\n2. **Provide Context**: Explain why the feature is needed and how it aligns with the project's goals.\\n3. **Engage in Discussion**: Be open to feedback and discussion from other contributors and maintainers regarding the feasibility and implementation of the feature.\"), AlpacaItem(instruction='How can contributors ensure their code is secure before submitting a pull request?', input='', output='Contributors can ensure their code is secure before submitting a pull request by:\\n1. **Reviewing Security Practices**: Familiarize themselves with security best practices relevant to the project.\\n2. **Conducting Code Reviews**: Have peers review their code to catch potential security vulnerabilities.\\n3. **Running Security Scans**: Utilize tools to run security scans on their code to identify any vulnerabilities before submission.'), AlpacaItem(instruction='What is the importance of automated testing in the CAMEL project?', input='', output='Automated testing in the CAMEL project is important for several reasons:\\n1. **Efficiency**: It allows for quick validation of code changes, reducing the time needed for manual testing.\\n2. **Consistency**: Automated tests provide consistent results, ensuring that code behaves as expected across different environments.\\n3. **Regression Prevention**: They help prevent regressions by ensuring that new changes do not break existing functionality.'), AlpacaItem(instruction='What guidelines should be followed when conducting a code review in CAMEL?', input='', output='Guidelines for conducting a code review in CAMEL include:\\n1. **Functionality Check**: Verify that the code performs the intended tasks and adheres to project requirements.\\n2. **Constructive Feedback**: Provide feedback that is clear, constructive, and aimed at improvement.\\n3. **Timely Reviews**: Strive to complete reviews promptly to keep the development process moving.'), AlpacaItem(instruction='How can contributors effectively onboard new members to the CAMEL project?', input='', output='Contributors can effectively onboard new members to the CAMEL project by:\\n1. **Providing Resources**: Share relevant documentation, resources, and links to help new members get started.\\n2. **Offering Guidance**: Be available to answer questions and provide guidance as new members navigate the contribution process.\\n3. **Encouraging Participation**: Encourage new members to participate in discussions and contribute to ongoing projects.'), AlpacaItem(instruction=\"What is the significance of using clear naming conventions in CAMEL's codebase?\", input='', output=\"Using clear naming conventions in CAMEL's codebase is significant because:\\n1. **Readability**: It enhances code readability, making it easier for contributors to understand the purpose of variables and functions.\\n2. **Maintainability**: Clear names reduce ambiguity, making the code easier to maintain and modify in the future.\\n3. **Collaboration**: It fosters better collaboration among contributors by ensuring that everyone can interpret the code consistently.\"), AlpacaItem(instruction='What should contributors do to ensure their contributions are properly credited?', input='', output='To ensure their contributions are properly credited, contributors should:\\n1. **Mention Social Media Handles**: Provide their social media handles in pull requests if they wish to receive public acknowledgment.\\n2. **Engage with the Community**: Participate in community discussions and events to build recognition within the project.\\n3. **Follow Up**: Check in with maintainers to confirm that their contributions are acknowledged in release notes or social media.'), AlpacaItem(instruction='What steps should be taken to maintain the quality of the CAMEL project over time?', input='', output='To maintain the quality of the CAMEL project over time, the following steps should be taken:\\n1. **Regular Code Reviews**: Implement regular code reviews to ensure all contributions meet quality standards.\\n2. **Continuous Testing**: Utilize automated testing to catch bugs and regressions early in the development process.\\n3. **Documentation Updates**: Keep documentation up to date to reflect changes in the project and provide accurate guidance for users and contributors.'), AlpacaItem(instruction='How can contributors make sure their code is compatible with existing code in CAMEL?', input='', output='Contributors can ensure their code is compatible with existing code in CAMEL by:\\n1. **Reviewing the Codebase**: Familiarize themselves with the existing codebase and its structure before making changes.\\n2. **Running Tests**: Execute existing tests to verify that their changes do not break any existing functionality.\\n3. **Engaging with Reviewers**: Actively seek feedback from reviewers regarding compatibility and integration with the current code.'), AlpacaItem(instruction='What practices should be followed to ensure effective communication within the CAMEL community?', input='', output='To ensure effective communication within the CAMEL community, the following practices should be followed:\\n1. **Active Participation**: Encourage all members to actively participate in discussions and provide input on decisions.\\n2. **Clear Messaging**: Use clear and concise language in communications to avoid misunderstandings.\\n3. **Utilizing Multiple Channels**: Leverage various communication channels (Discord, Slack, GitHub) to reach all members effectively.'), AlpacaItem(instruction='What is the importance of maintaining a consistent development workflow in CAMEL?', input='', output='Maintaining a consistent development workflow in CAMEL is important for:\\n1. **Predictability**: It provides predictability in the development process, helping contributors understand what to expect.\\n2. **Efficiency**: A consistent workflow streamlines processes, reducing confusion and improving productivity.\\n3. **Quality Control**: It ensures that all contributions undergo the same review and testing procedures, maintaining overall project quality.'), AlpacaItem(instruction='How can contributors effectively share their knowledge and expertise within the CAMEL community?', input='', output='Contributors can effectively share their knowledge and expertise within the CAMEL community by:\\n1. **Writing Blog Posts**: Contributing articles or blog posts about their experiences and insights related to the project.\\n2. **Conducting Workshops**: Organizing workshops or training sessions to teach specific skills or concepts to other community members.\\n3. **Mentoring New Contributors**: Offering to mentor new contributors, guiding them through the onboarding process and sharing best practices.'), AlpacaItem(instruction='What guidelines should contributors follow when adding dependencies to CAMEL?', input='', output='When adding dependencies to CAMEL, contributors should follow these guidelines:\\n1. **Justification**: Provide a clear justification for why the dependency is needed and how it benefits the project.\\n2. **Version Control**: Specify version constraints to avoid potential conflicts with other dependencies.\\n3. **Documentation**: Update documentation to include information on how to use the new dependency effectively.'), AlpacaItem(instruction='How can contributors ensure their pull requests are ready for review?', input='', output='Contributors can ensure their pull requests are ready for review by:\\n1. **Completing All Tests**: Make sure that all tests pass and any new tests are included for new features or bug fixes.\\n2. **Providing Detailed Descriptions**: Include a detailed description of the changes made and reference any related issues.\\n3. **Adhering to Guidelines**: Follow all contribution guidelines, including code style and documentation updates.'), AlpacaItem(instruction='What are the benefits of engaging with the CAMEL community on Discord?', input='', output='Engaging with the CAMEL community on Discord offers several benefits:\\n1. **Real-Time Communication**: It allows for real-time communication and quick feedback on ideas and issues.\\n2. **Networking**: Contributors can network with other developers, fostering collaboration and support.\\n3. **Staying Informed**: Members can stay updated on project developments, upcoming meetings, and community events.'), AlpacaItem(instruction='What steps should be taken to ensure a successful code merge in CAMEL?', input='', output='To ensure a successful code merge in CAMEL, the following steps should be taken:\\n1. **Resolve Conflicts**: Address any merge conflicts before attempting to merge the code.\\n2. **Run All Tests**: Ensure that all tests pass after merging to verify that the integration is successful.\\n3. **Review Changes**: Conduct a final review of the merged code to ensure it meets quality standards.'), AlpacaItem(instruction='How can contributors effectively manage their workload when contributing to CAMEL?', input='', output='Contributors can effectively manage their workload when contributing to CAMEL by:\\n1. **Setting Realistic Goals**: Establish achievable goals for their contributions based on available time and resources.\\n2. **Prioritizing Tasks**: Use prioritization techniques to focus on the most important or urgent tasks first.\\n3. **Taking Breaks**: Schedule regular breaks to avoid burnout and maintain productivity.')]\n" + ] + } + ], + "source": [ + "import random\n", + "firecrawl = Firecrawl()\n", + "# Scrape and clean content from a specified URL\n", + "response = firecrawl.scrape(\n", + " url=\"https://github.com/camel-ai/camel/blob/master/CONTRIBUTING.md\"\n", + ")\n", + "\n", + "# Generate the items 50 a time up to 300\n", + "alpaca_entries = []\n", + "for start in range(1, 301, 50):\n", + " # Combine default examples with random samples from previous generations\n", + " current_examples = examples + (random.sample(alpaca_entries,\n", + " min(5, len(alpaca_entries)))\n", + " if alpaca_entries else [])\n", + "\n", + " batch = generate_alpaca_items(\n", + " content=response[\"markdown\"],\n", + " n_items=50,\n", + " start_num=start,\n", + " examples=current_examples\n", + " )\n", + " print(f\"Generated {len(batch)} items\")\n", + " alpaca_entries.extend(batch)\n", + "\n", + "print(alpaca_entries)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "300" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(alpaca_entries)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Code for Conversion to Reward Model Format\n", + "Next, we transform the Alpaca-style entries into a format compatible with the reward model. Each entry will be converted into a structured list of instruction-input-response pairs that the reward model can evaluate." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "messages_lists=[]\n", + "for item in alpaca_entries:\n", + " messages_list =[]\n", + " user_content = item.instruction\n", + " if item.input:\n", + " user_content += f\"\\nInput: {item.input}\"\n", + " messages_list.append({\"role\": \"user\", \"content\": user_content})\n", + " messages_list.append({\"role\": \"assistant\", \"content\": item.output})\n", + " messages_lists.append(messages_list)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " # Filtering the Generated Data Using the Reward Model\n", + " Finally, we utilize NVIDIA's Nemotron Reward Model to filter out low-quality instruction-input-response triplets. The model evaluates each response based on defined thresholds for metrics such as helpfulness and correctness.\n", + "\n", + " To reduce runtime, we limit the evaluation to the first 50 entries. After filtering, 31 high-quality triplets are retained." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2024-12-16 20:36:49,985 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:50,426 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:50,778 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:51,285 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:51,563 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:51,963 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:52,322 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:52,751 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:53,047 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:53,382 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:53,872 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:54,165 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:54,451 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:54,745 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:55,038 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:55,548 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:55,960 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:56,313 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:56,797 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:57,229 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:57,559 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:57,863 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:58,306 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:58,600 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:59,126 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:59,412 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:36:59,707 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:00,085 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:00,456 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:00,866 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:01,200 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:02,095 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:02,609 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:02,907 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:03,232 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:03,631 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:03,940 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:04,279 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:04,856 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:05,157 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:05,485 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:05,886 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:06,185 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:06,501 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:06,922 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:07,303 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:07,588 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:08,034 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:08,547 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "2024-12-16 20:37:08,863 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", + "31\n" + ] + } + ], + "source": [ + "from camel.models.reward import Evaluator, NemotronRewardModel\n", + "from camel.types import ModelType\n", + "\n", + "reward_model = NemotronRewardModel(\n", + " model_type=ModelType.NVIDIA_NEMOTRON_340B_REWARD,\n", + " url=\"https://integrate.api.nvidia.com/v1\",\n", + ")\n", + "evaluator = Evaluator(reward_model=reward_model)\n", + "\n", + "thresholds = {\"helpfulness\": 2.5, \"correctness\": 2.5}\n", + "filtered_messages_lists = []\n", + "for messages_list in messages_lists[:50]:\n", + " response = evaluator.filter_data(messages_list, thresholds)\n", + " if response:\n", + " filtered_messages_lists.append(messages_list)\n", + "\n", + "print(len(filtered_messages_lists))\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "camel-ai-8RlHKqzd-py3.11", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/examples/reward/nemotron_model_example.py b/examples/reward/nemotron_model_example.py index 2371ab3c20..03ac500786 100644 --- a/examples/reward/nemotron_model_example.py +++ b/examples/reward/nemotron_model_example.py @@ -47,8 +47,8 @@ =============================================================================== ''' -threshoids = {"helpfulness": 1.5, "correctness": 1.5} -is_acceptable = evaluator.filter_data(messages, threshoids) +thresholds = {"helpfulness": 1.5, "correctness": 1.5} +is_acceptable = evaluator.filter_data(messages, thresholds) print("Is acceptable: ", is_acceptable) ''' =============================================================================== From 1bc18ab1bc603e093e0ea0fc16aff16f680ece7c Mon Sep 17 00:00:00 2001 From: asher Date: Thu, 19 Dec 2024 22:54:54 -0800 Subject: [PATCH 2/3] update --- docs/cookbooks/customer_slack_bot.ipynb | 546 ------------------------ 1 file changed, 546 deletions(-) delete mode 100644 docs/cookbooks/customer_slack_bot.ipynb diff --git a/docs/cookbooks/customer_slack_bot.ipynb b/docs/cookbooks/customer_slack_bot.ipynb deleted file mode 100644 index bbf578f783..0000000000 --- a/docs/cookbooks/customer_slack_bot.ipynb +++ /dev/null @@ -1,546 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Customer Service Discord Bot with Agentic RAG" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "You can also check this cookbook in colab [here]()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "⭐ **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." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "########Picture" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Installation and Setup\n", - "First, install the CAMEL package with all its dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install \"camel-ai[all]==0.2.12\"\n", - "!pip install nest_asyncio" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next, set up your API keys for Firecrawl and the model (Qwen or Mistral)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "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" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "from getpass import getpass\n", - "\n", - "firecrawl_api_key = getpass('Enter your API key: ')\n", - "os.environ[\"FIRECRAWL_API_KEY\"] = firecrawl_api_key" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "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" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "from getpass import getpass\n", - "\n", - "qwen_api_key = getpass('Enter your API key: ')\n", - "os.environ[\"QWEN_API_KEY\"] = qwen_api_key" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "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/" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "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" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Knowledge Crawling and Storage" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Use Firecrawl to crawl a website and store the content in a markdown file:" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "from camel.loaders import Firecrawl\n", - "\n", - "os.makedirs('local_data', exist_ok=True)\n", - "\n", - "firecrawl = Firecrawl()\n", - "\n", - "knowledge = firecrawl.crawl(\n", - " url=\"https://qdrant.tech/documentation/overview/\"\n", - ")[\"data\"][0][\"markdown\"]\n", - "\n", - "with open('local_data/qdrant_overview.md', 'w') as file:\n", - " file.write(knowledge)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Basic Agent Setup" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Qwen is a large language model developed by Alibaba Cloud. It is trained on a massive dataset of text and code and can generate text, translate languages, write different kinds of creative content, and answer your questions in an informative way.\n", - "\n", - "Use QWen model:" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "from camel.configs import QwenConfig, MistralConfig\n", - "from camel.models import ModelFactory\n", - "from camel.types import ModelPlatformType, ModelType\n", - "\n", - "qwen_model = ModelFactory.create(\n", - " model_platform=ModelPlatformType.QWEN,\n", - " model_type=ModelType.QWEN_TURBO,\n", - " model_config_dict=QwenConfig(temperature=0.2).as_dict(),\n", - ")\n", - "\n", - "mistral_model = ModelFactory.create(\n", - " model_platform=ModelPlatformType.MISTRAL,\n", - " model_type=ModelType.MISTRAL_LARGE,\n", - " model_config_dict=MistralConfig(temperature=0.0).as_dict(),\n", - ")\n", - "\n", - "# Use Qwen model\n", - "model = qwen_model\n", - "\n", - "# Replace with mistral_model if you want to choose mistral mode instead\n", - "# model = mistral_model" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "from camel.agents import ChatAgent\n", - "from camel.messages import BaseMessage\n", - "\n", - "agent = ChatAgent(\n", - " system_message=\"You're a helpful assistant\",\n", - " message_window_size=10,\n", - " model=model\n", - ")\n", - "\n", - "knowledge_message = BaseMessage.make_user_message(\n", - " role_name=\"User\", content=f\"Based on the following knowledge: {knowledge}\"\n", - ")\n", - "agent.update_memory(knowledge_message, \"user\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Basic Chatbot Setup" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Start chatting! Type 'exit' to end the conversation.\n", - "2024-12-16 17:10:14,437 - httpx - INFO - HTTP Request: POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 17:10:14,447 - camel.agents.chat_agent - INFO - Model qwen-turbo, index 0, processed these messages: [{'role': 'system', 'content': \"You're a helpful assistant\"}, {'role': 'user', 'content': 'Based on the following knowledge: ## Docs Menu\\n\\n- [Documentation](https://qdrant.tech/documentation/)\\n- [Overview](https://qdrant.tech/documentation/overview/)\\n- Understanding Vector Search in Qdrant\\n\\n# [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#how-does-vector-search-work-in-qdrant) How Does Vector Search Work in Qdrant?\\n\\nHow Vector Search Algorithms Work: An Intro to Qdrant - YouTube\\n\\nQdrant - Vector Database & Search Engine\\n\\n6.22K subscribers\\n\\n[How Vector Search Algorithms Work: An Intro to Qdrant](https://www.youtube.com/watch?v=mXNrhyw4q84)\\n\\nQdrant - Vector Database & Search Engine\\n\\nSearch\\n\\nWatch later\\n\\nShare\\n\\nCopy link\\n\\nInfo\\n\\nShopping\\n\\nTap to unmute\\n\\nIf playback doesn\\'t begin shortly, try restarting your device.\\n\\nMore videos\\n\\n## More videos\\n\\nYou\\'re signed out\\n\\nVideos you watch may be added to the TV\\'s watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.\\n\\nCancelConfirm\\n\\nShare\\n\\nInclude playlist\\n\\nAn error occurred while retrieving sharing information. Please try again later.\\n\\n[Watch on](https://www.youtube.com/watch?v=mXNrhyw4q84&embeds_referring_euri=https%3A%2F%2Fqdrant.tech%2F)\\n\\n0:00\\n\\n0:00 / 3:29•Live\\n\\n•\\n\\n[Watch on YouTube](https://www.youtube.com/watch?v=mXNrhyw4q84 \"Watch on YouTube\")\\n\\nIf you are still trying to figure out how vector search works, please read ahead. This document describes how vector search is used, covers Qdrant’s place in the larger ecosystem, and outlines how you can use Qdrant to augment your existing projects.\\n\\nFor those who want to start writing code right away, visit our [Complete Beginners tutorial](https://qdrant.tech/documentation/tutorials/search-beginners/) to build a search engine in 5-15 minutes.\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#a-brief-history-of-search) A Brief History of Search\\n\\nHuman memory is unreliable. Thus, as long as we have been trying to collect ‘knowledge’ in written form, we had to figure out how to search for relevant content without rereading the same books repeatedly. That’s why some brilliant minds introduced the inverted index. In the simplest form, it’s an appendix to a book, typically put at its end, with a list of the essential terms-and links to pages they occur at. Terms are put in alphabetical order. Back in the day, that was a manually crafted list requiring lots of effort to prepare. Once digitalization started, it became a lot easier, but still, we kept the same general principles. That worked, and still, it does.\\n\\nIf you are looking for a specific topic in a particular book, you can try to find a related phrase and quickly get to the correct page. Of course, assuming you know the proper term. If you don’t, you must try and fail several times or find somebody else to help you form the correct query.\\n\\n![A simplified version of the inverted index.](https://qdrant.tech/docs/gettingstarted/inverted-index.png)\\n\\nA simplified version of the inverted index.\\n\\nTime passed, and we haven’t had much change in that area for quite a long time. But our textual data collection started to grow at a greater pace. So we also started building up many processes around those inverted indexes. For example, we allowed our users to provide many words and started splitting them into pieces. That allowed finding some documents which do not necessarily contain all the query words, but possibly part of them. We also started converting words into their root forms to cover more cases, removing stopwords, etc. Effectively we were becoming more and more user-friendly. Still, the idea behind the whole process is derived from the most straightforward keyword-based search known since the Middle Ages, with some tweaks.\\n\\n![The process of tokenization with an additional stopwords removal and converstion to root form of a word.](https://qdrant.tech/docs/gettingstarted/tokenization.png)\\n\\nThe process of tokenization with an additional stopwords removal and converstion to root form of a word.\\n\\nTechnically speaking, we encode the documents and queries into so-called sparse vectors where each position has a corresponding word from the whole dictionary. If the input text contains a specific word, it gets a non-zero value at that position. But in reality, none of the texts will contain more than hundreds of different words. So the majority of vectors will have thousands of zeros and a few non-zero values. That’s why we call them sparse. And they might be already used to calculate some word-based similarity by finding the documents which have the biggest overlap.\\n\\n![An example of a query vectorized to sparse format.](https://qdrant.tech/docs/gettingstarted/query.png)\\n\\nAn example of a query vectorized to sparse format.\\n\\nSparse vectors have relatively **high dimensionality**; equal to the size of the dictionary. And the dictionary is obtained automatically from the input data. So if we have a vector, we are able to partially reconstruct the words used in the text that created that vector.\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#the-tower-of-babel) The Tower of Babel\\n\\nEvery once in a while, when we discover new problems with inverted indexes, we come up with a new heuristic to tackle it, at least to some extent. Once we realized that people might describe the same concept with different words, we started building lists of synonyms to convert the query to a normalized form. But that won’t work for the cases we didn’t foresee. Still, we need to craft and maintain our dictionaries manually, so they can support the language that changes over time. Another difficult issue comes to light with multilingual scenarios. Old methods require setting up separate pipelines and keeping humans in the loop to maintain the quality.\\n\\n![The Tower of Babel, Pieter Bruegel.](https://qdrant.tech/docs/gettingstarted/babel.jpg)\\n\\nThe Tower of Babel, Pieter Bruegel.\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#the-representation-revolution) The Representation Revolution\\n\\nThe latest research in Machine Learning for NLP is heavily focused on training Deep Language Models. In this process, the neural network takes a large corpus of text as input and creates a mathematical representation of the words in the form of vectors. These vectors are created in such a way that words with similar meanings and occurring in similar contexts are grouped together and represented by similar vectors. And we can also take, for example, an average of all the word vectors to create the vector for a whole text (e.g query, sentence, or paragraph).\\n\\n![deep neural](https://qdrant.tech/docs/gettingstarted/deep-neural.png)\\n\\nWe can take those **dense vectors** produced by the network and use them as a **different data representation**. They are dense because neural networks will rarely produce zeros at any position. In contrary to sparse ones, they have a relatively low dimensionality — hundreds or a few thousand only. Unfortunately, if we want to have a look and understand the content of the document by looking at the vector it’s no longer possible. Dimensions are no longer representing the presence of specific words.\\n\\nDense vectors can capture the meaning, not the words used in a text. That being said, **Large Language Models can automatically handle synonyms**. Moreso, since those neural networks might have been trained with multilingual corpora, they translate the same sentence, written in different languages, to similar vector representations, also called **embeddings**. And we can compare them to find similar pieces of text by calculating the distance to other vectors in our database.\\n\\n![Input queries contain different words, but they are still converted into similar vector representations, because the neural encoder can capture the meaning of the sentences. That feature can capture synonyms but also different languages..](https://qdrant.tech/docs/gettingstarted/input.png)\\n\\nInput queries contain different words, but they are still converted into similar vector representations, because the neural encoder can capture the meaning of the sentences. That feature can capture synonyms but also different languages..\\n\\n**Vector search** is a process of finding similar objects based on their embeddings similarity. The good thing is, you don’t have to design and train your neural network on your own. Many pre-trained models are available, either on **HuggingFace** or by using libraries like [SentenceTransformers](https://www.sbert.net/?ref=hackernoon.com). If you, however, prefer not to get your hands dirty with neural models, you can also create the embeddings with SaaS tools, like [co.embed API](https://docs.cohere.com/reference/embed?ref=hackernoon.com).\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#why-qdrant) Why Qdrant?\\n\\nThe challenge with vector search arises when we need to find similar documents in a big set of objects. If we want to find the closest examples, the naive approach would require calculating the distance to every document. That might work with dozens or even hundreds of examples but may become a bottleneck if we have more than that. When we work with relational data, we set up database indexes to speed things up and avoid full table scans. And the same is true for vector search. Qdrant is a fully-fledged vector database that speeds up the search process by using a graph-like structure to find the closest objects in sublinear time. So you don’t calculate the distance to every object from the database, but some candidates only.\\n\\n![Vector search with Qdrant. Thanks to HNSW graph we are able to compare the distance to some of the objects from the database, not to all of them.](https://qdrant.tech/docs/gettingstarted/vector-search.png)\\n\\nVector search with Qdrant. Thanks to HNSW graph we are able to compare the distance to some of the objects from the database, not to all of them.\\n\\nWhile doing a semantic search at scale, because this is what we sometimes call the vector search done on texts, we need a specialized tool to do it effectively — a tool like Qdrant.\\n\\n## [Anchor](https://qdrant.tech/documentation/overview/vector-search/\\\\#next-steps) Next Steps\\n\\nVector search is an exciting alternative to sparse methods. It solves the issues we had with the keyword-based search without needing to maintain lots of heuristics manually. It requires an additional component, a neural encoder, to convert text into vectors.\\n\\n[**Tutorial 1 - Qdrant for Complete Beginners**](https://qdrant.tech/documentation/tutorials/search-beginners/)\\nDespite its complicated background, vectors search is extraordinarily simple to set up. With Qdrant, you can have a search engine up-and-running in five minutes. Our [Complete Beginners tutorial](https://qdrant.tech/documentation/tutorials/search-beginners/) will show you how.\\n\\n[**Tutorial 2 - Question and Answer System**](https://qdrant.tech/articles/qa-with-cohere-and-qdrant/)\\nHowever, you can also choose SaaS tools to generate them and avoid building your model. Setting up a vector search project with Qdrant Cloud and Cohere co.embed API is fairly easy if you follow the [Question and Answer system tutorial](https://qdrant.tech/articles/qa-with-cohere-and-qdrant/).\\n\\nThere is another exciting thing about vector search. You can search for any kind of data as long as there is a neural network that would vectorize your data type. Do you think about a reverse image search? That’s also possible with vector embeddings.\\n\\n##### Was this page useful?\\n\\n![Thumb up icon](https://qdrant.tech/icons/outline/thumb-up.svg)\\nYes\\n![Thumb down icon](https://qdrant.tech/icons/outline/thumb-down.svg)\\nNo\\n\\nThank you for your feedback! 🙏\\n\\nWe are sorry to hear that. 😔 You can [edit](https://qdrant.tech/github.com/qdrant/landing_page/tree/master/qdrant-landing/content/documentation/overview/vector-search.md) this page on GitHub, or [create](https://github.com/qdrant/landing_page/issues/new/choose) a GitHub issue.\\n\\nOn this page:\\n\\n- [Edit on Github](https://github.com/qdrant/landing_page/tree/master/qdrant-landing/content/documentation/overview/vector-search.md)\\n- [Create an issue](https://github.com/qdrant/landing_page/issues/new/choose)\\n\\n×\\n\\n[Powered by](https://qdrant.tech/)\\n\\nWe use cookies to learn more about you. At any time you can delete or block cookies through your browser settings.\\n\\n[Learn more](https://qdrant.tech/legal/privacy-policy/) [I accept](https://qdrant.tech/documentation/overview/vector-search/#)'}, {'role': 'user', 'content': 'Hey, what is Qdrant?'}]\n", - "Assistant: Qdrant is a vector database designed to accelerate vector search and similarity search operations at scale. Here are the key points about Qdrant:\n", - "\n", - "1. **Vector Database**: Unlike traditional databases that store structured data, Qdrant specializes in storing and querying high-dimensional vectors, which are often generated from machine learning models.\n", - "\n", - "2. **Speed**: Qdrant uses advanced indexing techniques like Hierarchical Navigable Small World graphs (HNSW) to perform fast approximate nearest neighbor searches, making it suitable for real-time applications.\n", - "\n", - "3. **Scalability**: It can handle large datasets and high query volumes efficiently, making it ideal for applications that require searching through millions or billions of vectors.\n", - "\n", - "4. **Versatility**: Qdrant supports various types of data, including text, images, audio, and more, as long as they can be converted into vector representations.\n", - "\n", - "5. **Integration**: It integrates well with popular machine learning frameworks and services, allowing you to easily incorporate vector search into your existing workflows.\n", - "\n", - "6. **Ease of Use**: Despite its powerful capabilities, Qdrant is designed to be user-friendly, with tutorials and documentation to help beginners get started quickly.\n", - "\n", - "7. **Flexibility**: You can run Qdrant locally, in the cloud, or in a hybrid environment, providing flexibility in deployment options.\n", - "\n", - "In summary, Qdrant is a specialized database optimized for vector search, offering speed, scalability, and ease of integration for applications that rely on similarity search and machine learning models.\n", - "Ending conversation.\n" - ] - } - ], - "source": [ - "print(\"Start chatting! Type 'exit' to end the conversation.\")\n", - "while True:\n", - " user_input = input(\"User: \")\n", - " print(f\"User: {user_input}\")\n", - "\n", - " if user_input.lower() == \"exit\":\n", - " print(\"Ending conversation.\")\n", - " break\n", - "\n", - " assistant_response = agent.step(user_input)\n", - " print(f\"Assistant: {assistant_response.msgs[0].content}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Basic Slack Bot Integration" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To build a slack bot, you need to access these following informations.\n", - "1. Go to the slack app website: https://api.slack.com/apps\n", - "2. Log in with your slack account, or create an account if you don't have one\n", - "3. Click on 'Create New App' to create a new bot" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "from getpass import getpass\n", - "slack_token = getpass('Enter your slack token: ')\n", - "slack_scopes = getpass('Enter your slack scopes: ')\n", - "slack_signing_secret = getpass('Enter your slack signing secret')\n", - "slack_client_id = getpass('Enter your slack client id')\n", - "slack_client_secret = getpass('Enter your slack client secret')\n", - "\n", - "os.environ['SLACK_TOKEN'] = slack_token\n", - "os.environ['SLACK_SCOPES'] = slack_scopes\n", - "os.environ['SLACK_SIGNING_SECRET'] = slack_signing_secret\n", - "os.environ['SLACK_CLIENT_ID'] = slack_client_id\n", - "os.environ['SLACK_CLIENT_SECRET'] = slack_client_secret" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2024-12-16 17:38:55,499 - camel.bots.slack.slack_app - WARNING - As `installation_store` or `authorize` has been used, `token` (or SLACK_BOT_TOKEN env variable) will be ignored.\n" - ] - } - ], - "source": [ - "from camel.bots import SlackApp\n", - "\n", - "slack_bot = SlackApp(\n", - " token=slack_token,\n", - " scopes=slack_scopes,\n", - " signing_secret=slack_signing_secret,\n", - " client_id=slack_client_id,\n", - " client_secret=slack_client_secret\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Rewrite on_message method to custom message processing flow" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2024-12-16 17:43:45,490 - camel.bots.slack.slack_app - INFO - ⚡️ Bolt app is running!\n" - ] - }, - { - "ename": "RuntimeError", - "evalue": "web.Application instance initialized with different loop", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[16], line 10\u001b[0m\n\u001b[1;32m 4\u001b[0m nest_asyncio\u001b[38;5;241m.\u001b[39mapply()\n\u001b[1;32m 6\u001b[0m \u001b[38;5;66;03m# async def custom_on_message(self, event, say):\u001b[39;00m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;66;03m# print(f\"User: {event}\")\u001b[39;00m\n\u001b[1;32m 8\u001b[0m \n\u001b[1;32m 9\u001b[0m \u001b[38;5;66;03m# slack_bot.on_message = types.MethodType(custom_on_message, slack_bot)\u001b[39;00m\n\u001b[0;32m---> 10\u001b[0m \u001b[43mslack_bot\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/data/camel/camel/bots/slack/slack_app.py:164\u001b[0m, in \u001b[0;36mSlackApp.run\u001b[0;34m(self, port, path, host)\u001b[0m\n\u001b[1;32m 147\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrun\u001b[39m(\n\u001b[1;32m 148\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 149\u001b[0m port: \u001b[38;5;28mint\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m3000\u001b[39m,\n\u001b[1;32m 150\u001b[0m path: \u001b[38;5;28mstr\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m/slack/events\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 151\u001b[0m host: Optional[\u001b[38;5;28mstr\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[1;32m 152\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 153\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124;03m\"\"\"Starts the Slack Bolt app server to listen for incoming Slack\u001b[39;00m\n\u001b[1;32m 154\u001b[0m \u001b[38;5;124;03m events.\u001b[39;00m\n\u001b[1;32m 155\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[38;5;124;03m None).\u001b[39;00m\n\u001b[1;32m 163\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 164\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_app\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstart\u001b[49m\u001b[43m(\u001b[49m\u001b[43mport\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mport\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhost\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mhost\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/slack_bolt/app/async_app.py:559\u001b[0m, in \u001b[0;36mAsyncApp.start\u001b[0;34m(self, port, path, host)\u001b[0m\n\u001b[1;32m 550\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mstart\u001b[39m(\u001b[38;5;28mself\u001b[39m, port: \u001b[38;5;28mint\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m3000\u001b[39m, path: \u001b[38;5;28mstr\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m/slack/events\u001b[39m\u001b[38;5;124m\"\u001b[39m, host: Optional[\u001b[38;5;28mstr\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 551\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Start a web server using AIOHTTP.\u001b[39;00m\n\u001b[1;32m 552\u001b[0m \u001b[38;5;124;03m Refer to https://docs.aiohttp.org/ for more details about AIOHTTP.\u001b[39;00m\n\u001b[1;32m 553\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 557\u001b[0m \u001b[38;5;124;03m host: The hostname to serve the web endpoints. (Default: 0.0.0.0)\u001b[39;00m\n\u001b[1;32m 558\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m--> 559\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mserver\u001b[49m\u001b[43m(\u001b[49m\u001b[43mport\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mport\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhost\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mhost\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstart\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/slack_bolt/app/async_server.py:86\u001b[0m, in \u001b[0;36mAsyncSlackAppServer.start\u001b[0;34m(self, host)\u001b[0m\n\u001b[1;32m 83\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbolt_app\u001b[38;5;241m.\u001b[39mlogger\u001b[38;5;241m.\u001b[39minfo(get_boot_message())\n\u001b[1;32m 85\u001b[0m _host \u001b[38;5;241m=\u001b[39m host \u001b[38;5;28;01mif\u001b[39;00m host \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhost\n\u001b[0;32m---> 86\u001b[0m \u001b[43mweb\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun_app\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mweb_app\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhost\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m_host\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mport\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mport\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web.py:526\u001b[0m, in \u001b[0;36mrun_app\u001b[0;34m(app, host, port, path, sock, shutdown_timeout, keepalive_timeout, ssl_context, print, backlog, access_log_class, access_log_format, access_log, handle_signals, reuse_address, reuse_port, handler_cancellation, loop)\u001b[0m\n\u001b[1;32m 524\u001b[0m main_task\u001b[38;5;241m.\u001b[39mcancel()\n\u001b[1;32m 525\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m suppress(asyncio\u001b[38;5;241m.\u001b[39mCancelledError):\n\u001b[0;32m--> 526\u001b[0m \u001b[43mloop\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun_until_complete\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmain_task\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 527\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[1;32m 528\u001b[0m _cancel_tasks(asyncio\u001b[38;5;241m.\u001b[39mall_tasks(loop), loop)\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/nest_asyncio.py:98\u001b[0m, in \u001b[0;36m_patch_loop..run_until_complete\u001b[0;34m(self, future)\u001b[0m\n\u001b[1;32m 95\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m f\u001b[38;5;241m.\u001b[39mdone():\n\u001b[1;32m 96\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 97\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mEvent loop stopped before Future completed.\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m---> 98\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mf\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mresult\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/anaconda3/lib/python3.11/asyncio/futures.py:203\u001b[0m, in \u001b[0;36mFuture.result\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 201\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m__log_traceback \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[1;32m 202\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_exception \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m--> 203\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_exception\u001b[38;5;241m.\u001b[39mwith_traceback(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_exception_tb)\n\u001b[1;32m 204\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_result\n", - "File \u001b[0;32m~/anaconda3/lib/python3.11/asyncio/tasks.py:267\u001b[0m, in \u001b[0;36mTask.__step\u001b[0;34m(***failed resolving arguments***)\u001b[0m\n\u001b[1;32m 263\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 264\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m exc \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 265\u001b[0m \u001b[38;5;66;03m# We use the `send` method directly, because coroutines\u001b[39;00m\n\u001b[1;32m 266\u001b[0m \u001b[38;5;66;03m# don't have `__iter__` and `__next__` methods.\u001b[39;00m\n\u001b[0;32m--> 267\u001b[0m result \u001b[38;5;241m=\u001b[39m coro\u001b[38;5;241m.\u001b[39msend(\u001b[38;5;28;01mNone\u001b[39;00m)\n\u001b[1;32m 268\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 269\u001b[0m result \u001b[38;5;241m=\u001b[39m coro\u001b[38;5;241m.\u001b[39mthrow(exc)\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web.py:338\u001b[0m, in \u001b[0;36m_run_app\u001b[0;34m(app, host, port, path, sock, shutdown_timeout, keepalive_timeout, ssl_context, print, backlog, access_log_class, access_log_format, access_log, handle_signals, reuse_address, reuse_port, handler_cancellation)\u001b[0m\n\u001b[1;32m 325\u001b[0m app \u001b[38;5;241m=\u001b[39m cast(Application, app)\n\u001b[1;32m 327\u001b[0m runner \u001b[38;5;241m=\u001b[39m AppRunner(\n\u001b[1;32m 328\u001b[0m app,\n\u001b[1;32m 329\u001b[0m handle_signals\u001b[38;5;241m=\u001b[39mhandle_signals,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 335\u001b[0m handler_cancellation\u001b[38;5;241m=\u001b[39mhandler_cancellation,\n\u001b[1;32m 336\u001b[0m )\n\u001b[0;32m--> 338\u001b[0m \u001b[38;5;28;01mawait\u001b[39;00m runner\u001b[38;5;241m.\u001b[39msetup()\n\u001b[1;32m 340\u001b[0m sites: List[BaseSite] \u001b[38;5;241m=\u001b[39m []\n\u001b[1;32m 342\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web_runner.py:287\u001b[0m, in \u001b[0;36mBaseRunner.setup\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 283\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mNotImplementedError\u001b[39;00m: \u001b[38;5;66;03m# pragma: no cover\u001b[39;00m\n\u001b[1;32m 284\u001b[0m \u001b[38;5;66;03m# add_signal_handler is not implemented on Windows\u001b[39;00m\n\u001b[1;32m 285\u001b[0m \u001b[38;5;28;01mpass\u001b[39;00m\n\u001b[0;32m--> 287\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_server \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mawait\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_make_server()\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web_runner.py:389\u001b[0m, in \u001b[0;36mAppRunner._make_server\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 387\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_make_server\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Server:\n\u001b[1;32m 388\u001b[0m loop \u001b[38;5;241m=\u001b[39m asyncio\u001b[38;5;241m.\u001b[39mget_event_loop()\n\u001b[0;32m--> 389\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_app\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_set_loop\u001b[49m\u001b[43m(\u001b[49m\u001b[43mloop\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 390\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_app\u001b[38;5;241m.\u001b[39mon_startup\u001b[38;5;241m.\u001b[39mfreeze()\n\u001b[1;32m 391\u001b[0m \u001b[38;5;28;01mawait\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_app\u001b[38;5;241m.\u001b[39mstartup()\n", - "File \u001b[0;32m~/Library/Caches/pypoetry/virtualenvs/camel-ai-8RlHKqzd-py3.11/lib/python3.11/site-packages/aiohttp/web_app.py:275\u001b[0m, in \u001b[0;36mApplication._set_loop\u001b[0;34m(self, loop)\u001b[0m\n\u001b[1;32m 273\u001b[0m loop \u001b[38;5;241m=\u001b[39m asyncio\u001b[38;5;241m.\u001b[39mget_event_loop()\n\u001b[1;32m 274\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_loop \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_loop \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m loop:\n\u001b[0;32m--> 275\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 276\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mweb.Application instance initialized with different loop\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 277\u001b[0m )\n\u001b[1;32m 279\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_loop \u001b[38;5;241m=\u001b[39m loop\n\u001b[1;32m 281\u001b[0m \u001b[38;5;66;03m# set loop debug\u001b[39;00m\n", - "\u001b[0;31mRuntimeError\u001b[0m: web.Application instance initialized with different loop" - ] - } - ], - "source": [ - "import nest_asyncio\n", - "import types\n", - "\n", - "nest_asyncio.apply()\n", - "\n", - "# async def custom_on_message(self, event, say):\n", - "# print(f\"User: {event}\")\n", - "\n", - "# slack_bot.on_message = types.MethodType(custom_on_message, slack_bot)\n", - "slack_bot.run()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Integrating Qdrant for Large Files to build a more powerful Discord bot" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Qdrant is a vector similarity search engine and vector database. It is designed to perform fast and efficient similarity searches on large datasets of vectors. This enables the chatbot to access and utilize external information to provide more comprehensive and accurate responses. By storing knowledge as vectors, Qdrant enables efficient semantic search, allowing the chatbot to find relevant information based on the meaning of the user's query.\n", - "\n", - "Set up an embedding model and retriever for Qdrant:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from camel.embeddings import SentenceTransformerEncoder\n", - "\n", - "sentence_encoder = SentenceTransformerEncoder(model_name='intfloat/e5-large-v2')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from camel.retrievers import AutoRetriever\n", - "from camel.types import StorageType\n", - "\n", - "assistant_sys_msg = \"\"\"You are a helpful assistant to answer question,\n", - " I will give you the Original Query and Retrieved Context,\n", - " answer the Original Query based on the Retrieved Context,\n", - " if you can't answer the question just say I don't know.\"\"\"\n", - "auto_retriever = AutoRetriever(\n", - " vector_storage_local_path=\"local_data2/\",\n", - " storage_type=StorageType.QDRANT,\n", - " embedding_model=sentence_encoder\n", - " )\n", - "qdrant_agent = ChatAgent(system_message=assistant_sys_msg, model=model)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Use Auto RAG to retrieve first and then answer the user's query using CAMEL `ChatAgent` based on the retrieved info:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from camel.bots import DiscordApp\n", - "import nest_asyncio\n", - "import discord\n", - "\n", - "nest_asyncio.apply()\n", - "discord_q_bot = DiscordApp(token=discord_bot_token)\n", - "\n", - "@discord_q_bot.client.event # triggers when a message is sent in the channel\n", - "async def on_message(message: discord.Message):\n", - " if message.author == discord_q_bot.client.user:\n", - " return\n", - "\n", - " if message.type != discord.MessageType.default:\n", - " return\n", - "\n", - " if message.author.bot:\n", - " return\n", - " user_input = message.content\n", - "\n", - " retrieved_info = auto_retriever.run_vector_retriever(\n", - " query=user_input,\n", - " contents=[\n", - " \"local_data/qdrant_overview.md\",\n", - " ],\n", - " top_k=3,\n", - " return_detailed_info=False,\n", - " similarity_threshold=0.5\n", - " )\n", - "\n", - " user_msg = str(retrieved_info)\n", - " assistant_response = qdrant_agent.step(user_msg)\n", - " response_content = assistant_response.msgs[0].content\n", - "\n", - " if len(response_content) > 2000: # discord message length limit\n", - " for chunk in [response_content[i:i+2000] for i in range(0, len(response_content), 2000)]:\n", - " await message.channel.send(chunk)\n", - " else:\n", - " await message.channel.send(response_content)\n", - "\n", - "discord_q_bot.run()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "camel-ai-8RlHKqzd-py3.11", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.5" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} From 7b2beb5626fbc916dbb9c8beb880148657f7dedd Mon Sep 17 00:00:00 2001 From: asher Date: Mon, 30 Dec 2024 21:33:20 +0800 Subject: [PATCH 3/3] update --- ..._evaluation&filter_with_reward_model.ipynb | 393 ---------- ...aevaluation&filter_with_reward_model.ipynb | 685 ++++++++++++++++++ docs/index.rst | 1 + 3 files changed, 686 insertions(+), 393 deletions(-) delete mode 100644 docs/cookbooks/synthetic_data_evaluation&filter_with_reward_model.ipynb create mode 100644 docs/cookbooks/synthetic_dataevaluation&filter_with_reward_model.ipynb diff --git a/docs/cookbooks/synthetic_data_evaluation&filter_with_reward_model.ipynb b/docs/cookbooks/synthetic_data_evaluation&filter_with_reward_model.ipynb deleted file mode 100644 index 8863285c18..0000000000 --- a/docs/cookbooks/synthetic_data_evaluation&filter_with_reward_model.ipynb +++ /dev/null @@ -1,393 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Installation and Setup\n", - "First, install the CAMEL package with all its dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "!pip install \"camel-ai[all]==0.2.12\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next, we need to securely input and store the required API keys for accessing OpenAI, Firecrawl, and NVIDIA services." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "from getpass import getpass\n", - "import os\n", - "\n", - "openai_api_key = getpass('Enter your OpenAI API key: ')\n", - "os.environ[\"OPENAI_API_KEY\"] = openai_api_key\n", - "\n", - "# Generate an API key at https://www.firecrawl.dev/app/api-keys\n", - "firecrawl_api_key = getpass('Enter your Firecrawl API key: ')\n", - "os.environ[\"FIRECRAWL_API_KEY\"] = firecrawl_api_key\n", - "\n", - "nvidia_api_key = getpass('Enter your NVIDIA API key: ')\n", - "os.environ[\"NVIDIA_API_KEY\"] = nvidia_api_key" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "To work effectively with the Alpaca format and manage items systematically, we define a set of models using Pydantic. These models ensure that the data is well-structured, type-safe, and validated." - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "from pydantic import BaseModel\n", - "from camel.messages.conversion import AlpacaItem\n", - "\n", - "class NumberedAlpacaItem(BaseModel):\n", - " number: int\n", - " item: AlpacaItem\n", - "\n", - "\n", - "class AlpacaItemResponse(BaseModel):\n", - " \"\"\"\n", - " Represents an instruction-response item in the Alpaca format.\n", - " \"\"\"\n", - " items: list[NumberedAlpacaItem]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Data generation\n", - "Next, we define our data generation function. It takes a source content and generates a list of instruction-input-response triplets based on it.\n", - "\n", - "Later, we will use a reward model to filter this list." - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "from typing import List\n", - "from camel.loaders import Firecrawl\n", - "from camel.models import ModelFactory\n", - "from camel.types import ModelPlatformType, ModelType\n", - "from camel.configs import ChatGPTConfig\n", - "from camel.agents import ChatAgent\n", - "\n", - "from typing import List\n", - "from camel.loaders import Firecrawl\n", - "from camel.models import ModelFactory\n", - "from camel.types import ModelPlatformType, ModelType\n", - "from camel.configs import ChatGPTConfig\n", - "from camel.agents import ChatAgent\n", - "import json\n", - "\n", - "\n", - "def generate_alpaca_items(content: str, n_items: int, start_num: int = 1, examples: List[AlpacaItem] = None) -> List[AlpacaItem]:\n", - " system_msg = \"\"\"\n", - "You are an AI assistant generating detailed, accurate responses based on the provided content.\n", - "You will be given a reference content, and you must generate a specific number of AlpacaItems.\n", - "These are instruction-input-response triplets, where the input is the context or examples.\n", - "\n", - "Add a number to the items to keep track of the order. Generate exactly that many.\n", - "\n", - "For each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\n", - "\n", - "Include multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\n", - "\n", - "Leave the input field blank.\n", - "\n", - "Ensure all of the most significant parts of the context are covered.\n", - "\n", - "Start with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\n", - " \"\"\"\n", - "\n", - " examples_str = \"\"\n", - " if examples:\n", - " examples_str = \"\\n\\nHere are some example items for reference:\\n\" + \\\n", - " \"\\n\".join(ex.model_dump_json() for ex in examples)\n", - "\n", - " model = ModelFactory.create(\n", - " model_platform=ModelPlatformType.OPENAI,\n", - " model_type=ModelType.GPT_4O_MINI,\n", - " model_config_dict=ChatGPTConfig(\n", - " temperature=0.6, response_format=AlpacaItemResponse\n", - " ).as_dict(),\n", - " )\n", - "\n", - " agent = ChatAgent(\n", - " system_message=system_msg,\n", - " model=model,\n", - " )\n", - "\n", - " prompt = f\"Content reference:\\n{content}{examples_str}\\n\\n Generate {n_items} AlpacaItems. The first should start numbering at {start_num}.\"\n", - " response = agent.step(prompt)\n", - "\n", - " # Parse the generated JSON to our wrapper class\n", - " alpaca_items = [n_item.item for n_item in\n", - " AlpacaItemResponse.\n", - " model_validate_json(response.msgs[0].content).items]\n", - "\n", - " return alpaca_items\n", - "\n", - "# Few shot examples to ensure the right amount of detail\n", - "examples = [\n", - " AlpacaItem(\n", - " instruction=\"Explain the process for sprint planning and review in CAMEL.\",\n", - " input=\"\",\n", - " output=\"The process for sprint planning and review in CAMEL includes:\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"\n", - " )\n", - "]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Point to content and generate data!\n", - "Now we point to the content that we wish to generate SFT data around and use CAMEL's Firecrawl integration to get this content in a nice markdown format.\n", - "\n", - "You can get a Firecrawl API key from [here](https://www.firecrawl.dev/app/api-keys)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2024-12-16 17:51:01,479 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 17:51:01,495 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 1.'}]\n", - "Generated 50 items\n", - "2024-12-16 17:51:41,828 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 17:51:41,840 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"What is the importance of maintaining a clean and readable codebase?\",\"input\":\"\",\"output\":\"Maintaining a clean and readable codebase is important because:\\\\n1. **Ease of Maintenance**: It simplifies future maintenance and updates to the code.\\\\n2. **Collaboration**: It facilitates collaboration among multiple contributors by making the code easier to understand.\\\\n3. **Bug Reduction**: Clean code helps reduce the likelihood of bugs and errors.\"}\\n{\"instruction\":\"What should be included in the documentation for new features?\",\"input\":\"\",\"output\":\"The documentation for new features should include:\\\\n1. **Feature Description**: A clear explanation of what the feature does and its purpose.\\\\n2. **Usage Examples**: Practical examples of how to use the feature in code.\\\\n3. **Related Documentation**: Links to any related documentation or resources for further reading.\"}\\n{\"instruction\":\"What should contributors do if they find outdated issues in CAMEL?\",\"input\":\"\",\"output\":\"If contributors find outdated issues in CAMEL, they should:\\\\n1. **Notify Maintainers**: Give a heads-up to maintainers so they can review and address the issue.\\\\n2. **Comment on the Issue**: Add a comment on the issue to indicate its status and suggest updates.\"}\\n{\"instruction\":\"What does the \\'Common Actions\\' section in CAMEL documentation cover?\",\"input\":\"\",\"output\":\"The \\'Common Actions\\' section in CAMEL documentation covers various routine tasks, including:\\\\n1. **Updating Dependencies**: Instructions for managing project dependencies.\\\\n2. **Linting & Formatting**: Guidelines for checking and formatting code.\\\\n3. **Coverage**: How to measure code coverage for tests.\\\\n4. **Tests**: Instructions for running different types of tests.\"}\\n{\"instruction\":\"How can contributors ensure their code passes formatting checks?\",\"input\":\"\",\"output\":\"Contributors can ensure their code passes formatting checks by:\\\\n1. Running `poetry run ruff check .` to check for formatting issues.\\\\n2. Using `poetry run ruff format .` to automatically format the code according to the project\\'s style guidelines.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 51.'}]\n", - "Generated 50 items\n", - "2024-12-16 17:52:16,948 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 17:52:16,966 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"How can contributors effectively communicate updates about their pull requests?\",\"input\":\"\",\"output\":\"Contributors can effectively communicate updates about their pull requests by:\\\\n1. **Commenting**: Adding comments on the pull request to describe changes made.\\\\n2. **Labeling**: Using appropriate labels to indicate the status of the pull request.\\\\n3. **Engaging with Reviewers**: Actively engaging with reviewers to address feedback and questions.\"}\\n{\"instruction\":\"How can contributors effectively provide feedback during code reviews?\",\"input\":\"\",\"output\":\"Contributors can effectively provide feedback during code reviews by:\\\\n1. **Being Constructive**: Offer clear and actionable suggestions rather than just pointing out issues.\\\\n2. **Focusing on Code Quality**: Emphasize best practices in coding, documentation, and testing.\\\\n3. **Encouraging Discussion**: Engage in discussions about the code to foster collaboration and learning.\"}\\n{\"instruction\":\"What is the purpose of code reviews in CAMEL?\",\"input\":\"\",\"output\":\"The purpose of code reviews in CAMEL includes:\\\\n1. **Maintain Code Quality**: Ensure the codebase remains clean, readable, and maintainable.\\\\n2. **Knowledge Sharing**: Facilitate knowledge sharing among contributors and assist new contributors in learning best practices.\\\\n3. **Bug Prevention**: Catch potential bugs and issues before they are merged into the main branch.\\\\n4. **Consistency**: Ensure consistency in style, design patterns, and architecture across the project.\"}\\n{\"instruction\":\"What is the recommended workflow for contributing code to CAMEL?\",\"input\":\"\",\"output\":\"The recommended workflow for contributing code to CAMEL includes:\\\\n1. **Fork-and-Pull-Request**: Use the Fork-and-Pull-Request workflow if you are a community contributor.\\\\n2. **Checkout-and-Pull-Request**: If you are a member of CAMEL-AI.org, follow the Checkout-and-Pull-Request workflow.\\\\n3. **Mention Issues**: Always mention any related issues and tag relevant maintainers in your pull request.\"}\\n{\"instruction\":\"What is the workflow for creating a board item in CAMEL?\",\"input\":\"\",\"output\":\"The workflow for creating a board item in CAMEL involves:\\\\n1. **Issue Creation**: Create a new issue on the GitHub Issues page, ensuring it has a proper title and description.\\\\n2. **Assigning Issues**: Assign the issue to yourself to indicate it\\'s being worked on.\\\\n3. **Linking Issues**: If related to other issues, link them instead of merging into one.\\\\n4. **Sprint Planning**: Discuss the issue during team meetings and move it to the appropriate status column.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 101.'}]\n", - "Generated 50 items\n", - "2024-12-16 17:52:57,807 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 17:52:57,814 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"What are the steps to schedule an introduction call for CAMEL?\",\"input\":\"\",\"output\":\"To schedule an introduction call for CAMEL, follow these steps:\\\\n1. **Choose Language**: Select the appropriate link based on your language preference (English or Chinese).\\\\n2. **Select Date and Time**: Pick a suitable date and time from the available slots.\\\\n3. **Provide Information**: Fill in any required information on the scheduling platform.\"}\\n{\"instruction\":\"What is the significance of maintaining a changelog in CAMEL?\",\"input\":\"\",\"output\":\"The significance of maintaining a changelog in CAMEL is to:\\\\n1. **Track Changes**: Provide a clear record of all changes made to the project over time.\\\\n2. **Inform Users**: Keep users informed about new features, bug fixes, and improvements.\\\\n3. **Facilitate Version Control**: Help contributors and maintainers understand the evolution of the project.\"}\\n{\"instruction\":\"What is the recommended approach for documenting new features?\",\"input\":\"\",\"output\":\"The recommended approach for documenting new features includes:\\\\n1. **Feature Overview**: Provide a clear explanation of what the feature does and its purpose.\\\\n2. **Usage Examples**: Include practical examples demonstrating how to use the feature in code.\\\\n3. **Linking Related Documentation**: Reference any related documentation for further reading and context.\"}\\n{\"instruction\":\"What are the responsibilities of a reviewer during the code review process?\",\"input\":\"\",\"output\":\"The responsibilities of a reviewer during the code review process include:\\\\n1. **Timely Reviews**: Strive to review pull requests promptly to keep the project moving.\\\\n2. **Constructive Feedback**: Provide clear and constructive feedback to help the contributor improve.\\\\n3. **Collaboration**: Work collaboratively with the contributor to address any issues.\"}\\n{\"instruction\":\"What is the significance of using a logging module instead of print statements?\",\"input\":\"\",\"output\":\"The significance of using a logging module instead of print statements includes:\\\\n1. **Configurability**: Logging provides more control over how messages are emitted and where they are directed.\\\\n2. **Professionalism**: Using a logging framework leads to cleaner, more maintainable code.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 151.'}]\n", - "Generated 50 items\n", - "2024-12-16 17:53:30,467 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 17:53:30,474 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"What is the purpose of having a checklist for code reviews?\",\"input\":\"\",\"output\":\"The purpose of having a checklist for code reviews is to:\\\\n1. **Maintain Code Quality**: Ensure that all contributions meet the project\\'s standards for quality and functionality.\\\\n2. **Promote Consistency**: Foster consistency in the review process across different contributions.\"}\\n{\"instruction\":\"How can contributors effectively provide feedback during code reviews?\",\"input\":\"\",\"output\":\"Contributors can effectively provide feedback during code reviews by:\\\\n1. **Being Constructive**: Offer clear and actionable suggestions rather than just pointing out issues.\\\\n2. **Focusing on Code Quality**: Emphasize best practices in coding, documentation, and testing.\\\\n3. **Encouraging Discussion**: Engage in discussions about the code to foster collaboration and learning.\"}\\n{\"instruction\":\"What guidelines should contributors follow when creating new issues on GitHub?\",\"input\":\"\",\"output\":\"When creating new issues on GitHub, contributors should follow these guidelines:\\\\n1. **Clear Titles**: Use clear and descriptive titles that summarize the issue.\\\\n2. **Detailed Descriptions**: Provide detailed descriptions, including steps to reproduce the issue and any relevant context.\"}\\n{\"instruction\":\"What is the importance of the `Args:` section in docstrings?\",\"input\":\"\",\"output\":\"The `Args:` section in docstrings is important because it clearly documents the parameters of a function or class, including their names, types, descriptions, and default values. This helps users understand how to use the function or class correctly.\"}\\n{\"instruction\":\"What should you do if you encounter issues during the development setup for CAMEL?\",\"input\":\"\",\"output\":\"If you encounter issues during the development setup for CAMEL, you should:\\\\n1. **Consult Documentation**: Refer to the setup documentation for troubleshooting tips and guidelines.\\\\n2. **Ask for Help**: Reach out to a maintainer via the communication channels provided, such as Discord or Slack.\\\\n3. **Provide Details**: When asking for help, provide specific details about the issues you\\'re facing, including error messages and steps taken.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 201.'}]\n", - "Generated 50 items\n", - "2024-12-16 17:54:10,837 - httpx - INFO - HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 17:54:10,851 - camel.agents.chat_agent - INFO - Model gpt-4o-mini, index 0, processed these messages: [{'role': 'system', 'content': '\\nYou are an AI assistant generating detailed, accurate responses based on the provided content.\\nYou will be given a reference content, and you must generate a specific number of AlpacaItems.\\nThese are instruction-input-response triplets, where the input is the context or examples.\\n\\nAdd a number to the items to keep track of the order. Generate exactly that many.\\n\\nFor each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\\n\\nInclude multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\\n\\nLeave the input field blank.\\n\\nEnsure all of the most significant parts of the context are covered.\\n\\nStart with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\\n '}, {'role': 'user', 'content': 'Content reference:\\n\\n\\nYou signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert\\n\\n{{ message }}\\n\\n[camel-ai](/camel-ai)/ **[camel](/camel-ai/camel)** Public\\n\\n- [Notifications](/login?return_to=%2Fcamel-ai%2Fcamel) You must be signed in to change notification settings\\n- [Fork\\\\\\\\\\n710](/login?return_to=%2Fcamel-ai%2Fcamel)\\n- [Star\\\\\\\\\\n5.8k](/login?return_to=%2Fcamel-ai%2Fcamel)\\n\\n\\n## Files\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nBlame\\n\\nBlame\\n\\n## Latest commit\\n\\n## History\\n\\n[History](/camel-ai/camel/commits/master/CONTRIBUTING.md)\\n\\n363 lines (253 loc) · 17.8 KB\\n\\nmaster\\n\\n/\\n\\n# CONTRIBUTING.md\\n\\nTop\\n\\n## File metadata and controls\\n\\n- Preview\\n\\n- Code\\n\\n- Blame\\n\\n\\n363 lines (253 loc) · 17.8 KB\\n\\n[Raw](https://github.com/camel-ai/camel/raw/refs/heads/master/CONTRIBUTING.md)\\n\\n🐫 **Welcome to CAMEL!** 🐫\\n\\nThank you for your interest in contributing to the CAMEL project! 🎉 We\\'re excited to have your support. As an open-source initiative in a rapidly evolving and open-ended field, we wholeheartedly welcome contributions of all kinds. Whether you want to introduce new features, enhance the infrastructure, improve documentation, asking issues, add more examples, implement state-of-the-art research ideas, or fix bugs, we appreciate your enthusiasm and efforts. 🙌 You are welcome to join our [discord](https://discord.camel-ai.org/) for more efficient communication. 💬\\n\\n## Join Our Community 🌍\\n\\n[Permalink: Join Our Community 🌍](#join-our-community-)\\n\\n### Schedule an Introduction Call 📞\\n\\n[Permalink: Schedule an Introduction Call 📞](#schedule-an-introduction-call-)\\n\\n- English speakers: [here](https://calendly.com/roman-georgio/camel-ai-introduction-call?month=2024-05)\\n- Chinese speakers: [here](https://calendly.com/sisi-qu/welcome-to-camel-onboarding-meeting?month=2024-05)\\n\\n### Developer Meeting Time & Link 💻\\n\\n[Permalink: Developer Meeting Time & Link 💻](#developer-meeting-time--link-)\\n\\n- English speakers: Mondays at 5 PM GMT+1. Join via Discord: [Meeting Link](https://discord.gg/FFe4nB8MJj?event=1313319275708289034)\\n- Chinese Speakers: Mondays at 9 PM UTC+8. Join via TecentMeeting: [Meeting Link](https://meeting.tencent.com/dm/057wap1eeCSY)\\n\\n### Our Communication Channels 💬\\n\\n[Permalink: Our Communication Channels 💬](#our-communication-channels-)\\n\\n- **Discord:** [Join here](https://discord.camel-ai.org/)\\n- **WeChat:** Scan the QR code [here](https://ghli.org/camel/wechat.png)\\n- **Slack:** [Join here](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)\\n\\n## Guidelines 📝\\n\\n[Permalink: Guidelines 📝](#guidelines-)\\n\\n### Contributing to the Code 👨\\u200d💻👩\\u200d💻\\n\\n[Permalink: Contributing to the Code 👨\\u200d💻👩\\u200d💻](#contributing-to-the-code-)\\n\\nIf you\\'re eager to contribute to this project, that\\'s fantastic! We\\'re thrilled to have your support.\\n\\n- If you are a contributor from the community:\\n - Follow the [Fork-and-Pull-Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow when opening your pull requests.\\n- If you are a member of [CAMEL-AI.org](https://github.com/camel-ai):\\n\\n - Follow the [Checkout-and-Pull-Request](https://dev.to/ceceliacreates/how-to-create-a-pull-request-on-github-16h1) workflow when opening your pull request; this will allow the PR to pass all tests that require [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).\\n\\nMake sure to mention any related issues and tag the relevant maintainers too. 💪\\n\\nBefore your pull request can be merged, it must pass the formatting, linting, and testing checks. You can find instructions on running these checks locally under the **Common Actions** section below. 🔍\\n\\nEnsuring excellent documentation and thorough testing is absolutely crucial. Here are some guidelines to follow based on the type of contribution you\\'re making:\\n\\n- If you fix a bug:\\n - Add a relevant unit test when possible. These can be found in the `test` directory.\\n- If you make an improvement:\\n - Update any affected example console scripts in the `examples` directory, Gradio demos in the `apps` directory, and documentation in the `docs` directory.\\n - Update unit tests when relevant.\\n- If you add a feature:\\n - Include unit tests in the `test` directory.\\n - Add a demo script in the `examples` directory.\\n\\nWe\\'re a small team focused on building great things. If you have something in mind that you\\'d like to add or modify, opening a pull request is the ideal way to catch our attention. 🚀\\n\\n### Contributing to Code Reviews 🔍\\n\\n[Permalink: Contributing to Code Reviews 🔍](#contributing-to-code-reviews-)\\n\\nThis part outlines the guidelines and best practices for conducting code reviews in CAMEL. The aim is to ensure that all contributions are of high quality, align with the project\\'s goals, and are consistent with our coding standards.\\n\\n#### Purpose of Code Reviews\\n\\n[Permalink: Purpose of Code Reviews](#purpose-of-code-reviews)\\n\\n- Maintain Code Quality: Ensure that the codebase remains clean, readable, and maintainable.\\n- Knowledge Sharing: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n- Bug Prevention: Catch potential bugs and issues before they are merged into the main branch.\\n- Consistency: Ensure consistency in style, design patterns, and architecture across the project.\\n\\n#### Review Process Overview\\n\\n[Permalink: Review Process Overview](#review-process-overview)\\n\\n- Reviewers should check the code for functionality, readability, consistency, and compliance with the project’s coding standards.\\n- If changes are necessary, the reviewer should leave constructive feedback.\\n- The contributor addresses feedback and updates the PR.\\n- The reviewer re-reviews the updated code.\\n- Once the code is approved by at least two reviewer, it can be merged into the main branch.\\n- Merging should be done by a maintainer or an authorized contributor.\\n\\n#### Code Review Checklist\\n\\n[Permalink: Code Review Checklist](#code-review-checklist)\\n\\n- Functionality\\n - Correctness: Does the code perform the intended task? Are edge cases handled?\\n - Testing: Is there sufficient test coverage? Do all tests pass?\\n - Security: Are there any security vulnerabilities introduced by the change?\\n - Performance: Does the code introduce any performance regressions?\\n- Code Quality\\n - Readability: Is the code easy to read and understand? Is it well-commented where necessary?\\n - Maintainability: Is the code structured in a way that makes future changes easy?\\n - Style: Does the code follow the project’s style guidelines?\\n Currently we use Ruff for format check and take Google Python Style Guide as reference.\\n - Documentation: Are public methods, classes, and any complex logic well-documented?\\n- Design\\n - Consistency: Does the code follow established design patterns and project architecture?\\n - Modularity: Are the changes modular and self-contained? Does the code avoid unnecessary duplication?\\n - Dependencies: Are dependencies minimized and used appropriately?\\n\\n#### Reviewer Responsibilities\\n\\n[Permalink: Reviewer Responsibilities](#reviewer-responsibilities)\\n\\n- Timely Reviews: Reviewers should strive to review PRs promptly to keep the project moving.\\n- Constructive Feedback: Provide feedback that is clear, constructive, and aimed at helping the contributor improve.\\n- Collaboration: Work with the contributor to address any issues and ensure the final code meets the project’s standards.\\n- Approvals: Only approve code that you are confident meets all the necessary criteria.\\n\\n#### Common Pitfalls\\n\\n[Permalink: Common Pitfalls](#common-pitfalls)\\n\\n- Large PRs: Avoid submitting PRs that are too large. Break down your changes into smaller, manageable PRs if possible.\\n- Ignoring Feedback: Address all feedback provided by reviewers, even if you don’t agree with it—discuss it instead of ignoring it.\\n- Rushed Reviews: Avoid rushing through reviews. Taking the time to thoroughly review code is critical to maintaining quality.\\n\\nCode reviews are an essential part of maintaining the quality and integrity of our open source project. By following these guidelines, we can ensure that CAMEL remains robust, secure, and easy to maintain, while also fostering a collaborative and welcoming community.\\n\\n### Guideline for Writing Docstrings\\n\\n[Permalink: Guideline for Writing Docstrings](#guideline-for-writing-docstrings)\\n\\nThis guideline will help you write clear, concise, and structured docstrings for contributing to `CAMEL`.\\n\\n#### 1\\\\. Use the Triple-Quoted String with `r\"\"\"` (Raw String)\\n\\n[Permalink: 1. Use the Triple-Quoted String with r\"\"\" (Raw String)](#1-use-the-triple-quoted-string-with-r-raw-string)\\n\\nBegin the docstring with `r\"\"\"` to indicate a raw docstring. This prevents any issues with special characters and ensures consistent formatting, especially in documentation tools like Sphinx.\\n\\n#### 2\\\\. Provide a Brief Class or Method Description\\n\\n[Permalink: 2. Provide a Brief Class or Method Description](#2-provide-a-brief-class-or-method-description)\\n\\n- Start with a concise summary of the purpose and functionality.\\n- Keep each line under `79` characters.\\n- The summary should start on the first line without a linebreak.\\n\\nExample:\\n\\n```\\nr\"\"\"Class for managing conversations of CAMEL Chat Agents.\\n\"\"\"\\n```\\n\\n#### 3\\\\. Document Parameters in the Args Section\\n\\n[Permalink: 3. Document Parameters in the Args Section](#3-document-parameters-in-the-args-section)\\n\\n- Use an `Args`: section for documenting constructor or function parameters.\\n- Maintain the `79`-character limit for each line, and indent continuation lines by 4 spaces.\\n- Follow this structure:\\n - Parameter Name: Match the function signature.\\n - Type: Include the type (e.g., `int`, `str`, custom types like `BaseModelBackend`).\\n - Description: Provide a brief explanation of the parameter\\'s role.\\n - Default Value: Use ( `default: :obj:`) to indicate default values.\\n\\nExample:\\n\\n```\\nArgs:\\n system_message (BaseMessage): The system message for initializing\\n the agent\\'s conversation context.\\n model (BaseModelBackend, optional): The model backend to use for\\n response generation. Defaults to :obj:`OpenAIModel` with\\n `GPT_4O_MINI`. (default: :obj:`OpenAIModel` with `GPT_4O_MINI`)\\n```\\n\\n### Principles 🛡️\\n\\n[Permalink: Principles 🛡️](#principles-️)\\n\\n#### Naming Principle: Avoid Abbreviations in Naming\\n\\n[Permalink: Naming Principle: Avoid Abbreviations in Naming](#naming-principle-avoid-abbreviations-in-naming)\\n\\n- Abbreviations can lead to ambiguity, especially since variable names and code in CAMEL are directly used by agents.\\n- Use clear, descriptive names that convey meaning without requiring additional explanation. This improves both human readability and the agent\\'s ability to interpret the code.\\n\\nExamples:\\n\\n- Bad: msg\\\\_win\\\\_sz\\n- Good: message\\\\_window\\\\_size\\n\\nBy adhering to this principle, we ensure that CAMEL remains accessible and unambiguous for both developers and AI agents.\\n\\n#### Logging Principle: Use `logger` Instead of `print`\\n\\n[Permalink: Logging Principle: Use logger Instead of print](#logging-principle-use-logger-instead-of-print)\\n\\nAvoid using `print` for output. Use Python\\'s `logging` module ( `logger`) to ensure consistent, configurable, and professional logging.\\n\\nExamples:\\n\\n- Bad:\\n\\n\\n\\n```\\nprint(\"Process started\")\\nprint(f\"User input: {user_input}\")\\n```\\n\\n- Good:\\n\\n\\n\\n```\\nArgs:\\nlogger.info(\"Process started\")\\nlogger.debug(f\"User input: {user_input}\")\\n```\\n\\n\\n### Board Item Create Workflow 🛠️\\n\\n[Permalink: Board Item Create Workflow 🛠️](#board-item-create-workflow-️)\\n\\nAt CAMEL, we manage our project through a structured workflow that ensures efficiency and clarity in our development process. Our workflow includes stages for issue creation and pull requests (PRs), sprint planning, and reviews.\\n\\n#### Issue Item Stage:\\n\\n[Permalink: Issue Item Stage:](#issue-item-stage)\\n\\nOur [issues](https://github.com/camel-ai/camel/issues) page on GitHub is regularly updated with bugs, improvements, and feature requests. We have a handy set of labels to help you sort through and find issues that interest you. Feel free to use these labels to keep things organized.\\n\\nWhen you start working on an issue, please assign it to yourself so that others know it\\'s being taken care of.\\n\\nWhen creating a new issue, it\\'s best to keep it focused on a specific bug, improvement, or feature. If two issues are related or blocking each other, it\\'s better to link them instead of merging them into one.\\n\\nWe do our best to keep these issues up to date, but considering the fast-paced nature of this field, some may become outdated. If you come across any such issues, please give us a heads-up so we can address them promptly. 👀\\n\\nHere’s how to engage with our issues effectively:\\n\\n- Go to [GitHub Issues](https://github.com/camel-ai/camel/issues), create a new issue, choose the category, and fill in the required information.\\n- Ensure the issue has a proper title and update the Assignees, Labels, Projects (select Backlog status), Development, and Milestones.\\n- Discuss the issue during team meetings, then move it to the Analysis Done column.\\n- At the beginning of each sprint, share the analyzed issue and move it to the Sprint Planned column if you are going to work on this issue in the sprint.\\n\\n#### Pull Request Item Stage:\\n\\n[Permalink: Pull Request Item Stage:](#pull-request-item-stage)\\n\\n- Go to [GitHub Pulls](https://github.com/camel-ai/camel/pulls), create a new PR, choose the branch, and fill in the information, linking the related issue.\\n- Ensure the PR has a proper title and update the Reviewers (convert to draft), Assignees, Labels, Projects (select Developing status), Development, and Milestones.\\n- If the PR is related to a roadmap, link the roadmap to the PR.\\n- Move the PR item through the stages: Developing, Stuck, Reviewing (click ready for review), Merged. The linked issue will close automatically when the PR is merged.\\n\\n**Labeling PRs:**\\n\\n- **feat**: For new features (e.g., `feat: Add new AI model`)\\n- **fix**: For bug fixes (e.g., `fix: Resolve memory leak issue`)\\n- **docs**: For documentation updates (e.g., `docs: Update contribution guidelines`)\\n- **style**: For code style changes (e.g., `style: Refactor code formatting`)\\n- **refactor**: For code refactoring (e.g., `refactor: Optimize data processing`)\\n- **test**: For adding or updating tests (e.g., `test: Add unit tests for new feature`)\\n- **chore**: For maintenance tasks (e.g., `chore: Update dependencies`)\\n\\n### Sprint Planning & Review 🎯\\n\\n[Permalink: Sprint Planning & Review 🎯](#sprint-planning--review-)\\n\\n#### Definition\\n\\n[Permalink: Definition](#definition)\\n\\nSprint planning defines what can be delivered in the sprint and how it will be achieved. Sprint review allows stakeholders to review and provide feedback on recent work.\\n\\n#### Practice\\n\\n[Permalink: Practice](#practice)\\n\\n- **Sprint Duration**: Two weeks for development, one week for review.\\n- **Sprint Planning & Review**: Conducted biweekly during the dev meeting (around 30 minutes).\\n- **Planning**: Founder highlights the sprint goal and key points; developers pick items for the sprint.\\n- **Review**: Feedback on delivered features and identification of improvement areas.\\n\\n### Getting Help 🆘\\n\\n[Permalink: Getting Help 🆘](#getting-help-)\\n\\nOur aim is to make the developer setup as straightforward as possible. If you encounter any challenges during the setup process, don\\'t hesitate to reach out to a maintainer. We\\'re here to assist you and ensure that the experience is smooth not just for you but also for future contributors. 😊\\n\\nIn line with this, we do have specific guidelines for code linting, formatting, and documentation in the codebase. If you find these requirements difficult or even just bothersome to work with, please feel free to get in touch with a maintainer. We don\\'t want these guidelines to hinder the integration of good code into the codebase, so we\\'re more than happy to provide support and find a solution that works for you. 🤝\\n\\n## Quick Start 🚀\\n\\n[Permalink: Quick Start 🚀](#quick-start-)\\n\\nTo get started with CAMEL, follow these steps:\\n\\n```\\n# Clone github repo\\ngit clone https://github.com/camel-ai/camel.git\\n\\n# Change directory into project directory\\ncd camel\\n\\n# Activate camel virtual environment\\npoetry shell\\n\\n# Install camel from source\\npoetry install --with dev,docs -E all # (Suggested for developers, needed to pass all tests)\\n\\n# The following command installs a pre-commit hook into the local git repo,\\n# so every commit gets auto-formatted and linted.\\npre-commit install\\n\\n# Run camel\\'s pre-commit before push\\npre-commit run --all-files\\n\\n# Run camel\\'s unit tests\\npytest test\\n\\n# Exit the virtual environment\\nexit\\n```\\n\\nThese commands will install all the necessary dependencies for running the package, examples, linting, formatting, tests, and coverage.\\n\\nTo verify that everything is set up correctly, run `pytest .` This will ensure that all tests pass successfully. ✅\\n\\nTip\\n\\nYou need to config different API Keys as environment variables to pass all tests.\\n\\n## Common Actions 🔄\\n\\n[Permalink: Common Actions 🔄](#common-actions-)\\n\\n### Update dependencies\\n\\n[Permalink: Update dependencies](#update-dependencies)\\n\\nWhenever you add, update, or delete any dependencies in `pyproject.toml`, please run `poetry lock` to synchronize the dependencies with the lock file.\\n\\n### Linting & Formatting ✨\\n\\n[Permalink: Linting & Formatting ✨](#linting--formatting-)\\n\\n```\\npoetry run ruff check .\\npoetry run ruff format .\\n```\\n\\nFor extra validation of type hints:\\n\\n```\\nmypy --namespace-packages -p camel\\nmypy --namespace-packages -p test\\nmypy --namespace-packages -p examples\\nmypy --namespace-packages -p apps\\n```\\n\\n### Coverage 📊\\n\\n[Permalink: Coverage 📊](#coverage-)\\n\\nCode coverage measures the extent to which unit tests cover the code, helping identify both robust and less robust areas of the codebase.\\n\\nTo generate a report showing the current code coverage, execute one of the following commands.\\n\\nTo include all source files into coverage:\\n\\n```\\ncoverage erase\\ncoverage run --source=. -m pytest .\\ncoverage html\\n# Open htmlcov/index.html\\n```\\n\\nTo include only tested files:\\n\\n```\\npytest --cov --cov-report=html\\n```\\n\\nThe coverage report will be generated at `htmlcov/index.html`.\\n\\n### Tests 🧪\\n\\n[Permalink: Tests 🧪](#tests-)\\n\\nUnit tests cover modular logic that doesn\\'t require calls to outside APIs. Currently, the test setup requires an OpenAI API key to test the framework, making them resemble integration tests.\\n\\nTo run all tests including those that use OpenAI API, use the following command:\\n\\n```\\npytest .\\n```\\n\\nTo quickly run only local isolated unit and integration tests:\\n\\n```\\npytest --fast-test-mode .\\n```\\n\\nIf you\\'re developing with VSCode, make sure to create a `.env` file in the repository root and include your OpenAI API key:\\n\\n```\\nOPENAI_API_KEY=sk-XXXXXXXX\\nOPENAI_API_BASE_URL=https://XXXXXXXX (Should you utilize an OpenAI proxy service, kindly specify this)\\n\\n```\\n\\n## Documentation 📚\\n\\n[Permalink: Documentation 📚](#documentation-)\\n\\n### Contribute to Documentation 📝\\n\\n[Permalink: Contribute to Documentation 📝](#contribute-to-documentation-)\\n\\nThe documentation is primarily generated automatically by [Sphinx](https://www.sphinx-doc.org/en/master/) using the code.\\n\\nWe kindly request that you provide comprehensive documentation for all classes and methods to ensure high-quality documentation coverage.\\n\\n### Build Documentation Locally 🛠️\\n\\n[Permalink: Build Documentation Locally 🛠️](#build-documentation-locally-️)\\n\\nTo build the documentation locally, follow these steps:\\n\\n```\\ncd docs\\nmake html\\n```\\n\\nMore guidelines about building and hosting documentations locally can be found [here](https://github.com/camel-ai/camel/blob/master/docs/README.md).\\n\\n## Versioning and Release 🚀\\n\\n[Permalink: Versioning and Release 🚀](#versioning-and-release-)\\n\\nAs of now, CAMEL is actively in development and just published preview version to PyPI.\\n\\nCAMEL follows the [semver](https://semver.org/) versioning standard. As pre-1.0 software, even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4). Currently, the major version is 0, and the minor version is incremented. Releases are made once the maintainers feel that a significant body of changes has accumulated.\\n\\n## License 📜\\n\\n[Permalink: License 📜](#license-)\\n\\nThe source code of the CAMEL project is licensed under Apache 2.0. Your contributed code will be also licensed under Apache 2.0 by default. To add license to you code, you can manually copy-paste it from `license_template.txt` to the head of your files or run the `update_license.py` script to automate the process:\\n\\n```\\npython licenses/update_license.py . licenses/license_template.txt\\n```\\n\\nThis script will add licenses to all the `*.py` files or update the licenses if the existing licenses are not the same as `license_template.txt`.\\n\\n## Giving Credit 🎉\\n\\n[Permalink: Giving Credit 🎉](#giving-credit-)\\n\\nIf your contribution has been included in a release, we\\'d love to give you credit on Twitter, but only if you\\'re comfortable with it!\\n\\nIf you have a Twitter account that you would like us to mention, please let us know either in the pull request or through another communication method. We want to make sure you receive proper recognition for your valuable contributions. 😄\\n\\nYou can’t perform that action at this time.\\n\\nHere are some example items for reference:\\n{\"instruction\":\"Explain the process for sprint planning and review in CAMEL.\",\"input\":\"\",\"output\":\"The process for sprint planning and review in CAMEL includes:\\\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"}\\n{\"instruction\":\"Explain the significance of the `coverage` tool in CAMEL.\",\"input\":\"\",\"output\":\"The `coverage` tool in CAMEL is significant because it helps:\\\\n1. **Measure Test Coverage**: Assess the extent to which unit tests cover the codebase.\\\\n2. **Identify Weak Areas**: Highlight parts of the code that lack sufficient testing, guiding improvements.\\\\n3. **Maintain Code Quality**: Ensure robust testing practices are in place to maintain code quality.\"}\\n{\"instruction\":\"How can contributors ensure effective communication in the CAMEL project?\",\"input\":\"\",\"output\":\"Contributors can ensure effective communication in the CAMEL project by:\\\\n1. **Utilizing Communication Channels**: Actively use Discord, Slack, and other platforms for discussions and updates.\\\\n2. **Being Clear and Concise**: Communicate ideas clearly and concisely to avoid misunderstandings.\\\\n3. **Encouraging Feedback**: Foster an environment where feedback is welcomed and constructive, promoting open dialogue.\"}\\n{\"instruction\":\"What are the best practices for writing effective commit messages in CAMEL?\",\"input\":\"\",\"output\":\"Best practices for writing effective commit messages in CAMEL include:\\\\n1. **Use Imperative Mood**: Write messages in the imperative mood (e.g., \\'Add feature\\' instead of \\'Added feature\\').\\\\n2. **Be Concise**: Keep messages clear and to the point, summarizing the changes made.\\\\n3. **Reference Issues**: Link to any related issues in the commit message for clarity.\"}\\n{\"instruction\":\"How can contributors ensure that their contributions are recognized?\",\"input\":\"\",\"output\":\"Contributors can ensure recognition of their contributions by:\\\\n1. Mentioning their achievements in the pull request comments.\\\\n2. Providing their social media handles if they wish to receive public acknowledgment.\"}\\n{\"instruction\":\"What practices should be followed when adding unit tests?\",\"input\":\"\",\"output\":\"When adding unit tests, contributors should follow these practices:\\\\n1. **Test Coverage**: Ensure tests cover all relevant functionality, including edge cases.\\\\n2. **Isolation**: Keep tests isolated from external systems to ensure reliability.\\\\n3. **Descriptive Names**: Use clear and descriptive names for test functions to indicate their purpose.\"}\\n\\n Generate 50 AlpacaItems. The first should start numbering at 251.'}]\n", - "Generated 50 items\n", - "[AlpacaItem(instruction='What are the steps to contribute to the CAMEL project?', input='', output='To contribute to the CAMEL project, follow these steps:\\n1. **Fork the Repository**: Create a personal copy of the CAMEL repository on GitHub.\\n2. **Clone the Forked Repo**: Use `git clone` to download your forked version to your local machine.\\n3. **Create a Branch**: Make a new branch for your changes using `git checkout -b `.\\n4. **Make Changes**: Implement your features or bug fixes in the code.\\n5. **Commit Changes**: Use `git commit` to save your changes with a descriptive message.\\n6. **Push Changes**: Push your branch back to your GitHub fork using `git push origin `.\\n7. **Open a Pull Request**: Go to the original CAMEL repository and open a pull request to propose your changes.'), AlpacaItem(instruction='What is the purpose of code reviews in CAMEL?', input='', output='The purpose of code reviews in CAMEL includes:\\n1. **Maintain Code Quality**: Ensure the codebase remains clean, readable, and maintainable.\\n2. **Knowledge Sharing**: Facilitate knowledge sharing among contributors and assist new contributors in learning best practices.\\n3. **Bug Prevention**: Catch potential bugs and issues before they are merged into the main branch.\\n4. **Consistency**: Ensure consistency in style, design patterns, and architecture across the project.'), AlpacaItem(instruction='Describe the guidelines for writing docstrings in CAMEL.', input='', output='The guidelines for writing docstrings in CAMEL are as follows:\\n1. **Use Triple-Quoted String**: Begin with `r\"\"\"` to indicate a raw docstring, preventing issues with special characters.\\n2. **Brief Description**: Provide a concise summary of the class or method\\'s purpose and functionality.\\n3. **Document Parameters**: Use an `Args:` section to document parameters, including their type, description, and default value.'), AlpacaItem(instruction='What are the communication channels available for CAMEL contributors?', input='', output='The communication channels available for CAMEL contributors include:\\n1. **Discord**: Join the CAMEL Discord server for real-time communication.\\n2. **WeChat**: Scan the provided QR code to connect with the CAMEL community on WeChat.\\n3. **Slack**: Join the CAMEL Slack workspace for discussions and updates.'), AlpacaItem(instruction='How should contributions to documentation be handled in CAMEL?', input='', output='Contributions to documentation in CAMEL should be handled by providing comprehensive documentation for all classes and methods. The documentation is primarily generated using Sphinx, so ensure that your contributions are clear and improve the overall quality.'), AlpacaItem(instruction='What is the workflow for creating a board item in CAMEL?', input='', output=\"The workflow for creating a board item in CAMEL involves:\\n1. **Issue Creation**: Create a new issue on the GitHub Issues page, ensuring it has a proper title and description.\\n2. **Assigning Issues**: Assign the issue to yourself to indicate it's being worked on.\\n3. **Linking Issues**: If related to other issues, link them instead of merging into one.\\n4. **Sprint Planning**: Discuss the issue during team meetings and move it to the appropriate status column.\"), AlpacaItem(instruction='Explain the significance of logging over print statements in CAMEL.', input='', output='In CAMEL, using logging (`logger`) instead of print statements is significant because:\\n1. **Consistency**: Logging provides a consistent approach to capturing runtime information.\\n2. **Configurability**: The logging level can be configured, allowing for different levels of detail in output.\\n3. **Professionalism**: It ensures a more professional method of debugging and monitoring applications.'), AlpacaItem(instruction='What steps should be taken if a contributor encounters issues during setup?', input='', output='If a contributor encounters issues during setup, they should:\\n1. **Reach Out**: Contact a maintainer for assistance with the setup process.\\n2. **Seek Guidance**: Ask about specific guidelines for code linting, formatting, and documentation.\\n3. **Provide Feedback**: Let maintainers know if the guidelines are difficult, so they can work to find a solution.'), AlpacaItem(instruction='What is the recommended approach for sprint planning in CAMEL?', input='', output='The recommended approach for sprint planning in CAMEL includes:\\n1. **Duration**: Each sprint lasts two weeks for development and one week for review.\\n2. **Biweekly Meetings**: Conduct planning meetings biweekly to discuss goals and select items for the sprint.\\n3. **Feedback Loop**: Incorporate feedback from stakeholders during the review phase to improve future sprints.'), AlpacaItem(instruction='How should pull requests be labeled in CAMEL?', input='', output='Pull requests in CAMEL should be labeled according to their purpose:\\n- **feat**: For new features.\\n- **fix**: For bug fixes.\\n- **docs**: For documentation updates.\\n- **style**: For code style changes.\\n- **refactor**: For code refactoring.\\n- **test**: For adding or updating tests.\\n- **chore**: For maintenance tasks.'), AlpacaItem(instruction='What is the process for running unit tests in CAMEL?', input='', output='To run unit tests in CAMEL, execute the following command:\\n```\\npytest .\\n```\\nThis command will run all tests, including those that use external APIs. For isolating local unit tests, use:\\n```\\npytest --fast-test-mode .\\n```'), AlpacaItem(instruction='Describe the process for updating dependencies in CAMEL.', input='', output='To update dependencies in CAMEL, follow these steps:\\n1. Modify the `pyproject.toml` file to add, update, or delete dependencies.\\n2. Run `poetry lock` to synchronize the dependencies with the lock file.'), AlpacaItem(instruction='What are the principles for naming variables in CAMEL?', input='', output='The principles for naming variables in CAMEL include:\\n1. **Avoid Abbreviations**: Use clear, descriptive names that convey meaning without requiring additional explanation.\\n2. **Clarity**: Ensure that variable names are understandable to both developers and AI agents, improving both human readability and code interpretation.'), AlpacaItem(instruction='What guidelines should be followed when conducting code reviews?', input='', output='When conducting code reviews in CAMEL, follow these guidelines:\\n1. **Timely Reviews**: Review pull requests promptly to maintain project momentum.\\n2. **Constructive Feedback**: Provide clear, constructive feedback aimed at helping the contributor improve.\\n3. **Collaboration**: Work with the contributor to address any issues and ensure the final code meets standards.'), AlpacaItem(instruction='How to build documentation locally for CAMEL?', input='', output='To build documentation locally for CAMEL, navigate to the `docs` directory and run:\\n```\\nmake html\\n```\\nThis command will generate the HTML documentation files.'), AlpacaItem(instruction='What is the importance of the `Args:` section in docstrings?', input='', output='The `Args:` section in docstrings is important because it clearly documents the parameters of a function or class, including their names, types, descriptions, and default values. This helps users understand how to use the function or class correctly.'), AlpacaItem(instruction='What is the significance of using `pytest` for testing in CAMEL?', input='', output='Using `pytest` for testing in CAMEL is significant because:\\n1. **Ease of Use**: `pytest` provides a simple syntax for writing tests.\\n2. **Rich Features**: It offers powerful features such as fixtures, parameterization, and extensive plugins.\\n3. **Integration**: It integrates well with other tools and frameworks, making it suitable for both unit and integration testing.'), AlpacaItem(instruction='What steps are involved in the code review checklist?', input='', output='The code review checklist in CAMEL includes the following steps:\\n1. **Functionality**: Check for correctness and edge case handling.\\n2. **Testing**: Ensure sufficient test coverage and that all tests pass.\\n3. **Code Quality**: Assess readability, maintainability, and adherence to style guidelines.\\n4. **Documentation**: Verify that complex logic and public methods are well-documented.'), AlpacaItem(instruction='How can contributors ensure their code passes formatting checks?', input='', output=\"Contributors can ensure their code passes formatting checks by:\\n1. Running `poetry run ruff check .` to check for formatting issues.\\n2. Using `poetry run ruff format .` to automatically format the code according to the project's style guidelines.\"), AlpacaItem(instruction='What are the common pitfalls to avoid during code reviews?', input='', output='Common pitfalls to avoid during code reviews include:\\n1. **Large Pull Requests**: Avoid submitting overly large PRs; break them into smaller, manageable pieces.\\n2. **Ignoring Feedback**: Address all feedback provided by reviewers; discuss rather than ignore.\\n3. **Rushed Reviews**: Take the time to thoroughly review code to maintain quality.'), AlpacaItem(instruction=\"What does the 'Common Actions' section in CAMEL documentation cover?\", input='', output=\"The 'Common Actions' section in CAMEL documentation covers various routine tasks, including:\\n1. **Updating Dependencies**: Instructions for managing project dependencies.\\n2. **Linting & Formatting**: Guidelines for checking and formatting code.\\n3. **Coverage**: How to measure code coverage for tests.\\n4. **Tests**: Instructions for running different types of tests.\"), AlpacaItem(instruction='What are the recommended practices for sprint review in CAMEL?', input='', output='Recommended practices for sprint review in CAMEL include:\\n1. **Feedback Collection**: Gather feedback from stakeholders on delivered features.\\n2. **Improvement Identification**: Identify areas for improvement in both processes and product.\\n3. **Document Outcomes**: Ensure outcomes of the review are documented for future reference.'), AlpacaItem(instruction='What is the role of the CAMEL community in the development process?', input='', output='The CAMEL community plays a crucial role in the development process by:\\n1. **Encouraging Contributions**: Welcoming diverse contributions from developers.\\n2. **Providing Support**: Offering assistance and guidance to new contributors.\\n3. **Fostering Collaboration**: Facilitating communication and collaboration among contributors.'), AlpacaItem(instruction='How can contributors ensure their contributions are recognized?', input='', output='Contributors can ensure their contributions are recognized by:\\n1. **Mentioning Twitter Handles**: Informing maintainers if they wish to be credited on Twitter.\\n2. **Participating Actively**: Engaging consistently in discussions and contributions to the project.'), AlpacaItem(instruction='What are the benefits of joining the CAMEL Discord community?', input='', output='Joining the CAMEL Discord community offers several benefits:\\n1. **Real-Time Communication**: Engage with other contributors and maintainers in real-time.\\n2. **Collaboration Opportunities**: Find potential collaborators for projects and features.\\n3. **Support Network**: Access a support network for troubleshooting and sharing knowledge.'), AlpacaItem(instruction='What should be included in the documentation for new features?', input='', output='The documentation for new features should include:\\n1. **Feature Description**: A clear explanation of what the feature does and its purpose.\\n2. **Usage Examples**: Practical examples of how to use the feature in code.\\n3. **Related Documentation**: Links to any related documentation or resources for further reading.'), AlpacaItem(instruction='What are the steps to schedule an introduction call for CAMEL?', input='', output='To schedule an introduction call for CAMEL, follow these steps:\\n1. **Choose Language**: Select the appropriate link based on your language preference (English or Chinese).\\n2. **Select Date and Time**: Pick a suitable date and time from the available slots.\\n3. **Provide Information**: Fill in any required information on the scheduling platform.'), AlpacaItem(instruction='What practices should be followed when adding unit tests?', input='', output='When adding unit tests, contributors should follow these practices:\\n1. **Test Coverage**: Ensure tests cover all relevant functionality, including edge cases.\\n2. **Isolation**: Keep tests isolated from external systems to ensure reliability.\\n3. **Descriptive Names**: Use clear and descriptive names for test functions to indicate their purpose.'), AlpacaItem(instruction='How can contributors manage their issues effectively in CAMEL?', input='', output='Contributors can manage their issues effectively in CAMEL by:\\n1. **Assigning Issues**: Assign issues to themselves when they start working on them.\\n2. **Linking Related Issues**: Link related issues instead of merging them into one for clarity.\\n3. **Keeping Issues Updated**: Regularly update the status of issues to reflect current progress.'), AlpacaItem(instruction='What is the purpose of the `logger` in CAMEL?', input='', output='The purpose of the `logger` in CAMEL is to provide a standardized method for tracking and recording application events, which includes:\\n1. **Debugging**: Assisting in debugging by logging important runtime information.\\n2. **Monitoring**: Offering insights into application behavior and performance.\\n3. **Configurability**: Allowing configurable logging levels to control the amount of logged information.'), AlpacaItem(instruction='Explain the significance of the `pre-commit` hook in CAMEL.', input='', output='The significance of the `pre-commit` hook in CAMEL is that it:\\n1. **Automates Checks**: Automatically runs formatting and linting checks before each commit.\\n2. **Ensures Code Quality**: Helps maintain a consistent code style and quality across contributions.\\n3. **Saves Time**: Reduces the need for manual checks, streamlining the development workflow.'), AlpacaItem(instruction='What should contributors do if they find outdated issues in CAMEL?', input='', output='If contributors find outdated issues in CAMEL, they should:\\n1. **Notify Maintainers**: Give a heads-up to maintainers so they can review and address the issue.\\n2. **Comment on the Issue**: Add a comment on the issue to indicate its status and suggest updates.'), AlpacaItem(instruction=\"How can contributors ensure compliance with the project's coding standards?\", input='', output=\"Contributors can ensure compliance with the project's coding standards by:\\n1. **Reviewing Guidelines**: Familiarizing themselves with the project's coding standards and best practices.\\n2. **Using Linting Tools**: Running linting tools such as `ruff` to check for style issues.\\n3. **Participating in Code Reviews**: Engaging in code reviews to learn from others and share knowledge about coding standards.\"), AlpacaItem(instruction='What is the role of the `test` directory in CAMEL?', input='', output='The role of the `test` directory in CAMEL is to house all unit tests for the project, which includes:\\n1. **Organizing Tests**: Keeping tests organized for easy access and management.\\n2. **Facilitating Testing**: Allowing contributors to run tests easily to verify functionality and catch bugs.'), AlpacaItem(instruction='What should be done before merging a pull request in CAMEL?', input='', output='Before merging a pull request in CAMEL, the following steps should be taken:\\n1. **Review**: Ensure the code has been reviewed and approved by at least two reviewers.\\n2. **Check Tests**: Confirm that all tests pass successfully.\\n3. **Verify Documentation**: Ensure that any relevant documentation has been updated accordingly.'), AlpacaItem(instruction='What is the process for running coverage reports in CAMEL?', input='', output='The process for running coverage reports in CAMEL involves:\\n1. **Erase Previous Coverage**: Run `coverage erase` to clear previous coverage data.\\n2. **Run Tests with Coverage**: Execute `coverage run --source=. -m pytest .` to run tests while collecting coverage data.\\n3. **Generate Report**: Use `coverage html` to create an HTML report, which can be viewed in a browser.'), AlpacaItem(instruction='What are the key components of the CAMEL community?', input='', output='The key components of the CAMEL community include:\\n1. **Contributors**: Individuals who contribute code, documentation, and support.\\n2. **Maintainers**: Experienced contributors who oversee project development and guide the community.\\n3. **Users**: Individuals who use the CAMEL project and provide feedback or report issues.'), AlpacaItem(instruction='How can contributors effectively communicate updates about their pull requests?', input='', output='Contributors can effectively communicate updates about their pull requests by:\\n1. **Commenting**: Adding comments on the pull request to describe changes made.\\n2. **Labeling**: Using appropriate labels to indicate the status of the pull request.\\n3. **Engaging with Reviewers**: Actively engaging with reviewers to address feedback and questions.'), AlpacaItem(instruction='What should contributors do if they need to change an already submitted pull request?', input='', output='If contributors need to change an already submitted pull request, they should:\\n1. **Make Changes Locally**: Update their local branch with the necessary changes.\\n2. **Push Changes**: Push the updated branch to their GitHub fork, which will automatically update the pull request.\\n3. **Notify Reviewers**: Optionally, leave a comment on the pull request to notify reviewers about the changes.'), AlpacaItem(instruction='What guidelines should be followed when creating new issues in CAMEL?', input='', output='When creating new issues in CAMEL, follow these guidelines:\\n1. **Clear Title**: Provide a clear and descriptive title for the issue.\\n2. **Detailed Description**: Include a detailed description of the problem or feature request.\\n3. **Assign Labels**: Use appropriate labels to categorize the issue correctly.'), AlpacaItem(instruction='What is the importance of maintaining a clean and readable codebase?', input='', output='Maintaining a clean and readable codebase is important because:\\n1. **Ease of Maintenance**: It simplifies future maintenance and updates to the code.\\n2. **Collaboration**: It facilitates collaboration among multiple contributors by making the code easier to understand.\\n3. **Bug Reduction**: Clean code helps reduce the likelihood of bugs and errors.'), AlpacaItem(instruction=\"How can contributors participate in CAMEL's developer meetings?\", input='', output=\"Contributors can participate in CAMEL's developer meetings by:\\n1. **Joining Scheduled Meetings**: Attending the meetings at the designated time for their language group.\\n2. **Contributing to Discussions**: Actively engaging in discussions and providing input on project decisions.\"), AlpacaItem(instruction='What is the function of the `chore` label in pull requests?', input='', output=\"The `chore` label in pull requests is used to categorize maintenance tasks that do not affect the application's functionality, such as:\\n1. **Dependency Updates**: Updating project dependencies.\\n2. **Configuration Changes**: Modifying configuration files or settings.\"), AlpacaItem(instruction='What should contributors do after their pull request is merged?', input='', output='After their pull request is merged, contributors should:\\n1. **Clean Up Branches**: Delete the branch used for the pull request to keep the repository organized.\\n2. **Monitor for Feedback**: Stay engaged to monitor any feedback or issues that may arise from the merged changes.'), AlpacaItem(instruction='Explain the significance of the `coverage` tool in CAMEL.', input='', output='The `coverage` tool in CAMEL is significant because it helps:\\n1. **Measure Test Coverage**: Assess the extent to which unit tests cover the codebase.\\n2. **Identify Weak Areas**: Highlight parts of the code that lack sufficient testing, guiding improvements.\\n3. **Maintain Code Quality**: Ensure robust testing practices are in place to maintain code quality.'), AlpacaItem(instruction='What is the process for adding a new feature to CAMEL?', input='', output='The process for adding a new feature to CAMEL includes:\\n1. **Feature Proposal**: Discuss the proposed feature with the community or maintainers.\\n2. **Implementation**: Develop the feature while adhering to coding standards and guidelines.\\n3. **Documentation and Tests**: Update documentation and add relevant tests for the feature.\\n4. **Open a Pull Request**: Submit the changes through a pull request for review.'), AlpacaItem(instruction='What are the best practices for using Git in CAMEL?', input='', output='Best practices for using Git in CAMEL include:\\n1. **Frequent Commits**: Make frequent commits with clear messages to track changes effectively.\\n2. **Branching Strategy**: Use branches for features, fixes, and experiments to keep the main branch stable.\\n3. **Pull Requests**: Always use pull requests to propose changes and facilitate code reviews.'), AlpacaItem(instruction='How should contributors handle conflicts in pull requests?', input='', output='Contributors should handle conflicts in pull requests by:\\n1. **Identifying Conflicts**: Reviewing the conflict messages provided by Git.\\n2. **Resolving Conflicts Locally**: Pulling the latest changes from the main branch and resolving conflicts in their local environment.\\n3. **Pushing Resolved Changes**: Once resolved, pushing the changes back to the branch to update the pull request.'), AlpacaItem(instruction='What is the importance of using descriptive commit messages?', input='', output='Using descriptive commit messages is important because:\\n1. **Clarity**: They provide clarity on what changes were made and why.\\n2. **History Tracking**: They help in tracking the history of changes over time, making it easier to understand the evolution of the codebase.\\n3. **Collaboration**: They facilitate better collaboration by informing other contributors about the context of changes.'), AlpacaItem(instruction='What is the role of the CAMEL maintainers?', input='', output='The role of the CAMEL maintainers includes:\\n1. **Overseeing Development**: Guiding the overall development process and ensuring project goals are met.\\n2. **Reviewing Contributions**: Reviewing pull requests and providing feedback to contributors.\\n3. **Community Engagement**: Engaging with the community to foster participation and support contributors.'), AlpacaItem(instruction='What should a contributor do to get started with CAMEL?', input='', output='To get started with CAMEL, a contributor should:\\n1. **Clone the Repository**: Use the command `git clone https://github.com/camel-ai/camel.git`.\\n2. **Change Directory**: Navigate to the project directory using `cd camel`.\\n3. **Activate Virtual Environment**: Run `poetry shell` to activate the virtual environment.\\n4. **Install Dependencies**: Use `poetry install --with dev,docs -E all` to install all necessary dependencies.\\n5. **Set Up Pre-Commit Hooks**: Run `pre-commit install` to install Git hooks for auto-formatting and linting.\\n6. **Run Tests**: Execute `pytest test` to ensure all tests pass.'), AlpacaItem(instruction='How can a contributor effectively engage with issues in CAMEL?', input='', output='Contributors can effectively engage with issues in CAMEL by:\\n1. **Assigning Issues**: Assign issues to themselves when starting work to inform others.\\n2. **Creating Focused Issues**: Keep new issues focused on specific bugs, improvements, or features.\\n3. **Linking Related Issues**: Link related issues instead of merging them into one.\\n4. **Updating Issue Status**: Regularly update the status of issues and discuss them during team meetings.'), AlpacaItem(instruction='What is the purpose of code reviews in CAMEL?', input='', output='The purpose of code reviews in CAMEL includes:\\n1. **Maintaining Code Quality**: Ensure the codebase remains clean, readable, and maintainable.\\n2. **Knowledge Sharing**: Facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n3. **Bug Prevention**: Catch potential bugs and issues before they are merged into the main branch.'), AlpacaItem(instruction='What are the key points to consider when writing docstrings for CAMEL?', input='', output='When writing docstrings for CAMEL, consider the following key points:\\n1. **Use Triple-Quoted Strings**: Start with `r\"\"\"` to prevent issues with special characters.\\n2. **Brief Descriptions**: Provide a concise summary of the purpose and functionality.\\n3. **Document Parameters**: Use an `Args` section for documenting constructor or function parameters.'), AlpacaItem(instruction='How often are sprint planning and review meetings held in CAMEL?', input='', output='Sprint planning and review meetings in CAMEL are held biweekly. Each sprint lasts two weeks for development and one week for review.'), AlpacaItem(instruction='What is the recommended workflow for contributing code to CAMEL?', input='', output='The recommended workflow for contributing code to CAMEL includes:\\n1. **Fork-and-Pull-Request**: Use the Fork-and-Pull-Request workflow if you are a community contributor.\\n2. **Checkout-and-Pull-Request**: If you are a member of CAMEL-AI.org, follow the Checkout-and-Pull-Request workflow.\\n3. **Mention Issues**: Always mention any related issues and tag relevant maintainers in your pull request.'), AlpacaItem(instruction='What should a contributor do if they encounter challenges during the setup process?', input='', output='If contributors encounter challenges during the setup process, they should:\\n1. **Reach Out to Maintainers**: Contact a maintainer for assistance to ensure a smooth experience.\\n2. **Discuss Guidelines**: If the setup requirements are difficult, discuss them with maintainers for potential solutions.'), AlpacaItem(instruction='What is the significance of using the logger instead of print statements in CAMEL?', input='', output='Using the logger instead of print statements in CAMEL is significant because:\\n1. **Consistent Logging**: It ensures consistent and configurable logging across the application.\\n2. **Professional Output**: Logging provides a more professional approach to outputting information, which can be adjusted easily based on log levels.'), AlpacaItem(instruction='How should contributors handle outdated issues they come across in CAMEL?', input='', output='Contributors should handle outdated issues in CAMEL by:\\n1. **Notifying Maintainers**: Inform maintainers about the outdated issues for review.\\n2. **Commenting on Issues**: Leave a comment to indicate the status and suggest updates.'), AlpacaItem(instruction='What should be included in the documentation for bug fixes?', input='', output='The documentation for bug fixes should include:\\n1. **Description of the Bug**: A clear explanation of the bug that was fixed.\\n2. **Steps to Reproduce**: Instructions on how to reproduce the bug before the fix.\\n3. **Impact of the Fix**: Information on how the fix improves functionality or resolves issues.'), AlpacaItem(instruction='What actions should a contributor take after their pull request is merged?', input='', output='After a pull request is merged, a contributor should:\\n1. **Close Related Issues**: Ensure that any linked issues are closed automatically.\\n2. **Update Documentation**: If applicable, update documentation to reflect any changes made.\\n3. **Celebrate Contributions**: Acknowledge their contribution and share it with the community.'), AlpacaItem(instruction=\"What is covered in the 'Common Actions' section of the CAMEL documentation?\", input='', output=\"The 'Common Actions' section of the CAMEL documentation covers:\\n1. **Updating Dependencies**: Instructions for managing and updating project dependencies.\\n2. **Linting & Formatting**: Guidelines for checking and formatting code to maintain quality.\\n3. **Coverage**: How to measure code coverage for tests and ensure robustness.\\n4. **Tests**: Instructions for running various types of tests to verify code functionality.\"), AlpacaItem(instruction='What are the responsibilities of a reviewer during the code review process?', input='', output='The responsibilities of a reviewer during the code review process include:\\n1. **Timely Reviews**: Strive to review pull requests promptly to keep the project moving.\\n2. **Constructive Feedback**: Provide clear and constructive feedback to help the contributor improve.\\n3. **Collaboration**: Work collaboratively with the contributor to address any issues.'), AlpacaItem(instruction='How can contributors ensure their code is well-tested before submission?', input='', output='Contributors can ensure their code is well-tested before submission by:\\n1. **Writing Unit Tests**: Include relevant unit tests in the `test` directory for new features or bug fixes.\\n2. **Running Tests Locally**: Execute `pytest .` to run all tests and verify functionality.\\n3. **Checking Test Coverage**: Use coverage tools to ensure adequate test coverage for new changes.'), AlpacaItem(instruction=\"What is the purpose of the 'Guidelines for Writing Docstrings' section?\", input='', output=\"The purpose of the 'Guidelines for Writing Docstrings' section is to provide contributors with structured instructions on how to write clear, concise, and effective docstrings for their code, ensuring high-quality documentation coverage.\"), AlpacaItem(instruction='What should contributors do to maintain consistency in coding style?', input='', output=\"To maintain consistency in coding style, contributors should:\\n1. **Follow Style Guidelines**: Adhere to the project's coding style guidelines, such as using Ruff for format checks.\\n2. **Use Linting Tools**: Regularly run linting tools to identify and correct style issues in the code.\\n3. **Review Code Consistency**: During code reviews, check for adherence to style guidelines and provide feedback when necessary.\"), AlpacaItem(instruction='What is the role of documentation in the CAMEL project?', input='', output='The role of documentation in the CAMEL project is to:\\n1. **Facilitate Understanding**: Help contributors and users understand how to use the project effectively.\\n2. **Provide Reference Material**: Serve as a reference for the codebase, including features, functions, and usage examples.\\n3. **Support Onboarding**: Assist new contributors in getting up to speed with the project and its guidelines.'), AlpacaItem(instruction='How should unit tests be structured in CAMEL?', input='', output='Unit tests in CAMEL should be structured by:\\n1. **Organizing Tests**: Place them in the `test` directory, with clear naming conventions for test files.\\n2. **Isolating Tests**: Ensure that tests are modular and do not depend on external systems to facilitate quick execution.\\n3. **Covering Edge Cases**: Include tests for various scenarios, including edge cases, to ensure robustness.'), AlpacaItem(instruction='What is the recommended approach for documenting new features?', input='', output='The recommended approach for documenting new features includes:\\n1. **Feature Overview**: Provide a clear explanation of what the feature does and its purpose.\\n2. **Usage Examples**: Include practical examples demonstrating how to use the feature in code.\\n3. **Linking Related Documentation**: Reference any related documentation for further reading and context.'), AlpacaItem(instruction='What actions are part of the Pull Request Item Stage?', input='', output='The actions part of the Pull Request Item Stage include:\\n1. **Creating a PR**: Go to GitHub Pulls, create a new PR, and choose the appropriate branch.\\n2. **Updating Details**: Fill in the necessary information, linking any related issues.\\n3. **Labeling**: Ensure the PR has a proper title and update the Reviewers, Assignees, and Labels.'), AlpacaItem(instruction='What should contributors do if they want to improve documentation?', input='', output='If contributors want to improve documentation, they should:\\n1. **Identify Gaps**: Review existing documentation for areas that need clarification or additional information.\\n2. **Make Updates**: Edit documentation files to include new information, examples, or corrections.\\n3. **Submit Changes**: Open a pull request with the documentation updates for review.'), AlpacaItem(instruction=\"What is the significance of the 'Giving Credit' section in CAMEL?\", input='', output=\"The significance of the 'Giving Credit' section in CAMEL is to:\\n1. **Recognize Contributions**: Acknowledge and celebrate the contributions of individuals to the project.\\n2. **Encourage Participation**: Motivate contributors to engage with the project by highlighting their efforts publicly.\\n3. **Build Community**: Foster a sense of community and appreciation among contributors.\"), AlpacaItem(instruction='What are the best practices for conducting code reviews?', input='', output='Best practices for conducting code reviews include:\\n1. **Thorough Checks**: Review the code for functionality, readability, consistency, and compliance with coding standards.\\n2. **Provide Constructive Feedback**: Leave clear and actionable feedback for the contributor.\\n3. **Avoid Rushing**: Take time to thoroughly review the code to maintain quality.'), AlpacaItem(instruction='How can contributors ensure their changes are compatible with the existing codebase?', input='', output='Contributors can ensure their changes are compatible with the existing codebase by:\\n1. **Running Tests**: Execute all existing tests to verify that no functionality is broken.\\n2. **Adhering to Guidelines**: Follow coding and documentation guidelines to maintain consistency.\\n3. **Reviewing Related Code**: Examine related code sections to understand dependencies and interactions.'), AlpacaItem(instruction='What is the process for updating dependencies in CAMEL?', input='', output='The process for updating dependencies in CAMEL involves:\\n1. **Editing pyproject.toml**: Make necessary changes to the `pyproject.toml` file to add, update, or remove dependencies.\\n2. **Running Poetry Lock**: Execute `poetry lock` to synchronize the changes with the lock file.\\n3. **Testing Changes**: After updating dependencies, run tests to ensure that everything works correctly.'), AlpacaItem(instruction='What should contributors do to prepare for a developer meeting?', input='', output='To prepare for a developer meeting, contributors should:\\n1. **Review Agenda**: Familiarize themselves with the meeting agenda and topics to be discussed.\\n2. **Prepare Updates**: Be ready to provide updates on their contributions and any challenges faced.\\n3. **Gather Feedback**: Think about any feedback or questions they may want to bring up during the meeting.'), AlpacaItem(instruction='What are the goals of sprint planning in CAMEL?', input='', output=\"The goals of sprint planning in CAMEL include:\\n1. **Defining Deliverables**: Determine what can be delivered in the upcoming sprint.\\n2. **Setting Goals**: Establish a clear sprint goal to guide the team's efforts.\\n3. **Assigning Tasks**: Allow developers to choose items from the backlog for the sprint.\"), AlpacaItem(instruction='How can contributors ensure their pull requests are ready for review?', input='', output='Contributors can ensure their pull requests are ready for review by:\\n1. **Passing Checks**: Making sure that all formatting, linting, and testing checks pass.\\n2. **Providing Context**: Including a clear description of the changes made and any relevant issues.\\n3. **Labeling Appropriately**: Using the correct labels to indicate the nature of the changes.'), AlpacaItem(instruction=\"What is the purpose of the 'License' section in CAMEL documentation?\", input='', output=\"The purpose of the 'License' section in CAMEL documentation is to inform contributors and users about the licensing terms under which the source code of the CAMEL project is released, specifically under the Apache 2.0 license.\"), AlpacaItem(instruction='What is the recommended structure for a pull request description?', input='', output='The recommended structure for a pull request description includes:\\n1. **Title**: A concise title summarizing the changes.\\n2. **Description**: A detailed explanation of what the PR does and why changes were made.\\n3. **Related Issues**: Links to any related issues that the PR addresses.\\n4. **Testing Instructions**: Instructions on how to test the changes made.'), AlpacaItem(instruction='What should be included in the documentation for code refactoring?', input='', output='The documentation for code refactoring should include:\\n1. **Purpose of Refactoring**: An explanation of why the code was refactored and what issues it addressed.\\n2. **Changes Made**: A summary of the specific changes implemented during the refactoring process.\\n3. **Impact on Functionality**: Information on how the refactoring improves code quality or performance.'), AlpacaItem(instruction='How can contributors effectively communicate in the CAMEL community?', input='', output=\"Contributors can effectively communicate in the CAMEL community by:\\n1. **Using Discord**: Engaging in discussions on the community Discord server for real-time communication.\\n2. **Participating in Meetings**: Attending developer meetings to share updates and feedback.\\n3. **Providing Feedback**: Offering constructive feedback on others' contributions to foster a collaborative environment.\"), AlpacaItem(instruction='What should contributors consider when creating a new feature?', input='', output='When creating a new feature, contributors should consider:\\n1. **User Needs**: Ensure the feature addresses a real user need or improves functionality.\\n2. **Impact on Codebase**: Assess how the feature will integrate with the existing code and its potential impact.\\n3. **Testing Requirements**: Plan for how the feature will be tested and documented.'), AlpacaItem(instruction=\"What is the significance of the 'Developer Meeting Time & Link' section?\", input='', output=\"The significance of the 'Developer Meeting Time & Link' section is to provide contributors with the schedule and access information for regular meetings, ensuring they can participate in discussions about project development and planning.\"), AlpacaItem(instruction='How should contributors document their changes in a pull request?', input='', output='Contributors should document their changes in a pull request by:\\n1. **Describing Changes**: Clearly explaining what changes were made and their purpose.\\n2. **Referencing Related Issues**: Linking any related issues to provide context.\\n3. **Highlighting Testing**: Mentioning any tests that were added or modified as part of the changes.'), AlpacaItem(instruction='What is the process for building documentation locally in CAMEL?', input='', output='The process for building documentation locally in CAMEL involves:\\n1. **Changing Directory**: Navigate to the `docs` directory using `cd docs`.\\n2. **Building Documentation**: Run `make html` to generate the HTML documentation.\\n3. **Viewing Documentation**: Open the generated HTML files to review the documentation.'), AlpacaItem(instruction='How can contributors contribute to the CAMEL project beyond coding?', input='', output='Contributors can contribute to the CAMEL project beyond coding by:\\n1. **Improving Documentation**: Writing and updating documentation to enhance clarity and usability.\\n2. **Reporting Issues**: Identifying and reporting bugs or feature requests to help improve the project.\\n3. **Participating in Discussions**: Engaging in community discussions to share ideas and provide feedback.'), AlpacaItem(instruction='What guidelines should be followed when submitting a bug fix?', input='', output='When submitting a bug fix, contributors should follow these guidelines:\\n1. **Describe the Bug**: Clearly explain the bug and how it was identified.\\n2. **Include Tests**: Provide relevant unit tests to verify that the bug has been fixed.\\n3. **Update Documentation**: If applicable, update any related documentation to reflect the fix.'), AlpacaItem(instruction='What should contributors do to prepare for a sprint review?', input='', output='To prepare for a sprint review, contributors should:\\n1. **Compile Updates**: Gather information on what was accomplished during the sprint.\\n2. **Prepare Demonstrations**: Be ready to demonstrate completed features and provide feedback on their development.\\n3. **Reflect on Feedback**: Consider any feedback received during the sprint and how it can be addressed.'), AlpacaItem(instruction='How can contributors ensure that their code is secure?', input='', output='Contributors can ensure that their code is secure by:\\n1. **Reviewing Security Guidelines**: Familiarizing themselves with security best practices relevant to the project.\\n2. **Conducting Security Tests**: Running security tests to identify vulnerabilities before merging changes.\\n3. **Minimizing Dependencies**: Keeping dependencies to a minimum to reduce potential security risks.'), AlpacaItem(instruction=\"What is the role of the 'Quick Start' section in CAMEL documentation?\", input='', output=\"The role of the 'Quick Start' section in CAMEL documentation is to provide new contributors with a straightforward guide to set up the project quickly, helping them to get started with the development environment and understand the basic commands required.\"), AlpacaItem(instruction='What should contributors do if they want to suggest a new feature?', input='', output='If contributors want to suggest a new feature, they should:\\n1. **Create a New Issue**: Open a new issue in the GitHub repository detailing the proposed feature.\\n2. **Provide Context**: Explain the rationale behind the feature and its potential benefits.\\n3. **Solicit Feedback**: Encourage discussion around the feature to gather input from other contributors.'), AlpacaItem(instruction='How can contributors stay updated on project changes and discussions?', input='', output='Contributors can stay updated on project changes and discussions by:\\n1. **Following GitHub Notifications**: Subscribing to notifications for the repository to receive updates on issues and pull requests.\\n2. **Joining Community Channels**: Participating in community channels like Discord or Slack for real-time discussions.\\n3. **Reviewing Meeting Notes**: Checking notes from developer meetings to catch up on key discussions and decisions.'), AlpacaItem(instruction=\"What is the purpose of the 'Contributing to Code Reviews' section?\", input='', output=\"The purpose of the 'Contributing to Code Reviews' section is to outline the best practices and guidelines for conducting effective code reviews, ensuring that contributions meet project standards and maintain high code quality.\"), AlpacaItem(instruction='What are the principles behind naming conventions in CAMEL?', input='', output='The principles behind naming conventions in CAMEL include:\\n1. **Avoiding Abbreviations**: Use clear, descriptive names to avoid ambiguity.\\n2. **Clarity and Readability**: Ensure variable names and function names convey their purpose without needing additional explanation.\\n3. **Consistency**: Maintain consistency in naming across the codebase to improve readability and maintainability.'), AlpacaItem(instruction='How can contributors effectively provide feedback during code reviews?', input='', output='Contributors can effectively provide feedback during code reviews by:\\n1. **Being Constructive**: Offer clear and actionable suggestions rather than just pointing out issues.\\n2. **Focusing on Code Quality**: Emphasize best practices in coding, documentation, and testing.\\n3. **Encouraging Discussion**: Engage in discussions about the code to foster collaboration and learning.'), AlpacaItem(instruction='What should contributors do if they are unsure about a coding guideline?', input='', output=\"If contributors are unsure about a coding guideline, they should:\\n1. **Consult Documentation**: Review the project's documentation for clarification on guidelines.\\n2. **Ask the Community**: Reach out to maintainers or community members for guidance.\\n3. **Refer to Examples**: Look at existing code for examples of how guidelines are applied.\"), AlpacaItem(instruction='What is the significance of maintaining a changelog in CAMEL?', input='', output='The significance of maintaining a changelog in CAMEL is to:\\n1. **Track Changes**: Provide a clear record of all changes made to the project over time.\\n2. **Inform Users**: Keep users informed about new features, bug fixes, and improvements.\\n3. **Facilitate Version Control**: Help contributors and maintainers understand the evolution of the project.'), AlpacaItem(instruction='How can contributors ensure their documentation is comprehensive?', input='', output='Contributors can ensure their documentation is comprehensive by:\\n1. **Including Examples**: Providing practical examples of how to use features or functions.\\n2. **Covering Edge Cases**: Documenting edge cases and potential pitfalls in using the code.\\n3. **Reviewing for Clarity**: Ensuring that the language used is clear and accessible to both technical and non-technical users.'), AlpacaItem(instruction='What should contributors do to engage with the CAMEL community effectively?', input='', output='To engage with the CAMEL community effectively, contributors should:\\n1. **Participate Actively**: Join discussions on community platforms like Discord and attend meetings.\\n2. **Share Knowledge**: Offer insights and help others by sharing knowledge and experiences.\\n3. **Be Open to Feedback**: Be receptive to feedback and use it as an opportunity for growth.'), AlpacaItem(instruction='What are the guidelines for writing docstrings in CAMEL?', input='', output='The guidelines for writing docstrings in CAMEL include:\\n1. **Use the Triple-Quoted String with `r\"\"\"`**: Start the docstring with `r\"\"\"` to indicate a raw docstring, preventing issues with special characters.\\n2. **Provide a Brief Class or Method Description**: Include a concise summary of the functionality and keep each line under 79 characters.\\n3. **Document Parameters in the Args Section**: Use an `Args` section to document parameters, including their names, types, descriptions, and default values.'), AlpacaItem(instruction='How should contributors handle large pull requests in CAMEL?', input='', output='Contributors should handle large pull requests by:\\n1. **Breaking Down Changes**: Avoid submitting overly large PRs; instead, break them into smaller, manageable changes.\\n2. **Addressing Feedback**: Ensure to address all feedback provided by reviewers thoroughly, discussing any disagreements instead of ignoring them.'), AlpacaItem(instruction='What is the process for scheduling an introduction call for new contributors?', input='', output='The process for scheduling an introduction call for new contributors includes:\\n1. **Selecting Language**: Choose the appropriate link based on your language preference—either English or Chinese.\\n2. **Accessing Calendly**: Use the provided Calendly links to book a time slot that works for you.'), AlpacaItem(instruction='What are the responsibilities of reviewers during code reviews in CAMEL?', input='', output='Reviewers have several responsibilities during code reviews in CAMEL, including:\\n1. **Timely Reviews**: Striving to review PRs promptly to keep the project moving forward.\\n2. **Constructive Feedback**: Providing clear and constructive feedback aimed at helping contributors improve their code.\\n3. **Collaboration**: Working collaboratively with contributors to address any issues until the final code meets project standards.'), AlpacaItem(instruction='What steps should contributors take if they encounter difficulties during the setup process?', input='', output='If contributors encounter difficulties during the setup process, they should:\\n1. **Reach Out for Help**: Contact a maintainer for assistance.\\n2. **Provide Feedback**: Share any specific guidelines or requirements that are causing issues to find a suitable solution.'), AlpacaItem(instruction='How are contributions recognized in CAMEL?', input='', output='Contributions are recognized in CAMEL by:\\n1. **Credit on Twitter**: Contributors can opt to receive recognition on Twitter if their contribution is included in a release.\\n2. **Communication**: Contributors should inform the team of their Twitter handle to ensure proper acknowledgment.'), AlpacaItem(instruction='What is the importance of maintaining code quality in CAMEL?', input='', output='Maintaining code quality in CAMEL is important because it:\\n1. **Ensures Readability**: Keeps the codebase clean and easy to read.\\n2. **Facilitates Maintenance**: Makes the code easier to maintain and modify in the future.\\n3. **Prevents Bugs**: Helps catch potential bugs and issues before they are merged into the main branch.'), AlpacaItem(instruction='What should be included in the documentation for new features?', input='', output='Documentation for new features should include:\\n1. **Usage Instructions**: Clear instructions on how to use the new feature.\\n2. **Examples**: Examples demonstrating the feature in action.\\n3. **API Changes**: Any changes to the API that relate to the new feature.'), AlpacaItem(instruction='How can contributors ensure their code is well-tested before submission?', input='', output='Contributors can ensure their code is well-tested before submission by:\\n1. **Writing Unit Tests**: Adding relevant unit tests that cover new features or bug fixes.\\n2. **Running Tests Locally**: Executing `pytest` to verify that all tests pass before creating a pull request.'), AlpacaItem(instruction='What are the recommended practices for managing project dependencies in CAMEL?', input='', output='Recommended practices for managing project dependencies in CAMEL include:\\n1. **Using Poetry**: Utilize Poetry to manage dependencies and ensure they are up to date.\\n2. **Running `poetry lock`**: When adding, updating, or deleting dependencies in `pyproject.toml`, always run `poetry lock` to synchronize with the lock file.'), AlpacaItem(instruction='How should contributors document changes made in their pull requests?', input='', output='Contributors should document changes made in their pull requests by:\\n1. **Writing Descriptive Titles**: Using clear and descriptive titles for the pull request.\\n2. **Providing Context**: Including a detailed description of the changes and any related issues.'), AlpacaItem(instruction='What is the purpose of having a checklist for code reviews?', input='', output=\"The purpose of having a checklist for code reviews is to:\\n1. **Maintain Code Quality**: Ensure that all contributions meet the project's standards for quality and functionality.\\n2. **Promote Consistency**: Foster consistency in the review process across different contributions.\"), AlpacaItem(instruction='What steps should be taken to build documentation locally in CAMEL?', input='', output='To build documentation locally in CAMEL, follow these steps:\\n1. **Navigate to the Docs Directory**: Change directory to `docs`.\\n2. **Run the Build Command**: Execute `make html` to generate the HTML documentation.'), AlpacaItem(instruction='How can contributors add unit tests when fixing bugs?', input='', output='Contributors can add unit tests when fixing bugs by:\\n1. **Identifying the Bug**: Understanding the bug and its context.\\n2. **Creating Relevant Tests**: Writing unit tests that specifically check for the bug and ensure it does not occur again.'), AlpacaItem(instruction='What is the recommended approach for handling documentation updates?', input='', output='The recommended approach for handling documentation updates includes:\\n1. **Updating Affected Sections**: Modifying documentation to reflect any changes made to the code or features.\\n2. **Ensuring Clarity**: Making sure that the documentation is clear, concise, and easy to follow.'), AlpacaItem(instruction='What guidelines should be followed when contributing to the codebase?', input='', output='Guidelines for contributing to the codebase include:\\n1. **Fork-and-Pull-Request Workflow**: Follow the Fork-and-Pull-Request workflow for community contributors.\\n2. **Mention Related Issues**: Always mention any related issues and tag relevant maintainers in your pull request.'), AlpacaItem(instruction='What is the significance of using a logging module instead of print statements?', input='', output='The significance of using a logging module instead of print statements includes:\\n1. **Configurability**: Logging provides more control over how messages are emitted and where they are directed.\\n2. **Professionalism**: Using a logging framework leads to cleaner, more maintainable code.'), AlpacaItem(instruction='What is the procedure for submitting a pull request in CAMEL?', input='', output='The procedure for submitting a pull request in CAMEL involves:\\n1. **Creating a Pull Request**: Go to GitHub Pulls, create a new PR, and fill in the required information.\\n2. **Linking Issues**: Ensure to link the related issue and update the necessary fields.'), AlpacaItem(instruction='How can contributors effectively communicate their ideas for new features?', input='', output='Contributors can effectively communicate their ideas for new features by:\\n1. **Opening Discussions**: Initiating discussions on Discord or through GitHub issues to share and refine ideas.\\n2. **Providing Detailed Proposals**: Writing detailed proposals that outline the feature, its benefits, and potential implementation strategies.'), AlpacaItem(instruction='What is the recommended method for running tests in CAMEL?', input='', output='The recommended method for running tests in CAMEL is to use the command:\\n```\\npytest .\\n```\\nThis command runs all tests, including those that utilize external APIs.'), AlpacaItem(instruction='How should contributors handle security concerns in their code contributions?', input='', output='Contributors should handle security concerns in their code contributions by:\\n1. **Reviewing Code for Vulnerabilities**: Conducting thorough reviews of their code to identify any potential security issues.\\n2. **Documenting Security Features**: Clearly documenting any security-related features and considerations in their contributions.'), AlpacaItem(instruction=\"What is the purpose of the CAMEL community's communication channels?\", input='', output=\"The purpose of the CAMEL community's communication channels is to:\\n1. **Facilitate Collaboration**: Provide platforms for contributors to discuss ideas, issues, and solutions.\\n2. **Enhance Support**: Allow contributors to seek help and share experiences with others in the community.\"), AlpacaItem(instruction='What should be done if a contributor encounters an outdated issue on GitHub?', input='', output='If a contributor encounters an outdated issue on GitHub, they should:\\n1. **Notify Maintainers**: Inform the maintainers about the outdated issue so they can address it.\\n2. **Check for Related Discussions**: Look for any related discussions or updates that may have occurred since the issue was created.'), AlpacaItem(instruction='What are the key components of a successful sprint review in CAMEL?', input='', output='The key components of a successful sprint review in CAMEL include:\\n1. **Feedback from Stakeholders**: Gathering feedback on delivered features from stakeholders.\\n2. **Discussion of Improvements**: Identifying areas for improvement based on the review of recent work.'), AlpacaItem(instruction='How can contributors ensure their documentation is comprehensive?', input='', output='Contributors can ensure their documentation is comprehensive by:\\n1. **Covering All Aspects**: Addressing all relevant aspects of the code or feature being documented.\\n2. **Seeking Feedback**: Asking peers for feedback on the documentation to identify any gaps or areas for improvement.'), AlpacaItem(instruction='What is the importance of code formatting in CAMEL?', input='', output='The importance of code formatting in CAMEL includes:\\n1. **Improving Readability**: Proper formatting enhances the readability of the code, making it easier for contributors to understand.\\n2. **Ensuring Consistency**: Consistent formatting helps maintain a uniform style across the codebase.'), AlpacaItem(instruction='What are the guidelines for submitting documentation contributions?', input='', output='The guidelines for submitting documentation contributions include:\\n1. **Clarity and Precision**: Ensure that documentation is clear and precise, avoiding ambiguities.\\n2. **Alignment with Code Changes**: Update documentation to align with any changes made to the codebase.'), AlpacaItem(instruction='How can contributors effectively manage their time during sprints?', input='', output='Contributors can effectively manage their time during sprints by:\\n1. **Setting Clear Goals**: Establishing clear goals for what they intend to accomplish during the sprint.\\n2. **Prioritizing Tasks**: Prioritizing tasks based on their importance and deadlines.'), AlpacaItem(instruction='What is the role of the founder in sprint planning?', input='', output='The role of the founder in sprint planning includes:\\n1. **Highlighting Sprint Goals**: Outlining the key objectives and goals for the upcoming sprint.\\n2. **Facilitating Discussions**: Leading discussions to help developers select items for the sprint.'), AlpacaItem(instruction='What should contributors do when they want to propose a significant change to the codebase?', input='', output='When proposing a significant change to the codebase, contributors should:\\n1. **Create a Proposal**: Write a detailed proposal outlining the change, its benefits, and how it aligns with project goals.\\n2. **Engage the Community**: Discuss the proposal with the community to gather feedback and build consensus.'), AlpacaItem(instruction='What is the recommended approach for code reviews in CAMEL?', input='', output='The recommended approach for code reviews in CAMEL includes:\\n1. **Thorough Examination**: Review the code for functionality, readability, and adherence to coding standards.\\n2. **Providing Constructive Feedback**: Offer clear, constructive feedback to help the contributor improve their code.'), AlpacaItem(instruction='How can contributors contribute to improving documentation in CAMEL?', input='', output='Contributors can improve documentation in CAMEL by:\\n1. **Identifying Gaps**: Reviewing existing documentation to identify gaps or outdated information.\\n2. **Providing Updates**: Submitting updates to documentation based on their own experiences and insights.'), AlpacaItem(instruction='What should be included in a pull request description?', input='', output='A pull request description should include:\\n1. **Summary of Changes**: A brief overview of the changes made in the pull request.\\n2. **Related Issues**: Links to any related issues or discussions.\\n3. **Testing Instructions**: Instructions on how to test the changes.'), AlpacaItem(instruction='How can contributors foster a welcoming community in CAMEL?', input='', output='Contributors can foster a welcoming community in CAMEL by:\\n1. **Encouraging New Contributors**: Offering help and guidance to new contributors to help them get started.\\n2. **Being Respectful**: Maintaining a respectful and supportive tone in all communications.'), AlpacaItem(instruction='What are the best practices for running pre-commit hooks in CAMEL?', input='', output='Best practices for running pre-commit hooks in CAMEL include:\\n1. **Setting Up Hooks**: Ensure pre-commit hooks are set up correctly in the local repository using `pre-commit install`.\\n2. **Running Hooks Before Push**: Always run `pre-commit run --all-files` before pushing changes to catch any issues early.'), AlpacaItem(instruction='What is the significance of using semantic versioning in CAMEL?', input='', output='The significance of using semantic versioning in CAMEL includes:\\n1. **Clear Communication**: It provides clear communication regarding the nature of changes in each release (major, minor, or patch).\\n2. **Predictable Updates**: Users can predict the impact of updates on their projects based on version numbers.'), AlpacaItem(instruction='What are the responsibilities of maintainers in the CAMEL project?', input='', output='The responsibilities of maintainers in the CAMEL project include:\\n1. **Overseeing Contributions**: Managing and reviewing contributions from the community.\\n2. **Ensuring Project Quality**: Ensuring that the codebase remains high-quality and aligned with project goals.'), AlpacaItem(instruction='How can contributors effectively collaborate on issues in CAMEL?', input='', output='Contributors can effectively collaborate on issues in CAMEL by:\\n1. **Commenting on Issues**: Actively commenting on issues to provide updates, insights, and suggestions.\\n2. **Assigning Issues**: Assigning themselves to issues they are working on to keep the team informed.'), AlpacaItem(instruction='What is the best way to handle feedback received during code reviews?', input='', output='The best way to handle feedback received during code reviews is to:\\n1. **Be Open-Minded**: Approach feedback with an open mind, considering the suggestions seriously.\\n2. **Engage in Discussion**: If there are disagreements, engage in constructive discussions to reach a consensus.'), AlpacaItem(instruction='How can contributors help ensure that the CAMEL documentation stays up to date?', input='', output='Contributors can help ensure that the CAMEL documentation stays up to date by:\\n1. **Regularly Reviewing Documentation**: Periodically reviewing documentation for accuracy and relevance.\\n2. **Submitting Updates**: Promptly submitting updates whenever they make changes to the code that affect documentation.'), AlpacaItem(instruction='What should contributors do if they discover a security vulnerability in CAMEL?', input='', output='If contributors discover a security vulnerability in CAMEL, they should:\\n1. **Report Immediately**: Report the vulnerability to the maintainers as soon as possible.\\n2. **Provide Details**: Include as much detail as possible about the vulnerability and how to reproduce it.'), AlpacaItem(instruction='What is the role of documentation in the CAMEL project?', input='', output='The role of documentation in the CAMEL project includes:\\n1. **Guiding Contributors**: Providing clear guidelines for contributors to understand how to engage with the project.\\n2. **Explaining Features**: Offering explanations and usage examples for features to help users effectively utilize the software.'), AlpacaItem(instruction=\"How can contributors ensure their code adheres to the project's style guidelines?\", input='', output=\"Contributors can ensure their code adheres to the project's style guidelines by:\\n1. **Using Linting Tools**: Utilizing tools like Ruff to check for style compliance.\\n2. **Reviewing Guidelines**: Familiarizing themselves with the project's style guidelines before submitting code.\"), AlpacaItem(instruction='What is the process for conducting a sprint planning meeting in CAMEL?', input='', output='The process for conducting a sprint planning meeting in CAMEL involves:\\n1. **Setting the Agenda**: The founder sets the agenda by highlighting the sprint goal.\\n2. **Choosing Items**: Developers discuss and choose items to work on during the sprint.'), AlpacaItem(instruction='How can contributors effectively share their experiences with the CAMEL community?', input='', output='Contributors can effectively share their experiences with the CAMEL community by:\\n1. **Participating in Discussions**: Engaging in discussions on Discord or GitHub issues to share insights.\\n2. **Writing Blog Posts**: Consider writing blog posts or articles about their experiences and contributions.'), AlpacaItem(instruction='What should contributors include in their pull request titles?', input='', output='Contributors should include the following in their pull request titles:\\n1. **Concise Description**: A concise description of the changes made.\\n2. **Type of Change**: An indication of whether it is a feature, fix, or documentation update.'), AlpacaItem(instruction='What are the advantages of participating in the CAMEL community?', input='', output='The advantages of participating in the CAMEL community include:\\n1. **Collaborative Learning**: Opportunities to learn from others and share knowledge.\\n2. **Networking**: Building connections with other developers and contributors.'), AlpacaItem(instruction='How can contributors improve their coding skills through CAMEL?', input='', output='Contributors can improve their coding skills through CAMEL by:\\n1. **Engaging in Code Reviews**: Participating in code reviews to learn from feedback and best practices.\\n2. **Taking on Challenges**: Tackling challenging issues and features to stretch their coding abilities.'), AlpacaItem(instruction='What is the significance of maintaining a clean codebase in CAMEL?', input='', output='The significance of maintaining a clean codebase in CAMEL includes:\\n1. **Ease of Maintenance**: A clean codebase is easier to maintain and update over time.\\n2. **Enhanced Collaboration**: It facilitates collaboration among contributors by making the code more understandable.'), AlpacaItem(instruction='What guidelines should contributors follow when creating new issues on GitHub?', input='', output='When creating new issues on GitHub, contributors should follow these guidelines:\\n1. **Clear Titles**: Use clear and descriptive titles that summarize the issue.\\n2. **Detailed Descriptions**: Provide detailed descriptions, including steps to reproduce the issue and any relevant context.'), AlpacaItem(instruction='Explain the process of contributing to the CAMEL codebase.', input='', output=\"To contribute to the CAMEL codebase, follow these steps:\\n1. **Fork the Repository**: Create a personal copy of the CAMEL repository on GitHub.\\n2. **Clone Your Fork**: Use `git clone` to download the forked repository to your local machine.\\n3. **Create a Branch**: Develop your feature or fix in a new branch to keep your changes organized.\\n4. **Make Changes**: Implement your changes, ensuring to follow the project's coding standards and guidelines.\\n5. **Test Your Changes**: Run the appropriate tests to confirm that everything works as expected.\\n6. **Commit and Push**: Commit your changes and push the branch back to your forked repository.\\n7. **Open a Pull Request**: Navigate to the original repository and create a pull request from your branch, detailing the changes made.\"), AlpacaItem(instruction='What are the guidelines for writing docstrings in CAMEL?', input='', output='The guidelines for writing docstrings in CAMEL include:\\n1. **Use Triple-Quoted Strings**: Start with `r\"\"\"` to create a raw docstring, preventing issues with special characters.\\n2. **Provide a Brief Description**: Summarize the purpose and functionality of the class or method clearly, keeping each line under 79 characters.\\n3. **Document Parameters**: Use an `Args:` section to document parameters, including their names, types, descriptions, and default values.'), AlpacaItem(instruction='Describe the process for creating a pull request in CAMEL.', input='', output='The process for creating a pull request in CAMEL includes:\\n1. **Navigate to Pull Requests**: Go to the Pull Requests section of the CAMEL GitHub repository.\\n2. **Click on New Pull Request**: Initiate the creation of a new pull request from your branch.\\n3. **Fill Out Details**: Provide a clear title and description of the changes made, linking any related issues.\\n4. **Assign Reviewers**: Assign relevant team members to review your pull request.\\n5. **Submit the Pull Request**: Once everything is filled out, submit the pull request for review.'), AlpacaItem(instruction='What should you do if you encounter issues during the development setup for CAMEL?', input='', output=\"If you encounter issues during the development setup for CAMEL, you should:\\n1. **Consult Documentation**: Refer to the setup documentation for troubleshooting tips and guidelines.\\n2. **Ask for Help**: Reach out to a maintainer via the communication channels provided, such as Discord or Slack.\\n3. **Provide Details**: When asking for help, provide specific details about the issues you're facing, including error messages and steps taken.\"), AlpacaItem(instruction='What are the recommended practices for testing new features in CAMEL?', input='', output='The recommended practices for testing new features in CAMEL include:\\n1. **Write Unit Tests**: Ensure that new features are accompanied by relevant unit tests located in the `test` directory.\\n2. **Run Tests Locally**: Execute the testing suite locally using `pytest` to confirm that all tests pass.\\n3. **Check Coverage**: Generate a coverage report to ensure that the new features are adequately tested.'), AlpacaItem(instruction='Explain the importance of code reviews in CAMEL.', input='', output='The importance of code reviews in CAMEL includes:\\n1. **Maintaining Code Quality**: Code reviews help ensure that the codebase remains clean and maintainable.\\n2. **Knowledge Sharing**: They facilitate knowledge sharing among contributors and help new contributors learn best practices.\\n3. **Bug Prevention**: Code reviews can catch potential bugs before they are merged into the main branch.'), AlpacaItem(instruction='What is the purpose of using GitHub Secrets in CAMEL?', input='', output='The purpose of using GitHub Secrets in CAMEL includes:\\n1. **Security**: They allow for the secure storage of sensitive data, such as API keys, that should not be exposed in the codebase.\\n2. **Access Control**: GitHub Secrets ensure that only authorized workflows can access sensitive information during CI/CD processes.'), AlpacaItem(instruction='Outline the steps to build documentation locally for CAMEL.', input='', output='To build documentation locally for CAMEL, follow these steps:\\n1. **Change Directory**: Navigate to the `docs` directory of the CAMEL project.\\n2. **Run Build Command**: Execute the command `make html` to generate the HTML documentation.\\n3. **View Documentation**: Open the generated HTML files in a browser to view the documentation.'), AlpacaItem(instruction='What are the key elements of the CAMEL contribution guidelines?', input='', output='The key elements of the CAMEL contribution guidelines include:\\n1. **Fork-and-Pull-Request Workflow**: Contributors should follow this workflow for submitting changes.\\n2. **Issue Tracking**: Before starting work, assign issues to yourself to avoid duplication of effort.\\n3. **Documentation and Testing**: Emphasize the importance of thorough documentation and testing for all contributions.'), AlpacaItem(instruction='How should contributors handle feedback during code reviews?', input='', output='Contributors should handle feedback during code reviews by:\\n1. **Acknowledging Feedback**: Read and understand the feedback provided by reviewers.\\n2. **Making Necessary Changes**: Implement changes based on the feedback to improve the code quality.\\n3. **Engaging in Discussion**: If there are disagreements, discuss the feedback constructively with the reviewers.'), AlpacaItem(instruction='What is the significance of maintaining a changelog in CAMEL?', input='', output='The significance of maintaining a changelog in CAMEL is to:\\n1. **Track Changes**: Provide a clear record of all changes made to the project over time.\\n2. **Inform Users**: Keep users informed about new features, bug fixes, and improvements.\\n3. **Facilitate Version Control**: Help contributors and maintainers understand the evolution of the project.'), AlpacaItem(instruction='Describe how to engage with issues effectively in CAMEL.', input='', output=\"To engage with issues effectively in CAMEL, you should:\\n1. **Check GitHub Issues**: Regularly review the issues page for bugs, improvements, and feature requests.\\n2. **Assign Yourself**: When starting work on an issue, assign it to yourself to indicate it's being addressed.\\n3. **Link Related Issues**: If issues are related, link them instead of merging them into one.\"), AlpacaItem(instruction='What are the steps to update dependencies in CAMEL?', input='', output='To update dependencies in CAMEL, follow these steps:\\n1. **Modify pyproject.toml**: Add, update, or delete dependencies as needed in the `pyproject.toml` file.\\n2. **Run Poetry Lock**: Execute `poetry lock` to synchronize the dependencies with the lock file.\\n3. **Test Changes**: Run the tests to ensure that the updates do not introduce any issues.'), AlpacaItem(instruction='Explain the process for sprint planning in CAMEL.', input='', output='The process for sprint planning in CAMEL includes:\\n1. **Duration**: Each sprint lasts two weeks for development.\\n2. **Planning Meetings**: Conduct biweekly meetings where the founder highlights the sprint goal and developers select items for the sprint.\\n3. **Review Process**: At the start of each sprint, review previously analyzed issues to determine which will be tackled.'), AlpacaItem(instruction='What is the role of a maintainer in the CAMEL project?', input='', output='The role of a maintainer in the CAMEL project includes:\\n1. **Overseeing Contributions**: Review and manage pull requests to ensure they meet project standards.\\n2. **Guiding Contributors**: Provide support and guidance to contributors, especially new ones.\\n3. **Maintaining Project Direction**: Ensure that the project continues to move in a direction that aligns with its goals.'), AlpacaItem(instruction='What guidelines should be followed for logging in CAMEL?', input='', output=\"The guidelines for logging in CAMEL include:\\n1. **Use the Logger Module**: Avoid using print statements; instead, use Python's logging module for output.\\n2. **Log Levels**: Use appropriate log levels (e.g., info, debug, error) to categorize log messages.\\n3. **Consistent Formatting**: Ensure that logging messages are formatted consistently throughout the code.\"), AlpacaItem(instruction='How can contributors ensure their code is compatible with the project’s standards?', input='', output=\"Contributors can ensure their code is compatible with the project’s standards by:\\n1. **Following Style Guidelines**: Adhere to the project's coding style guidelines, such as those outlined in the Google Python Style Guide.\\n2. **Running Linting Tools**: Use linting tools like Ruff to check for style issues before submitting code.\\n3. **Conducting Local Tests**: Test their code locally to verify that it functions correctly and passes all tests.\"), AlpacaItem(instruction='What are the best practices for writing effective commit messages in CAMEL?', input='', output=\"Best practices for writing effective commit messages in CAMEL include:\\n1. **Use Imperative Mood**: Write messages in the imperative mood (e.g., 'Add feature' instead of 'Added feature').\\n2. **Be Concise**: Keep messages clear and to the point, summarizing the changes made.\\n3. **Reference Issues**: Link to any related issues in the commit message for clarity.\"), AlpacaItem(instruction='What is the significance of using unit tests in CAMEL?', input='', output='The significance of using unit tests in CAMEL includes:\\n1. **Code Reliability**: Unit tests help ensure that individual components of the code function correctly.\\n2. **Regression Prevention**: They catch regressions early, preventing the reintroduction of old bugs.\\n3. **Documentation of Functionality**: Unit tests serve as documentation for the expected behavior of code.'), AlpacaItem(instruction='Explain how to manage dependencies in the CAMEL project.', input='', output='To manage dependencies in the CAMEL project, follow these steps:\\n1. **Use Poetry**: Utilize the Poetry dependency manager to handle project dependencies.\\n2. **Update pyproject.toml**: Modify the `pyproject.toml` file to add or update dependencies.\\n3. **Run Poetry Lock**: Execute `poetry lock` to synchronize the lock file with the current dependencies.'), AlpacaItem(instruction='What should be included in a pull request description in CAMEL?', input='', output='A pull request description in CAMEL should include:\\n1. **Summary of Changes**: A clear and concise summary of what changes were made and why.\\n2. **Related Issues**: Links to any issues that the pull request addresses.\\n3. **Testing Information**: Details on how the changes were tested and any relevant test results.'), AlpacaItem(instruction='How can contributors improve the documentation in CAMEL?', input='', output='Contributors can improve the documentation in CAMEL by:\\n1. **Providing Comprehensive Coverage**: Ensure that all classes and methods are well-documented.\\n2. **Updating Existing Documentation**: Revise outdated documentation to reflect current functionality.\\n3. **Adding Examples**: Include practical examples demonstrating how to use features effectively.'), AlpacaItem(instruction='What is the process for resolving conflicts in pull requests?', input='', output='The process for resolving conflicts in pull requests involves:\\n1. **Identifying Conflicts**: Check for any merge conflicts indicated by GitHub.\\n2. **Locally Resolving Conflicts**: Pull the latest changes from the base branch and resolve conflicts locally using a code editor.\\n3. **Committing Resolved Changes**: Commit the resolved changes and push them back to the pull request.'), AlpacaItem(instruction='Describe how to use environment variables in the CAMEL project.', input='', output='To use environment variables in the CAMEL project, follow these steps:\\n1. **Define Variables**: Create a `.env` file in the project root to define necessary environment variables.\\n2. **Load Variables**: Use libraries like `python-dotenv` to load the environment variables into your application.\\n3. **Access Variables**: Access the variables in your code using `os.getenv()` to ensure sensitive data is not hardcoded.'), AlpacaItem(instruction='What are the steps to run tests in CAMEL?', input='', output='To run tests in CAMEL, follow these steps:\\n1. **Activate Virtual Environment**: Ensure that the CAMEL virtual environment is active.\\n2. **Run Pytest**: Execute the command `pytest .` in the project directory to run all tests.\\n3. **Check Test Results**: Review the output to identify any failed tests and address them accordingly.'), AlpacaItem(instruction='How should contributors document their changes when fixing bugs?', input='', output='When fixing bugs, contributors should document their changes by:\\n1. **Describing the Bug**: Clearly state the issue that was fixed in the commit message or pull request description.\\n2. **Linking to Issues**: Reference the related issue in the documentation to provide context.\\n3. **Adding Tests**: Include relevant unit tests that verify the bug fix.'), AlpacaItem(instruction='What are the benefits of using a virtual environment for CAMEL development?', input='', output='The benefits of using a virtual environment for CAMEL development include:\\n1. **Dependency Management**: Isolate project dependencies to avoid conflicts with other projects.\\n2. **Environment Consistency**: Ensure consistent development environments across different machines.\\n3. **Easy Setup**: Simplify the setup process for new contributors by providing a clear environment configuration.'), AlpacaItem(instruction='Explain the significance of the `pre-commit` hook in CAMEL.', input='', output='The significance of the `pre-commit` hook in CAMEL includes:\\n1. **Automated Checks**: Automatically run linting and formatting checks before each commit to maintain code quality.\\n2. **Error Prevention**: Reduce the chances of committing code that does not adhere to project standards.\\n3. **Consistency**: Ensure consistent code style across the codebase, making it easier to read and maintain.'), AlpacaItem(instruction='What is the importance of keeping the CAMEL project updated with the latest dependencies?', input='', output='The importance of keeping the CAMEL project updated with the latest dependencies includes:\\n1. **Security**: Address security vulnerabilities that may be present in outdated dependencies.\\n2. **Performance Improvements**: Benefit from performance enhancements and bug fixes provided in newer versions of libraries.\\n3. **Compatibility**: Ensure compatibility with other tools and frameworks that may depend on updated libraries.'), AlpacaItem(instruction='How should contributors approach feature requests in CAMEL?', input='', output='Contributors should approach feature requests in CAMEL by:\\n1. **Reviewing Existing Issues**: Check if the feature request has already been submitted or discussed.\\n2. **Discussing with Maintainers**: Engage with project maintainers to gauge interest and feasibility before starting work.\\n3. **Providing Clear Specifications**: When implementing a feature, provide clear specifications and rationale in the pull request.'), AlpacaItem(instruction='What steps should be taken to ensure that code changes do not introduce new bugs?', input='', output='To ensure that code changes do not introduce new bugs, take the following steps:\\n1. **Write Unit Tests**: Implement unit tests that cover the new changes and edge cases.\\n2. **Run Existing Tests**: Execute the full test suite to verify that existing functionality remains intact.\\n3. **Conduct Code Reviews**: Participate in code reviews to catch potential issues before merging changes.'), AlpacaItem(instruction='What is the process for merging pull requests in CAMEL?', input='', output='The process for merging pull requests in CAMEL includes:\\n1. **Review Approval**: Ensure that the pull request has been approved by at least two reviewers.\\n2. **Check for Conflicts**: Confirm that there are no merge conflicts with the base branch.\\n3. **Merge the PR**: Use the GitHub interface to merge the pull request into the main branch.'), AlpacaItem(instruction='How can contributors effectively communicate in the CAMEL community?', input='', output='Contributors can effectively communicate in the CAMEL community by:\\n1. **Using Discord and Slack**: Engage with other contributors and maintainers through the provided communication channels.\\n2. **Being Respectful and Constructive**: Maintain a respectful tone and provide constructive feedback during discussions.\\n3. **Participating in Meetings**: Join scheduled meetings to discuss progress, issues, and feature requests.'), AlpacaItem(instruction='What are the key practices for ensuring code quality in CAMEL?', input='', output='Key practices for ensuring code quality in CAMEL include:\\n1. **Regular Code Reviews**: Implement a thorough review process for all code changes.\\n2. **Automated Testing**: Utilize automated testing frameworks to validate functionality.\\n3. **Adhering to Style Guidelines**: Follow established style guidelines to maintain consistency across the codebase.'), AlpacaItem(instruction='Explain the significance of using version control in the CAMEL project.', input='', output='The significance of using version control in the CAMEL project includes:\\n1. **History Tracking**: Version control allows tracking of all changes made to the codebase over time.\\n2. **Collaboration**: It facilitates collaboration among multiple contributors, allowing simultaneous work on different features.\\n3. **Rollback Capability**: Provides the ability to revert to previous versions of the code in case of issues.'), AlpacaItem(instruction=\"What should be included in the CAMEL project's README file?\", input='', output=\"The CAMEL project's README file should include:\\n1. **Project Overview**: A brief description of what the project does and its goals.\\n2. **Installation Instructions**: Clear guidelines on how to install and set up the project.\\n3. **Usage Examples**: Practical examples demonstrating how to use the project effectively.\\n4. **Contribution Guidelines**: Information on how to contribute to the project, including links to relevant documentation.\"), AlpacaItem(instruction='How can contributors ensure their pull requests are ready for review?', input='', output='Contributors can ensure their pull requests are ready for review by:\\n1. **Completing All Tasks**: Ensure that all tasks outlined in the pull request checklist are completed.\\n2. **Providing Clear Descriptions**: Include a detailed description of the changes made and any relevant context.\\n3. **Testing Thoroughly**: Run all tests to confirm that the changes do not break existing functionality.'), AlpacaItem(instruction=\"What is the purpose of the `chore` label in CAMEL's issue tracking?\", input='', output=\"The purpose of the `chore` label in CAMEL's issue tracking is to categorize maintenance tasks that do not add features or fix bugs. This can include tasks such as:\\n1. **Updating Dependencies**: Tasks related to keeping the project dependencies up to date.\\n2. **Refactoring Code**: Improvements to code structure without changing its functionality.\\n3. **General Maintenance**: Any other non-feature related tasks that contribute to the project's health.\"), AlpacaItem(instruction='Explain the process of resolving merge conflicts in CAMEL.', input='', output='The process of resolving merge conflicts in CAMEL involves:\\n1. **Identifying Conflicts**: When merging, Git will notify you of any conflicts that need resolution.\\n2. **Editing the Conflicted Files**: Open the files with conflicts, identify the conflicting sections, and manually resolve the differences.\\n3. **Marking as Resolved**: After resolving the conflicts, mark the files as resolved using `git add`.\\n4. **Completing the Merge**: Commit the changes to complete the merge process.'), AlpacaItem(instruction='What steps should contributors follow when submitting a feature request?', input='', output='When submitting a feature request, contributors should follow these steps:\\n1. **Check Existing Requests**: Review the issues page to ensure the feature has not already been requested.\\n2. **Provide Detailed Description**: Clearly describe the feature, its purpose, and how it would benefit the project.\\n3. **Engage with Community**: Discuss the request in the community channels to gather feedback and gauge interest before formal submission.'), AlpacaItem(instruction='What are the best practices for maintaining a clean Git history in CAMEL?', input='', output='Best practices for maintaining a clean Git history in CAMEL include:\\n1. **Use Descriptive Commit Messages**: Write clear and concise commit messages that reflect the changes made.\\n2. **Squash Commits**: Combine multiple related commits into a single commit before merging to keep the history tidy.\\n3. **Avoid WIP Commits**: Do not commit work-in-progress changes; instead, use branches for ongoing work.'), AlpacaItem(instruction='Explain the significance of testing in the development process of CAMEL.', input='', output='The significance of testing in the development process of CAMEL includes:\\n1. **Ensuring Functionality**: Tests verify that the code behaves as expected and meets requirements.\\n2. **Identifying Bugs Early**: Early detection of bugs helps reduce the cost and effort of fixing them later in the development cycle.\\n3. **Supporting Refactoring**: A robust test suite allows for safe refactoring by ensuring that existing functionality is not broken.'), AlpacaItem(instruction='How can contributors effectively onboard new developers in CAMEL?', input='', output='Contributors can effectively onboard new developers in CAMEL by:\\n1. **Providing Clear Documentation**: Ensure that onboarding documentation is comprehensive and easy to understand.\\n2. **Offering Support**: Be available to answer questions and provide guidance as new developers get acclimated.\\n3. **Encouraging Participation**: Invite new developers to participate in discussions and contribute to issues to foster engagement.'), AlpacaItem(instruction='What is the role of automated testing in the CAMEL project?', input='', output='The role of automated testing in the CAMEL project includes:\\n1. **Continuous Validation**: Automatically run tests to validate code changes continuously.\\n2. **Reducing Manual Effort**: Minimize the need for manual testing, saving time and resources.\\n3. **Ensuring Consistency**: Maintain consistent testing practices across different environments and contributors.'), AlpacaItem(instruction='What are the key components of a successful pull request in CAMEL?', input='', output='Key components of a successful pull request in CAMEL include:\\n1. **Clear Title and Description**: A descriptive title and detailed description explaining the changes and their purpose.\\n2. **Link to Related Issues**: References to any related issues that the pull request addresses.\\n3. **Thorough Testing**: Evidence that the changes have been tested and do not break existing functionality.'), AlpacaItem(instruction='How should contributors handle updates to existing documentation?', input='', output='Contributors should handle updates to existing documentation by:\\n1. **Reviewing Current Content**: Identify areas that are outdated or inaccurate.\\n2. **Making Necessary Revisions**: Update the documentation to reflect current functionality and best practices.\\n3. **Adding Examples**: Include relevant examples to clarify usage and improve understanding.'), AlpacaItem(instruction='What is the importance of community engagement in CAMEL?', input='', output='The importance of community engagement in CAMEL includes:\\n1. **Fostering Collaboration**: Encourages collaboration among contributors and maintainers, enhancing project quality.\\n2. **Gathering Feedback**: Provides valuable feedback from users and contributors that can inform project direction and improvements.\\n3. **Building a Supportive Environment**: Creates a welcoming atmosphere for new contributors, promoting growth and participation.'), AlpacaItem(instruction='Explain the process of adding a new feature to CAMEL.', input='', output=\"The process of adding a new feature to CAMEL includes:\\n1. **Discussing the Feature**: Engage with maintainers and the community to discuss the feature's feasibility and value.\\n2. **Creating an Issue**: Document the feature request in an issue to track progress and gather input.\\n3. **Implementing the Feature**: Develop the feature in a dedicated branch, ensuring to follow coding standards and practices.\\n4. **Testing and Documentation**: Write tests and update documentation to reflect the new feature.\\n5. **Submitting a Pull Request**: Create a pull request for review, linking to the original feature request.\"), AlpacaItem(instruction='What are the best practices for managing project milestones in CAMEL?', input='', output='Best practices for managing project milestones in CAMEL include:\\n1. **Defining Clear Objectives**: Set specific, measurable goals for each milestone to guide progress.\\n2. **Regularly Reviewing Progress**: Conduct regular check-ins to assess progress towards milestones and adjust plans as necessary.\\n3. **Communicating Changes**: Keep the community informed about any changes to milestones or timelines.'), AlpacaItem(instruction='How can contributors ensure effective communication in the CAMEL project?', input='', output='Contributors can ensure effective communication in the CAMEL project by:\\n1. **Utilizing Communication Channels**: Actively use Discord, Slack, and other platforms for discussions and updates.\\n2. **Being Clear and Concise**: Communicate ideas clearly and concisely to avoid misunderstandings.\\n3. **Encouraging Feedback**: Foster an environment where feedback is welcomed and constructive, promoting open dialogue.'), AlpacaItem(instruction='What are the key principles for naming variables in CAMEL?', input='', output='The key principles for naming variables in CAMEL include:\\n1. **Avoiding Abbreviations**: Abbreviations can lead to ambiguity, so clear and descriptive names should be used.\\n2. **Descriptive Names**: Variable names should convey meaning without requiring additional explanation to improve readability.'), AlpacaItem(instruction='Describe the steps to build documentation locally for CAMEL.', input='', output='To build documentation locally for CAMEL, follow these steps:\\n1. Navigate to the `docs` directory: `cd docs`\\n2. Run the command to build HTML documentation: `make html`.'), AlpacaItem(instruction='What is the significance of using `logger` instead of `print` in CAMEL?', input='', output='Using `logger` instead of `print` is significant because:\\n1. **Consistency**: `logger` provides a consistent logging interface across the application.\\n2. **Configurability**: It allows for configurable log levels and formats, improving the professionalism of logging.'), AlpacaItem(instruction='What should contributors do before submitting a pull request?', input='', output='Before submitting a pull request, contributors should:\\n1. Ensure all tests pass and the code is properly formatted.\\n2. Mention any related issues and tag relevant maintainers in the pull request.'), AlpacaItem(instruction='How can contributors get help if they face challenges during the setup process?', input='', output='Contributors can get help by:\\n1. Consulting the documentation for troubleshooting guidance.\\n2. Reaching out to maintainers through communication channels like Discord or Slack.'), AlpacaItem(instruction='What are the main communication channels available for CAMEL contributors?', input='', output='The main communication channels available for CAMEL contributors include:\\n1. **Discord**: For real-time discussions and community engagement.\\n2. **WeChat**: For Chinese-speaking contributors.\\n3. **Slack**: For organized communication and collaboration.'), AlpacaItem(instruction='Explain the Fork-and-Pull-Request workflow for community contributors.', input='', output='The Fork-and-Pull-Request workflow involves:\\n1. **Forking the Repository**: Contributors create a personal copy of the repository.\\n2. **Making Changes**: They make their changes in a branch of their fork.\\n3. **Submitting a Pull Request**: After committing changes, they submit a pull request to the original repository.'), AlpacaItem(instruction='What is the importance of unit tests when fixing bugs in CAMEL?', input='', output='The importance of unit tests when fixing bugs includes:\\n1. **Verification**: They help verify that the bug is fixed and that the code performs as intended.\\n2. **Preventing Regression**: Unit tests ensure that the same bug does not reoccur in future updates.'), AlpacaItem(instruction='Describe the process for conducting code reviews in CAMEL.', input='', output='The process for conducting code reviews in CAMEL includes:\\n1. **Reviewing Functionality**: Check if the code performs its intended task correctly.\\n2. **Providing Feedback**: Leave constructive feedback for contributors to address.\\n3. **Approval**: Once changes are made, the reviewer re-evaluates and approves the code if it meets standards.'), AlpacaItem(instruction='What guidelines should be followed when adding new features to CAMEL?', input='', output='When adding new features, contributors should:\\n1. Include relevant unit tests in the `test` directory.\\n2. Update documentation and example scripts to reflect the new feature.'), AlpacaItem(instruction='What are some common pitfalls to avoid during code reviews?', input='', output='Common pitfalls to avoid during code reviews include:\\n1. **Large Pull Requests**: Submitting overly large PRs that are difficult to review.\\n2. **Ignoring Feedback**: Not addressing feedback from reviewers can lead to unmerged PRs.'), AlpacaItem(instruction='What is the purpose of having a structured workflow for managing project items in CAMEL?', input='', output='The purpose of having a structured workflow includes:\\n1. **Efficiency**: It streamlines the process of issue creation, pull requests, and sprint planning.\\n2. **Clarity**: It ensures clear communication and organization within the development team.'), AlpacaItem(instruction='How should contributors handle outdated issues in the CAMEL GitHub repository?', input='', output='Contributors should handle outdated issues by:\\n1. **Flagging Outdated Issues**: Inform maintainers about issues that may no longer be relevant.\\n2. **Linking Related Issues**: If issues are related, linking them instead of merging can help maintain clarity.'), AlpacaItem(instruction='What are the guidelines for writing docstrings in CAMEL?', input='', output='Guidelines for writing docstrings include:\\n1. **Use Triple-Quoted Strings**: Begin with `r\"\"\"` for raw strings to avoid special character issues.\\n2. **Brief Descriptions**: Provide concise summaries of classes or methods without exceeding 79 characters per line.'), AlpacaItem(instruction='What is the significance of sprint planning in CAMEL?', input='', output='The significance of sprint planning includes:\\n1. **Defining Deliverables**: It outlines what can be delivered in the upcoming sprint.\\n2. **Collaboration**: It fosters collaboration among team members to align on goals and priorities.'), AlpacaItem(instruction='What steps should be taken to ensure code quality during contributions?', input='', output=\"To ensure code quality, contributors should:\\n1. Follow the project's coding standards and style guidelines.\\n2. Conduct thorough testing and include documentation for any new features or changes.\"), AlpacaItem(instruction='How can contributors contribute to documentation in CAMEL?', input='', output='Contributors can contribute to documentation by:\\n1. Providing comprehensive documentation for all classes and methods.\\n2. Updating existing documentation to reflect any changes made in the codebase.'), AlpacaItem(instruction='What is the process for merging pull requests in CAMEL?', input='', output='The process for merging pull requests includes:\\n1. **Approval**: The pull request must be approved by at least two reviewers.\\n2. **Merging**: A maintainer or authorized contributor merges the approved PR into the main branch.'), AlpacaItem(instruction='Why is it important to document parameters in the `Args:` section of docstrings?', input='', output='Documenting parameters in the `Args:` section is important because:\\n1. **Clarity**: It provides clear information about the function or class parameters, helping users understand their roles.\\n2. **Usage Guidance**: It aids in correctly utilizing the function or class by specifying expected types and default values.'), AlpacaItem(instruction='What should contributors do if they want to give credit for their contributions?', input='', output='Contributors should:\\n1. Inform maintainers of their Twitter handle in the pull request if they want to receive credit.\\n2. Ensure they are comfortable with being mentioned publicly.'), AlpacaItem(instruction='What steps should be taken when updating dependencies in CAMEL?', input='', output='When updating dependencies, contributors should:\\n1. Modify the `pyproject.toml` file as needed.\\n2. Run `poetry lock` to synchronize the dependencies with the lock file.'), AlpacaItem(instruction='Explain the importance of security checks during code reviews.', input='', output='Security checks during code reviews are important because:\\n1. **Vulnerability Prevention**: They help identify and mitigate potential security vulnerabilities introduced by new code.\\n2. **Code Integrity**: Ensuring that the code adheres to security best practices maintains the integrity of the application.'), AlpacaItem(instruction='What is the purpose of the `Common Actions` section in CAMEL documentation?', input='', output='The `Common Actions` section serves to provide quick references for frequent tasks, such as:\\n1. **Updating Dependencies**: Steps to ensure dependencies are synchronized.\\n2. **Running Tests**: Guidelines for executing tests to verify code functionality.'), AlpacaItem(instruction='How can contributors ensure their code adheres to style guidelines?', input='', output='Contributors can ensure adherence to style guidelines by:\\n1. Running formatting tools like `ruff` to check and format their code before submission.\\n2. Reviewing the project’s style guide to understand the expected conventions.'), AlpacaItem(instruction='What is the significance of using the `pre-commit` hook in CAMEL?', input='', output='The significance of using the `pre-commit` hook includes:\\n1. **Automation**: It automatically formats and lints the code before every commit, ensuring consistency.\\n2. **Error Reduction**: It helps catch errors early in the development process, improving overall code quality.'), AlpacaItem(instruction='What is the role of the `test` directory in CAMEL?', input='', output='The `test` directory plays a crucial role in CAMEL by:\\n1. **Housing Unit Tests**: It contains unit tests that verify the functionality of individual components.\\n2. **Supporting Quality Assurance**: Running these tests ensures that code changes do not introduce new bugs.'), AlpacaItem(instruction='How should contributors respond to feedback received during code reviews?', input='', output='Contributors should respond to feedback by:\\n1. **Addressing Suggestions**: Making necessary changes based on the feedback provided.\\n2. **Engaging in Discussion**: If they disagree with feedback, discussing their perspective constructively.'), AlpacaItem(instruction='What are the benefits of attending developer meetings in CAMEL?', input='', output='The benefits of attending developer meetings include:\\n1. **Collaboration**: Opportunities to collaborate with other contributors and share ideas.\\n2. **Updates**: Staying informed about project developments and upcoming features.'), AlpacaItem(instruction='What actions should be taken when creating a new issue on GitHub?', input='', output='When creating a new issue on GitHub, the following actions should be taken:\\n1. **Clear Title**: Provide a clear and descriptive title for the issue.\\n2. **Detailed Description**: Include a detailed description outlining the issue, steps to reproduce it, and any relevant context.'), AlpacaItem(instruction='How can contributors ensure that their contributions are recognized?', input='', output='Contributors can ensure recognition of their contributions by:\\n1. Mentioning their achievements in the pull request comments.\\n2. Providing their social media handles if they wish to receive public acknowledgment.'), AlpacaItem(instruction='What should contributors include in their pull requests to facilitate reviews?', input='', output='Contributors should include the following in their pull requests:\\n1. **Descriptive Title**: A clear title summarizing the changes made.\\n2. **Link to Related Issues**: Reference any related issues to provide context.'), AlpacaItem(instruction='Describe the importance of maintaining code quality in CAMEL.', input='', output='Maintaining code quality is important because:\\n1. **Readability**: High-quality code is easier to read and understand for current and future contributors.\\n2. **Maintainability**: It ensures the codebase can be easily updated and modified without introducing errors.'), AlpacaItem(instruction='What is the significance of the `License` section in CAMEL documentation?', input='', output='The `License` section is significant because:\\n1. **Legal Clarity**: It provides clarity on the legal terms under which the code can be used and modified.\\n2. **Contributor Rights**: It specifies the rights of contributors regarding their contributions to the project.'), AlpacaItem(instruction='What guidelines should be followed when submitting bug fixes?', input='', output='When submitting bug fixes, contributors should:\\n1. Add relevant unit tests to verify the fix.\\n2. Update documentation if the fix affects any user-facing features.'), AlpacaItem(instruction='What steps should be taken to ensure proper testing of new features?', input='', output='To ensure proper testing of new features, contributors should:\\n1. Write unit tests that cover various scenarios related to the new feature.\\n2. Run all tests to verify that existing functionality remains unaffected.'), AlpacaItem(instruction='How can contributors effectively communicate during the development process?', input='', output='Contributors can effectively communicate by:\\n1. Utilizing designated communication channels like Discord or Slack for discussions.\\n2. Providing regular updates on their progress during team meetings.'), AlpacaItem(instruction='What are the best practices for conducting code reviews?', input='', output='Best practices for conducting code reviews include:\\n1. **Timely Reviews**: Aim to review pull requests promptly to keep the development process moving.\\n2. **Constructive Feedback**: Provide clear, actionable feedback to help contributors improve their code.'), AlpacaItem(instruction='What should contributors do if they encounter a security vulnerability?', input='', output='If contributors encounter a security vulnerability, they should:\\n1. Report it immediately to the maintainers through the appropriate channels.\\n2. Avoid publicly disclosing the vulnerability until it has been addressed.'), AlpacaItem(instruction='What is the role of the `Quick Start` section in documentation?', input='', output='The `Quick Start` section serves to provide new contributors with a streamlined introduction to setting up the project, including:\\n1. **Installation Instructions**: Step-by-step guidance on how to clone the repository and install dependencies.\\n2. **Initial Setup Commands**: Commands to run for setting up the environment and verifying the installation.'), AlpacaItem(instruction='What should be included in the `Contributing to Documentation` section?', input='', output='The `Contributing to Documentation` section should include:\\n1. **Documentation Standards**: Guidelines for writing and updating documentation.\\n2. **Submission Process**: Instructions on how to submit documentation changes, including any relevant links to tools or resources.'), AlpacaItem(instruction='How can contributors ensure that their pull requests are ready for review?', input='', output='Contributors can ensure their pull requests are ready for review by:\\n1. Running all tests and ensuring they pass.\\n2. Formatting the code according to project style guidelines.'), AlpacaItem(instruction='What is the purpose of the `Giving Credit` section in CAMEL documentation?', input='', output='The purpose of the `Giving Credit` section is to acknowledge contributors for their work and provide a way for them to receive recognition, particularly on social media platforms like Twitter.'), AlpacaItem(instruction='What actions should be taken during sprint reviews?', input='', output='During sprint reviews, the following actions should be taken:\\n1. **Demonstration of Features**: Showcase the completed features to stakeholders for feedback.\\n2. **Feedback Collection**: Gather feedback from stakeholders regarding the work completed.'), AlpacaItem(instruction='What is the significance of using the `pull request` template in CAMEL?', input='', output='The significance of using the `pull request` template includes:\\n1. **Consistency**: It ensures all necessary information is provided for reviewers.\\n2. **Guidance**: It helps contributors understand what details are important to include.'), AlpacaItem(instruction='How can contributors maintain effective communication with maintainers?', input='', output=\"Contributors can maintain effective communication by:\\n1. Being proactive in discussing their contributions and seeking feedback.\\n2. Respecting maintainers' time and being concise in their communications.\"), AlpacaItem(instruction='What should contributors do if they disagree with feedback on their pull request?', input='', output='If contributors disagree with feedback, they should:\\n1. Engage in a constructive discussion with the reviewers to understand their perspective.\\n2. Present their reasoning clearly and respectfully.'), AlpacaItem(instruction='How can the `Common Actions` section help new contributors?', input='', output='The `Common Actions` section can help new contributors by providing:\\n1. **Quick References**: Easy access to frequently needed commands and procedures.\\n2. **Guidance**: Clear instructions on how to perform common tasks within the project.'), AlpacaItem(instruction='What steps should be taken when preparing for a developer meeting?', input='', output='When preparing for a developer meeting, participants should:\\n1. Review agenda items and come prepared with updates on their tasks.\\n2. Be ready to discuss any blockers or challenges they are facing.'), AlpacaItem(instruction='What is the purpose of the `Board Item Create Workflow` in CAMEL?', input='', output='The purpose of the `Board Item Create Workflow` is to streamline the process of managing project items, ensuring that:\\n1. **Clarity**: Each item is tracked and organized effectively.\\n2. **Efficiency**: Contributors can easily navigate through issues and pull requests.'), AlpacaItem(instruction='What should be included in the `Review Process Overview` section?', input='', output='The `Review Process Overview` section should include:\\n1. **Functionality Checks**: Guidelines on what to review regarding code functionality.\\n2. **Feedback Process**: Steps on how to provide and address feedback during the review.'), AlpacaItem(instruction='What steps should a contributor follow to create a new issue in CAMEL?', input='', output=\"To create a new issue in CAMEL, a contributor should follow these steps:\\n1. Navigate to the [GitHub Issues](https://github.com/camel-ai/camel/issues) page.\\n2. Click on 'New Issue' and select the relevant category (bug, improvement, feature).\\n3. Fill in the required information, ensuring the issue has a descriptive title.\\n4. Assign the issue to themselves to indicate it's being worked on.\\n5. Discuss the issue during team meetings and move it to the appropriate columns in the project board.\"), AlpacaItem(instruction='Explain the workflow for submitting a pull request in the CAMEL project.', input='', output=\"The workflow for submitting a pull request in the CAMEL project involves several steps:\\n1. Ensure your branch is up to date with the main branch.\\n2. Make your code changes and commit them with a clear message following best practices.\\n3. Push your branch to the remote repository.\\n4. Navigate to the 'Pull Requests' section on GitHub and click 'New Pull Request'.\\n5. Select your branch and compare it with the main branch, providing a detailed description of the changes.\\n6. Link any related issues and assign reviewers before submitting the pull request.\"), AlpacaItem(instruction='What guidelines should contributors follow when writing documentation for CAMEL?', input='', output='Contributors should follow these guidelines when writing documentation for CAMEL:\\n1. **Clarity**: Ensure that documentation is clear, concise, and easy to understand.\\n2. **Structure**: Organize content logically, using headings and sections for better readability.\\n3. **Examples**: Include examples to illustrate complex concepts or code snippets.\\n4. **Consistency**: Use consistent terminology and formatting throughout the documentation.'), AlpacaItem(instruction='How can contributors test their changes locally before submitting a pull request?', input='', output='Contributors can test their changes locally by following these steps:\\n1. Clone the repository and navigate to the project directory.\\n2. Activate the virtual environment using `poetry shell`.\\n3. Install the necessary dependencies using `poetry install --with dev,docs -E all`.\\n4. Run the pre-commit hooks to check for formatting and linting issues with `pre-commit run --all-files`.\\n5. Execute the unit tests using `pytest .` to ensure all tests pass.'), AlpacaItem(instruction='What is the purpose of the `logger` in CAMEL, and how should it be used?', input='', output='The purpose of the `logger` in CAMEL is to provide a consistent and configurable way to output log messages, replacing `print` statements. Contributors should use it as follows:\\n1. Import the logging module and configure the logger at the beginning of the code.\\n2. Use `logger.info()`, `logger.debug()`, and other logging methods to log messages instead of `print`.\\n3. Ensure that log messages are clear and provide useful information for debugging.'), AlpacaItem(instruction='Describe the importance of following code style guidelines in CAMEL.', input='', output='Following code style guidelines in CAMEL is important for several reasons:\\n1. **Consistency**: It ensures a consistent codebase, making it easier for contributors to read and understand the code.\\n2. **Maintainability**: Well-styled code is easier to maintain and modify over time, reducing the likelihood of introducing bugs.\\n3. **Collaboration**: Adhering to style guidelines fosters better collaboration among contributors, as everyone is on the same page regarding code formatting.'), AlpacaItem(instruction='What is the role of code reviews in the CAMEL project?', input='', output=\"Code reviews in the CAMEL project serve several key roles:\\n1. **Quality Assurance**: They help maintain code quality by ensuring that all contributions meet the project's standards.\\n2. **Knowledge Sharing**: Code reviews facilitate knowledge sharing among contributors, allowing them to learn from each other.\\n3. **Bug Prevention**: They catch potential bugs and issues before the code is merged into the main branch, enhancing overall project stability.\"), AlpacaItem(instruction='Explain the process for conducting a sprint review in CAMEL.', input='', output='The process for conducting a sprint review in CAMEL includes:\\n1. **Participants**: Involve all stakeholders, including developers and project maintainers.\\n2. **Feedback Session**: Review the features delivered during the sprint and gather feedback from stakeholders on their functionality.\\n3. **Improvement Discussion**: Identify areas for improvement based on the feedback received and plan for future sprints.'), AlpacaItem(instruction='What should contributors do if they encounter outdated issues on GitHub?', input='', output='If contributors encounter outdated issues on GitHub, they should:\\n1. Notify the maintainers by commenting on the issue to bring it to their attention.\\n2. Provide any relevant context or updates that may help in resolving the issue.\\n3. If they believe the issue is no longer relevant, suggest closing it with a brief explanation.'), AlpacaItem(instruction='How should contributors handle feedback received during code reviews?', input='', output='Contributors should handle feedback received during code reviews by:\\n1. **Reading Carefully**: Take time to read and understand the feedback provided by reviewers.\\n2. **Addressing Concerns**: Make the necessary changes to the code based on the feedback.\\n3. **Engaging in Discussion**: If there are disagreements or questions about the feedback, engage in a constructive discussion with the reviewers to reach a consensus.'), AlpacaItem(instruction='What is the significance of using `pre-commit` hooks in the CAMEL project?', input='', output='The significance of using `pre-commit` hooks in the CAMEL project includes:\\n1. **Automated Checks**: They automate formatting and linting checks before code is committed, ensuring adherence to style guidelines.\\n2. **Quality Assurance**: This helps maintain high code quality and reduces the chances of introducing errors into the codebase.\\n3. **Efficiency**: Contributors save time by catching potential issues early in the development process.'), AlpacaItem(instruction='Explain the steps to build documentation locally for CAMEL.', input='', output='To build documentation locally for CAMEL, follow these steps:\\n1. Navigate to the `docs` directory using the command line.\\n2. Run the command `make html` to generate the HTML documentation.\\n3. Open the generated documentation in a web browser by navigating to `htmlcov/index.html`.'), AlpacaItem(instruction='What are the common pitfalls to avoid when submitting pull requests?', input='', output='Common pitfalls to avoid when submitting pull requests include:\\n1. **Large Pull Requests**: Avoid submitting overly large PRs; break them down into smaller, manageable changes.\\n2. **Ignoring Feedback**: Always address feedback provided by reviewers instead of ignoring it.\\n3. **Rushed Reviews**: Take the time to thoroughly review your own code before submitting to ensure quality.'), AlpacaItem(instruction='What is the process for updating dependencies in the CAMEL project?', input='', output='The process for updating dependencies in the CAMEL project is as follows:\\n1. Modify the `pyproject.toml` file to add, update, or delete dependencies.\\n2. Run the command `poetry lock` to synchronize the dependencies with the lock file.\\n3. Test the project to ensure that all functionalities work with the updated dependencies.'), AlpacaItem(instruction='How can contributors ensure their contributions align with project goals?', input='', output=\"Contributors can ensure their contributions align with project goals by:\\n1. **Reviewing Project Documentation**: Familiarize themselves with the project's mission, guidelines, and current goals.\\n2. **Participating in Discussions**: Engage in community discussions to understand ongoing priorities and needs.\\n3. **Linking Issues**: When submitting PRs, link them to relevant issues that reflect the project goals.\"), AlpacaItem(instruction='What are the best practices for writing effective unit tests in CAMEL?', input='', output='Best practices for writing effective unit tests in CAMEL include:\\n1. **Coverage**: Ensure that tests cover all relevant functionality, including edge cases and error scenarios.\\n2. **Isolation**: Keep tests isolated from external dependencies to ensure they run reliably and quickly.\\n3. **Descriptive Names**: Use clear and descriptive names for test functions to indicate their purpose and expected behavior.'), AlpacaItem(instruction='What guidelines should contributors follow when creating new features for CAMEL?', input='', output='When creating new features for CAMEL, contributors should follow these guidelines:\\n1. **Documentation**: Provide comprehensive documentation for the new feature, including usage examples.\\n2. **Testing**: Include unit tests that cover the new feature to ensure its reliability.\\n3. **Code Quality**: Adhere to the project’s coding standards and style guidelines to maintain consistency.'), AlpacaItem(instruction='How can contributors effectively manage their time while working on CAMEL?', input='', output='Contributors can effectively manage their time while working on CAMEL by:\\n1. **Setting Priorities**: Identify and prioritize tasks based on their importance and deadlines.\\n2. **Creating a Schedule**: Allocate specific time blocks for working on issues or features and stick to the schedule.\\n3. **Breaking Down Tasks**: Divide larger tasks into smaller, manageable pieces to avoid feeling overwhelmed.'), AlpacaItem(instruction='What should contributors do if they encounter a merge conflict?', input='', output='If contributors encounter a merge conflict, they should:\\n1. **Identify Conflicted Files**: Review the files with conflicts and understand the changes made in both branches.\\n2. **Resolve Conflicts**: Manually edit the conflicted files to resolve discrepancies, ensuring the final version is correct.\\n3. **Test Changes**: After resolving conflicts, run tests to ensure the code behaves as expected before proceeding with the merge.'), AlpacaItem(instruction=\"What are the consequences of not following the project's coding standards?\", input='', output=\"Not following the project's coding standards can lead to several consequences:\\n1. **Code Quality Issues**: It may result in poorly structured or hard-to-read code, making it difficult for others to maintain.\\n2. **Increased Review Time**: Reviewers may spend more time addressing style issues, delaying the review process.\\n3. **Integration Challenges**: Inconsistent coding styles can create integration challenges, leading to potential bugs and conflicts.\"), AlpacaItem(instruction='How can contributors ensure that their pull requests are merged in a timely manner?', input='', output=\"Contributors can ensure that their pull requests are merged in a timely manner by:\\n1. **Being Responsive**: Actively respond to feedback from reviewers and make necessary changes promptly.\\n2. **Following Guidelines**: Adhere to the project's contribution guidelines to avoid delays caused by style or format issues.\\n3. **Communicating**: Maintain open communication with maintainers regarding the status and urgency of the pull request.\"), AlpacaItem(instruction='What is the role of the `test` directory in the CAMEL project?', input='', output='The `test` directory in the CAMEL project plays a crucial role by:\\n1. **Housing Unit Tests**: It contains unit tests that verify the functionality of various components and features within the project.\\n2. **Ensuring Code Reliability**: The tests help ensure that changes do not introduce new bugs, maintaining the integrity of the codebase.\\n3. **Facilitating Continuous Integration**: The tests can be run automatically in CI/CD pipelines to validate contributions before merging.'), AlpacaItem(instruction='What strategies can be employed to improve collaboration among contributors in CAMEL?', input='', output='Strategies to improve collaboration among contributors in CAMEL include:\\n1. **Regular Meetings**: Hold regular meetings to discuss progress, share updates, and address challenges.\\n2. **Utilizing Communication Tools**: Leverage platforms like Discord and Slack for real-time communication and discussions.\\n3. **Encouraging Pair Programming**: Promote pair programming sessions to foster collaboration and knowledge sharing.'), AlpacaItem(instruction='What is the significance of maintaining a changelog in the CAMEL project?', input='', output='Maintaining a changelog in the CAMEL project is significant because it:\\n1. **Tracks Changes**: Provides a clear record of changes made to the project over time, including new features, bug fixes, and improvements.\\n2. **Enhances Transparency**: Keeps contributors and users informed about the evolution of the project and upcoming changes.\\n3. **Facilitates Versioning**: Assists in managing version releases by documenting the history of changes associated with each release.'), AlpacaItem(instruction='How can contributors effectively use issues to manage their work in CAMEL?', input='', output='Contributors can effectively use issues to manage their work in CAMEL by:\\n1. **Creating Clear Issues**: Write clear and descriptive issues that outline the problem or feature request.\\n2. **Assigning Issues**: Assign issues to themselves when they start working on them to indicate ownership.\\n3. **Commenting on Progress**: Use comments to update the status of the issue and discuss any challenges faced during development.'), AlpacaItem(instruction='What best practices should be followed when writing commit messages?', input='', output=\"Best practices for writing commit messages include:\\n1. **Use the Imperative Mood**: Write in the imperative mood (e.g., 'Fix bug' instead of 'Fixed bug').\\n2. **Be Concise**: Keep messages short and to the point, summarizing the changes in a single sentence.\\n3. **Reference Related Issues**: Include references to any related issues or pull requests to provide context.\"), AlpacaItem(instruction='What is the purpose of the `examples` directory in CAMEL?', input='', output='The `examples` directory in CAMEL serves the purpose of:\\n1. **Demonstrating Features**: Providing practical examples of how to use the various features and functionalities of the project.\\n2. **Assisting New Contributors**: Helping new contributors understand how to implement features by offering reference code.\\n3. **Testing Ground**: Serving as a testing ground for new ideas and implementations before they are fully integrated into the main codebase.'), AlpacaItem(instruction='How can contributors contribute to improving documentation in CAMEL?', input='', output=\"Contributors can improve documentation in CAMEL by:\\n1. **Reviewing Existing Documentation**: Regularly reviewing and updating existing documentation to ensure it is accurate and up to date.\\n2. **Adding Examples**: Including examples and use cases that illustrate how to use the project's features effectively.\\n3. **Suggesting Improvements**: Providing feedback and suggestions for improving the structure and clarity of the documentation.\"), AlpacaItem(instruction='What is the significance of the `LICENSE` file in the CAMEL project?', input='', output='The significance of the `LICENSE` file in the CAMEL project includes:\\n1. **Legal Clarity**: It provides legal clarity regarding the rights and responsibilities of contributors and users of the code.\\n2. **Open Source Compliance**: Ensures compliance with open-source licensing standards, allowing others to use, modify, and distribute the software.\\n3. **Attraction of Contributors**: A clear license can attract more contributors who are assured of their rights regarding their contributions.'), AlpacaItem(instruction='What steps should be taken to prepare for a successful sprint planning meeting?', input='', output='To prepare for a successful sprint planning meeting, the following steps should be taken:\\n1. **Review Backlog**: Ensure that the backlog is up to date with prioritized items ready for discussion.\\n2. **Set Goals**: Define clear goals for the upcoming sprint to guide the planning process.\\n3. **Gather Input**: Collect input from team members on what items they believe should be included in the sprint.'), AlpacaItem(instruction='How can contributors effectively track their progress on tasks in CAMEL?', input='', output='Contributors can effectively track their progress on tasks in CAMEL by:\\n1. **Using Project Boards**: Utilize GitHub project boards to visualize the status of tasks and their progress.\\n2. **Updating Issues**: Regularly update the status of issues they are working on to reflect current progress.\\n3. **Setting Milestones**: Establish milestones for larger tasks to break them down into manageable parts and track completion.'), AlpacaItem(instruction='What are the benefits of having a well-defined contribution process in CAMEL?', input='', output='The benefits of having a well-defined contribution process in CAMEL include:\\n1. **Clarity**: It provides clarity for contributors on how to get involved and what is expected of them.\\n2. **Efficiency**: A clear process streamlines contributions, reducing the time spent on administrative tasks.\\n3. **Quality Control**: It helps maintain the quality of contributions through established guidelines and review processes.'), AlpacaItem(instruction='What is the role of the `docs` directory in the CAMEL project?', input='', output='The `docs` directory in the CAMEL project plays a crucial role by:\\n1. **Housing Documentation**: It contains all project documentation, including usage guides, API references, and contribution guidelines.\\n2. **Facilitating User Understanding**: The documentation helps users understand how to use the project effectively.\\n3. **Supporting Contributor Onboarding**: It serves as a resource for new contributors to learn about the project and how to contribute.'), AlpacaItem(instruction='What should contributors do if they want to suggest a new feature for CAMEL?', input='', output=\"If contributors want to suggest a new feature for CAMEL, they should:\\n1. **Create a New Issue**: Open a new issue on GitHub detailing the feature request, including its purpose and potential benefits.\\n2. **Provide Context**: Explain why the feature is needed and how it aligns with the project's goals.\\n3. **Engage in Discussion**: Be open to feedback and discussion from other contributors and maintainers regarding the feasibility and implementation of the feature.\"), AlpacaItem(instruction='How can contributors ensure their code is secure before submitting a pull request?', input='', output='Contributors can ensure their code is secure before submitting a pull request by:\\n1. **Reviewing Security Practices**: Familiarize themselves with security best practices relevant to the project.\\n2. **Conducting Code Reviews**: Have peers review their code to catch potential security vulnerabilities.\\n3. **Running Security Scans**: Utilize tools to run security scans on their code to identify any vulnerabilities before submission.'), AlpacaItem(instruction='What is the importance of automated testing in the CAMEL project?', input='', output='Automated testing in the CAMEL project is important for several reasons:\\n1. **Efficiency**: It allows for quick validation of code changes, reducing the time needed for manual testing.\\n2. **Consistency**: Automated tests provide consistent results, ensuring that code behaves as expected across different environments.\\n3. **Regression Prevention**: They help prevent regressions by ensuring that new changes do not break existing functionality.'), AlpacaItem(instruction='What guidelines should be followed when conducting a code review in CAMEL?', input='', output='Guidelines for conducting a code review in CAMEL include:\\n1. **Functionality Check**: Verify that the code performs the intended tasks and adheres to project requirements.\\n2. **Constructive Feedback**: Provide feedback that is clear, constructive, and aimed at improvement.\\n3. **Timely Reviews**: Strive to complete reviews promptly to keep the development process moving.'), AlpacaItem(instruction='How can contributors effectively onboard new members to the CAMEL project?', input='', output='Contributors can effectively onboard new members to the CAMEL project by:\\n1. **Providing Resources**: Share relevant documentation, resources, and links to help new members get started.\\n2. **Offering Guidance**: Be available to answer questions and provide guidance as new members navigate the contribution process.\\n3. **Encouraging Participation**: Encourage new members to participate in discussions and contribute to ongoing projects.'), AlpacaItem(instruction=\"What is the significance of using clear naming conventions in CAMEL's codebase?\", input='', output=\"Using clear naming conventions in CAMEL's codebase is significant because:\\n1. **Readability**: It enhances code readability, making it easier for contributors to understand the purpose of variables and functions.\\n2. **Maintainability**: Clear names reduce ambiguity, making the code easier to maintain and modify in the future.\\n3. **Collaboration**: It fosters better collaboration among contributors by ensuring that everyone can interpret the code consistently.\"), AlpacaItem(instruction='What should contributors do to ensure their contributions are properly credited?', input='', output='To ensure their contributions are properly credited, contributors should:\\n1. **Mention Social Media Handles**: Provide their social media handles in pull requests if they wish to receive public acknowledgment.\\n2. **Engage with the Community**: Participate in community discussions and events to build recognition within the project.\\n3. **Follow Up**: Check in with maintainers to confirm that their contributions are acknowledged in release notes or social media.'), AlpacaItem(instruction='What steps should be taken to maintain the quality of the CAMEL project over time?', input='', output='To maintain the quality of the CAMEL project over time, the following steps should be taken:\\n1. **Regular Code Reviews**: Implement regular code reviews to ensure all contributions meet quality standards.\\n2. **Continuous Testing**: Utilize automated testing to catch bugs and regressions early in the development process.\\n3. **Documentation Updates**: Keep documentation up to date to reflect changes in the project and provide accurate guidance for users and contributors.'), AlpacaItem(instruction='How can contributors make sure their code is compatible with existing code in CAMEL?', input='', output='Contributors can ensure their code is compatible with existing code in CAMEL by:\\n1. **Reviewing the Codebase**: Familiarize themselves with the existing codebase and its structure before making changes.\\n2. **Running Tests**: Execute existing tests to verify that their changes do not break any existing functionality.\\n3. **Engaging with Reviewers**: Actively seek feedback from reviewers regarding compatibility and integration with the current code.'), AlpacaItem(instruction='What practices should be followed to ensure effective communication within the CAMEL community?', input='', output='To ensure effective communication within the CAMEL community, the following practices should be followed:\\n1. **Active Participation**: Encourage all members to actively participate in discussions and provide input on decisions.\\n2. **Clear Messaging**: Use clear and concise language in communications to avoid misunderstandings.\\n3. **Utilizing Multiple Channels**: Leverage various communication channels (Discord, Slack, GitHub) to reach all members effectively.'), AlpacaItem(instruction='What is the importance of maintaining a consistent development workflow in CAMEL?', input='', output='Maintaining a consistent development workflow in CAMEL is important for:\\n1. **Predictability**: It provides predictability in the development process, helping contributors understand what to expect.\\n2. **Efficiency**: A consistent workflow streamlines processes, reducing confusion and improving productivity.\\n3. **Quality Control**: It ensures that all contributions undergo the same review and testing procedures, maintaining overall project quality.'), AlpacaItem(instruction='How can contributors effectively share their knowledge and expertise within the CAMEL community?', input='', output='Contributors can effectively share their knowledge and expertise within the CAMEL community by:\\n1. **Writing Blog Posts**: Contributing articles or blog posts about their experiences and insights related to the project.\\n2. **Conducting Workshops**: Organizing workshops or training sessions to teach specific skills or concepts to other community members.\\n3. **Mentoring New Contributors**: Offering to mentor new contributors, guiding them through the onboarding process and sharing best practices.'), AlpacaItem(instruction='What guidelines should contributors follow when adding dependencies to CAMEL?', input='', output='When adding dependencies to CAMEL, contributors should follow these guidelines:\\n1. **Justification**: Provide a clear justification for why the dependency is needed and how it benefits the project.\\n2. **Version Control**: Specify version constraints to avoid potential conflicts with other dependencies.\\n3. **Documentation**: Update documentation to include information on how to use the new dependency effectively.'), AlpacaItem(instruction='How can contributors ensure their pull requests are ready for review?', input='', output='Contributors can ensure their pull requests are ready for review by:\\n1. **Completing All Tests**: Make sure that all tests pass and any new tests are included for new features or bug fixes.\\n2. **Providing Detailed Descriptions**: Include a detailed description of the changes made and reference any related issues.\\n3. **Adhering to Guidelines**: Follow all contribution guidelines, including code style and documentation updates.'), AlpacaItem(instruction='What are the benefits of engaging with the CAMEL community on Discord?', input='', output='Engaging with the CAMEL community on Discord offers several benefits:\\n1. **Real-Time Communication**: It allows for real-time communication and quick feedback on ideas and issues.\\n2. **Networking**: Contributors can network with other developers, fostering collaboration and support.\\n3. **Staying Informed**: Members can stay updated on project developments, upcoming meetings, and community events.'), AlpacaItem(instruction='What steps should be taken to ensure a successful code merge in CAMEL?', input='', output='To ensure a successful code merge in CAMEL, the following steps should be taken:\\n1. **Resolve Conflicts**: Address any merge conflicts before attempting to merge the code.\\n2. **Run All Tests**: Ensure that all tests pass after merging to verify that the integration is successful.\\n3. **Review Changes**: Conduct a final review of the merged code to ensure it meets quality standards.'), AlpacaItem(instruction='How can contributors effectively manage their workload when contributing to CAMEL?', input='', output='Contributors can effectively manage their workload when contributing to CAMEL by:\\n1. **Setting Realistic Goals**: Establish achievable goals for their contributions based on available time and resources.\\n2. **Prioritizing Tasks**: Use prioritization techniques to focus on the most important or urgent tasks first.\\n3. **Taking Breaks**: Schedule regular breaks to avoid burnout and maintain productivity.')]\n" - ] - } - ], - "source": [ - "import random\n", - "firecrawl = Firecrawl()\n", - "# Scrape and clean content from a specified URL\n", - "response = firecrawl.scrape(\n", - " url=\"https://github.com/camel-ai/camel/blob/master/CONTRIBUTING.md\"\n", - ")\n", - "\n", - "# Generate the items 50 a time up to 300\n", - "alpaca_entries = []\n", - "for start in range(1, 301, 50):\n", - " # Combine default examples with random samples from previous generations\n", - " current_examples = examples + (random.sample(alpaca_entries,\n", - " min(5, len(alpaca_entries)))\n", - " if alpaca_entries else [])\n", - "\n", - " batch = generate_alpaca_items(\n", - " content=response[\"markdown\"],\n", - " n_items=50,\n", - " start_num=start,\n", - " examples=current_examples\n", - " )\n", - " print(f\"Generated {len(batch)} items\")\n", - " alpaca_entries.extend(batch)\n", - "\n", - "print(alpaca_entries)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "300" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "len(alpaca_entries)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Code for Conversion to Reward Model Format\n", - "Next, we transform the Alpaca-style entries into a format compatible with the reward model. Each entry will be converted into a structured list of instruction-input-response pairs that the reward model can evaluate." - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "messages_lists=[]\n", - "for item in alpaca_entries:\n", - " messages_list =[]\n", - " user_content = item.instruction\n", - " if item.input:\n", - " user_content += f\"\\nInput: {item.input}\"\n", - " messages_list.append({\"role\": \"user\", \"content\": user_content})\n", - " messages_list.append({\"role\": \"assistant\", \"content\": item.output})\n", - " messages_lists.append(messages_list)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - " # Filtering the Generated Data Using the Reward Model\n", - " Finally, we utilize NVIDIA's Nemotron Reward Model to filter out low-quality instruction-input-response triplets. The model evaluates each response based on defined thresholds for metrics such as helpfulness and correctness.\n", - "\n", - " To reduce runtime, we limit the evaluation to the first 50 entries. After filtering, 31 high-quality triplets are retained." - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2024-12-16 20:36:49,985 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:50,426 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:50,778 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:51,285 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:51,563 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:51,963 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:52,322 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:52,751 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:53,047 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:53,382 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:53,872 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:54,165 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:54,451 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:54,745 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:55,038 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:55,548 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:55,960 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:56,313 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:56,797 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:57,229 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:57,559 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:57,863 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:58,306 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:58,600 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:59,126 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:59,412 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:36:59,707 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:00,085 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:00,456 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:00,866 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:01,200 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:02,095 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:02,609 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:02,907 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:03,232 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:03,631 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:03,940 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:04,279 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:04,856 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:05,157 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:05,485 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:05,886 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:06,185 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:06,501 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:06,922 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:07,303 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:07,588 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:08,034 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:08,547 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "2024-12-16 20:37:08,863 - httpx - INFO - HTTP Request: POST https://integrate.api.nvidia.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n", - "31\n" - ] - } - ], - "source": [ - "from camel.models.reward import Evaluator, NemotronRewardModel\n", - "from camel.types import ModelType\n", - "\n", - "reward_model = NemotronRewardModel(\n", - " model_type=ModelType.NVIDIA_NEMOTRON_340B_REWARD,\n", - " url=\"https://integrate.api.nvidia.com/v1\",\n", - ")\n", - "evaluator = Evaluator(reward_model=reward_model)\n", - "\n", - "thresholds = {\"helpfulness\": 2.5, \"correctness\": 2.5}\n", - "filtered_messages_lists = []\n", - "for messages_list in messages_lists[:50]:\n", - " response = evaluator.filter_data(messages_list, thresholds)\n", - " if response:\n", - " filtered_messages_lists.append(messages_list)\n", - "\n", - "print(len(filtered_messages_lists))\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "camel-ai-8RlHKqzd-py3.11", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.5" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/docs/cookbooks/synthetic_dataevaluation&filter_with_reward_model.ipynb b/docs/cookbooks/synthetic_dataevaluation&filter_with_reward_model.ipynb new file mode 100644 index 0000000000..eea5e4052f --- /dev/null +++ b/docs/cookbooks/synthetic_dataevaluation&filter_with_reward_model.ipynb @@ -0,0 +1,685 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "source": [ + "# Synthetic Data Evaluation&Filter With Reward model" + ], + "metadata": { + "id": "wTyN9Ur03UgZ" + } + }, + { + "cell_type": "markdown", + "source": [ + "You can also check this cookbook in colab [here](https://colab.research.google.com/drive/15Y4iDw_yeskG7ZXzqy6pnJDVtPjl3RVA?usp=sharing) (Use the colab share link)" + ], + "metadata": { + "id": "7V3aV16AmY0K" + } + }, + { + "cell_type": "markdown", + "source": [ + "This notebook demonstrates how to set up and leverage CAMEL's reward model to evaluate and filter synthetic data.\n", + "\n", + "In this notebook, you'll explore:\n", + "\n", + "* **CAMEL**: A powerful multi-agent framework that enables data synthesis, evaluation, and model training, as well as multi-agent role-playing scenarios, allowing for sophisticated AI-driven tasks.\n", + "* **CAMEL FireCrawl Reader**: The Firecrawl loader encapsulated in Camel allows users to retrieve web information through Firecrawl.\n", + "* **Reward Model Module**: A critical component designed to score and evaluate the quality of generated data based on predefined criteria. It supports fine-tuning of the evaluation process and ensures alignment with desired outcomes, making it an essential tool for filtering synthetic data effectively.\n", + "\n", + "This cookbook demonstrates Camel serves as a flexible framework that can be adapted for various scenarios requiring evaluation, filtering, and optimization of AI-generated content." + ], + "metadata": { + "id": "sAMnfaxK5SLY" + } + }, + { + "cell_type": "markdown", + "source": [ + "⭐ **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." + ], + "metadata": { + "id": "OWeP5vnv6Gkz" + } + }, + { + "cell_type": "markdown", + "metadata": { + "id": "eTAwCl7q2m2P" + }, + "source": [ + "## 📦 Installation" + ] + }, + { + "cell_type": "markdown", + "source": [ + "First, install the CAMEL package with all its dependencies" + ], + "metadata": { + "id": "DvLPKCp26ZGS" + } + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ua2cEP-B2m2S" + }, + "outputs": [], + "source": [ + "!pip install \"camel-ai==0.2.14\" firecrawl" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "TZjOU-PM2m2S" + }, + "source": [ + "Next, we need to securely input and store the required API keys for accessing OpenAI, Firecrawl, and NVIDIA services." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "0leJxgNB2m2T", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "dba63d78-3932-49f5-b730-6b0181b9fcfd" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Enter your OpenAI API key: ··········\n", + "Enter your Firecrawl API key: ··········\n", + "Enter your NVIDIA API key: ··········\n" + ] + } + ], + "source": [ + "from getpass import getpass\n", + "import os\n", + "\n", + "openai_api_key = getpass('Enter your OpenAI API key: ')\n", + "os.environ[\"OPENAI_API_KEY\"] = openai_api_key\n", + "\n", + "# Generate an API key at https://www.firecrawl.dev/app/api-keys\n", + "firecrawl_api_key = getpass('Enter your Firecrawl API key: ')\n", + "os.environ[\"FIRECRAWL_API_KEY\"] = firecrawl_api_key\n", + "\n", + "# Generate an API key at https://build.nvidia.com/nvidia/nemotron-4-340b-reward\n", + "nvidia_api_key = getpass('Enter your NVIDIA API key: ')\n", + "os.environ[\"NVIDIA_API_KEY\"] = nvidia_api_key" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "3ug4mmpA2m2T" + }, + "source": [ + "To work effectively with the Alpaca format and manage items systematically, we define a set of models using Pydantic. These models ensure that the data is well-structured, type-safe, and validated." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "h9IdTqJC2m2T" + }, + "outputs": [], + "source": [ + "from pydantic import BaseModel\n", + "from camel.messages.conversion import AlpacaItem\n", + "\n", + "class NumberedAlpacaItem(BaseModel):\n", + " number: int\n", + " item: AlpacaItem\n", + "\n", + "\n", + "class AlpacaItemResponse(BaseModel):\n", + " \"\"\"\n", + " Represents an instruction-response item in the Alpaca format.\n", + " \"\"\"\n", + " items: list[NumberedAlpacaItem]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "hMJJHNH02m2T" + }, + "source": [ + "# 🚀 Data Generation\n", + "Next, we define our data generation function. It takes a source content and generates a list of instruction-input-response triplets based on it.\n", + "\n", + "Later, we will use a reward model to filter this list." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "yvmO-S8P2m2U" + }, + "outputs": [], + "source": [ + "from typing import List\n", + "from camel.loaders import Firecrawl\n", + "from camel.models import ModelFactory\n", + "from camel.types import ModelPlatformType, ModelType\n", + "from camel.configs import ChatGPTConfig\n", + "from camel.agents import ChatAgent\n", + "\n", + "def generate_alpaca_items(content: str, n_items: int, start_num: int = 1, examples: List[AlpacaItem] = None) -> List[AlpacaItem]:\n", + " system_msg = \"\"\"\n", + "You are an AI assistant generating detailed, accurate responses based on the provided content.\n", + "You will be given a reference content, and you must generate a specific number of AlpacaItems.\n", + "These are instruction-input-response triplets, where the input is the context or examples.\n", + "\n", + "Add a number to the items to keep track of the order. Generate exactly that many.\n", + "\n", + "For each instruction, imagine but do not include a real world scenario and real user in that scenario to inform realistic and varied instructions. Avoid common sense questions and answers.\n", + "\n", + "Include multiple lines in the output as appropriate to provide sufficient detail. Cite the most relevant context verbatim in output fields, do not omit anything important.\n", + "\n", + "Leave the input field blank.\n", + "\n", + "Ensure all of the most significant parts of the context are covered.\n", + "\n", + "Start with open ended instructions, then move to more specific ones. Consider the starting number for an impression of what has already been generated.\n", + " \"\"\"\n", + "\n", + " examples_str = \"\"\n", + " if examples:\n", + " examples_str = \"\\n\\nHere are some example items for reference:\\n\" + \\\n", + " \"\\n\".join(ex.model_dump_json() for ex in examples)\n", + "\n", + " model = ModelFactory.create(\n", + " model_platform=ModelPlatformType.OPENAI,\n", + " model_type=ModelType.GPT_4O_MINI,\n", + " model_config_dict=ChatGPTConfig(\n", + " temperature=0.6, response_format=AlpacaItemResponse\n", + " ).as_dict(),\n", + " )\n", + "\n", + " agent = ChatAgent(\n", + " system_message=system_msg,\n", + " model=model,\n", + " )\n", + "\n", + " prompt = f\"Content reference:\\n{content}{examples_str}\\n\\n Generate {n_items} AlpacaItems. The first should start numbering at {start_num}.\"\n", + " response = agent.step(prompt)\n", + "\n", + " # Parse the generated JSON to our wrapper class\n", + " alpaca_items = [n_item.item for n_item in\n", + " AlpacaItemResponse.\n", + " model_validate_json(response.msgs[0].content).items]\n", + "\n", + " return alpaca_items\n", + "\n", + "# Few shot examples to ensure the right amount of detail\n", + "examples = [\n", + " AlpacaItem(\n", + " instruction=\"Explain the process for sprint planning and review in CAMEL.\",\n", + " input=\"\",\n", + " output=\"The process for sprint planning and review in CAMEL includes:\\n1. **Sprint Duration**: Each sprint lasts two weeks for development and one week for review.\\n2. **Planning Meeting**: Conducted biweekly, where the founder highlights the sprint goal and developers select items for the sprint.\\n3. **Review Meeting**: Stakeholders review the delivered features and provide feedback on the work completed during the sprint.\"\n", + " )\n", + "]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "YPh1UxQB2m2U" + }, + "source": [ + "# 📊 Point to content and generate data!\n", + "Now we point to the content that we wish to generate SFT data around and use CAMEL's Firecrawl integration to get this content in a nice markdown format.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ghDjZH152m2U", + "outputId": "cbd1cfa0-fe97-44e6-954c-0a52a69f9ed1", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Generated 50 items\n", + "[AlpacaItem(instruction='Summarize the contributing guidelines for the CAMEL project.', input='', output='The contributing guidelines for the CAMEL project include:\\n1. **Types of Contributions**: Contributions can include new features, infrastructure enhancements, documentation improvements, issue reporting, and bug fixes.\\n2. **Workflow**: Community contributors should follow the Fork-and-Pull-Request workflow, while members of CAMEL-AI.org should use the Checkout-and-Pull-Request workflow.\\n3. **Pull Requests**: Mention related issues and tag relevant maintainers. Pull requests must pass formatting, linting, and testing checks before merging.'), AlpacaItem(instruction='What are the steps for writing a cookbook entry for CAMEL?', input='', output='The steps for writing a cookbook entry for CAMEL are:\\n1. **Template Usage**: Use the provided template for consistency.\\n2. **Writing in Colab**: Write your cookbook in Google Colab, ensuring that LLM-generated responses are correct and verified.\\n3. **Clear Explanations**: Provide clear explanations of the code and its purpose.\\n4. **Review and Submit**: After writing, review in Colab, then submit by downloading the notebook and creating a pull request.'), AlpacaItem(instruction='Describe the principles for writing docstrings in CAMEL.', input='', output='The principles for writing docstrings in CAMEL include:\\n1. **Use Raw Strings**: Start with `r\"\"\"` to prevent issues with special characters.\\n2. **Brief Descriptions**: Provide a concise summary of the functionality at the beginning.\\n3. **Document Parameters**: Use an `Args` section to document parameters, including type and default values.'), AlpacaItem(instruction='What is the process for conducting code reviews in CAMEL?', input='', output='The process for conducting code reviews in CAMEL includes:\\n1. **Reviewers Check**: Reviewers assess code for functionality, readability, and compliance with standards.\\n2. **Feedback**: Leave constructive feedback where changes are necessary.\\n3. **Approval**: The code must be approved by at least two reviewers before merging.'), AlpacaItem(instruction='Outline the steps for submitting a cookbook to CAMEL.', input='', output='The steps for submitting a cookbook to CAMEL are:\\n1. **Finalize in Colab**: Ensure that the Colab notebook is complete and reviewed.\\n2. **Download Notebook**: Download the finalized notebook as a .ipynb file.\\n3. **Create Pull Request**: Open a pull request to add the .ipynb file to the repository, including any necessary documentation.'), AlpacaItem(instruction='Explain the importance of code coverage in CAMEL.', input='', output='Code coverage is important in CAMEL because it measures how much of the code is tested by unit tests. This helps in identifying robust areas of the codebase and areas that may need more testing, ensuring better reliability and maintainability of the code.'), AlpacaItem(instruction='What are the guidelines for labeling pull requests in CAMEL?', input='', output='The guidelines for labeling pull requests in CAMEL include:\\n- **feat**: For new features.\\n- **fix**: For bug fixes.\\n- **docs**: For documentation updates.\\n- **style**: For code style changes.\\n- **refactor**: For code refactoring.\\n- **test**: For adding or updating tests.\\n- **chore**: For maintenance tasks.'), AlpacaItem(instruction='What communication channels are available for CAMEL contributors?', input='', output='The communication channels available for CAMEL contributors include:\\n- **Discord**: For real-time communication.\\n- **WeChat**: For Chinese-speaking contributors.\\n- **Slack**: For team collaboration.'), AlpacaItem(instruction='Describe the purpose of the sprint planning process in CAMEL.', input='', output='The purpose of the sprint planning process in CAMEL is to define what can be delivered in the upcoming sprint and how those goals will be achieved. It ensures that the team has a clear understanding of the sprint objectives and tasks to focus on.'), AlpacaItem(instruction='What are the key components of the CAMEL project license?', input='', output='The CAMEL project is licensed under Apache 2.0, which means that contributions will also be licensed under the same terms by default. Contributors can add the license manually or use a script to automate the process.'), AlpacaItem(instruction='Summarize the guidelines for contributing to the CAMEL documentation.', input='', output='The guidelines for contributing to the CAMEL documentation include:\\n1. **Comprehensive Coverage**: Provide thorough documentation for all classes and methods.\\n2. **Sphinx Usage**: Documentation is generated automatically using Sphinx from the codebase.'), AlpacaItem(instruction='What steps should be taken to ensure reproducibility in the CAMEL cookbook?', input='', output='To ensure reproducibility in the CAMEL cookbook, contributors should:\\n1. Write code that can be run and produces consistent results.\\n2. Provide clear instructions for running the code.\\n3. Validate all examples with real code execution.'), AlpacaItem(instruction='Explain the significance of logging over using print statements in CAMEL.', input='', output='Using logging instead of print statements in CAMEL is significant because it allows for more professional, configurable, and consistent logging. It helps in maintaining clean code and provides better control over the logging output.'), AlpacaItem(instruction='What is the process for updating dependencies in CAMEL?', input='', output='The process for updating dependencies in CAMEL includes:\\n1. Modify the `pyproject.toml` file to add, update, or delete dependencies.\\n2. Run `poetry lock` to synchronize the dependencies with the lock file.'), AlpacaItem(instruction='What are the responsibilities of a code reviewer in CAMEL?', input='', output='The responsibilities of a code reviewer in CAMEL include:\\n1. Conduct timely reviews to keep the project moving.\\n2. Provide clear and constructive feedback.\\n3. Collaborate with contributors to ensure code meets project standards.'), AlpacaItem(instruction='Outline the steps to build documentation locally for CAMEL.', input='', output='To build documentation locally for CAMEL, follow these steps:\\n1. Navigate to the `docs` directory.\\n2. Run the command `make html` to generate the HTML documentation.'), AlpacaItem(instruction='What are the key principles to follow when writing entries for the CAMEL cookbook?', input='', output='The key principles for writing entries for the CAMEL cookbook include:\\n1. High Quality: Ensure accurate code and clear explanations.\\n2. Correctness: Validate LLM-generated responses with real code execution.\\n3. Accessibility: Make content understandable for all users, from beginners to advanced.'), AlpacaItem(instruction='Describe how to run tests in CAMEL.', input='', output='To run tests in CAMEL, use the command `pytest .` in the project root directory. This will execute all tests, including those that require an OpenAI API key. For local isolated unit tests, use `pytest --fast-test-mode .`.'), AlpacaItem(instruction='What is the purpose of the code review checklist in CAMEL?', input='', output='The purpose of the code review checklist in CAMEL is to ensure that all contributions maintain high quality by evaluating functionality, code quality, design consistency, and documentation before merging into the main branch.'), AlpacaItem(instruction='Explain the process for scheduling an introduction call for new contributors in CAMEL.', input='', output='To schedule an introduction call for new contributors in CAMEL, visit the provided Calendly links:\\n- For English speakers: Use the designated link for English.\\n- For Chinese speakers: Use the designated link for Chinese.'), AlpacaItem(instruction='What are the main goals of the CAMEL project?', input='', output='The main goals of the CAMEL project include developing a robust open-source framework for AI applications, fostering community contributions, and ensuring high-quality documentation and testing.'), AlpacaItem(instruction=\"What is the significance of the 'Fork-and-Pull-Request' workflow in CAMEL?\", input='', output=\"The 'Fork-and-Pull-Request' workflow in CAMEL is significant because it allows contributors to work on their own copy of the project and submit changes for review, ensuring that contributions are managed efficiently and collaboratively.\"), AlpacaItem(instruction='What should contributors do before their pull request can be merged?', input='', output='Before a pull request can be merged in CAMEL, it must pass formatting, linting, and testing checks. Contributors should also ensure that they have addressed any feedback from reviewers.'), AlpacaItem(instruction='Summarize the guidelines for writing clear and concise explanations in the CAMEL cookbook.', input='', output='The guidelines for writing clear and concise explanations in the CAMEL cookbook include:\\n1. Use simple language to describe code functionality.\\n2. Break down complex logic into understandable steps.\\n3. Provide context for technical terms.'), AlpacaItem(instruction='What is the recommended way to provide feedback during code reviews in CAMEL?', input='', output='The recommended way to provide feedback during code reviews in CAMEL is to leave constructive comments that are clear and aimed at helping the contributor improve their code.'), AlpacaItem(instruction='What are the key components of the CAMEL community guidelines?', input='', output='The key components of the CAMEL community guidelines include promoting an inclusive environment, encouraging collaboration, and respecting diverse perspectives among contributors.'), AlpacaItem(instruction='Explain the significance of ensuring high-quality documentation in CAMEL.', input='', output='Ensuring high-quality documentation in CAMEL is significant because it helps users understand how to use the framework effectively, facilitates onboarding for new contributors, and promotes better collaboration within the community.'), AlpacaItem(instruction='What should contributors do if they encounter challenges during the setup process?', input='', output='If contributors encounter challenges during the setup process in CAMEL, they should reach out to a maintainer for assistance to ensure a smooth experience.'), AlpacaItem(instruction='Describe the process for merging pull requests in CAMEL.', input='', output='The process for merging pull requests in CAMEL involves:\\n1. Ensuring the pull request has been approved by at least two reviewers.\\n2. The merging should be done by a maintainer or an authorized contributor.'), AlpacaItem(instruction='What are the best practices for conducting a sprint review in CAMEL?', input='', output='Best practices for conducting a sprint review in CAMEL include:\\n1. Gathering stakeholder feedback on delivered features.\\n2. Identifying areas for improvement based on the work completed.'), AlpacaItem(instruction='What is the significance of using Google Colab for cookbook contributions?', input='', output='Using Google Colab for cookbook contributions is significant because it allows for interactive code execution alongside explanations, making it easier for users to understand and experiment with the code.'), AlpacaItem(instruction='What are the steps to create a new issue on the CAMEL GitHub repository?', input='', output=\"To create a new issue on the CAMEL GitHub repository, follow these steps:\\n1. Go to the issues page on GitHub.\\n2. Click on 'New Issue' and fill in the required information, including a proper title and description.\\n3. Assign labels and update the assignees and milestones as necessary.\"), AlpacaItem(instruction=\"What should contributors do to maintain the project's coding standards?\", input='', output=\"To maintain the project's coding standards, contributors should:\\n1. Follow the established style guidelines.\\n2. Use tools like Ruff for formatting and linting checks.\\n3. Ensure documentation is up-to-date and comprehensive.\"), AlpacaItem(instruction='Explain the role of the CAMEL project maintainers.', input='', output='The role of the CAMEL project maintainers includes overseeing contributions, ensuring code quality, managing project direction, and facilitating communication within the community.'), AlpacaItem(instruction='What are the guidelines for submitting documentation updates in CAMEL?', input='', output='The guidelines for submitting documentation updates in CAMEL include:\\n1. Ensure that updates are comprehensive and improve clarity.\\n2. Follow the automated documentation generation process using Sphinx.'), AlpacaItem(instruction='What are the requirements for submitting a feature request in CAMEL?', input='', output='The requirements for submitting a feature request in CAMEL include providing a clear description of the feature, explaining its benefits, and linking to any relevant issues or discussions.'), AlpacaItem(instruction='Describe the importance of unit tests in the CAMEL project.', input='', output='Unit tests are important in the CAMEL project because they verify that individual components of the code work as expected, helping to catch bugs early and ensuring code reliability.'), AlpacaItem(instruction='What is the process for addressing feedback received during code reviews?', input='', output='The process for addressing feedback received during code reviews involves:\\n1. Carefully reviewing the comments and suggestions provided by reviewers.\\n2. Making necessary changes to the code based on the feedback.\\n3. Updating the pull request to reflect the changes made.'), AlpacaItem(instruction='Summarize the steps for conducting a developer meeting in CAMEL.', input='', output='The steps for conducting a developer meeting in CAMEL include:\\n1. Scheduling the meeting in advance and sharing the agenda.\\n2. Discussing ongoing projects, challenges, and upcoming tasks.\\n3. Gathering feedback and suggestions from team members.'), AlpacaItem(instruction='What should contributors include in their pull requests?', input='', output='Contributors should include the following in their pull requests:\\n1. A clear title and description of the changes.\\n2. Links to any related issues.\\n3. Any necessary documentation or references.'), AlpacaItem(instruction='Explain the significance of following the pull request review process.', input='', output='Following the pull request review process is significant because it ensures that all contributions are evaluated for quality, functionality, and adherence to project standards, which helps maintain the integrity of the codebase.'), AlpacaItem(instruction='What are the best practices for writing unit tests in CAMEL?', input='', output='Best practices for writing unit tests in CAMEL include:\\n1. Ensure tests cover all edge cases and expected outcomes.\\n2. Keep tests isolated to avoid dependencies on other parts of the code.\\n3. Use descriptive names for test functions to clarify their purpose.'), AlpacaItem(instruction='What is the process for integrating new features into the CAMEL project?', input='', output='The process for integrating new features into the CAMEL project involves:\\n1. Submitting a feature request or proposal.\\n2. Developing the feature in a separate branch.\\n3. Creating a pull request for review once development is complete.'), AlpacaItem(instruction='Describe the importance of maintaining a clean and organized project structure in CAMEL.', input='', output='Maintaining a clean and organized project structure in CAMEL is important because it enhances code readability, facilitates easier navigation for contributors, and makes it simpler to manage and scale the project.'), AlpacaItem(instruction='What are the steps for conducting a retrospective after a sprint in CAMEL?', input='', output='The steps for conducting a retrospective after a sprint in CAMEL include:\\n1. Gathering team feedback on what went well and what could be improved.\\n2. Discussing challenges faced during the sprint.\\n3. Identifying actionable items to implement in the next sprint.'), AlpacaItem(instruction='What should contributors do to ensure their code is secure?', input='', output='To ensure their code is secure, contributors should:\\n1. Follow best practices for security in coding.\\n2. Review code for potential vulnerabilities.\\n3. Conduct security testing as part of the development process.'), AlpacaItem(instruction=\"What is the significance of the CAMEL community's code of conduct?\", input='', output=\"The significance of the CAMEL community's code of conduct is to promote a respectful and inclusive environment for all contributors, ensuring that everyone feels welcome and valued while participating in the project.\"), AlpacaItem(instruction='Explain the relationship between CAMEL and its contributors.', input='', output='The relationship between CAMEL and its contributors is collaborative; contributors provide enhancements, fixes, and documentation, while CAMEL offers a platform for sharing knowledge and fostering community engagement.'), AlpacaItem(instruction='What are the benefits of participating in the CAMEL community?', input='', output='The benefits of participating in the CAMEL community include:\\n1. Gaining experience in open-source development.\\n2. Networking with other developers and contributors.\\n3. Contributing to a project that aims to advance AI capabilities.'), AlpacaItem(instruction='Summarize the guidelines for writing clear commit messages in CAMEL.', input='', output=\"The guidelines for writing clear commit messages in CAMEL include:\\n1. Use the imperative mood to describe the changes (e.g., 'Add feature' instead of 'Added feature').\\n2. Keep messages concise and focused on the changes made.\\n3. Include references to related issues when applicable.\")]\n" + ] + } + ], + "source": [ + "import random\n", + "from camel.loaders.firecrawl_reader import Firecrawl\n", + "firecrawl = Firecrawl()\n", + "# Scrape and clean content from a specified URL\n", + "response = firecrawl.scrape(\n", + " url=\"https://github.com/camel-ai/camel/blob/master/CONTRIBUTING.md\"\n", + ")\n", + "\n", + "# Generate the items 50 a time up to 50\n", + "alpaca_entries = []\n", + "for start in range(1, 51, 50):\n", + " # Combine default examples with random samples from previous generations\n", + " current_examples = examples + (random.sample(alpaca_entries,\n", + " min(5, len(alpaca_entries)))\n", + " if alpaca_entries else [])\n", + "\n", + " batch = generate_alpaca_items(\n", + " content=response[\"markdown\"],\n", + " n_items=50,\n", + " start_num=start,\n", + " examples=current_examples\n", + " )\n", + " print(f\"Generated {len(batch)} items\")\n", + " alpaca_entries.extend(batch)\n", + "\n", + "print(alpaca_entries)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "frSMDZ-U2m2V", + "outputId": "de992905-b4ee-4e2e-aef1-c45f6e8e6f84", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "50" + ] + }, + "metadata": {}, + "execution_count": 6 + } + ], + "source": [ + "len(alpaca_entries)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "5Nr-DX502m2V" + }, + "source": [ + "# 🔄 Code for Conversion to Reward Model Format\n", + "Next, we transform the Alpaca-style entries into a format compatible with the reward model. Each entry will be converted into a structured list of instruction-input-response pairs that the reward model can evaluate." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "FVYyGBSK2m2V" + }, + "outputs": [], + "source": [ + "messages_lists=[]\n", + "for item in alpaca_entries:\n", + " messages_list =[]\n", + " user_content = item.instruction\n", + " if item.input:\n", + " user_content += f\"\\nInput: {item.input}\"\n", + " messages_list.append({\"role\": \"user\", \"content\": user_content})\n", + " messages_list.append({\"role\": \"assistant\", \"content\": item.output})\n", + " messages_lists.append(messages_list)" + ] + }, + { + "cell_type": "markdown", + "source": [ + "# ✨Test Reward Model\n", + "Then, we can test the reward model to check its output format and use it as a reference to set the filtering criteria.\n" + ], + "metadata": { + "id": "hIuE1dImfBJG" + } + }, + { + "cell_type": "code", + "source": [ + "from camel.models.reward import Evaluator, NemotronRewardModel\n", + "from camel.types import ModelType\n", + "\n", + "reward_model = NemotronRewardModel(\n", + " model_type=ModelType.NVIDIA_NEMOTRON_340B_REWARD,\n", + " url=\"https://integrate.api.nvidia.com/v1\",\n", + ")\n", + "evaluator = Evaluator(reward_model=reward_model)\n", + "results = [] # To store results for comparison\n", + "for i in range(min(10, len(messages_lists))):\n", + " print(f\"Evaluating message list {i+1}:\")\n", + " print(messages_lists[i]) # Display the message list\n", + " scores = evaluator.evaluate(messages_lists[i])\n", + " print(f\"Scores: {scores}\\n\") # Print the evaluation scores\n", + " results.append((i + 1, messages_lists[i], scores))\n", + "\n", + "# Print a summary of the results\n", + "print(\"\\nSummary of evaluations:\")\n", + "for index, messages, scores in results:\n", + " print(f\"Message List {index}:\")\n", + " print(messages)\n", + " print(f\"Scores: {scores}\\n\")\n" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Ae3BVlbXfAmB", + "outputId": "dddb3fc1-f1a2-4da7-dd0e-f4df8a3b4dc1" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Evaluating message list 1:\n", + "[{'role': 'user', 'content': 'Summarize the contributing guidelines for the CAMEL project.'}, {'role': 'assistant', 'content': 'The contributing guidelines for the CAMEL project include:\\n1. **Types of Contributions**: Contributions can include new features, infrastructure enhancements, documentation improvements, issue reporting, and bug fixes.\\n2. **Workflow**: Community contributors should follow the Fork-and-Pull-Request workflow, while members of CAMEL-AI.org should use the Checkout-and-Pull-Request workflow.\\n3. **Pull Requests**: Mention related issues and tag relevant maintainers. Pull requests must pass formatting, linting, and testing checks before merging.'}]\n", + "Scores: {'helpfulness': 2.21875, 'correctness': 2.40625, 'coherence': 3.453125, 'complexity': 1.6640625, 'verbosity': 1.078125}\n", + "\n", + "Evaluating message list 2:\n", + "[{'role': 'user', 'content': 'What are the steps for writing a cookbook entry for CAMEL?'}, {'role': 'assistant', 'content': 'The steps for writing a cookbook entry for CAMEL are:\\n1. **Template Usage**: Use the provided template for consistency.\\n2. **Writing in Colab**: Write your cookbook in Google Colab, ensuring that LLM-generated responses are correct and verified.\\n3. **Clear Explanations**: Provide clear explanations of the code and its purpose.\\n4. **Review and Submit**: After writing, review in Colab, then submit by downloading the notebook and creating a pull request.'}]\n", + "Scores: {'helpfulness': 2.71875, 'correctness': 2.734375, 'coherence': 3.46875, 'complexity': 1.7109375, 'verbosity': 1.203125}\n", + "\n", + "Evaluating message list 3:\n", + "[{'role': 'user', 'content': 'Describe the principles for writing docstrings in CAMEL.'}, {'role': 'assistant', 'content': 'The principles for writing docstrings in CAMEL include:\\n1. **Use Raw Strings**: Start with `r\"\"\"` to prevent issues with special characters.\\n2. **Brief Descriptions**: Provide a concise summary of the functionality at the beginning.\\n3. **Document Parameters**: Use an `Args` section to document parameters, including type and default values.'}]\n", + "Scores: {'helpfulness': 1.5546875, 'correctness': 1.890625, 'coherence': 3.015625, 'complexity': 1.65625, 'verbosity': 0.6484375}\n", + "\n", + "Evaluating message list 4:\n", + "[{'role': 'user', 'content': 'What is the process for conducting code reviews in CAMEL?'}, {'role': 'assistant', 'content': 'The process for conducting code reviews in CAMEL includes:\\n1. **Reviewers Check**: Reviewers assess code for functionality, readability, and compliance with standards.\\n2. **Feedback**: Leave constructive feedback where changes are necessary.\\n3. **Approval**: The code must be approved by at least two reviewers before merging.'}]\n", + "Scores: {'helpfulness': 2.34375, 'correctness': 2.546875, 'coherence': 3.59375, 'complexity': 1.3984375, 'verbosity': 1.0625}\n", + "\n", + "Evaluating message list 5:\n", + "[{'role': 'user', 'content': 'Outline the steps for submitting a cookbook to CAMEL.'}, {'role': 'assistant', 'content': 'The steps for submitting a cookbook to CAMEL are:\\n1. **Finalize in Colab**: Ensure that the Colab notebook is complete and reviewed.\\n2. **Download Notebook**: Download the finalized notebook as a .ipynb file.\\n3. **Create Pull Request**: Open a pull request to add the .ipynb file to the repository, including any necessary documentation.'}]\n", + "Scores: {'helpfulness': 2.34375, 'correctness': 2.625, 'coherence': 3.546875, 'complexity': 1.46875, 'verbosity': 1.046875}\n", + "\n", + "Evaluating message list 6:\n", + "[{'role': 'user', 'content': 'Explain the importance of code coverage in CAMEL.'}, {'role': 'assistant', 'content': 'Code coverage is important in CAMEL because it measures how much of the code is tested by unit tests. This helps in identifying robust areas of the codebase and areas that may need more testing, ensuring better reliability and maintainability of the code.'}]\n", + "Scores: {'helpfulness': 2.78125, 'correctness': 2.875, 'coherence': 3.8125, 'complexity': 1.7734375, 'verbosity': 1.0234375}\n", + "\n", + "Evaluating message list 7:\n", + "[{'role': 'user', 'content': 'What are the guidelines for labeling pull requests in CAMEL?'}, {'role': 'assistant', 'content': 'The guidelines for labeling pull requests in CAMEL include:\\n- **feat**: For new features.\\n- **fix**: For bug fixes.\\n- **docs**: For documentation updates.\\n- **style**: For code style changes.\\n- **refactor**: For code refactoring.\\n- **test**: For adding or updating tests.\\n- **chore**: For maintenance tasks.'}]\n", + "Scores: {'helpfulness': 2.859375, 'correctness': 2.984375, 'coherence': 3.78125, 'complexity': 1.6171875, 'verbosity': 1.1328125}\n", + "\n", + "Evaluating message list 8:\n", + "[{'role': 'user', 'content': 'What communication channels are available for CAMEL contributors?'}, {'role': 'assistant', 'content': 'The communication channels available for CAMEL contributors include:\\n- **Discord**: For real-time communication.\\n- **WeChat**: For Chinese-speaking contributors.\\n- **Slack**: For team collaboration.'}]\n", + "Scores: {'helpfulness': 1.4296875, 'correctness': 1.6796875, 'coherence': 3.59375, 'complexity': 0.796875, 'verbosity': 0.546875}\n", + "\n", + "Evaluating message list 9:\n", + "[{'role': 'user', 'content': 'Describe the purpose of the sprint planning process in CAMEL.'}, {'role': 'assistant', 'content': 'The purpose of the sprint planning process in CAMEL is to define what can be delivered in the upcoming sprint and how those goals will be achieved. It ensures that the team has a clear understanding of the sprint objectives and tasks to focus on.'}]\n", + "Scores: {'helpfulness': 2.84375, 'correctness': 2.984375, 'coherence': 3.890625, 'complexity': 1.6015625, 'verbosity': 0.95703125}\n", + "\n", + "Evaluating message list 10:\n", + "[{'role': 'user', 'content': 'What are the key components of the CAMEL project license?'}, {'role': 'assistant', 'content': 'The CAMEL project is licensed under Apache 2.0, which means that contributions will also be licensed under the same terms by default. Contributors can add the license manually or use a script to automate the process.'}]\n", + "Scores: {'helpfulness': 1.890625, 'correctness': 1.828125, 'coherence': 3.5625, 'complexity': 1.3515625, 'verbosity': 0.65625}\n", + "\n", + "\n", + "Summary of evaluations:\n", + "Message List 1:\n", + "[{'role': 'user', 'content': 'Summarize the contributing guidelines for the CAMEL project.'}, {'role': 'assistant', 'content': 'The contributing guidelines for the CAMEL project include:\\n1. **Types of Contributions**: Contributions can include new features, infrastructure enhancements, documentation improvements, issue reporting, and bug fixes.\\n2. **Workflow**: Community contributors should follow the Fork-and-Pull-Request workflow, while members of CAMEL-AI.org should use the Checkout-and-Pull-Request workflow.\\n3. **Pull Requests**: Mention related issues and tag relevant maintainers. Pull requests must pass formatting, linting, and testing checks before merging.'}]\n", + "Scores: {'helpfulness': 2.21875, 'correctness': 2.40625, 'coherence': 3.453125, 'complexity': 1.6640625, 'verbosity': 1.078125}\n", + "\n", + "Message List 2:\n", + "[{'role': 'user', 'content': 'What are the steps for writing a cookbook entry for CAMEL?'}, {'role': 'assistant', 'content': 'The steps for writing a cookbook entry for CAMEL are:\\n1. **Template Usage**: Use the provided template for consistency.\\n2. **Writing in Colab**: Write your cookbook in Google Colab, ensuring that LLM-generated responses are correct and verified.\\n3. **Clear Explanations**: Provide clear explanations of the code and its purpose.\\n4. **Review and Submit**: After writing, review in Colab, then submit by downloading the notebook and creating a pull request.'}]\n", + "Scores: {'helpfulness': 2.71875, 'correctness': 2.734375, 'coherence': 3.46875, 'complexity': 1.7109375, 'verbosity': 1.203125}\n", + "\n", + "Message List 3:\n", + "[{'role': 'user', 'content': 'Describe the principles for writing docstrings in CAMEL.'}, {'role': 'assistant', 'content': 'The principles for writing docstrings in CAMEL include:\\n1. **Use Raw Strings**: Start with `r\"\"\"` to prevent issues with special characters.\\n2. **Brief Descriptions**: Provide a concise summary of the functionality at the beginning.\\n3. **Document Parameters**: Use an `Args` section to document parameters, including type and default values.'}]\n", + "Scores: {'helpfulness': 1.5546875, 'correctness': 1.890625, 'coherence': 3.015625, 'complexity': 1.65625, 'verbosity': 0.6484375}\n", + "\n", + "Message List 4:\n", + "[{'role': 'user', 'content': 'What is the process for conducting code reviews in CAMEL?'}, {'role': 'assistant', 'content': 'The process for conducting code reviews in CAMEL includes:\\n1. **Reviewers Check**: Reviewers assess code for functionality, readability, and compliance with standards.\\n2. **Feedback**: Leave constructive feedback where changes are necessary.\\n3. **Approval**: The code must be approved by at least two reviewers before merging.'}]\n", + "Scores: {'helpfulness': 2.34375, 'correctness': 2.546875, 'coherence': 3.59375, 'complexity': 1.3984375, 'verbosity': 1.0625}\n", + "\n", + "Message List 5:\n", + "[{'role': 'user', 'content': 'Outline the steps for submitting a cookbook to CAMEL.'}, {'role': 'assistant', 'content': 'The steps for submitting a cookbook to CAMEL are:\\n1. **Finalize in Colab**: Ensure that the Colab notebook is complete and reviewed.\\n2. **Download Notebook**: Download the finalized notebook as a .ipynb file.\\n3. **Create Pull Request**: Open a pull request to add the .ipynb file to the repository, including any necessary documentation.'}]\n", + "Scores: {'helpfulness': 2.34375, 'correctness': 2.625, 'coherence': 3.546875, 'complexity': 1.46875, 'verbosity': 1.046875}\n", + "\n", + "Message List 6:\n", + "[{'role': 'user', 'content': 'Explain the importance of code coverage in CAMEL.'}, {'role': 'assistant', 'content': 'Code coverage is important in CAMEL because it measures how much of the code is tested by unit tests. This helps in identifying robust areas of the codebase and areas that may need more testing, ensuring better reliability and maintainability of the code.'}]\n", + "Scores: {'helpfulness': 2.78125, 'correctness': 2.875, 'coherence': 3.8125, 'complexity': 1.7734375, 'verbosity': 1.0234375}\n", + "\n", + "Message List 7:\n", + "[{'role': 'user', 'content': 'What are the guidelines for labeling pull requests in CAMEL?'}, {'role': 'assistant', 'content': 'The guidelines for labeling pull requests in CAMEL include:\\n- **feat**: For new features.\\n- **fix**: For bug fixes.\\n- **docs**: For documentation updates.\\n- **style**: For code style changes.\\n- **refactor**: For code refactoring.\\n- **test**: For adding or updating tests.\\n- **chore**: For maintenance tasks.'}]\n", + "Scores: {'helpfulness': 2.859375, 'correctness': 2.984375, 'coherence': 3.78125, 'complexity': 1.6171875, 'verbosity': 1.1328125}\n", + "\n", + "Message List 8:\n", + "[{'role': 'user', 'content': 'What communication channels are available for CAMEL contributors?'}, {'role': 'assistant', 'content': 'The communication channels available for CAMEL contributors include:\\n- **Discord**: For real-time communication.\\n- **WeChat**: For Chinese-speaking contributors.\\n- **Slack**: For team collaboration.'}]\n", + "Scores: {'helpfulness': 1.4296875, 'correctness': 1.6796875, 'coherence': 3.59375, 'complexity': 0.796875, 'verbosity': 0.546875}\n", + "\n", + "Message List 9:\n", + "[{'role': 'user', 'content': 'Describe the purpose of the sprint planning process in CAMEL.'}, {'role': 'assistant', 'content': 'The purpose of the sprint planning process in CAMEL is to define what can be delivered in the upcoming sprint and how those goals will be achieved. It ensures that the team has a clear understanding of the sprint objectives and tasks to focus on.'}]\n", + "Scores: {'helpfulness': 2.84375, 'correctness': 2.984375, 'coherence': 3.890625, 'complexity': 1.6015625, 'verbosity': 0.95703125}\n", + "\n", + "Message List 10:\n", + "[{'role': 'user', 'content': 'What are the key components of the CAMEL project license?'}, {'role': 'assistant', 'content': 'The CAMEL project is licensed under Apache 2.0, which means that contributions will also be licensed under the same terms by default. Contributors can add the license manually or use a script to automate the process.'}]\n", + "Scores: {'helpfulness': 1.890625, 'correctness': 1.828125, 'coherence': 3.5625, 'complexity': 1.3515625, 'verbosity': 0.65625}\n", + "\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "9kbfgqwY2m2V" + }, + "source": [ + " # 🎯Filtering the Generated Data Using the Reward Model\n", + " Finally, we utilize NVIDIA's Nemotron Reward Model to filter out low-quality instruction-input-response triplets. The model evaluates each response based on defined thresholds for metrics such as helpfulness and correctness.\n", + "\n", + " Let's use thresholds = {\"helpfulness\": 2.5, \"correctness\": 2.5} as an example of filter parameters. After filtering, some high-quality triplets are retained." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "gVlhSTXO2m2V", + "outputId": "d7205b6e-d2e8-42af-d1d5-88b964273a49", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "18\n" + ] + } + ], + "source": [ + "thresholds = {\"helpfulness\": 2.5, \"correctness\": 2.5}\n", + "filtered_messages_lists = []\n", + "for messages_list in messages_lists:\n", + " response = evaluator.filter_data(messages_list, thresholds)\n", + " if response:\n", + " filtered_messages_lists.append(messages_list)\n", + "\n", + "print(len(filtered_messages_lists))\n" + ] + }, + { + "cell_type": "code", + "source": [ + "filtered_messages_lists" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "VF-KQ3dgsrgy", + "outputId": "b9ccc85c-a05c-4831-ec85-68046f9488d2" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "[[{'role': 'user',\n", + " 'content': 'What are the steps for writing a cookbook entry for CAMEL?'},\n", + " {'role': 'assistant',\n", + " 'content': 'The steps for writing a cookbook entry for CAMEL are:\\n1. **Template Usage**: Use the provided template for consistency.\\n2. **Writing in Colab**: Write your cookbook in Google Colab, ensuring that LLM-generated responses are correct and verified.\\n3. **Clear Explanations**: Provide clear explanations of the code and its purpose.\\n4. **Review and Submit**: After writing, review in Colab, then submit by downloading the notebook and creating a pull request.'}],\n", + " [{'role': 'user',\n", + " 'content': 'Explain the importance of code coverage in CAMEL.'},\n", + " {'role': 'assistant',\n", + " 'content': 'Code coverage is important in CAMEL because it measures how much of the code is tested by unit tests. This helps in identifying robust areas of the codebase and areas that may need more testing, ensuring better reliability and maintainability of the code.'}],\n", + " [{'role': 'user',\n", + " 'content': 'What are the guidelines for labeling pull requests in CAMEL?'},\n", + " {'role': 'assistant',\n", + " 'content': 'The guidelines for labeling pull requests in CAMEL include:\\n- **feat**: For new features.\\n- **fix**: For bug fixes.\\n- **docs**: For documentation updates.\\n- **style**: For code style changes.\\n- **refactor**: For code refactoring.\\n- **test**: For adding or updating tests.\\n- **chore**: For maintenance tasks.'}],\n", + " [{'role': 'user',\n", + " 'content': 'Describe the purpose of the sprint planning process in CAMEL.'},\n", + " {'role': 'assistant',\n", + " 'content': 'The purpose of the sprint planning process in CAMEL is to define what can be delivered in the upcoming sprint and how those goals will be achieved. It ensures that the team has a clear understanding of the sprint objectives and tasks to focus on.'}],\n", + " [{'role': 'user',\n", + " 'content': 'What are the key principles to follow when writing entries for the CAMEL cookbook?'},\n", + " {'role': 'assistant',\n", + " 'content': 'The key principles for writing entries for the CAMEL cookbook include:\\n1. High Quality: Ensure accurate code and clear explanations.\\n2. Correctness: Validate LLM-generated responses with real code execution.\\n3. Accessibility: Make content understandable for all users, from beginners to advanced.'}],\n", + " [{'role': 'user',\n", + " 'content': 'What is the purpose of the code review checklist in CAMEL?'},\n", + " {'role': 'assistant',\n", + " 'content': 'The purpose of the code review checklist in CAMEL is to ensure that all contributions maintain high quality by evaluating functionality, code quality, design consistency, and documentation before merging into the main branch.'}],\n", + " [{'role': 'user',\n", + " 'content': \"What is the significance of the 'Fork-and-Pull-Request' workflow in CAMEL?\"},\n", + " {'role': 'assistant',\n", + " 'content': \"The 'Fork-and-Pull-Request' workflow in CAMEL is significant because it allows contributors to work on their own copy of the project and submit changes for review, ensuring that contributions are managed efficiently and collaboratively.\"}],\n", + " [{'role': 'user',\n", + " 'content': 'What should contributors do if they encounter challenges during the setup process?'},\n", + " {'role': 'assistant',\n", + " 'content': 'If contributors encounter challenges during the setup process in CAMEL, they should reach out to a maintainer for assistance to ensure a smooth experience.'}],\n", + " [{'role': 'user',\n", + " 'content': 'What are the steps to create a new issue on the CAMEL GitHub repository?'},\n", + " {'role': 'assistant',\n", + " 'content': \"To create a new issue on the CAMEL GitHub repository, follow these steps:\\n1. Go to the issues page on GitHub.\\n2. Click on 'New Issue' and fill in the required information, including a proper title and description.\\n3. Assign labels and update the assignees and milestones as necessary.\"}],\n", + " [{'role': 'user',\n", + " 'content': \"What should contributors do to maintain the project's coding standards?\"},\n", + " {'role': 'assistant',\n", + " 'content': \"To maintain the project's coding standards, contributors should:\\n1. Follow the established style guidelines.\\n2. Use tools like Ruff for formatting and linting checks.\\n3. Ensure documentation is up-to-date and comprehensive.\"}],\n", + " [{'role': 'user',\n", + " 'content': 'Describe the importance of unit tests in the CAMEL project.'},\n", + " {'role': 'assistant',\n", + " 'content': 'Unit tests are important in the CAMEL project because they verify that individual components of the code work as expected, helping to catch bugs early and ensuring code reliability.'}],\n", + " [{'role': 'user',\n", + " 'content': 'What should contributors include in their pull requests?'},\n", + " {'role': 'assistant',\n", + " 'content': 'Contributors should include the following in their pull requests:\\n1. A clear title and description of the changes.\\n2. Links to any related issues.\\n3. Any necessary documentation or references.'}],\n", + " [{'role': 'user',\n", + " 'content': 'Explain the significance of following the pull request review process.'},\n", + " {'role': 'assistant',\n", + " 'content': 'Following the pull request review process is significant because it ensures that all contributions are evaluated for quality, functionality, and adherence to project standards, which helps maintain the integrity of the codebase.'}],\n", + " [{'role': 'user',\n", + " 'content': 'Describe the importance of maintaining a clean and organized project structure in CAMEL.'},\n", + " {'role': 'assistant',\n", + " 'content': 'Maintaining a clean and organized project structure in CAMEL is important because it enhances code readability, facilitates easier navigation for contributors, and makes it simpler to manage and scale the project.'}],\n", + " [{'role': 'user',\n", + " 'content': \"What is the significance of the CAMEL community's code of conduct?\"},\n", + " {'role': 'assistant',\n", + " 'content': \"The significance of the CAMEL community's code of conduct is to promote a respectful and inclusive environment for all contributors, ensuring that everyone feels welcome and valued while participating in the project.\"}],\n", + " [{'role': 'user',\n", + " 'content': 'Explain the relationship between CAMEL and its contributors.'},\n", + " {'role': 'assistant',\n", + " 'content': 'The relationship between CAMEL and its contributors is collaborative; contributors provide enhancements, fixes, and documentation, while CAMEL offers a platform for sharing knowledge and fostering community engagement.'}],\n", + " [{'role': 'user',\n", + " 'content': 'What are the benefits of participating in the CAMEL community?'},\n", + " {'role': 'assistant',\n", + " 'content': 'The benefits of participating in the CAMEL community include:\\n1. Gaining experience in open-source development.\\n2. Networking with other developers and contributors.\\n3. Contributing to a project that aims to advance AI capabilities.'}],\n", + " [{'role': 'user',\n", + " 'content': 'Summarize the guidelines for writing clear commit messages in CAMEL.'},\n", + " {'role': 'assistant',\n", + " 'content': \"The guidelines for writing clear commit messages in CAMEL include:\\n1. Use the imperative mood to describe the changes (e.g., 'Add feature' instead of 'Added feature').\\n2. Keep messages concise and focused on the changes made.\\n3. Include references to related issues when applicable.\"}]]" + ] + }, + "metadata": {}, + "execution_count": 11 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "## 🌟 Highlights\n", + "\n", + "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", + "Summary of This Cookbook:\n", + "In this cookbook, we demonstrated how to leverage CAMEL-AI to filter generate data. This practical guide helps you efficiently evaluate synthetic data.\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. 🔥 3 ways to ingest data from websites with Firecrawl & CAMEL [free Colab](https://colab.research.google.com/drive/1lOmM3VmgR1hLwDKdeLGFve_75RFW0R9I?usp=sharing)\n", + "\n", + "3. 🦥 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", + "\n", + "\n", + "
\n", + " \n", + " \n", + " \n", + "⭐ Star us on Github , join our [*Discord*](https://discord.camel-ai.org) or follow our [*X*](https://x.com/camelaiorg) ⭐\n", + "
" + ], + "metadata": { + "id": "emHCz7p9sum1" + } + } + ], + "metadata": { + "kernelspec": { + "display_name": "camel-ai-8RlHKqzd-py3.11", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.5" + }, + "colab": { + "provenance": [] + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 7b2f8e55d7..82be7f3c7e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -77,6 +77,7 @@ Main Documentation cookbooks/customer_service_Discord_bot_using_SambaNova_with_agentic_RAG.ipynb cookbooks/data_gen_with_real_function_calls_and_hermes_format.ipynb cookbooks/agent_with_chunkr_for_pdf_parsing.ipynb + cookbooks/synthetic_dataevaluation&filter_with_reward_model.ipynb .. toctree:: :maxdepth: 1