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.4.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.4-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buddyassistant-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 1ebd8d25edb354776fa6f2bb8eb1a639e5fe63a258ccb820bebf35f041e3db53
MD5 c105adff2d9eeb47e9614cf48f9e553e
BLAKE2b-256 f9826a79b3f20472605012fe62d6a047db33c9a7065d998be474a1b50dc22e97

See more details on using hashes here.

File details

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

File metadata

  • Download URL: BuddyAssistant-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 25.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5c253654b79d1deca7d27089ecc490aeba12d5f1b7fffab5a1f1b172be4c4f0a
MD5 c32d8bd3788b8b48cd4a0ccddd131faf
BLAKE2b-256 9d751675ffa4778b0bee96cb8c570e1f25c08b524a49832205c84aefe2efe27e

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