Skip to content

Commit

Permalink
Merge pull request #1 from Adisol07/dev
Browse files Browse the repository at this point in the history
Configuration
  • Loading branch information
Adisol07 authored Sep 15, 2024
2 parents 81cad35 + 3815361 commit 956d833
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Config.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace ReasoningAI;

public class Config
{
public int MaxReasoningIterations { get; set; } = 5;
public string OllamaAddress { get; set; } = "http://localhost:11434/";
}
10 changes: 9 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Text.Json;

namespace ReasoningAI;

Expand All @@ -7,6 +8,13 @@ class Program
static async Task Main()
{
Console.Title = "ReasoningAI";
Config config = new Config();
if (!File.Exists("./config.json"))
{
File.WriteAllText("./config.json", JsonSerializer.Serialize(config, new JsonSerializerOptions() { WriteIndented = true }));
}
config = JsonSerializer.Deserialize<Config>(File.ReadAllText("./config.json"))!;
OllamaRequest.URL = config.OllamaAddress + "api/chat";
Random rng = new Random();
while (true)
{
Expand All @@ -26,7 +34,7 @@ static async Task Main()
Console.SetCursorPosition(0, y);
Console.WriteLine("Thinking: " + title);
};
Prompt prompt = await Prompt.Send(userinput, 3);
Prompt prompt = await Prompt.Send(userinput, config.MaxReasoningIterations);
Console.SetCursorPosition(0, y);
for (int x = 0; x < Console.WindowWidth - 1; x++)
Console.Write(" ");
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ When that is done just run the ReasoningAI program and enjoy!
> You can modify everything about the model in its model file but keep in mind that some behaviour of the model is required for the program to work
---
Base model: llama 3.1\
Version: 1.0.0 - beta\
Version: 1.1.0 - beta\
Context size: 4096

## License
Expand Down

0 comments on commit 956d833

Please sign in to comment.