2024-04-28 03:42:04 -03:00
|
|
|
|
using GTPCorrgir;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace GTPCorrgir
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class Opciones
|
|
|
|
|
{
|
|
|
|
|
public enum LLM_a_Usar
|
|
|
|
|
{
|
|
|
|
|
OpenAI,
|
|
|
|
|
Ollama,
|
2024-11-14 06:05:56 -03:00
|
|
|
|
Groq,
|
2024-11-20 11:09:19 -03:00
|
|
|
|
Grok
|
2024-04-28 03:42:04 -03:00
|
|
|
|
}
|
2024-11-20 11:09:19 -03:00
|
|
|
|
|
2024-04-29 05:56:48 -03:00
|
|
|
|
public enum modoDeUso
|
|
|
|
|
{
|
|
|
|
|
Corregir,
|
2024-05-22 06:12:46 -03:00
|
|
|
|
Ortografia,
|
2024-04-29 05:56:48 -03:00
|
|
|
|
Chat,
|
2024-06-16 05:26:18 -03:00
|
|
|
|
Traducir_a_Ingles,
|
|
|
|
|
Traducir_a_Italiano,
|
|
|
|
|
Traducir_a_Espanol,
|
2024-04-29 05:56:48 -03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Dictionary<LLM_a_Usar, string> nombreLLM = new Dictionary<LLM_a_Usar, string>
|
2024-11-20 11:09:19 -03:00
|
|
|
|
{
|
|
|
|
|
{ LLM_a_Usar.Ollama, "Ollama" },
|
|
|
|
|
{ LLM_a_Usar.Groq, "Groq" },
|
|
|
|
|
{ LLM_a_Usar.Grok, "Grok" },
|
|
|
|
|
{ LLM_a_Usar.OpenAI, "OpenAI" },
|
|
|
|
|
};
|
2024-04-28 03:42:04 -03:00
|
|
|
|
|
|
|
|
|
private static Opciones _instance;
|
2024-11-20 11:09:19 -03:00
|
|
|
|
public bool AutoCopy { get; set; }
|
|
|
|
|
|
2024-04-28 03:42:04 -03:00
|
|
|
|
public static Opciones Instance
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (_instance == null)
|
|
|
|
|
{
|
|
|
|
|
_instance = new Opciones();
|
2024-11-14 06:05:56 -03:00
|
|
|
|
_instance.LLM = LLM_a_Usar.Grok;
|
|
|
|
|
_instance.modo = modoDeUso.Chat;
|
2024-11-20 11:09:19 -03:00
|
|
|
|
_instance.AutoCopy = false;
|
2024-04-28 03:42:04 -03:00
|
|
|
|
}
|
|
|
|
|
return _instance;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public LLM_a_Usar LLM { get; set; }
|
2024-04-29 05:56:48 -03:00
|
|
|
|
public modoDeUso modo { get; set; }
|
|
|
|
|
|
2024-11-20 11:09:19 -03:00
|
|
|
|
public string nombreDeLLM()
|
|
|
|
|
{
|
2024-04-28 03:42:04 -03:00
|
|
|
|
return nombreLLM[LLM];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Opciones() { }
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-16 05:26:18 -03:00
|
|
|
|
|
2024-04-28 03:42:04 -03:00
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
[STAThread]
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
var application = new App();
|
|
|
|
|
|
|
|
|
|
foreach (var arg in args)
|
|
|
|
|
{
|
|
|
|
|
if (arg.StartsWith("--"))
|
|
|
|
|
{
|
|
|
|
|
// Procesa el argumento según tus necesidades
|
2024-06-16 05:26:18 -03:00
|
|
|
|
if (arg.Contains("Ollama"))
|
2024-04-28 03:42:04 -03:00
|
|
|
|
Opciones.Instance.LLM = Opciones.LLM_a_Usar.Ollama;
|
2024-06-16 05:26:18 -03:00
|
|
|
|
else if (arg.Contains("Groq"))
|
2024-04-28 03:42:04 -03:00
|
|
|
|
Opciones.Instance.LLM = Opciones.LLM_a_Usar.Groq;
|
2024-11-14 06:05:56 -03:00
|
|
|
|
else if (arg.Contains("Grok"))
|
|
|
|
|
Opciones.Instance.LLM = Opciones.LLM_a_Usar.Grok;
|
2024-06-16 05:26:18 -03:00
|
|
|
|
else if (arg.Contains("OpenAI"))
|
|
|
|
|
Opciones.Instance.LLM = Opciones.LLM_a_Usar.OpenAI;
|
|
|
|
|
|
|
|
|
|
if (arg.Contains("Chat"))
|
2024-05-22 06:12:46 -03:00
|
|
|
|
Opciones.Instance.modo = Opciones.modoDeUso.Chat;
|
2024-06-16 05:26:18 -03:00
|
|
|
|
else if (arg.Contains("Ortografia"))
|
2024-05-22 06:12:46 -03:00
|
|
|
|
Opciones.Instance.modo = Opciones.modoDeUso.Ortografia;
|
2024-06-16 05:26:18 -03:00
|
|
|
|
else if (arg.Contains("Corregir"))
|
|
|
|
|
Opciones.Instance.modo = Opciones.modoDeUso.Corregir;
|
|
|
|
|
else if (arg.Contains("Traducir_a_Ingles"))
|
|
|
|
|
Opciones.Instance.modo = Opciones.modoDeUso.Traducir_a_Ingles;
|
|
|
|
|
else if (arg.Contains("Traducir_a_Italiano"))
|
|
|
|
|
Opciones.Instance.modo = Opciones.modoDeUso.Traducir_a_Italiano;
|
|
|
|
|
else if (arg.Contains("Traducir_a_Espanol"))
|
|
|
|
|
Opciones.Instance.modo = Opciones.modoDeUso.Traducir_a_Espanol;
|
2024-11-20 11:09:19 -03:00
|
|
|
|
else if (arg.Contains("AutoCopy"))
|
|
|
|
|
Opciones.Instance.AutoCopy = true;
|
2024-04-28 03:42:04 -03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
application.Run();
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-06-16 05:26:18 -03:00
|
|
|
|
|
2024-04-28 03:42:04 -03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|