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
Built Distribution
File details
Details for the file timeplus-leptons-0.0.3.tar.gz
.
File metadata
- Download URL: timeplus-leptons-0.0.3.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.9.6 requests/2.31.0 setuptools/57.4.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14d9c3ddffdfef5edfc216635bb8c682afc4bed381b5f73afd7da0942afb14e0 |
|
MD5 | b03cdff996cc7f7f1bab6631eef34e29 |
|
BLAKE2b-256 | 00ffd6d1ff040b04a1af572d102f0446ba0d55c1b4f7f50fea6bba148ba1b830 |
File details
Details for the file timeplus_leptons-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: timeplus_leptons-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.9.6 requests/2.31.0 setuptools/57.4.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3b50a3bf1bf002d3cf5da4e38542b836d7af9db305da374c8b6f2f28ebd7686 |
|
MD5 | 0fcb34eece42f934085d908db6540d7d |
|
BLAKE2b-256 | c4e2f90c77399a40b592109786341edab97a2a5dd23d51b5b0d6d0f8ff91d7ee |