Skip to content

Commit

Permalink
checkboxPara
Browse files Browse the repository at this point in the history
  • Loading branch information
mili-tan committed Jul 9, 2024
1 parent 46017dd commit 4ea0a62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Onllama.Tiny/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public Form1()
{
if (string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OLLAMA_ORIGINS", EnvironmentVariableTarget.User) ?? string.Empty))
Environment.SetEnvironmentVariable("OLLAMA_ORIGINS", "*", EnvironmentVariableTarget.User);
if (string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OLLAMA_MAX_LOADED_MODELS", EnvironmentVariableTarget.User) ?? string.Empty))
Environment.SetEnvironmentVariable("OLLAMA_MAX_LOADED_MODELS", "4", EnvironmentVariableTarget.User);
if (string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OLLAMA_NUM_PARALLEL", EnvironmentVariableTarget.User) ?? string.Empty))
Environment.SetEnvironmentVariable("OLLAMA_NUM_PARALLEL", "6", EnvironmentVariableTarget.User);
//if (string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OLLAMA_MAX_LOADED_MODELS", EnvironmentVariableTarget.User) ?? string.Empty))
// Environment.SetEnvironmentVariable("OLLAMA_MAX_LOADED_MODELS", "4", EnvironmentVariableTarget.User);
//if (string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OLLAMA_NUM_PARALLEL", EnvironmentVariableTarget.User) ?? string.Empty))
// Environment.SetEnvironmentVariable("OLLAMA_NUM_PARALLEL", "6", EnvironmentVariableTarget.User);
});
OllamaUri = new Uri(Environment.GetEnvironmentVariable("OLLAMA_API") ?? OllamaUri.ToString());
OllamaApi = new OllamaApiClient(OllamaUri);
Expand Down
6 changes: 3 additions & 3 deletions Onllama.Tiny/FormSettings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Onllama.Tiny/FormSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ private void buttonSave_Click(object sender, EventArgs e)
() => Environment.SetEnvironmentVariable("HIP_VISIBLE_DEVICES",
checkboxNoGpu.Checked ? " " : null, EnvironmentVariableTarget.User),
() => Environment.SetEnvironmentVariable("OLLAMA_NUM_PARALLEL",
checkboxPara.Checked ? "6" : "1", EnvironmentVariableTarget.User),
checkboxPara.Checked ? "32" : "1", EnvironmentVariableTarget.User),
() => Environment.SetEnvironmentVariable("OLLAMA_MAX_LOADED_MODELS",
checkboxModels.Checked ? "4" : "1", EnvironmentVariableTarget.User),
checkboxModels.Checked ? "8" : "1", EnvironmentVariableTarget.User),
() => Kill("ollama app"),
() => Kill("ollama")
);
Expand Down

0 comments on commit 4ea0a62

Please sign in to comment.