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.4.tar.gz (3.7 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.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmrails-0.1.4.tar.gz
  • Upload date:
  • Size: 3.7 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.4.tar.gz
Algorithm Hash digest
SHA256 697400e706ddb252c01a9b2519681b6bd94c31414f6010f27d618220679f7a56
MD5 67b57ca72c445d3e7497a755f70a579c
BLAKE2b-256 e600496e5f974ff90fc7e1966e693e7d0f9bc5ff0b9ec5aa78f80b033ede810c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmrails-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 109635cf00aba89c6d5d9d9a95e407489648c2b1685f1f0e9d5e8df81af5905c
MD5 4cc8ebb9fff7f48d8b6c29b4b0993b82
BLAKE2b-256 1c0be70c64cd1b2d0798f9927d1fbfeff89f7acb06b9aa581e19f55f40f5f2f4

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