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.13.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: rocat-0.1.13.tar.gz
  • Upload date:
  • Size: 3.8 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.13.tar.gz
Algorithm Hash digest
SHA256 894727088053cd42cc83ad13a8f951f68b07f13cfd557142927682da9f42f1f4
MD5 5d1e7b34e9c9d343903f370861d183e2
BLAKE2b-256 3346c10005af444479c668f81672fe0753b4ef5e663aa902c3234ccdef9ea54c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rocat-0.1.13-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.13-py3-none-any.whl
Algorithm Hash digest
SHA256 cf28cc779e8ceef5c112a8e60e85b6acc559cf40886de00b20dc88dc45f18c2c
MD5 b57ad264512d687ffc85e568e447251b
BLAKE2b-256 1b3cf87a0d0dcc50cfca3818052f9c90e4a15dfa7abc4bfbe1c953e58d277706

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