AzureAI.Community.OpenAI.Bot.Builder.Prompt 1.0.7

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package AzureAI.Community.OpenAI.Bot.Builder.Prompt --version 1.0.7
NuGet\Install-Package AzureAI.Community.OpenAI.Bot.Builder.Prompt -Version 1.0.7
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AzureAI.Community.OpenAI.Bot.Builder.Prompt" Version="1.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AzureAI.Community.OpenAI.Bot.Builder.Prompt --version 1.0.7
#r "nuget: AzureAI.Community.OpenAI.Bot.Builder.Prompt, 1.0.7"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AzureAI.Community.OpenAI.Bot.Builder.Prompt as a Cake Addin
#addin nuget:?package=AzureAI.Community.OpenAI.Bot.Builder.Prompt&version=1.0.7

// Install AzureAI.Community.OpenAI.Bot.Builder.Prompt as a Cake Tool
#tool nuget:?package=AzureAI.Community.OpenAI.Bot.Builder.Prompt&version=1.0.7

AzureAI.Community.OpenAI.Bot.Builder.Prompt - Preview

Description

This package contains OpenAI prompts to provide support for use in Bot Composer.

Currently, the following Prompts are available:

  1. Prompt Completions
  2. Prompt ChatCompletions
  3. DALL-E Image Generation

Learn the process of implementing this concept by watching the video in Learn Microsoft AI

Changes for Bot Composer Target Framework NET 7.0

Important Note: Bot Composer now targets .NET 7.0.

Composer Component Installation

Follow these steps to install the component:

  1. Navigate to the Bot Framework Composer Package Manager.

  2. Change the filter to Community packages.

  3. Search for 'AzureAI' and install AzureAI.Community.OpenAI.Bot.Builder.Prompt.

    Installation

After installing the package, you will find Azure OpenAI menus available in the main menu.

Main Menu

Prompt Completions

Prompt Completions: Returns textual completions as configured for a given prompt.

Prompt Completions

Example

Prompt Configuration

This section is used to pass the prompt and parameter configurations, and Prompt Configuration is in required JSON format.

Note: The "Prompt" parameter is a required field; the rest of the parameters are optional.

Here's a complete config structure example:

{
    "Prompts": ["prompt1", "prompt2"],
    "GenerationSampleCount": 3,
    "Temperature": 0.75,
    "User": "AzureAICommunityUser",
    "Echo": true,
    "LogProbabilityCount": 1,
    "MaxTokens": 512,
    "TokenSelectionBiases": {
        "25996": -100,
        "35484": -100,
        "40058": -100,
        "15991": -100
    },
    "StopSequences": ["\n"],
    "ChoicesPerPrompt": 3,
    "FrequencyPenalty": 0.5,
    "NucleusSamplingFactor": 0.9,
    "PresencePenalty": 0.1
}

output

To obtain the result, utilize ${turn.OpenAI}.

Prompt ChatCompletions

Description: Returns chat completions for the provided chat context message.

Prompt ChatCompletions

Example

Prompt Chat Configuration

This section is used to pass the ChatMessages and parameter configurations, and Prompt Configuration is in the required JSON format.

Note: The "ChatMessages" parameter is a required field; the rest of the parameters are optional.

Here is a complete config structure:

{
    "ChoiceCount": 1,
    "FrequencyPenalty": 0.5,
    "MaxTokens": 512,
    "NucleusSamplingFactor": 0.9,
    "PresencePenalty": 0.1,
    "StopSequences": ["\\n"],
    "Temperature": 0.75,
    "TokenSelectionBiases": {
        "25996": -100,
        "35484": -100,
        "40058": -100,
        "15991": -100
    },
    "User": "AzureAICommunityUser",
    "ChatMessages": [
        {
            "Text": "Hello, how are you?",
            "Sender": "user"
        },
        {
            "Text": "I'm fine, thank you. And you?",
            "Sender": "Assistant"
        }
    ]
}

output

To obtain the result, utilize ${turn.OpenAI}

DALL E Image Generation

Description: DALL-E Image Generation

Prompt Configuration

  • Endpoint: Connect to OpenAI
  • API Key: Your OpenAI API Key
  • Prompt: Specify the type of image you want to create.
  • Image Size: Desired image resolution size.
  • Image Count: Number of images to generate.
  • User: A unique identifier representing your end-user, which aids in monitoring and abuse detection.

Note - Image Count , User are optional parameters

output

To obtain the result, utilize ${turn.OpenAI}

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.8--beta.2 271 9/12/2023
1.0.7 371 8/17/2023
1.0.6 124 8/16/2023
1.0.5 95 8/16/2023
1.0.4 100 8/16/2023