GPT4 Turbo
This commit is contained in:
parent
18e9d7ef5d
commit
538445760e
|
@ -1,6 +1,8 @@
|
||||||
namespace KIKunstKirstenKlöckner.Data;
|
using OpenAI_API.Models;
|
||||||
|
|
||||||
|
namespace KIKunstKirstenKlöckner.Data;
|
||||||
|
|
||||||
public class ChatGPT
|
public class ChatGPT
|
||||||
{
|
{
|
||||||
|
public static Model GPT4Turbo => new Model("gpt-4-1106-preview") { OwnedBy = "openai" };
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
<RadzenStack Orientation="Orientation.Horizontal"
|
<RadzenStack Orientation="Orientation.Horizontal"
|
||||||
AlignItems="AlignItems.Center" Wrap="FlexWrap.Wrap">
|
AlignItems="AlignItems.Center" Wrap="FlexWrap.Wrap">
|
||||||
<RadzenCheckBox @bind-Value=@_useGpt4 Name="UseGPT4"/>
|
<RadzenCheckBox @bind-Value=@_useGpt4Turbo Name="UseGPT4"/>
|
||||||
<RadzenLabel Text="Verwende GPT 4" Component="UseGPT4" Style="margin-left: 8px; vertical-align: middle;" />
|
<RadzenLabel Text="Verwende GPT 4 Turbo" Component="UseGPT4" Style="margin-left: 8px; vertical-align: middle;" />
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
@* <RadzenRadioButtonList Data="@_imageModels" @bind-Value=@_selectedImageModel TValue="ModelInfo" TextProperty="Name" class="mb-5"> *@
|
@* <RadzenRadioButtonList Data="@_imageModels" @bind-Value=@_selectedImageModel TValue="ModelInfo" TextProperty="Name" class="mb-5"> *@
|
||||||
<RadzenRadioButtonList Data="@_imageModels" @bind-Value=@_selectedImageModel TValue="ModelInfo" TextProperty="Name" ValueProperty="" class="mb-5">
|
<RadzenRadioButtonList Data="@_imageModels" @bind-Value=@_selectedImageModel TValue="ModelInfo" TextProperty="Name" ValueProperty="" class="mb-5">
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wenn <see langword="true"/> wird GPT4 verwendet um die Idee zu interpretieren.
|
/// Wenn <see langword="true"/> wird GPT4 verwendet um die Idee zu interpretieren.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool _useGpt4;
|
private bool _useGpt4Turbo;
|
||||||
|
|
||||||
private int maxAddons = 2;
|
private int maxAddons = 2;
|
||||||
private int amountOfAddons = 0; // wird später geändert
|
private int amountOfAddons = 0; // wird später geändert
|
||||||
|
@ -247,7 +247,7 @@
|
||||||
ChatRequest chatRequest = new ChatRequest
|
ChatRequest chatRequest = new ChatRequest
|
||||||
{
|
{
|
||||||
Temperature = _temperature,
|
Temperature = _temperature,
|
||||||
Model = _useGpt4 ? Model.GPT4 : Model.ChatGPTTurbo
|
Model = _useGpt4Turbo ? ChatGPT.GPT4Turbo : Model.ChatGPTTurbo
|
||||||
};
|
};
|
||||||
|
|
||||||
_conversation = _openAiApi.Chat.CreateConversation(chatRequest);
|
_conversation = _openAiApi.Chat.CreateConversation(chatRequest);
|
||||||
|
@ -256,7 +256,6 @@
|
||||||
_conversation.AppendUserInput(ideaBasePrompt + " " + _userIdea);
|
_conversation.AppendUserInput(ideaBasePrompt + " " + _userIdea);
|
||||||
_imageIdea = await _conversation.GetResponseFromChatbotAsync();
|
_imageIdea = await _conversation.GetResponseFromChatbotAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fordert für mehrere Bilder Bild-Prompts an und generiert die dazugehörigen Bilder.
|
/// Fordert für mehrere Bilder Bild-Prompts an und generiert die dazugehörigen Bilder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue