Jawwal.Recognizer.GPT 3.1.0

dotnet add package Jawwal.Recognizer.GPT --version 3.1.0                
NuGet\Install-Package Jawwal.Recognizer.GPT -Version 3.1.0                
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="Jawwal.Recognizer.GPT" Version="3.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jawwal.Recognizer.GPT --version 3.1.0                
#r "nuget: Jawwal.Recognizer.GPT, 3.1.0"                
#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 Jawwal.Recognizer.GPT as a Cake Addin
#addin nuget:?package=Jawwal.Recognizer.GPT&version=3.1.0

// Install Jawwal.Recognizer.GPT as a Cake Tool
#tool nuget:?package=Jawwal.Recognizer.GPT&version=3.1.0                

Jawwal Open AI Recognizer

Summary

This recognizer helps you add a custom recognizer to an empty bot built with Bot Framework Composer in order to use the Open AI Completion API in place of the traditional Recognizer.

Installation

In order to enable the Jawwal GPT recognizer, you must first install the [Jawwal GPT Recognizer package] from NuGet in your Composer project.

  1. Create a new Composer bot using the Empty Bot template.

  2. Open the Package Manager in Composer.

  3. Search for Jawwal.Recognizer.GPT and install the package.

Configuration

To enable the Jawwal recognizer, complete the following steps:

  1. Select Custom as your root dialog's recognizer type.

  2. Paste the following JSON into the custom recognizer configuration window:

{
  "$kind": "Jawwal.Recognizer.GPT",
  "endpoint": "<your endpoint, including https://>",
  "endpointKey": "<your endpoint key>",
  "prePromptText": "<your message to Open AI API (you should include system message plus context if you need to preserve it beside user message with input text), by default this will maintain specific number of turns and everytime response will returned with intents but you need to know that system mesage should have this instruction ( The results should be formatted as json object with list named intents and with 3 keys and values per list index, keys are intent1, Englishgeneralanswer and confidenceScore. ) so recognized intent will be returned in intent1 variable >",
  "temperature": "<temperature for GPT API>",
  "maxContext": "<Number of message to preserve in context history noting that each message either system, user or assistant counted and each round two indeices will be deleted (1,2) if number of messages maxContext reached >",
  "openAiModel": "OpenAI Model"
}
  1. Update the endpoint and endpointKey fields with the values from your Open AI Portal.

Notes

  1. If any error occured during calling Open AI APIs intent error will be returned in order to allow for you to handle recognizing errors, intent is OpenAIIntentError

  2. Regarding prePromptText in configuration window you need to add variable in the value to maintain that you always send user message as exactly mentioned below : ${user.context} {"role":"user","content":"${turn.activity.text}"}]

    here i save system message as a json in user.context in Begindialog trigger with only add extra , for this object to have valid json in the end. so first value for user context will be "[{\"role\":\"system\",\"content\":\" Your Instruction included mentioned instruction"}," then based on configuration value it will be concatenated correctly with user message as role and input finallly to maintain the maxContext you need after each recognized intent to change user.context to add history as mentioned below user.context = concat(substring(turn.recognized.text, 0, length(turn.recognized.text) - 1),"," ) noting that DLL return ready json for history in each call in property turn.recognized.text

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
3.1.0 262 12/6/2023
3.0.0 176 10/19/2023
2.5.0 149 10/17/2023
2.4.0 135 9/17/2023
2.3.0 127 9/5/2023