Custom Base URL

Installation

Prerequisites

This example specifically requires completion of GLChat SDK installation & API Key steps listed on the Quickstart page.

View full project code on GitHub

Custom Base URL in GLChat SDK

You can set custom Base URL when initializing GLChat SDK. This is particularly useful when you have Self-Managed On-Premises GL Chat (you manage your own GLChat deployments, thus you have your own GLChat URL).

from glchat_sdk import GLChat

client = GLChat(base_url="https://custom-glchat.foobar.com/api/proxy/")
response = client.message.create(
    chatbot_id="no-op",
    message="Hello!",
    stream=False
)

print(response.message)

Last updated