Skip to content

Commit

Permalink
Update OpenAI models
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpotts committed Feb 2, 2024
1 parent 6e7dbff commit 2ec739a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/AIDataGenerator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ The following configuration options are available:
- Endpoint - **(Required for Azure OpenAI Service)** Azure OpenAI Service Endpoint
- ApiKey - **(Required)** API key for OpenAI or Azure OpenAI Service
- ChatCompletionsDeploymentName
- OpenAI - Chat Completions model (defaults to gpt-3.5-turbo-1106); supports gpt-3.5-turbo-1106 or gpt-4-turbo-preview
- OpenAI - Chat Completions model (defaults to gpt-3.5-turbo-0125); supports gpt-3.5-turbo-0125 or gpt-4-turbo-preview
- Azure OpenAI Service - **(Required)** Deployment name for Chat Completions model; supports gpt-35-turbo (1106) or gpt-4 (1106-preview)
- AIImageGenerator
- UseAzureOpenAI - Set to true if using Azure OpenAI Service
- UseDallE3 - Only used with Azure OpenAI Service; set to true if using DALL-E 3
- Endpoint - **(Required for Azure OpenAI Service)** Azure OpenAI Service Endpoint
- ApiKey - **(Required)** API key for OpenAI or Azure OpenAI Service
- DeploymentName
- OpenAI - Image Generation model (defaults to dall-e-2); supports dall-e-2 or dall-e-3
- OpenAI - Image Generation model (defaults to dall-e-3); supports dall-e-2 or dall-e-3
- Azure OpenAI Service - **(Required for DALL-E 3)** Deployment name for Image Generation model; supports dall-e-3
- Size - Size of generated image (defaults to 1024x1024)
- DALL-E 2 - Supports 256x256, 512x512, or 1024x1024
Expand Down
2 changes: 1 addition & 1 deletion src/AIDataGenerator/Services/OpenAIImageGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace JonathanPotts.RecipeCatalog.AIDataGenerator.Services;

public class OpenAIImageGenerator(IOptions<OpenAIImageGeneratorOptions> options) : BaseOpenAIImageGenerator
{
private readonly string _deploymentName = options.Value.DeploymentName ?? "dall-e-2";
private readonly string _deploymentName = options.Value.DeploymentName ?? "dall-e-3";
private readonly string? _quality = options.Value.Quality;
private readonly string? _size = options.Value.Size;
private readonly string? _style = options.Value.Style;
Expand Down
4 changes: 2 additions & 2 deletions src/AIDataGenerator/Services/OpenAITextGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ namespace JonathanPotts.RecipeCatalog.AIDataGenerator.Services;
public class OpenAITextGenerator(IOptions<OpenAITextGeneratorOptions> options) : BaseOpenAITextGenerator
{
private readonly string _chatCompletionsDeploymentName =
options.Value.ChatCompletionsDeploymentName ?? "gpt-3.5-turbo-1106";
options.Value.ChatCompletionsDeploymentName ?? "gpt-3.5-turbo-0125";

private readonly string _embeddingsDeploymentName =
options.Value.EmbeddingsDeploymentName ?? "text-embedding-ada-002";
options.Value.EmbeddingsDeploymentName ?? "text-embedding-3-small";

protected override OpenAIClient Client { get; init; } = new(options.Value.ApiKey);

Expand Down

0 comments on commit 2ec739a

Please sign in to comment.