Skip to main content

BuddyAssistant is a conversational AI assistant.

Project description

BuddyAssistant

Overview

BuddyAssistant is a conversational AI assistant built using Python, utilizing the Ollama framework. The assistant can manage conversations, execute functions, and store chat history. This project is designed to facilitate interactions in a user-friendly way while allowing for extensibility through tools and functions.

Features

  • Conversational Threads: Create and manage multiple conversation threads with unique instructions.
  • Function Execution: Dynamically import and execute functions based on user queries.
  • Storage: Persist conversations and assistant state using local storage.
  • Custom Instructions: Define global and thread-specific instructions for personalized interactions.
  • Emoji Support: Optionally include emojis in responses to enhance user experience.

Requirements

To run this project, you will need the following Python packages:

  • ollama

You can install these packages using:

pip install -r requirements.txt

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/my-assistant.git
    cd my-assistant
    
  2. Install the required packages:

    pip install -r requirements.txt
    
  3. Ensure you have the necessary model downloaded: If you're using ollama, make sure to pull the required model:

    ollama pull test_model
    

    Replace with the actual model (personally i use llama3.2)

Usage

To create and interact with the assistant, you can use the following example:

from BuddyAssistant import BuddyAssistant

# Initialize the assistant
assistant = BuddyAssistant(
    name="My Assistant",
    model="test_model",
    description="A friendly conversational assistant.",
    global_instruction="Always respond politely."
)

# Create a new thread
thread_id = assistant.create_thread(thread_instruction="Help me with my questions.")

# Chat with the assistant
response = assistant.chat("Hello, how can you assist me?", thread_id)
print(response.content)

Running tests

To ensure the functionality of the assistant, you can run the unit tests included in the project. Use the following command:

pytest tests/

Contributing

Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.

Acknowledgements

  • Thank you to the Ollama team for providing a powerful framework for building conversational agents.

  • Thanks to the open-source community for their valuable resources and libraries.

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

buddyassistant-0.1.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

BuddyAssistant-0.1.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file buddyassistant-0.1.1.tar.gz.

File metadata

  • Download URL: buddyassistant-0.1.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.66.5 importlib-metadata/8.4.0 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.7

File hashes

Hashes for buddyassistant-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6dc091acf2f7bf862bbddeff1b82a19667bac8bffc6e3b8e723084997acd58b8
MD5 8b86150169daf6728e5d73c8221d5531
BLAKE2b-256 95840c8131b287f792536bb20a8258e2e2d29f7dbebcdba4287110825974a6a7

See more details on using hashes here.

File details

Details for the file BuddyAssistant-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: BuddyAssistant-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.66.5 importlib-metadata/8.4.0 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.7

File hashes

Hashes for BuddyAssistant-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21d1ee16160751aa8bb227d5fc304002e904a1060f97fe88aca5c245838cd899
MD5 1d520e0194e70f2aa6dc390a4c5ec0ad
BLAKE2b-256 0073c351349f615ca41649d5ad9e4e0fce3bc10fb4066f5bbd793eebb4a37018

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