Table of Contents

Namespace BotManager.OpenAi.Expressions

Classes

OpenAiChat

Executes a char request to the OpenAI api. The OpenAiInit must be initialized.

Return type is string.

This json example sends an OpenAI chat request and returns the result:
{ "$OpenAiChat": { "Messages": [
  { "Role": "System", "Text": "Create a recipe suggestion for the following ingredient list:" },
  { "Role": "User", "Text": "Cheesecake" }
] } }
OpenAiInit

The OpenAI plugin will connect to the OpenAI api by using the ApiKey and allows you to run AI expressions like OpenAiChat.

Return type is null.

This json example initials OpenAI and returns null:
{ "$OpenAiInit": { "ApiKey": { "$Env": "OPENAI_API_KEY" } } }