-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added model selection dropdown * Added interface for LLM clients * Extended markdown for followup
- Loading branch information
1 parent
18d6ceb
commit 56f6a83
Showing
14 changed files
with
232 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using EntwineLlm.Enums; | ||
using EntwineLlm.Models; | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace EntwineLlm.Clients.Interfacs | ||
{ | ||
internal interface ILlmClient | ||
{ | ||
void SetBaseUrl(string baseUrl); | ||
string GetBaseUrl(); | ||
void SetTimeOut(TimeSpan timeOut); | ||
TimeSpan GetTimeOut(); | ||
Task<string[]> GetModelListAsync(); | ||
Task<CodeSuggestionResponse> GetCodeSuggestionsAsync(CodeType codeType, string prompt); | ||
} | ||
} |
65 changes: 60 additions & 5 deletions
65
src/EntwineLLM/Clients/LlmClient.cs → src/EntwineLLM/Clients/OllamaClient.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Microsoft.VisualStudio.Shell; | ||
using System.ComponentModel; | ||
|
||
namespace EntwineLlm.Converters | ||
{ | ||
internal class LlmModelConverter : StringConverter | ||
{ | ||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context) => true; | ||
|
||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) | ||
=> new(ThreadHelper.JoinableTaskFactory.Run(async () => await EntwineLlmPackage.LlmClient.GetModelListAsync())); | ||
|
||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) => true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.