Skip to main content

A simple and user-friendly library for AI services

Project description

😺🚀RoCat

RoCat is a Python library that provides a simple and user-friendly interface for integrating AI services into your projects.

Installation

You can install RoCat using pip:

pip install rocat ​

Usage

How to use it

# main.py
import streamlit as st
import rocat as rc

openai_api_key = "your-api-key-here"
claude_api_key = "your-api-key-here"

st.title("RoCat AI Chatbot Test App")

model = st.selectbox("Select LLM", ["OpenAI", "Claude"])

if model == "OpenAI":
    chatbot = rc.OpenAIChatbot(api_key=openai_api_key, model='gpt-3.5-turbo', max_tokens=512, temperature=0.7)
elif model == "Claude":
    chatbot = rc.ClaudeChatbot(api_key=claude_api_key, model='claude-3-haiku-20240307', max_tokens=512, temperature=0.7)

chatbot.set_system_prompt("you are helpful assistant")

user_prompt = st.text_input("User Input")
if st.button("Generate Response"):
    response = chatbot.generate_response(user_prompt)
    st.write("Assistant:", response)

Running in a streamlit environment

streamlit run main.py

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

Acknowledgements

RoCat is built on top of the following libraries:

  • OpenAI - API for AI services
  • Streamlit - Framework for building web applications

Contact

If you have any questions or inquiries, please contact the author:

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

rocat-0.1.14.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

rocat-0.1.14-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file rocat-0.1.14.tar.gz.

File metadata

  • Download URL: rocat-0.1.14.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for rocat-0.1.14.tar.gz
Algorithm Hash digest
SHA256 b03736874f7f0f549684f290b6a220a9248e7774992cae5aa6ec1e7deefcc175
MD5 e0e023b839967ccf97053830c0ae5874
BLAKE2b-256 a7b877fc6d999963263568dbcf97f9d7de5ea4afba238b0db1537af6e36878c8

See more details on using hashes here.

File details

Details for the file rocat-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: rocat-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for rocat-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 316ed6c0731e933da512d08bee6ddd72310adb5368a6dfeab745c46516a5d3b7
MD5 bf5926a838165ef5da19fd1a58d4cd66
BLAKE2b-256 1be6f6a1e1da265e8fa21945ce1566cccc0efb24aee017c64af264f27939a9b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page