Skip to main content

Timeplus OpenAI API monitor tool

Project description

leptons

leptons records all openAI api calls by adding an api hook that sends request/response to Timeplus cloud.

to install leptons, run pip install timeplus-leptons

to use leptons, refer to following sample code

import os
import openai
from leptons import agent

# start the monitor agent of leptons
api_key = os.environ.get("TIMEPLUS_API_KEY")
api_address = os.environ.get("TIMEPLUS_ADDRESS")
agent = Agent(api_address=api_address, api_key=api_key)
agent.start()

# your open ai calls here
openai.ChatCompletion.create(
        model="gpt-3.5-turbo",
        messages=[{"role": "user", "content": input}],
        temperature=temp
    )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timeplus-leptons-0.0.3.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

timeplus_leptons-0.0.3-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page