InSkill GPT | API
Inskill has a method to embed a GPT session in an iFrame of another web site. This is a self-contained conversation with a copilot for some equipment type. A user asks questions and gets answers back, with links to resources such as pdf manuals, videos, etc. There is no deep integration with the enclosing website.
If a website wants to integrate InSkill GPT conversations at an API level, the following API and usage describes how to proceed.
First, create a “session” or conversation. This may be per pageview, so a user gets a clean chat window each time they visit the page. If a session is saved, it may be associated with a user and continue each time that user visits the page.
POST https://expert.inskill.ai/servicesv1/solver
Header apikey:xxxx
content-type: application/json
body:
{"product_id":"42705", "language": "en"}
Response:
{
"status": "success",
"session": {
"asset_id": null,
"data": [],
"language": "en",
"created_ts": 1742181154,
"guid": "94BFA2C326BB4CB9D344E26EA2F89C74",
"account_id": 9816,
"product_id": 42705,
"id": 8882
}
}
The response has some additional information but the id is the important element.
The rest of a GPT conversation is as follows:
Post a question
POST https://expert.inskill.ai/servicesv1/solver/8882/ask
Header
apikey:xxxx
content-type: application/json
Body:
{"question": "how does cavitation affect the pump?"}
data: Optional data
Response:
{
"question": "how does cavitation affect the pump?",
"answer": "Cavitation can significantly affect a pump in several ways:\n\n1. **Material Damage**: Cavitation involves the rapid formation and collapse of vapor bubbles in a liquid. When these bubbles collapse near solid surfaces, such as the impeller, they can cause surface damage, leading to fatigue failure and material detachment over time.\n\n2. **Noise and Vibration**: The onset of cavitation is often first detected by noise, which can range from rattling sounds to severe vibrations. This can lead to further mechanical issues and affect the overall operation of the pump.\n\n3. **Reduced Performance**: Cavitation reduces the effective head and power of the pump, as the vapor bubbles disrupt the flow through the impeller. This can lead to unpredictable changes in pump efficiency and performance.\n\n4. **Corrosion Acceleration**: Cavitation can expose fresh metal surfaces by chipping away material, which can accelerate the corrosion process, further compounding the damage.\n\n5. **Pump Failure**: In severe cases, cavitation can lead to total pump failure if not addressed, making it crucial to design pumping systems that minimize the risk of cavitation.\n\nUnderstanding and managing the conditions that lead to cavitation, such as ensuring adequate Net Positive Suction Head (NPSH), is essential for maintaining pump reliability and performance.",
"references": [
{
"id": "0524dd1dac814ba387caa1ff127b0f71_1_0",
"url": "https://r2resources.blob.core.windows.net/files/6786eb196f970.pdf#page=1",
"guid": "DB3B7973-34FC-CFA6-5F21-D8236AA3FDFD",
"page": 1,
"type": "doc",
"score": 1,
"title": "Whitepaper Cavitation",
"product_id": 42704
}
],
"id": 12322,
"data": []
}
The response contains an answer in markdown format for rich text. The references are shown as links to additional pdf documents, videos, web pages, etc.
To give the user a way to flag good or bad responses (thumbs up or down) per response:
POST https://expert.inskill.ai/servicesv1/solver/8882/feedback
Header
apikey:xxxx
content-type: application/json
Body:
{"history_id": 12322, "feedback": 1}
(Where the history_id is the id in the previous ask. Feedback 1=good 2=bad (thumbs down) and feedback = null will clear the field.)
For a solver site, we recommend that the data sent with each question can be the filtering criteria, such as application, power, flow, etc. eg the context.
The data in a response can be extended to sometimes include new filtering criteria or even selected products.
The data will be json in a schema we all agree to, so navigation or changing filtering can be done easily.
The result from GPT is a suggestion, maybe a button allows the user to choose if they want to use or see that suggestion.
Scenarios:
- Begin a GPT conversation with the current selection or filter criteria as json data. User questions will be affected by this information
- User says they have some application or industry or special requirements. This information is stored in the conversation and can be used to update the solver UI. If the user asks about the criteria so far, all of the information will be in the reply. The user should be able to remove some or start over.
- User asks questions about how to calculate pump characteristics, or requirements in some industry, etc. and gets answers from selection guides or pump calculations
Updated 8 months ago
