Custom Base URL
Installation
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)import { GLChat } from "glchat-sdk";
const client = new GLChat({baseUrl: "https://custom-glchat.foobar.com/api/proxy/"});
void (async () => {
const result = await client.message.create({
chatbot_id: "no-op",
message: "Hello!",
});
for await (const chunk of result) {
console.log(chunk);
}
})();Last updated