Skip to main content

hegel

Welcome to hegel, the python client library for Hegel AI. This library adds the full functionality of our Dialectic product to your LLM, including observability, computing metrics, and tracking customer feedback.

Monitoring your LLM

To use hegel, you'll wrap your current call to an LLM API with the HegelScribe object. HegelScribe helps record the input and response of a LLM call with minimal overhead. The call to the LLM's API is not routed through our server; only the input and response are captured and written to the database through a separate thread without blocking the main thread.

import openai
from hegel.scribe import HegelScribe

scribe = HegelScribe(completion_fn=openai.ChatCompletion.create)
response = scribe(
    model= "gpt-3.5-turbo",
    messages = [  
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Who won the world series in 2020?"},
    ])

Setting your API key

An OpenAI API key is needed if you would like to use OpenAI's API (we do not store or track your API key in anyway). A separate Hegel API key is needed to use our service. You can get a key by contacting us.

To set your API keys:

# Starting from this `hegel` directory
cp .env.example .env

Edit the .env file to include your keys. Avoid sharing that file.

Viewing Logs and Metrics

Scribe collects metrics, monitors failures, and helps gather customer feedback. You can view aggregate metrics, drill into logs, and more on the Hegel Dashboard.

Contributing

We welcome PRs and suggestions! Don't hesitate to open a PR/issue or to reach out to us via email.

Usage and Feedback

We will be delighted to work with early adopters to shape our designs. Please reach out to us via email if you're interested in using this tooling for your project or have any feedback.

License

We will be gradually releasing more components to the open-source community. The current license can be found in the LICENSE file. If there is any concern, please contact us and we will be happy to work with you.

Metadata

Release files for hegel 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hegel 0.0.3
File Size Uploaded
hegel-0.0.3.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hegel 0.0.3
File Interpreter ABI Platform
hegel-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / hegel-0.0.3.tar.gz

Download URL hegel-0.0.3.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9432d043f65dbfc8526ef87623493d31bddc56bf0bcee6096f05927eadeaf89c
BLAKE2b-256 checksum
How to use checksums
7622edf550ecb9f27ccbb37f464654a6afe6bceb1159025bf49c75a351679720
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / hegel-0.0.3-py3-none-any.whl

Download URL hegel-0.0.3-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c12f0c7e8ce520d8e95486a3f24e682ea08e78d103298fc162c3c20304184433
BLAKE2b-256 checksum
How to use checksums
b1383c983d5129190eac68cee2c71eecefba0b795e42cceb593ba1a967d35af8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page