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

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmrails-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 abd1afd12f5c1c53f018aaf8377490d491f65c678711b97870d19daaac6c3c87
MD5 f806de1ec7d699d90a6ce0e5883c36c2
BLAKE2b-256 5a4a4cc0438ecf3994b7b107e2df1aa780d72112590dc477155d610da97c2aa3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmrails-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 609489af86adb6c5ccebfa6322dc0e9f7434ad3553928f4dddbacce779ea0e7b
MD5 02828d730002344bb0e72dfadbe99242
BLAKE2b-256 4b0f1aa7d1c94bd2abe5513686a0c99a11269767d8fb98e447ac6384c63ed0aa

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