POST restapi/personal/ai/responses/v1
Creates a response using the Responses API with optional file search.
Request Information
URI Parameters
None.
Body Parameters
Request with the data needed to create a response.
Itslearning.RestApi.Entities.Personal.Ai.AiResponseRequest| 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. |
| PreviousResponseId |
The previous response identifier for conversation continuation. |
string |
None. |
| StoreToken |
Token for the store containing attached files. |
string |
None. |
Request Formats
application/json, text/json
{
"Feature": 0,
"LocationId": 1,
"LocationType": 1,
"PlanId": 2,
"SystemPrompt": "sample string 3",
"UserPrompt": "sample string 4",
"Content": "sample string 5",
"PreviousResponseId": "sample string 6",
"StoreToken": "sample string 7"
}
application/xml, text/xml
<AiResponseRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities.Personal.Ai"> <Content>sample string 5</Content> <Feature>None</Feature> <LocationId>1</LocationId> <LocationType>Course</LocationType> <PlanId>2</PlanId> <PreviousResponseId>sample string 6</PreviousResponseId> <StoreToken>sample string 7</StoreToken> <SystemPrompt>sample string 3</SystemPrompt> <UserPrompt>sample string 4</UserPrompt> </AiResponseRequest>
application/x-www-form-urlencoded
No sample available
Response Information
Resource Description
Text and response reference.
Itslearning.RestApi.Entities.AiResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Text |
The text from the AI service |
string |
None. |
| ChatHistoryId |
Identifier for the chat history (legacy, use ResponseId for new implementations) |
string |
None. |
| ResponseId |
The response identifier from the Daisy Responses API. |
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
{
"Text": "sample string 1",
"ChatHistoryId": "sample string 2",
"ResponseId": "sample string 3",
"Prompt": [
{
"Role": "sample string 1",
"Text": "sample string 2"
},
{
"Role": "sample string 1",
"Text": "sample string 2"
}
]
}
application/xml, text/xml
<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>
<ResponseId>sample string 3</ResponseId>
<Text>sample string 1</Text>
</AiResponse>