Optimizely.OptiGPT.Client 0.1.11

OptiAI C# SDK

C# SDK for optiAI

This SDK is a C# wrapper around the Optimizely AI API. It is intended to be used by the Optimizely employees to integrate AI features into Optimizely products.

Accessing the Package

The package is published to the Episerver package repository as Optimizely.OptiGPT.Client.

Usage

Set up your Opti AI Instance and Keypair

For development, use the PREP environment. For production, use the PROD environment. The PROD baseURL is https://cg.optimizely.com. Create a turnstile instance and keypair for yourself here. You can store and use this from user secrets or from environment variables, depending on your application setup.

Using the SDK

You can use the client by calling Create() and providing your appKey and secretKey, then calling Complete() or Extend() with your preferred model and your prompt.

var optiGPTClient = OptiGPTClient.Create(endpoint, appKey, secretKey);
var models = await optiGPTClient.GetAllModels();

var messages = new[]
{
    new ChatMessage
    {
        Role = "user",
        Content = "Describe a beautiful sunset."
    }
};

var result = await optiGPTClient.Extend(new AIArgs { Model = selectedModel.Name, Messages = messages });

Run Examples

In visual studio, set your startup project to the LocalChat project in the Examples folder and hit run. This will bring up a console window that lets you interact with OptiAI and send prompts.

image

Issues

Log issues directly into GitHub. Pull Requests will be created to resolve those issues as soon as they are triaged.

Showing the top 5 packages that depend on Optimizely.OptiGPT.Client.

Packages Downloads
EPiServer.Commerce
This is the main package for EPiServer Commerce.
1,348
Insite.Commerce.Public
The Configured Commerce public libraries you reference in your Extensions project.
71
Insite.Commerce.Private
The Configured Commerce private libraries you MUST NOT reference in your Extensions project.
57

.NET 6.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
0.1.11 1,908 11/02/2023
0.1.10 20 11/02/2023
0.1.9 21 10/19/2023
0.1.8 18 10/19/2023