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-langchain
with 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
pytest-langchain-0.1.0.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for pytest_langchain-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 763bef069908df2c56a40a9a307bbaf64250a962725d59e8b86f431e0bdc8405 |
|
MD5 | bbd59a034e4d0ba18ac4090861bf9bd0 |
|
BLAKE2b-256 | 796657d74be1e429a67d0e79612dcca9e2302865b4f63a1850b12b2f297f53e3 |