Skip to main content

Tools for testing, debugging, and evaluating LLM features.

Project description

Baserun

Twitter

Baserun is the testing and observability platform for LLM apps.

Quick Start

1. Generate an API key

Create an account at https://baserun.ai. Then generate an API key for your project in the settings tab and set it as an environment variable.

export BASERUN_API_KEY="your_api_key_here"

2. Install Baserun

pip install baserun

3. Start testing

export BASERUN_API_KEY="your_api_key_here"

Use our pytest plugin and start immediately testing with Baserun. By default all OpenAI and Anthropic requests will be automatically logged.

# test_module.py

import openai

def test_paris_trip():
    response = openai.ChatCompletion.create(
        model="gpt-3.5-turbo",
        temperature=0.7,
        messages=[
            {
                "role": "user",
                "content": "What are three activities to do in Paris?"
            }
        ],
    )
    
    assert "Eiffel Tower" in response['choices'][0]['message']['content']

To run the test and log to baserun:

pytest --baserun test_module.py
...
========================Baserun========================
Test results available at: https://baserun.ai/runs/<id>
=======================================================

Documentation

For a deeper dive on all capabilities and more advanced usage, please refer to our Documentation.

License

MIT License

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

baserun-0.5.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

baserun-0.5.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file baserun-0.5.1.tar.gz.

File metadata

  • Download URL: baserun-0.5.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for baserun-0.5.1.tar.gz
Algorithm Hash digest
SHA256 dd1b238f796d69b20834d6e4da393c05297eb759c1226f388e4ae28f35a22701
MD5 0e852b56228bbb0008c1b729161a624d
BLAKE2b-256 36289b15e35f8c7ba598e7dfff3ded388753efc827a40beb743582d5de2fd456

See more details on using hashes here.

File details

Details for the file baserun-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: baserun-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for baserun-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92d022ae76bd05910b673c94c060eb51433d5210c839af78526a16c1fab21353
MD5 956a6263f0940a653be5aef51a2c4d75
BLAKE2b-256 cbf9967f530753c66b3e1e4d89dcc15bc509cdbfb84906b41adabae5a9d8abb8

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