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

Uploaded Python 3

File details

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

File metadata

  • Download URL: buddyassistant-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 dc2f6f1e5c87d6ed75f8c7eb8cba15163d1ba61b995a5fa01cff8f8de5a87a84
MD5 0b61f2a9fa8d3f5b96bf9241d14f0a43
BLAKE2b-256 33c13b417d19270f2539794721640099a59f73f767ff00504cf93d62277379de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: BuddyAssistant-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bee03ef581309f1e480e72249baed6672fba8a0b69a3c802e5f339883f4d4ce6
MD5 dc0e4519bf8d519e1be40396a248d31b
BLAKE2b-256 e09def2be6a3d745ea729a66bd220f5f794ebfe0493d682c60ca5ecb967c669d

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