Chat API Integration
If you prefer to build your own user interface, chat functionality integration via API key is available.
1. Retrieving API Key
once you have created your knowledge base, you can get the API key through :
Knowledge Base list menu (API Key Column)

Edit Knowledge Base (Under API Key section)

2. Creating API Request
Request
make your request (method: POST) to this endpoint :
https://api.temaninsight.com/api/public/partners/knowledgebases/askmessage: input your question that you want to sendsession_id(Optional) : this is a chatroom identifier.In the beginning of conversation you might not need to include this.
However, once you receive your first response from API , you will get session_id.
If you want the AI to be able to get the context within the same conversation (chatroom) , you need to include this session_id when you sending request
Response
answer: this is the answer from the AIembeddings: array of strings contains images that are retrieved by the AI. This value isnullif you turn this off on Knowledge Base edit page. please note that this field is still in betasession_id: use this value if you want to make the AI answering your question with existing conversation as a context
Last updated