Chat Completion
Last updated
Last updated
Method Input
Method Name
AzureChatCompletionMethod
Request Type
azure-openai-chatcompletion
Parameters: SystemMessage
{{Sesssion.StoreDescription}}, {{App.AIContent.SystemMessage}}
Parameters: UserQuestion
{{UserInput}}
Parameters: Streaming
False
Parameters: SessionTime
Session time in minutes used to maintain conversation history. e.g. 10
Parameters: OrganizationID
{{Context.OrganizationID}}
Parameters: EmployeeID
{{Context.EmployeeID}}
You can get the result of the query as a single record or you can get a list of records. You can also define the number of items in the list using Record Limit Parameter.
The method result section is used to define how you want to display the result of the query response.
Method Result
Record JsonPath
$.choices[0].message
Valid Result Template
{{Records}} How else can I help you?
Record Template
{{content}}
Empty Result Template
How else can I help you?
Automatically prompt for next question
False
a. Record JsonPath: The result of each method is returned in JSON and ixHello uses JSONPath query to access those results. By providing the value $.choices[0].message, you are asking the method to read the message of first item in the list of results. The response JSON looks somewhat like this.
b. Valid Result Template: It defines how the result is presented to the user.
By using {{Records}} , you are accessing all the results of the method query.
c. Record Template : This represents a single record and how a record shall be presented to the user. {{content}}
d. Empty Result Template : In case the query does not return any value, this prompt is next displayed to the user.
e. Automatically prompt for next question: This flag is intended for integrations to smart bots like Alexa and Lex, where the user defines if the bot shall prompt the user for next question after the previous query has been answered for the app. For Generative AI apps, this flag is set to false.
Note: Everything parameter that has{{ }} means that the platform is interpreting the value from its parameters, input parameters or managed results.