Pytest-style test runner for langchain agents
Project description
🦜️🔗✅ pytest-langchain
Pytest-style test runner for langchain projects.
Installation
Install from PyPI:
pip install pytest-langchain
Install from source:
git clone https://github.com/ajndkr/pytest-langchain
cd pytest-langchain
pip install .
Usage
-
Serialise your LLM chain into a YAML file. Refer to docs for more details.
-
Create a new configuration YAML file to run
pytest-langchainwith the following structure:chain_file: <path to chain YAML file> test_cases: - [<input-1>, <expected output-1>] - [<input-2>, <expected output-2>] - ...
-
Run
pytest-langchain:pytest-langchain -c <path to config YAML file> --openai-api-key <OPENAI API key>For more options, run
pytest-langchain --help.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest-langchain-0.1.0.tar.gz.
File metadata
- Download URL: pytest-langchain-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f3708bcce82da37d713fdb6fa2fe887874717c2c79ba2e44e01463d6191baec
|
|
| MD5 |
6661a260da47ed0eb66660bdc2f0e1e1
|
|
| BLAKE2b-256 |
d7a0855b8fe8630998ce15e7b0c757a70e6ba7050c5be36e71d431bf4371fb3d
|
File details
Details for the file pytest_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pytest_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
763bef069908df2c56a40a9a307bbaf64250a962725d59e8b86f431e0bdc8405
|
|
| MD5 |
bbd59a034e4d0ba18ac4090861bf9bd0
|
|
| BLAKE2b-256 |
796657d74be1e429a67d0e79612dcca9e2302865b4f63a1850b12b2f297f53e3
|