From 3ec94c7fa1f00f9e457b1fb5db2593f44b56b84e Mon Sep 17 00:00:00 2001 From: PeterZhong Date: Sun, 27 Apr 2025 11:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=8F=82=E8=80=83=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LinkToolAddin.csproj | 13 +++++++++++++ host/llm/Llm.cs | 14 ++++++++++++++ Button1.cs => ui/Button1.cs | 0 Dockpane1.xaml => ui/Dockpane1.xaml | 0 Dockpane1.xaml.cs => ui/Dockpane1.xaml.cs | 0 Dockpane1ViewModel.cs => ui/Dockpane1ViewModel.cs | 0 ui/message/MessageListItem.cs | 7 +++++++ 7 files changed, 34 insertions(+) create mode 100644 host/llm/Llm.cs rename Button1.cs => ui/Button1.cs (100%) rename Dockpane1.xaml => ui/Dockpane1.xaml (100%) rename Dockpane1.xaml.cs => ui/Dockpane1.xaml.cs (100%) rename Dockpane1ViewModel.cs => ui/Dockpane1ViewModel.cs (100%) create mode 100644 ui/message/MessageListItem.cs diff --git a/LinkToolAddin.csproj b/LinkToolAddin.csproj index a050b37..e08d647 100644 --- a/LinkToolAddin.csproj +++ b/LinkToolAddin.csproj @@ -96,6 +96,19 @@ False False + + + + + + + + + + MSBuild:Compile + Wpf + Designer + diff --git a/host/llm/Llm.cs b/host/llm/Llm.cs new file mode 100644 index 0000000..95e11c4 --- /dev/null +++ b/host/llm/Llm.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; + +namespace LinkToolAddin.host.llm; + +public interface Llm +{ + public string model { get; set; } + public string temperature { get; set; } + public string top_p { get; set; } + public string max_tokens { get; set; } + + public IAsyncEnumerable SendChatStreamAsync(string message); + public IAsyncEnumerable SendApplicationStreamAsync(string message); +} \ No newline at end of file diff --git a/Button1.cs b/ui/Button1.cs similarity index 100% rename from Button1.cs rename to ui/Button1.cs diff --git a/Dockpane1.xaml b/ui/Dockpane1.xaml similarity index 100% rename from Dockpane1.xaml rename to ui/Dockpane1.xaml diff --git a/Dockpane1.xaml.cs b/ui/Dockpane1.xaml.cs similarity index 100% rename from Dockpane1.xaml.cs rename to ui/Dockpane1.xaml.cs diff --git a/Dockpane1ViewModel.cs b/ui/Dockpane1ViewModel.cs similarity index 100% rename from Dockpane1ViewModel.cs rename to ui/Dockpane1ViewModel.cs diff --git a/ui/message/MessageListItem.cs b/ui/message/MessageListItem.cs new file mode 100644 index 0000000..0de3b34 --- /dev/null +++ b/ui/message/MessageListItem.cs @@ -0,0 +1,7 @@ +namespace LinkToolAddin.message; + +public interface MessageListItem +{ + string role { get; set; } + string content { get; set; } +} \ No newline at end of file