From 83a89dad73d70dbc6160e26a2ae1294b572a815f Mon Sep 17 00:00:00 2001 From: JKamue Date: Mon, 10 Jun 2024 20:02:46 +0200 Subject: [PATCH] feat: add all current relevant llm choices --- .../OpenAi/OpenAiModelType.cs | 19 +++++++++++++++---- EasyOpenAiTools.Samples/Program.cs | 2 +- README.md | 4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/EasyOpenAiTools.Library/OpenAi/OpenAiModelType.cs b/EasyOpenAiTools.Library/OpenAi/OpenAiModelType.cs index ebb52ff..acc6d40 100644 --- a/EasyOpenAiTools.Library/OpenAi/OpenAiModelType.cs +++ b/EasyOpenAiTools.Library/OpenAi/OpenAiModelType.cs @@ -6,14 +6,25 @@ public class OpenAiModelType { /// - /// Gets the GPT-4 model type. + /// Gets the GPT-4o model type. The most advanced, multimodal flagship model that’s cheaper and faster than GPT-4 Turbo /// - public static OpenAiModelType Gpt4 => new OpenAiModelType("gpt-4o"); + public static OpenAiModelType Gpt4o => new OpenAiModelType("gpt-4o"); /// - /// Gets the GPT-3.5 model type (Turbo variant). + /// Gets the latest GPT-4 Turbo model type /// - public static OpenAiModelType Gpt35 => new OpenAiModelType("gpt-3.5-turbo-0125"); + public static OpenAiModelType Gpt4Turbo => new OpenAiModelType("gpt-4-turbo"); + + /// + /// Gets the latest GPT-4 model type + /// + public static OpenAiModelType Gpt4 => new OpenAiModelType("gpt-4"); + + /// + /// Gets the GPT-3.5 model type (Turbo variant). The latest GPT-3.5 Turbo model with higher accuracy at + /// responding in requested formats. Returns a maximum of 4,096 output tokens + /// + public static OpenAiModelType Gpt35 => new OpenAiModelType("gpt-3.5-turbo"); internal string Name { get; init; } diff --git a/EasyOpenAiTools.Samples/Program.cs b/EasyOpenAiTools.Samples/Program.cs index d172da2..45d8110 100644 --- a/EasyOpenAiTools.Samples/Program.cs +++ b/EasyOpenAiTools.Samples/Program.cs @@ -19,7 +19,7 @@ static void Main(string[] args) var logger = loggerFactory.CreateLogger("EasyOpenAi"); var openAiApiKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY"); - var openAiModelType = OpenAiModelType.Gpt4; + var openAiModelType = OpenAiModelType.Gpt4o; var initialPrompt = """ Answer all questions by users in a brief and concise way. """; diff --git a/README.md b/README.md index d35ddcd..423c89d 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,12 @@ Make sure to check the `EasyOpenAiTools.Samples` project for a running example. To start a cjat you need to supply an OpenAiSettings Object containing the following information: - Your Api Key -- The Type of Model you want to use (currently Gpt3.5 or Gpt4) +- The Type of Model you want to use - The initial prompt telling the model how to behave [check here for inspiration](https://platform.openai.com/docs/guides/prompt-engineering/tactics) ```c# var openAiApiKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY"); -var openAiModelType = OpenAiModelType.Gpt4; +var openAiModelType = OpenAiModelType.Gpt4o; var initialPrompt = "Answer all questions by users in a brief and concise way."; var openAiSettings = new OpenAiSettings(openAiApiKey, openAiModelType, initialPrompt);