Skip to main content

A library to help and facilitate the creation of bots and AI assistants

Project description

EasyBot Library

EasyBot is a Python library designed to facilitate the creation of AI-powered bots using OpenAI's API. This library provides a simple interface to integrate various functionalities and create a customizable assistant.

Features

  • Easy integration with OpenAI's API.
  • Customizable bot functions.
  • Simple setup and usage.

Installation

To install the EasyBot library, you can use pip:

pip install easybot-py

Usage

Usage Here is an example of how to use the EasyBot library:

import os
from openai_conn import OpenAICore
from easy_bot import EasyBot

def sum(a: int, b: int, positive: bool = False):
    """
    Made an operation and returns the result
    @a : int First operand
    @b : int Second operand
    """
    return a + b

def main():
    INSTRUCTION = "You're a Math tutor, you should use the functions"
    token = os.getenv('OPENAI_API_KEY')
    if token is None:
        raise ValueError('Token key is not set in env variables')

    client = EasyBot(token, INSTRUCTION)
    client.add_function(sum)
    client.create_assistant()

    print(client.create_text_completion('Who are you?'))
    print(client.create_text_completion('What is 24556 + 554322 + 2'))

if __name__ == "__main__":
    main()

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

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

easybot_py-0.0.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

easybot_py-0.0.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file easybot_py-0.0.2.tar.gz.

File metadata

  • Download URL: easybot_py-0.0.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for easybot_py-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fef42165e295d58e04edd1d7756d8858ff57b07375176a3b8545c1f57d8540ec
MD5 bf16aeb301b3fbd31c4017e21f37369c
BLAKE2b-256 29839830c79b0c05a56544109e9ad730fb157e1eb490efbc341ee7ded1a28345

See more details on using hashes here.

File details

Details for the file easybot_py-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: easybot_py-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for easybot_py-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0aa3d5a23fe0a638b7ce442b2d0dbad303ee90b0f1d1cf583bf75aebfeff3994
MD5 dc6e6388236da0835911d69dfc6b49bd
BLAKE2b-256 54ce80600c9bae680ebc026c979c58b89140660c26b282e5e3802faec9ffcc54

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