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
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
timeplus-leptons-0.0.3.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for timeplus_leptons-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3b50a3bf1bf002d3cf5da4e38542b836d7af9db305da374c8b6f2f28ebd7686 |
|
MD5 | 0fcb34eece42f934085d908db6540d7d |
|
BLAKE2b-256 | c4e2f90c77399a40b592109786341edab97a2a5dd23d51b5b0d6d0f8ff91d7ee |