diff --git a/src/AzureOpenAIProxy.PlaygroundApp/Components/Pages/Playground.razor b/src/AzureOpenAIProxy.PlaygroundApp/Components/Pages/Playground.razor index f402c62c..13b8d0ca 100644 --- a/src/AzureOpenAIProxy.PlaygroundApp/Components/Pages/Playground.razor +++ b/src/AzureOpenAIProxy.PlaygroundApp/Components/Pages/Playground.razor @@ -1,6 +1,8 @@ @page "/playground" @rendermode InteractiveServer +@using AzureOpenAIProxy.PlaygroundApp.Models + Playground Page @@ -8,7 +10,10 @@ - + @@ -19,6 +24,7 @@ @code { private string? systemMessage; + private ChatParameters? chatParameters; private async Task SetSystemMessage(string systemMessage) { @@ -26,4 +32,11 @@ await Task.CompletedTask; } + + private async Task SetChatParameters(ChatParameters parameters) + { + this.chatParameters = parameters; + + await Task.CompletedTask; + } } \ No newline at end of file diff --git a/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ConfigTabComponent.razor b/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ConfigTabComponent.razor index afe64b81..69e65ef8 100644 --- a/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ConfigTabComponent.razor +++ b/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ConfigTabComponent.razor @@ -1,10 +1,12 @@ +@using AzureOpenAIProxy.PlaygroundApp.Models + - + @@ -19,6 +21,9 @@ [Parameter] public EventCallback OnSystemMessageChanged { get; set; } + [Parameter] + public EventCallback OnChatParametersChanged { get; set; } + private async Task ChangeTab(FluentTab tab) { this.selectedTab = tab; @@ -29,7 +34,7 @@ private async Task SetSystemMessage(string systemMessage) { this.systemMessage = systemMessage; - + await OnSystemMessageChanged.InvokeAsync(systemMessage); } } \ No newline at end of file diff --git a/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ConfigWindowComponent.razor b/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ConfigWindowComponent.razor index 739e4e7c..d1155ca5 100644 --- a/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ConfigWindowComponent.razor +++ b/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ConfigWindowComponent.razor @@ -5,7 +5,10 @@ - + @code { @@ -19,6 +22,9 @@ [Parameter] public EventCallback OnSystemMessageChanged { get; set; } + [Parameter] + public EventCallback OnChatParametersChanged { get; set; } + private async Task SetApiKey(string apiKey) { this.apiKey = apiKey; @@ -36,7 +42,7 @@ private async Task SetSystemMessage(string systemMessage) { this.systemMessage = systemMessage; - + await OnSystemMessageChanged.InvokeAsync(systemMessage); } } \ No newline at end of file diff --git a/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ParametersTabComponent.razor b/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ParametersTabComponent.razor index 1bc48f2d..eb0c2876 100644 --- a/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ParametersTabComponent.razor +++ b/src/AzureOpenAIProxy.PlaygroundApp/Components/UI/ParametersTabComponent.razor @@ -1,5 +1,6 @@ @using System.Linq -@using PlaygroundApp.Models + +@using AzureOpenAIProxy.PlaygroundApp.Models @* Past Messages Range *@