Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
BeepBeepBopBop committed Nov 21, 2024
1 parent e70545a commit 59af141
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions LM-Kit-Maestro/Services/LMKitService.Conversation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,21 @@ public void SetGeneratedTitle(PromptResult textGenerationResult)

if (textGenerationResult.TextGenerationResult != null && !string.IsNullOrEmpty(textGenerationResult.TextGenerationResult.Completion))
{
foreach (var sentance in textGenerationResult.TextGenerationResult.Completion.Split('\n'))
foreach (var sentence in textGenerationResult.TextGenerationResult.Completion.Split('\n'))
{
if (sentance.ToLower().StartsWith("topic"))
if (sentence.ToLower().StartsWith("topic"))
{
conversationTopic = sentance.Substring("topic".Length, sentance.Length - "topic".Length);
conversationTopic = sentence.Substring("topic".Length, sentence.Length - "topic".Length);
break;
}
else if (sentance.ToLower().StartsWith("the topic of the sentance is"))
else if (sentence.ToLower().StartsWith("the topic of the sentence is"))
{
conversationTopic = sentance.Substring("the topic of the sentance is".Length, sentance.Length - "the topic of the sentance is".Length);
conversationTopic = sentence.Substring("the topic of the sentence is".Length, sentence.Length - "the topic of the sentence is".Length);
break;
}
else if (sentance.ToLower().StartsWith("the topic of this sentance is"))
else if (sentence.ToLower().StartsWith("the topic of this sentence is"))
{
conversationTopic = sentance.Substring("the topic of this sentance is".Length, sentance.Length - "the topic of this sentance is".Length);
conversationTopic = sentence.Substring("the topic of this sentence is".Length, sentence.Length - "the topic of this sentence is".Length);
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions LM-Kit-Maestro/Services/LMKitService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private void GenerateConversationSummaryTitle(Conversation conversation, string

try
{
string titleSummaryPrompt = $"What is the topic of the following sentance: {prompt}";
string titleSummaryPrompt = $"What is the topic of the following sentence: {prompt}";

promptResult.TextGenerationResult = await _singleTurnConversation!.SubmitAsync(titleSummaryPrompt, titleGenerationRequest.CancellationTokenSource.Token);
}
Expand Down Expand Up @@ -451,7 +451,7 @@ private void BeforeSubmittingPrompt(Conversation conversation)
MaximumContextLength = 512,
MaximumCompletionTokens = 50,
SamplingMode = new GreedyDecoding(),
SystemPrompt = "You receive a sentance. You are to summarize, with a single sentance containing a maximum of 10 words, the topic of this sentance. You start your answer with 'topic:'"
SystemPrompt = "You receive a sentence. You are to summarize, with a single sentence containing a maximum of 10 words, the topic of this sentence. You start your answer with 'topic:'"
//SystemPrompt = "You receive one question and one response taken from a conversation, and you are to provide, with a maximum of 10 words, a summary of the conversation topic."
};
}
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/UI/ChatView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</VerticalStackLayout>
</Grid>

<!-- Mesage history Blazor view -->
<!-- Message history Blazor view -->
<BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type razor:Chat}" />
Expand Down
4 changes: 2 additions & 2 deletions LM-Kit-Maestro/UI/Pages/ChatPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<Setter Property="IsVisible" Value="{Binding Source={x:Reference chatPage}, Path=ShowSidebarToggles}"/>
</Style>

<Style TargetType="Grid" x:Key="TuckedSidebarUpperGridSyle">
<Style TargetType="Grid" x:Key="TuckedSidebarUpperGridStyle">
<Setter Property="WidthRequest" Value="{x:Static local:AppConstants.ChatPageSideTogglesWidth}"/>
<Setter Property="VerticalOptions" Value="Start"/>
<Setter Property="HeightRequest" Value="{x:Static local:AppConstants.ModelSelectionButtonHeight}"/>
Expand All @@ -40,7 +40,7 @@
</Style>

<ControlTemplate x:Key="TuckedSettingsSidebarUpperGrid">
<Grid Style="{StaticResource TuckedSidebarUpperGridSyle}" Grid.Column="2">
<Grid Style="{StaticResource TuckedSidebarUpperGridStyle}" Grid.Column="2">
<Button
Margin="12, 0"
Style="{StaticResource SidebarToggleButtonStyle}"
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/UI/Razor/Components/UserInput.razor
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
#chat-box {
color: var(--OnBackgound);
color: var(--OnBackground);
margin-block: auto;
padding-inline: 20px;
background-color: transparent;
Expand Down

0 comments on commit 59af141

Please sign in to comment.