Skip to main content

Python wrapper for Brave's Leo AI chat functionality based on Llama

Project description

Brave Leo

"Brave Leo" is a Python module that provides access to Brave's Leo AI chat functionality based on Llama. With this module, you can easily integrate AI chat capabilities powered by Brave's Leo into your Python applications.

Installation

You can install "brave-leo" using pip:

pip install brave-leo

Usage

Here's a quick example of how to use "brave-leo" to interact with Brave's Leo AI:

Sync,

from brave_leo import Leo

# Initialize the Leo instance
leo = Leo()

# Ask to Leo and get a response
response = leo.ask('What is the weather like today?')

print("Leo:", response.completion)

Async,

import asyncio
from brave_leo import AsyncLeo

# Initialize the Leo instance
leo = AsyncLeo()

async def main():
    # Ask to Leo and get a response
    response = await leo.ask('What is the weather like today?')
    print("Leo:", response.completion)
    # Close Session
    await leo.close()

asyncio.run(main())

License

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

Contributing

Contributions are welcome! If you have suggestions or find issues, please feel free to open an issue or submit a pull request.

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

brave-leo-0.1.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

brave_leo-0.1.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file brave-leo-0.1.4.tar.gz.

File metadata

  • Download URL: brave-leo-0.1.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for brave-leo-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9ae6d256797eb8f526c730f07b9af154cc54b71b32ea126023f1ef45aa83e760
MD5 412ca157f65ae551590c2ab63181b8fc
BLAKE2b-256 3ca2cc622ff7dfab6491f12964a54c9ae05af310d51654369263f4c40f79bfb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brave_leo-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for brave_leo-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 db308053377a8e9039021f6f6795411cee6ff981e27b315dc6c7f70e250f6cd1
MD5 a59a3a65f2f32d6d1fc050b95d632fe9
BLAKE2b-256 73b83d8aafd31b3e7bfa055a54f0b3bb93d40a1da8b88a32aba1138b134553e0

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