wyn-agent


Namewyn-agent JSON
Version 0.1.9 PyPI version JSON
download
home_pageNone
SummaryWelcome to the **WYN-Agent** package! This Python package provides a simple yet powerful interface to create AI chatbots using the Mistral AI platform.
upload_time2024-09-10 18:31:21
maintainerNone
docs_urlNone
authorYiqiao Yin
requires_python<4.0,>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🧠 WYN-Agent

Welcome to the **WYN-Agent** package! This Python package provides a simple yet powerful interface to create AI chatbots using the Mistral AI platform. It includes functionalities to handle conversation history, isolate and execute Python code from chatbot responses, and seamlessly interact with Mistral's AI agents.

💻 Github: [https://github.com/yiqiao-yin/wyn-agent](https://github.com/yiqiao-yin/wyn-agent)

[![Video Title](https://img.youtube.com/vi/g_T9XIlnhak/0.jpg)](https://youtu.be/g_T9XIlnhak)

## 📦 Installation

Before using the package, make sure you have Python installed. You can install the package via `pip`:

```bash
pip install wyn-agent
```

## 🛠️ Features

- **ChatBot Class**: Easily create a chatbot that interacts with Mistral AI services.
- **Conversation History**: Track the entire conversation history with ease.
- **Python Code Extraction**: Automatically extract and save Python code from chatbot responses.
- **Script Execution**: Execute Python scripts directly from the extracted code.
- **Interactive Agent**: Run a Mistral AI agent chatbot with simple commands.

## 🚀 Quick Start

To get started, simply initialize the `ChatBot` class with your Mistral API key and call the `run_mistral_agent()` method.

```python
from wyn_agent.mistral_agent import ChatBot

bot = ChatBot(
    api_key=YOUR_MISTRAL_API_KEY,
    agent_id=YOUR_MISTRAL_AGENT_API_ID
)

bot.run_mistral_agent()
```

This will start an interactive chatbot session where you can converse with the AI, extract Python code snippets, and even execute them on your local machine.

## 📚 Mistral AI Agent Bot Tutorial

In this section, we'll walk through using the Mistral AI Agent Bot to build a simple interactive chatbot.

### 1. **Initialization**

Start by creating a `ChatBot` instance with your API key:

```python
from wyn_agent.mistral_agent import ChatBot

bot = ChatBot(
    api_key=YOUR_MISTRAL_API_KEY,
    agent_id=YOUR_MISTRAL_AGENT_API_ID
)
```

### 2. **Running the Agent**

Call the `run_mistral_agent()` method to begin interacting with the Mistral AI agent:

```python
bot.run_mistral_agent()
```

### 3. **Interacting with the Bot**

You'll be prompted to enter your messages. The bot will respond and, if the response contains Python code enclosed in triple backticks (```), you'll have the option to save and execute the code.

### 4. **Saving and Executing Python Code**

If the bot generates Python code, you'll be asked if you want to save and execute the code. The code will be saved as a `.py` file, and you can choose to run it immediately.

### 5. **Exiting the Program**

Type `EXIT` to end the conversation.

## 📧 Contact

Developed by **Yiqiao Yin**. For any questions or feedback, feel free to reach out at [eagle0504@gmail.com](mailto:eagle0504@gmail.com).

## 🎉 Contributions

We welcome contributions! If you'd like to contribute, please fork the repository and submit a pull request.

---

Enjoy building your AI agents with Mistral! 🚀
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wyn-agent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Yiqiao Yin",
    "author_email": "eagle0504@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/88/67/668e95534040d5a24e2c7082c2ba950a3321c559eb8d505b23a07bc4bbac/wyn_agent-0.1.9.tar.gz",
    "platform": null,
    "description": "# \ud83e\udde0 WYN-Agent\n\nWelcome to the **WYN-Agent** package! This Python package provides a simple yet powerful interface to create AI chatbots using the Mistral AI platform. It includes functionalities to handle conversation history, isolate and execute Python code from chatbot responses, and seamlessly interact with Mistral's AI agents.\n\n\ud83d\udcbb Github: [https://github.com/yiqiao-yin/wyn-agent](https://github.com/yiqiao-yin/wyn-agent)\n\n[![Video Title](https://img.youtube.com/vi/g_T9XIlnhak/0.jpg)](https://youtu.be/g_T9XIlnhak)\n\n## \ud83d\udce6 Installation\n\nBefore using the package, make sure you have Python installed. You can install the package via `pip`:\n\n```bash\npip install wyn-agent\n```\n\n## \ud83d\udee0\ufe0f Features\n\n- **ChatBot Class**: Easily create a chatbot that interacts with Mistral AI services.\n- **Conversation History**: Track the entire conversation history with ease.\n- **Python Code Extraction**: Automatically extract and save Python code from chatbot responses.\n- **Script Execution**: Execute Python scripts directly from the extracted code.\n- **Interactive Agent**: Run a Mistral AI agent chatbot with simple commands.\n\n## \ud83d\ude80 Quick Start\n\nTo get started, simply initialize the `ChatBot` class with your Mistral API key and call the `run_mistral_agent()` method.\n\n```python\nfrom wyn_agent.mistral_agent import ChatBot\n\nbot = ChatBot(\n    api_key=YOUR_MISTRAL_API_KEY,\n    agent_id=YOUR_MISTRAL_AGENT_API_ID\n)\n\nbot.run_mistral_agent()\n```\n\nThis will start an interactive chatbot session where you can converse with the AI, extract Python code snippets, and even execute them on your local machine.\n\n## \ud83d\udcda Mistral AI Agent Bot Tutorial\n\nIn this section, we'll walk through using the Mistral AI Agent Bot to build a simple interactive chatbot.\n\n### 1. **Initialization**\n\nStart by creating a `ChatBot` instance with your API key:\n\n```python\nfrom wyn_agent.mistral_agent import ChatBot\n\nbot = ChatBot(\n    api_key=YOUR_MISTRAL_API_KEY,\n    agent_id=YOUR_MISTRAL_AGENT_API_ID\n)\n```\n\n### 2. **Running the Agent**\n\nCall the `run_mistral_agent()` method to begin interacting with the Mistral AI agent:\n\n```python\nbot.run_mistral_agent()\n```\n\n### 3. **Interacting with the Bot**\n\nYou'll be prompted to enter your messages. The bot will respond and, if the response contains Python code enclosed in triple backticks (```), you'll have the option to save and execute the code.\n\n### 4. **Saving and Executing Python Code**\n\nIf the bot generates Python code, you'll be asked if you want to save and execute the code. The code will be saved as a `.py` file, and you can choose to run it immediately.\n\n### 5. **Exiting the Program**\n\nType `EXIT` to end the conversation.\n\n## \ud83d\udce7 Contact\n\nDeveloped by **Yiqiao Yin**. For any questions or feedback, feel free to reach out at [eagle0504@gmail.com](mailto:eagle0504@gmail.com).\n\n## \ud83c\udf89 Contributions\n\nWe welcome contributions! If you'd like to contribute, please fork the repository and submit a pull request.\n\n---\n\nEnjoy building your AI agents with Mistral! \ud83d\ude80",
    "bugtrack_url": null,
    "license": null,
    "summary": "Welcome to the **WYN-Agent** package! This Python package provides a simple yet powerful interface to create AI chatbots using the Mistral AI platform.",
    "version": "0.1.9",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e057dd064baa4bd9fb878aa92b1381d191ae6a2348bdcdde0dfd85b6295a756a",
                "md5": "1d6527bedb1e9614db5000cf2adab334",
                "sha256": "32144b7467f1659d7ada28f531ea2d3bb65414d0f055447971fc6ff69bd4e94d"
            },
            "downloads": -1,
            "filename": "wyn_agent-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d6527bedb1e9614db5000cf2adab334",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 4356,
            "upload_time": "2024-09-10T18:31:19",
            "upload_time_iso_8601": "2024-09-10T18:31:19.587996Z",
            "url": "https://files.pythonhosted.org/packages/e0/57/dd064baa4bd9fb878aa92b1381d191ae6a2348bdcdde0dfd85b6295a756a/wyn_agent-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8867668e95534040d5a24e2c7082c2ba950a3321c559eb8d505b23a07bc4bbac",
                "md5": "c6b7e334916d489d2558717ff8835947",
                "sha256": "22ee873360c261e7e2f425cf21539896af648804820158721d6d7751e8d17241"
            },
            "downloads": -1,
            "filename": "wyn_agent-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "c6b7e334916d489d2558717ff8835947",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 3989,
            "upload_time": "2024-09-10T18:31:21",
            "upload_time_iso_8601": "2024-09-10T18:31:21.098181Z",
            "url": "https://files.pythonhosted.org/packages/88/67/668e95534040d5a24e2c7082c2ba950a3321c559eb8d505b23a07bc4bbac/wyn_agent-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-10 18:31:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "wyn-agent"
}
        
Elapsed time: 0.33374s