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/anislanguer/BuddyAssistant.git
    
  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.7.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.7-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buddyassistant-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 a454ec5db19862baad442baad4d87174b7bf9701972c10f8b3795356f0f98468
MD5 869d030cc685b32c7f64d06360377292
BLAKE2b-256 9ffb4428d78e21d683e9a20bc67d36d805d4672f83d7a3281e0eadacc9a1f81a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: BuddyAssistant-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 29.5 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e2f6934babd36f8163806ca30bf225142be8ac6315446cbb1ca2c8f9d70b3c18
MD5 39b0b413d0b5d11a00d1f018a715f5ef
BLAKE2b-256 9ba280c7d8e7fb3a0cb6c29622f18799d76e4d61bd0fbeccf210cc82d168157b

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