genia-dev / vibraniumdome-sdk

Client SDK to send LLM interactions to Vibranium Dome

Home Page:https://docs.vibraniumdome.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vibraniumdome-sdk

Overview

Client SDK to send LLM interactions to the Vibranium Dome System. Supports both the deprecated version of OpenAI Python SDK 0.28.1, and the new version 1.*

Getting Started

Install the PiPY package

https://pypi.org/project/vibraniumdome-sdk/

pip3 install vibraniumdome-sdk

Run sample

To start trace your OpenAI, you need to define VIBRANIUM_DOME_BASE_URL environment variable to point Vibranium Dome service, and to set VIBRANIUM_DOME_API_KEY from Vibranium Dome System; Run it locally via the basic installation:

export VIBRANIUM_DOME_BASE_URL=http://localhost:5001
export VIBRANIUM_DOME_API_KEY=vibranium...

Code sample:

import os
from openai import OpenAI

from vibraniumdome_sdk import VibraniumDome

VibraniumDome.init(app_name="vibraniumdome_sdk_openai_test_app")

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
completion = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[{"role": "user", "content": "Tell me a joke about opentelemetry"}],
    user="user-123456",
    extra_headers={"x-session-id": "abcd-1234-cdef"},
)

print(completion.choices[0].message.content)

For more details please see documentation here

Contributing

We would appreciate your contributions! πŸ™ŒπŸŒŸπŸ’– πŸ‘©β€πŸ’»βž•πŸ‘¨β€πŸ’» Fork repository, make your changes, and submit a pull request! More details can be found here.

License

MIT License.

See LICENSE to see the full text.

Contact

Got an idea to improve our project? We'd love to hear it and collaborate with you. Don't hesitate to reach out to us! Just open an issue and we will respond to you πŸ¦Έβ€β™€οΈπŸ¦Έβ€β™‚οΈ ! You can see details here.

Documentation

https://docs.vibraniumdome.com

About

Client SDK to send LLM interactions to Vibranium Dome

https://docs.vibraniumdome.com

License:MIT License


Languages

Language:Python 100.0%