Sending Message with PII Masking

Installation

chevron-rightPrerequisiteshashtag

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

githubView 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()
response = client.message.create(
    chatbot_id="no-op",
    message="Nama saya Budiono Siregar. Saya umur 20 tahun. Project saya LODA. Nomor HP saya 081234567890. Saya asal Yogyakarta. Tolong rekap biodata saya",
    ananymize_lm=True
)

for chunk in response:
    print(chunk.decode("utf-8"), end="")

Sample Response

This is a sample of the response:

Last updated