Generative AI Endpoint Calls

Generative AI Endpoint Calls

This document is created to explain how to use endpoints for Generative AI. With API Endpoints improvement, now clients will be able to create document with placeholder keys in it to be able to use it dynamically. Also, with new endpoints clients will be able to batch add or update documents.

How To Add or Update Documents To Knowledge Base?

To be able to add or update bulk documents you can use following endpoints.

In Postman Collections page, click on Import button. This will open a new window, copy paste related endpoint curl request you want use.




  • {domain} can be change due to environment.

dev - dev.mindbehind.com

uat - uatapp.mindbehind.com

master - app.mindbehind.com

  • You can get companyId and knowledgebaseId from MindBehind Knowledge Base Page.

Batch Add Document:

  1. curl --location 'https://{domain}/oai-orchestrator/knowledgebase/context/{companyId}/{knowledgebaseId}/batch' \
  2. --header 'accept: application/json' \
  3. --header 'token: {securityToken}' \
  4. --data '{
  5.     "contexts": [
  6.         {
  7.             "label": "label",
  8.             "createdBy": "userId",
  9.             "content": {
  10.                 "language": "English",
  11.                 "contentText": "content"
  12.             }
  13.         },
  14.         {
  15.             "label": "label",
  16.             "createdBy": "userId",
  17.             "content": {
  18.                 "language": "English",
  19.                 "contentText": "content"
  20.             }
  21.         }
  22.     ]
  23. }'
Batch Update Document:
  1. curl --location --request PATCH 'https://{domain}/oai-orchestrator/knowledgebase/context/{companyId}/{knowledgebaseID}/batch' \
  2. --header 'content-type: application/json' \
  3. --header 'token: {securityToken}' \
  4. --data '{
  5.     "contexts": [
  6.         {
  7. "_id": "id",
  8.             "label": "label",
  9.             "knowledgeBaseId": "knowledgeBaseId",
  10.             "content": {
  11.                 "language": "English",
  12.                 "contentText": "context"
  13.             }
  14.         },
  15.         {
  16. "_id": "id",
  17. "label": "label",
  18.             "knowledgeBaseId": "knowledgeBaseId",
  19.             "content": {
  20.                 "language": "Turkish",
  21.                 "contentText": "context"
  22.             }
  23.         }
  24.     ]
  25. }'
Batch Get Document:

  1. curl --location --globoff 'https://{{domain}}/oai-orchestrator/knowledgebase/context/{companyID}/{knowledgebaseID}/batch' \
  2. --header 'accept: application/json' \
  3. --header 'token: {securityToken}'

How To Add or Update Dictionary To Knowledge Base Using Postman?

Update a new dictionary

  1. curl --location --request PATCH 'http://{domain}/oai-orchestrator/oai-dictionary/knowledgebase' \
  2. --header 'token: {oldSecurityToken}' \
  3. --header 'Content-Type: application/json' \
  4. --data '{
  5.     "knowledgeBaseId": "randomID",
  6.     "companyId": "companyId",
  7.     "token": "newSecurityToken",
  8.     "dictionary": {
  9.         "key": "value"
  10.     }
  11. }'
Delete a dictionary
  1. curl --location --request DELETE 'http://{domain}/oai-orchestrator/oai-dictionary/knowledgebase/knowledgebaseID' \
  2. --header 'token: token'
You can also use this API to get the token for related dictionary
  1. curl --location 'http://{domain}/oai-orchestrator/oai-dictionary/dictionaryID'

    • Related Articles

    • Generative AI: Dictionary & Keys

      What are dictionary & keys? Dictionary is a feature of Generative AI, which is designed to show texts in multiple fields and update those text with only one action into those multiple fields. Keys are the pointers that we use into Gen AI Knowledge ...
    • How to Use Generative AI Module

      What is Generative AI Module for? The Generative AI Module is designed for generating human-like text based on given prompts or input. It utilizes advanced natural language processing and artificial intelligence techniques to produce coherent and ...
    • AI Designer Tricks

      General Settings 1. How to use 'Global Keyword' 1. Go to 'Settings' gear icon so see more options of customization. Functionality: Global Keyword helps you to achieve immediate bot reaction without AI . The condition is 1 score* wording resemblance. ...
    • How to Use AI Action

      Action usage AI action helps user to create a comprehensive conversation without too much effort. MindBehind supports three AI providers: Google DialogFlow, IBM Watson, CLU and Microsoft Luis. After connecting to a provider, the page fills up with ...
    • LUIS Provider User Documentation

      Prerequisites: To connect Microsoft LUIS AI Provider in MindBehind following fields needs to be filled. Application ID, Authoring Resource Primary Key, Prediction Resource Primary Key, Endpoint and Management Endpoint fields can be provided from Luis ...