Skip to main content

Welcome to the **WYN-Agent** package! This Python package provides a simple yet powerful interface to create AI chatbots using the Mistral AI platform.

Project description

🧠 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

Video Title

📦 Installation

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

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.

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:

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:

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.

🎉 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! 🚀

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wyn_agent-0.1.9.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wyn_agent-0.1.9-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file wyn_agent-0.1.9.tar.gz.

File metadata

  • Download URL: wyn_agent-0.1.9.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.1 Windows/10

File hashes

Hashes for wyn_agent-0.1.9.tar.gz
Algorithm Hash digest
SHA256 22ee873360c261e7e2f425cf21539896af648804820158721d6d7751e8d17241
MD5 c6b7e334916d489d2558717ff8835947
BLAKE2b-256 8867668e95534040d5a24e2c7082c2ba950a3321c559eb8d505b23a07bc4bbac

See more details on using hashes here.

File details

Details for the file wyn_agent-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: wyn_agent-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.1 Windows/10

File hashes

Hashes for wyn_agent-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 32144b7467f1659d7ada28f531ea2d3bb65414d0f055447971fc6ff69bd4e94d
MD5 1d6527bedb1e9614db5000cf2adab334
BLAKE2b-256 e057dd064baa4bd9fb878aa92b1381d191ae6a2348bdcdde0dfd85b6295a756a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page