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

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmrails-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for llmrails-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aafaf978b70ddb60a9755976abc20fbed1b655a80f4c77652df1ac68ce7a8c4b
MD5 e8972aea5d86c2c4bd5282dbdfed7e69
BLAKE2b-256 05539600dbf756481e6ab2ea5fc4b7fad00b39b7a1f1515dc5685532541a0e75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmrails-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for llmrails-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5a92e58e8676535da5df4fd46db4c5588a91ce6af5be3dac379faa6b4ce1440
MD5 e00f8ee296d43ee471aa17718982adf2
BLAKE2b-256 5a6aa6573913ac71c5e7bca35e32130cab5ad7b97f8119269c22eee61dd11f91

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