POST restapi/personal/ai/v1
Runs the AI prompt for the given feature. It uses Daisy API.
Request Information
URI Parameters
None.
Body Parameters
Request with the data needed to run the AI feature.
Itslearning.RestApi.Entities.Personal.Ai.AiRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Feature |
The feature to use. |
Itslearning.RestApi.Entities.Personal.Ai.AiFeatureType |
None. |
| LocationId |
Course or project id. |
integer |
None. |
| LocationType |
Course or project. |
Itsolutions.ItslUtils.Constants.LocationType |
None. |
| PlanId |
Plan identifier. |
integer |
None. |
| UserPrompt |
User prompt for the AI. |
string |
None. |
| Content |
Content if already present. |
string |
None. |
| ChatHistoryId |
The chat history identifier |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"Feature": 0,
"LocationId": 1,
"LocationType": 1,
"PlanId": 2,
"UserPrompt": "sample string 3",
"Content": "sample string 4",
"ChatHistoryId": "sample string 5"
}
application/xml, text/xml
Sample:
<AiRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities.Personal.Ai"> <ChatHistoryId>sample string 5</ChatHistoryId> <Content>sample string 4</Content> <Feature>None</Feature> <LocationId>1</LocationId> <LocationType>Course</LocationType> <PlanId>2</PlanId> <UserPrompt>sample string 3</UserPrompt> </AiRequest>
application/x-www-form-urlencoded
Sample:
No sample available
Response Information
Resource Description
Text and history reference for the prompt.
Itslearning.RestApi.Entities.AiResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Text |
The text from the AI service |
string |
None. |
| ChatHistoryId |
Identifier for the chat history |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"Text": "sample string 1",
"ChatHistoryId": "sample string 2"
}
application/xml, text/xml
Sample:
<AiResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities"> <ChatHistoryId>sample string 2</ChatHistoryId> <Text>sample string 1</Text> </AiResponse>