POST api/ai/chat-completion

Request Information

URI Parameters

None.

Body Parameters

WorkPoint365.WebAPI.Model.ChatRequestModel
NameDescriptionTypeAdditional information
Input

WorkPoint365.WebAPI.Model.ChatResponseModel

None.

ConnectionId

string

Required

SystemMessage

string

None.

ChatId

string

None.

UserInput

Object

None.

OutputMode

WorkPoint365.WebAPI.Model.ChatOutputMode

None.

AutoInvokeTools

boolean

None.

ResponseFormatId

string

None.

JsonObject

Object

None.

GenerateSchema

boolean

None.

JsonSchema

Object

None.

Connection

WorkPoint365.WebAPI.Model.ChatRequestConnection

None.

History

Collection of WorkPoint365.WebAPI.Model.ChatHistoryMessage

None.

HistoryMode

WorkPoint365.WebAPI.Model.HistoryMode

None.

Request Formats

application/json, text/json

Sample:
{
  "Input": {
    "ChatId": "sample string 1",
    "Response": "sample string 2",
    "TextResponse": "sample string 3"
  },
  "ConnectionId": "sample string 1",
  "SystemMessage": "sample string 2",
  "ChatId": "sample string 3",
  "UserInput": {},
  "OutputMode": "text",
  "AutoInvokeTools": true,
  "ResponseFormatId": "sample string 6",
  "JsonObject": {},
  "GenerateSchema": true,
  "JsonSchema": {},
  "Connection": {
    "Endpoint": "sample string 1",
    "Deployment": "sample string 2",
    "Key": "sample string 3",
    "Id": "sample string 4",
    "Title": "sample string 5",
    "ApiVersion": "sample string 6"
  },
  "History": [
    {
      "role": "sample string 1",
      "content": "sample string 2"
    },
    {
      "role": "sample string 1",
      "content": "sample string 2"
    }
  ],
  "HistoryMode": 0
}

application/xml, text/xml

Sample:
<ChatRequestModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WorkPoint365.WebAPI.Model">
  <AutoInvokeTools>true</AutoInvokeTools>
  <ChatId>sample string 3</ChatId>
  <Connection>
    <ApiVersion>sample string 6</ApiVersion>
    <Deployment>sample string 2</Deployment>
    <Endpoint>sample string 1</Endpoint>
    <Id>sample string 4</Id>
    <Key>sample string 3</Key>
    <Title>sample string 5</Title>
  </Connection>
  <ConnectionId>sample string 1</ConnectionId>
  <GenerateSchema>true</GenerateSchema>
  <History>
    <ChatHistoryMessage>
      <Content>sample string 2</Content>
      <Role>sample string 1</Role>
    </ChatHistoryMessage>
    <ChatHistoryMessage>
      <Content>sample string 2</Content>
      <Role>sample string 1</Role>
    </ChatHistoryMessage>
  </History>
  <HistoryMode>None</HistoryMode>
  <Input>
    <ChatId>sample string 1</ChatId>
    <Response>sample string 2</Response>
    <TextResponse>sample string 3</TextResponse>
  </Input>
  <JsonObject />
  <JsonSchema />
  <OutputMode>text</OutputMode>
  <ResponseFormatId>sample string 6</ResponseFormatId>
  <SystemMessage>sample string 2</SystemMessage>
  <UserInput />
</ChatRequestModel>

Response Information

Resource Description

System.Web.Http.IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.