Skip to main content

Integrating ChatGPT into Live Helper Chat with Responses API, Tool Calls, File Search Support

This integration uses the Chat Responses API.

Before you begin, you will need:

Streaming Support

Import the version you want Streaming OR Non Streaming. Streaming version requires NodeJS and PHP-Resque extensions.

Reasoning models support

If you have imported bot previously and want to upgrade a model with reasoning capabilities, you can

  • Make changes as new versions of Rest API and Bot has
  • Just set store: false in the Rest APi call.
  • Make sure you have version released after 2025-06-14 or just pull from master branch just.

Flow with Tool Call Support

Rest API

What are the differences between V1 and V2 streaming API?

After some testing, I found few edge scenarios that V1 could fail. So V2 fixes those. You do not need to make any changes to bot itself.

Provide your own vector storage ID (optional)

{
"type": "file_search",
"vector_store_ids": ["<storage_id>"]
}

Here is example how full tools section might look like. If you do not want to use vector storage you can remove that section just.

[
{
"type": "file_search",
"vector_store_ids": ["<storage_id>"]
},
{
"type": "function",
"name": "password_reminder",
"description": "Sends a password reset link to the provided email address.",
"parameters": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The email address associated with the account."
}
},
"required": ["email"]
}
},
{
"type": "function",
"name": "support_price",
"description": "Returns paid support price",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
]

Bot

Calling a Trigger Based on a Defined Function in ChatGPT

  1. Note the defined function in Rest API, transfer_operator.
  2. Add an event to your trigger with the Type set to Custom text matching. The Should include any of these words value should be transfer_operator.

For example:

transfer_operator

Limiting the Knowledge Base to Uploaded Documents (Vector Storage)

Here are my System instructions for the bot used on the documentation page:

You are a helpful Live Helper Chat Bot. You answer questions based on file search. If you don't know the answer, respond with "I can only help with Live Helper Chat related questions." Provide the most relevant answer to the visitor's question, not exceeding 100 words. Include a link for more information about your answer.