flag-checkeredGetting Started

circle-exclamation

githubView full project code on GitHub

GLChat SDK

You can send message programmatically using GLChat SDK.

Install

pip install glchat-sdk

Set API Key

export GLCHAT_API_KEY=...

Make your first API call

from glchat_sdk import GLChat

client = GLChat()
response = client.message.create(
    chatbot_id="no-op",
    message="Hello!",
    stream=False
)

print(response.message)

This is a sample of the response:

Hello! How can I assist you today?

More details on PyPI glchat-sdkarrow-up-right.

For more advanced usages, see How-To Guides.

Notes for On-Premises GL Chat

If you use self-managed on-premises GL Chat, you can set API Keys via environment variable:

See GLChat UI for more details on environment variables.

Last updated