Skip to main content

A library for interaction with multiple AI models, such as GPT-4, Claude, Gemini, Llama, and others.

Project description

RsnChat

The ultimate AI-powered RsnChat Phyton

This package package for interacting with the Rsn Labs API. It supports generating chat responses, images, and interacting with female character models.

Installation

You can install the package via Pypi

pip install rsnchat

APIKEY

Discord : https://api.rnilaweera.lk/discord

Join discord server and create account with /register slash command and get your apikey with /generate-key slash command for free!


Generating Chat Responses

You can generate responses using the available chat models.

Valid models: gemini, claude, deepseek-v3, gpt, deepseek-r1, llama, grok-3, grok-3-r1, gpt4.

Example:

from rsnchat import RsnChat

rsn_chat = RsnChat("rsnlabs_××××××××××××××××××××××")
response = rsn_chat.generate_chat_response("gemini", "Hello, what is your name?")
print(response.get('message', 'Error: Could not generate the response'))

Generating Images

You can generate images using different models for specific styles.

Valid models: rsnlabs, flux, anime, disney, cartoon, photography, icon, ghibli.

Example:

from rsnchat import RsnChat

rsn_chat = RsnChat("rsnlabs_××××××××××××××××××××××")
response = rsn_chat.generate_image("A futuristic city at night with neon lights", "flux")
print(response.get('image_url', 'Error: Could not generate the image'))

Listing Available Models

The API allows you to list all available models, including chat, image, and female character models.

Example:

from rsnchat import RsnChat

rsn_chat = RsnChat()

response = rsn_chat.list_models()

if response:
    print("Chat Models:")
    for chat_model in response.get('chat_models', []):
        print(f" - {chat_model['name']} (Status: {chat_model['status']})")

    print("\nImage Models:")
    for image_model in response.get('image_models', []):
        print(f" - {image_model['name']} (Status: {image_model['status']})")

    print("\nGirls Character Models:")
    for girl_model in response.get('girls_character_models', []):
        print(f" - {girl_model['name']} (Status: {girl_model['status']})")
        print(f"   Profile Pic: {girl_model['profile_pic']}")

    print(f"\nPowered By: {response.get('powered_by', 'Unknown')}")
else:
    print("Failed to fetch the models.")

Generating Responses with Female Character Models

You can interact with female character models. Each character has a profile picture and responds based on the provided prompt.

Valid models: amaya, ana, carla, delicia, ember, mariya, summer, naomi.

Example:

from rsnchat import RsnChat

rsn_chat = RsnChat("rsnlabs_××××××××××××××××××××××")
response = rsn_chat.generate_character_response('amaya', 'Hello, how are you doing today?')

print(f"Profile Pic: {response.get('profile_pic', 'Error: No profile picture available')}")
print(f"Response: {response.get('response', 'Error: Could not generate the message')}")

Error Handling

If an invalid model is provided, the SDK will raise a ValueError with a detailed message listing the valid models.

Example:

from rsnchat import RsnChat

rsn_chat = RsnChat("rsnlabs_××××××××××××××××××××××")

try:
    response = rsn_chat.generate_chat_response("invalid_model", "Test prompt")
except ValueError as e:
    print(f"Error: {e}")

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

rsnchat-5.0.0b1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

rsnchat-5.0.0b1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file rsnchat-5.0.0b1.tar.gz.

File metadata

  • Download URL: rsnchat-5.0.0b1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.12

File hashes

Hashes for rsnchat-5.0.0b1.tar.gz
Algorithm Hash digest
SHA256 d5d0ddca805236f70902c7c376c76e5cee09013180182bfaa3cc4b7be915f136
MD5 ac8632be27c857455121d869e854e1c9
BLAKE2b-256 34fc7510bdbb64a55696c017c7667c24dc723713053d49e170cc79f2cea2a214

See more details on using hashes here.

File details

Details for the file rsnchat-5.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: rsnchat-5.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.12

File hashes

Hashes for rsnchat-5.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4ab4c18f331584bdc65cf5e773474f1157b803cdf934b1f284eafe11fbf4bcd
MD5 3698c727d426b5095c75383405c553a5
BLAKE2b-256 9e6bccb7a76037b19aacb7c9d4dc8488ea487459611370748cfacd31a6b5ab04

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