POST api/Village/{village}/AI/Proxy/Chat
Proxy to OpenAI Chat
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
village | string |
None. |
Body Parameters
Collection of AIChatMessageModelName | Description | Type | Additional information |
---|---|---|---|
role |
Role |
ChatMessageRole |
None. |
content |
Content |
string |
None. |
Request Formats
application/json, text/json
Sample:
[ { "role": 0, "content": "sample string 1" }, { "role": 0, "content": "sample string 1" } ]
application/xml, text/xml
Sample:
<ArrayOfAIChatMessageModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models"> <AIChatMessageModel> <content>sample string 1</content> <role>System</role> </AIChatMessageModel> <AIChatMessageModel> <content>sample string 1</content> <role>System</role> </AIChatMessageModel> </ArrayOfAIChatMessageModel>
multipart/form-data
Sample:
Response Information
Resource Description
AIMessageModelName | Description | Type | Additional information |
---|---|---|---|
id |
id |
string |
None. |
role |
role |
ChatMessageRole |
None. |
content |
content |
string |
None. |
date |
date |
string |
None. |
isLoading |
isLoading |
boolean |
None. |
isError |
isError |
boolean |
None. |
Response Formats
application/json, text/json
Sample:
{ "id": "sample string 1", "role": 0, "content": "sample string 2", "date": "sample string 3", "isLoading": true, "isError": true }
application/xml, text/xml
Sample:
<AIMessageModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models"> <content>sample string 2</content> <date>sample string 3</date> <id>sample string 1</id> <isError>true</isError> <isLoading>true</isLoading> <role>System</role> </AIMessageModel>