Zenetics SDK
Python SDK

Zenetics SDK for Python

Zenetics SDK is a Python library that provides a simple interface to interact with Zenetics API.

Installation

You can install the Zenetics SDK using pip:

pip install zenetics

Define the following environment variables: OPENAI_API_KEY, ZENETICS_API_KEY, ZENETICS_APP_ID.

from zenetics import openai
 
openai.chat.completions.create(
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Knock knock."},
        {"role": "assistant", "content": "Who's there?"},
        {"role": "user", "content": "Orange."},
    ],
    model="gpt-3.5-turbo",
)

The SDK requires credential to be provided via environment variables to prevent sensitive information to leak into source code. The following environment variables are required:

  • ZENETICS_API_KEY: Zenetics API key
  • ZENETICS_APP_ID: Zenetics application ID

Depending on your selected LLM provider, you must also provide the API key authenticating access to the provider's API. Zenetics does not access your providers API and does not read your provider API key.

  • OPENAI_API_KEY: OpenAI API key