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.1.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.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmrails-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1b77b9b4194faa718451af045a08fc854aa0a05e698613dc4f86958627c7c165
MD5 e54ac9cd46c6d3cfe6a2c1f35ce751a9
BLAKE2b-256 546043f75e952f1fe8bb4c733a8503c4603bf18b01b7923394dd3998ea78f45e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmrails-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7186ce46ed04495ce65228e92eeb3f77b9b03f6917b1ceebec3078832cf0d19e
MD5 1a2d557bd1b72b7c70b71876a67b57a2
BLAKE2b-256 f475c309df7a6143575fc59e3905e6c0a1476b285b7ca5af3c34c1275efbeb81

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