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. |
| SystemPrompt |
System prompt for the AI (template). Normally is empty, only taken into account when the prompt engineering feature is enabled. |
string |
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,
"SystemPrompt": "sample string 3",
"UserPrompt": "sample string 4",
"Content": "sample string 5",
"ChatHistoryId": "sample string 6"
}
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 6</ChatHistoryId> <Content>sample string 5</Content> <Feature>None</Feature> <LocationId>1</LocationId> <LocationType>Course</LocationType> <PlanId>2</PlanId> <SystemPrompt>sample string 3</SystemPrompt> <UserPrompt>sample string 4</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. |
| Prompt |
The prompt that was used to generate the response. |
Collection of Itslearning.RestApi.Entities.AiChatMessage |
None. |
Response Formats
application/json, text/json
Sample:
{
"Text": "sample string 1",
"ChatHistoryId": "sample string 2",
"Prompt": [
{
"Role": "sample string 1",
"Text": "sample string 2"
},
{
"Role": "sample string 1",
"Text": "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>
<Prompt>
<AiChatMessage>
<Role>sample string 1</Role>
<Text>sample string 2</Text>
</AiChatMessage>
<AiChatMessage>
<Role>sample string 1</Role>
<Text>sample string 2</Text>
</AiChatMessage>
</Prompt>
<Text>sample string 1</Text>
</AiResponse>