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.tar.gz (7.8 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-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buddyassistant-0.1.tar.gz
  • Upload date:
  • Size: 7.8 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.tar.gz
Algorithm Hash digest
SHA256 8c0d78cad8b99c21c055a869a181f8f1c03cb2bda14b98f48b55faf075cb7270
MD5 b715c7196238ba074c7b3c6c931b71e6
BLAKE2b-256 6b4d32cc29c519c3038e776b6e2fab70c37ec3ff3d36eb9850e4d60e019dbc62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: BuddyAssistant-0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.6 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-py3-none-any.whl
Algorithm Hash digest
SHA256 8bd5b4b09f8590b5e253300ce9fa6dbf1679a2d0e447dee198d745c749d2c7b8
MD5 e4b17421c4c09712ada8277284dc2ba5
BLAKE2b-256 6302e4e265501bea13a42d51288c1c146416c7b5c92d92d4f24630dcc8594a15

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