Relevance AI
A simple chain
1. Install and login
Install:
pip install relevanceai
Log in and create a project and api key:
import relevanceai as rai
rai.login()
or if you are in an automated environment, set these environment variables:
RELEVANCE_API_KEY=XXXX
2. Getting started
chain = rai.create(
name = "My chain",
description = "The greatest chain"
)
3. Add steps to the chain
Create a step for the chain
step = PromptCompletion(
prompt="Hello world",
)
You can run and test the individual step.
step.run()
Once you are comfortable with the step you can add it by
chain.add(step)
4. Run and test the chain
Run the chain
chain.run()
5. Configuring output
By default it'll return the full state and all outputs from each step. You can control it by:
chain.set_output(["answer"])
A chain with flexible inputs
1. Give your chain flexible inputs
Add input parameters
chain = rai.create(
name = "My chain",
description = "The greatest chain"
parameters = {
"name" : {"type" : "string"}
}
)
2. Define the parameters inside a step
step = PromptCompletion(
prompt="Hello world my name is ${name}",
)
Metadata
Release files for relevanceai-chains 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| relevanceai-chains-1.0.1.tar.gz | 9.9 kB | Without provenance | Details for relevanceai-chains-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| relevanceai_chains-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for relevanceai_chains-1.0.1-py3-none-any.whl |
Total release size: 23.8 kB
Release files / relevanceai-chains-1.0.1.tar.gz
| Download URL | relevanceai-chains-1.0.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fffc6e1f28c74f7bb85b98237373877a772ac873ef34327e9d205b7891568fd
|
|
BLAKE2b-256 checksum How to use checksums |
38dcb8c9acdec5a7b5745cff42e4cd1955ddd3fa741a86819c7bf675de6f8a83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / relevanceai_chains-1.0.1-py3-none-any.whl
| Download URL | relevanceai_chains-1.0.1-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3373cc3d7290853fa033a9938c853eb30b9a1c61d5dc0f5135191a6324f1de5a
|
|
BLAKE2b-256 checksum How to use checksums |
0cd660ffd3dd2ddfdd49a1a529e898bee1bc37cb4997a107dadba7f2f910bda7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for relevanceai-chains 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.