Skip to main content

LLMRails SDK

Project description

LLMRails Python SDK

This package provides functionality developed to simplify interfacing with the LLMRails API in Python 3.

Documentation

  • For more details on advanced parameters, you can also consult the API documentation.

Installation

The package can be installed with pip:

pip install --upgrade llmrails

Install from source:

pip install .

Requirements

  • Python 3.7+

Quick Start

To use this library, you must have an API key and specify it as a string when creating the llmrails.Client object. API keys can be created through the platform. This is a basic example of the creating the client and using the generate endpoint.

import llmrails

# initialize the LLMRails Client with an API Key
rails = llmrails.Client('YOUR_API_KEY')

# generate a prediction for a prompt
embeddings = rails.embed(
            model='embedding-english-v1',
            text=['Hey There'])

# print the predicted text
print('embeddings: {}'.format(embeddings.data[0].embedding))

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

llmrails-0.1.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

llmrails-0.1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file llmrails-0.1.2.tar.gz.

File metadata

  • Download URL: llmrails-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1012-azure

File hashes

Hashes for llmrails-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2756a431266a4d93cad55fefe8eb1fc16be1b116e652b8f0ba5725414eb114d8
MD5 7a265a4b70b1f0ca47e10ddca335b46b
BLAKE2b-256 955982abc9a44bd35204f65dca9303bcfe2c9251771b98a60d09685b07e8958b

See more details on using hashes here.

File details

Details for the file llmrails-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: llmrails-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1012-azure

File hashes

Hashes for llmrails-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 161aeb807746f3f03156193d18c1fc3935ff9320d32173d60de4cc0dfe470ca5
MD5 dd8bbacec4b9de2865ccbfc23756ca4c
BLAKE2b-256 6f7fac05086fc002a02132fbe72dcdde712b588e557437f44d271269d3e600d7

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