UntilDot commited on
Commit
1fe15fd
·
verified ·
1 Parent(s): 087934f

Update templates/docs.html

Browse files
Files changed (1) hide show
  1. templates/docs.html +124 -135
templates/docs.html CHANGED
@@ -6,155 +6,144 @@
6
  <title>Documentation - MoA Chat</title>
7
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
8
  <link rel="stylesheet" href="/static/style.css" />
9
- <style>
10
- .sticky-buttons {
11
- position: fixed;
12
- top: 1rem;
13
- right: 1rem;
14
- display: flex;
15
- gap: 0.5rem;
16
- z-index: 1000;
17
- }
18
- .sticky-buttons button {
19
- padding: 0.5rem 0.75rem;
20
- background-color: var(--blue);
21
- color: var(--fg1);
22
- border: none;
23
- border-radius: 0.375rem;
24
- font-weight: bold;
25
- cursor: pointer;
26
- transition: background-color 0.3s;
27
- }
28
- .sticky-buttons button:hover {
29
- background-color: var(--purple);
30
- color: var(--fg0);
31
- }
32
- </style>
33
  </head>
 
34
 
35
- <body class="bg0 text-fg0 transition-colors duration-300">
 
 
 
 
 
 
 
 
36
 
37
- <div class="sticky-buttons">
38
- <button id="themeToggle">🌙</button>
39
- <a href="/" class="px-3 py-2 bg-blue text-fg0 rounded hover:bg-purple transition text-center">← Chat</a>
40
- <button id="langToggle">🇬🇧/🇪🇸</button>
41
- </div>
42
-
43
- <main class="flex flex-col items-center p-6 space-y-6 max-w-4xl mx-auto">
44
 
45
  <!-- English Section -->
46
- <section id="en" lang="en">
47
-
48
- <h1 class="text-3xl font-bold mb-6">MoA Chat Documentation</h1>
49
-
50
- <p class="text-lg mb-4">
51
- MoA Chat is a multi-agent AI system where several AI models answer a prompt independently, and a fourth model (the Aggregator) synthesizes their responses into a final answer.
52
- </p>
53
-
54
- <img src="https://raw.githubusercontent.com/togethercomputer/MoA/main/assets/moa-explained.png" alt="MoA Diagram" class="rounded shadow mb-6">
55
-
56
- <h2 class="text-2xl font-semibold mt-6 mb-2">How it Works</h2>
57
- <ul class="list-disc list-inside mb-6">
58
- <li>LLM-A, LLM-B, and LLM-C receive your prompt and answer independently.</li>
59
- <li>LLM-D (Aggregator) combines their answers into one final response.</li>
60
- </ul>
61
-
62
- <h2 class="text-2xl font-semibold mt-6 mb-2">How to Self-Host</h2>
63
- <ol class="list-decimal list-inside mb-6 space-y-2">
64
- <li>Clone the repository.</li>
65
- <li>Create a `.env` file with your API keys (OpenRouter, Together, Grok, etc.).</li>
66
- <li>Edit `llm/model_config.json` to configure providers and models.</li>
67
- <li>Run the app:
68
- <pre class="bg-statusline1 rounded p-3 mt-2 overflow-x-auto">pip install -r requirements.txt
69
- python app.py</pre>
70
- </li>
71
- <li>Deploy to Hugging Face Spaces if you prefer (using Docker or Python template).</li>
72
- </ol>
73
-
74
- <h2 class="text-2xl font-semibold mt-6 mb-2">Adding More Models</h2>
75
- <p class="mb-4">
76
- To add models, simply edit `llm/model_config.json`.
77
- Example:
78
- </p>
79
- <pre class="bg-statusline1 rounded p-3 overflow-x-auto">
80
- "models": {
81
- "newmodel/awesome-13b": "openrouter",
82
- "another/model-v2": "together"
83
- }
84
- </pre>
85
-
86
- <h2 class="text-2xl font-semibold mt-6 mb-2">License</h2>
87
- <p class="mb-2">
88
- This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3).
89
- </p>
90
- <p class="mb-6 text-sm opacity-70">
91
- You are free to use, modify, and share this project as long as you also make your changes available under the same license.
92
- </p>
93
-
94
- <footer class="text-center text-sm opacity-70">
95
- Made with ❤️ in Panamá • Powered by Open Source
96
- </footer>
 
 
 
 
 
97
 
98
  </section>
99
 
100
  <!-- Spanish Section -->
101
- <section id="es" lang="es" class="hidden">
102
-
103
- <h1 class="text-3xl font-bold mb-6">Documentación de MoA Chat</h1>
104
-
105
- <p class="text-lg mb-4">
106
- MoA Chat es un sistema de múltiples agentes donde varios modelos de IA responden a una solicitud de forma independiente, y un cuarto modelo (el Agregador) sintetiza sus respuestas en una sola.
107
- </p>
108
-
109
- <img src="https://raw.githubusercontent.com/togethercomputer/MoA/main/assets/moa-explained.png" alt="Diagrama MoA" class="rounded shadow mb-6">
110
-
111
- <h2 class="text-2xl font-semibold mt-6 mb-2">Cómo Funciona</h2>
112
- <ul class="list-disc list-inside mb-6">
113
- <li>LLM-A, LLM-B y LLM-C reciben tu pregunta y responden de forma independiente.</li>
114
- <li>LLM-D (Agregador) combina esas respuestas en una sola.</li>
115
- </ul>
116
-
117
- <h2 class="text-2xl font-semibold mt-6 mb-2">Cómo Autoalojar</h2>
118
- <ol class="list-decimal list-inside mb-6 space-y-2">
119
- <li>Clona el repositorio.</li>
120
- <li>Crea un archivo `.env` con tus claves API (OpenRouter, Together, Grok, etc.).</li>
121
- <li>Edita `llm/model_config.json` para configurar proveedores y modelos.</li>
122
- <li>Ejecuta:
123
- <pre class="bg-statusline1 rounded p-3 mt-2 overflow-x-auto">pip install -r requirements.txt
124
- python app.py</pre>
125
- </li>
126
- <li>O despliega en Hugging Face Spaces si prefieres.</li>
127
- </ol>
128
-
129
- <h2 class="text-2xl font-semibold mt-6 mb-2">Agregar Más Modelos</h2>
130
- <p class="mb-4">
131
- Para agregar modelos, simplemente edita `llm/model_config.json`.
132
- Ejemplo:
133
- </p>
134
- <pre class="bg-statusline1 rounded p-3 overflow-x-auto">
135
- "models": {
136
- "newmodel/awesome-13b": "openrouter",
137
- "another/model-v2": "together"
138
- }
139
- </pre>
140
-
141
- <h2 class="text-2xl font-semibold mt-6 mb-2">Licencia</h2>
142
- <p class="mb-2">
143
- Este proyecto está licenciado bajo la Licencia Pública General Affero de GNU v3.0 (AGPLv3).
144
- </p>
145
- <p class="mb-6 text-sm opacity-70">
146
- Puedes usar, modificar y compartir este proyecto siempre que también compartas tus cambios bajo la misma licencia.
147
- </p>
148
-
149
- <footer class="text-center text-sm opacity-70">
150
- Hecho con ❤️ en Panamá • Impulsado por Software Libre
151
- </footer>
 
 
 
 
152
 
153
  </section>
154
 
155
  </main>
156
 
157
- <script src="/static/docs.js"></script>
158
 
159
  </body>
160
  </html>
 
6
  <title>Documentation - MoA Chat</title>
7
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
8
  <link rel="stylesheet" href="/static/style.css" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  </head>
10
+ <body class="bg0 text-fg0 transition-colors duration-300 flex flex-col min-h-screen">
11
 
12
+ <!-- Top Fixed Bar -->
13
+ <header class="flex items-center justify-between p-4 bg1 shadow-md sticky top-0 z-50">
14
+ <h1 class="text-2xl font-bold">Documentation</h1>
15
+ <div class="space-x-2 flex items-center">
16
+ <a href="/" id="chatButton" class="px-3 py-1 rounded bg-blue hover:bg-purple text-fg0 transition">← Chat</a>
17
+ <button id="langToggle" class="px-3 py-1 rounded bg-blue hover:bg-purple text-fg0 transition">🌐</button>
18
+ <button id="themeToggle" class="px-3 py-1 rounded bg-blue hover:bg-purple text-fg0 transition">🌙</button>
19
+ </div>
20
+ </header>
21
 
22
+ <!-- Scrollable Main Content -->
23
+ <main class="flex-1 overflow-y-auto p-6 space-y-8">
 
 
 
 
 
24
 
25
  <!-- English Section -->
26
+ <section id="en" class="space-y-8">
27
+
28
+ <div class="space-y-4">
29
+ <h2 class="text-xl font-semibold">What is MoA Chat?</h2>
30
+ <p>
31
+ MoA Chat is a minimalistic and modern multi-model AI chat platform based on the "Mixture of Agents" (MoA) architecture.
32
+ It allows you to query multiple language models (LLMs) simultaneously, and combine their responses into a final answer.
33
+ </p>
34
+ </div>
35
+
36
+ <div class="space-y-4">
37
+ <h2 class="text-xl font-semibold">How It Works</h2>
38
+ <img src="https://github.com/togethercomputer/MoA/raw/main/assets/moa-explained.png" alt="MoA System Architecture" class="rounded shadow-lg">
39
+ <p>
40
+ Each conversation consists of three AI models (LLM-A, LLM-B, LLM-C) answering separately based on a structured system prompt,
41
+ and one aggregator model (LLM-D) combining their outputs into a high-quality final response.
42
+ </p>
43
+ </div>
44
+
45
+ <div class="space-y-4">
46
+ <h2 class="text-xl font-semibold">Features</h2>
47
+ <ul class="list-disc list-inside space-y-2">
48
+ <li>🔹 Minimal, fast, fully responsive UI.</li>
49
+ <li>🔹 Supports any OpenRouter, Groq, Together AI, or Grok model easily.</li>
50
+ <li>🔹 Auto-theme (light/dark) detection based on your device.</li>
51
+ <li>🔹 Smooth animations and Gruvbox Material palette.</li>
52
+ <li>🔹 Self-hostable without any hidden costs.</li>
53
+ </ul>
54
+ </div>
55
+
56
+ <div class="space-y-4">
57
+ <h2 class="text-xl font-semibold">How to Self-Host</h2>
58
+ <p>1. Deploy to Hugging Face Spaces (Docker).</p>
59
+ <p>2. Add your API keys under "Secrets" (OPENROUTER_API_KEY, GROK_API_KEY, etc).</p>
60
+ <p>3. Configure `llm/model_config.json` to add new providers or models.</p>
61
+ <p>4. That's it! No database required.</p>
62
+ </div>
63
+
64
+ <div class="space-y-4">
65
+ <h2 class="text-xl font-semibold">Adding Models</h2>
66
+ <p>
67
+ To add new models, simply update the <code>llm/model_config.json</code> file by mapping model names to providers.
68
+ No backend changes are needed the app automatically pulls from the updated list.
69
+ </p>
70
+ </div>
71
+
72
+ <div class="space-y-4">
73
+ <h2 class="text-xl font-semibold">License</h2>
74
+ <p>This project is licensed under the <strong>AGPLv3</strong>.
75
+ Fully free, fully open-source, no restrictions.</p>
76
+ </div>
77
+
78
+ <div class="space-y-4">
79
+ <h2 class="text-xl font-semibold">Credits</h2>
80
+ <p>Inspired by <a href="https://github.com/togethercomputer/MoA" class="text-blue underline hover:text-purple" target="_blank">Together MoA</a> and built with ❤️ in Panamá.</p>
81
+ </div>
82
 
83
  </section>
84
 
85
  <!-- Spanish Section -->
86
+ <section id="es" class="space-y-8 hidden">
87
+
88
+ <div class="space-y-4">
89
+ <h2 class="text-xl font-semibold">¿Qué es MoA Chat?</h2>
90
+ <p>
91
+ MoA Chat es una plataforma de chat de IA moderna y minimalista basada en la arquitectura "Mixture of Agents" (MoA).
92
+ Permite consultar múltiples modelos de lenguaje (LLMs) al mismo tiempo y combinar sus respuestas en una sola.
93
+ </p>
94
+ </div>
95
+
96
+ <div class="space-y-4">
97
+ <h2 class="text-xl font-semibold">¿Cómo Funciona?</h2>
98
+ <img src="https://github.com/togethercomputer/MoA/raw/main/assets/moa-explained.png" alt="Arquitectura MoA" class="rounded shadow-lg">
99
+ <p>
100
+ Cada conversación involucra tres modelos de IA (LLM-A, LLM-B, LLM-C) respondiendo por separado con un prompt estructurado,
101
+ y un modelo agregador (LLM-D) que combina las respuestas en una final de alta calidad.
102
+ </p>
103
+ </div>
104
+
105
+ <div class="space-y-4">
106
+ <h2 class="text-xl font-semibold">Características</h2>
107
+ <ul class="list-disc list-inside space-y-2">
108
+ <li>🔹 UI rápida, minimalista y adaptable.</li>
109
+ <li>🔹 Soporte para OpenRouter, Groq, Together AI, Grok.</li>
110
+ <li>🔹 Cambio automático de tema claro/oscuro.</li>
111
+ <li>🔹 Animaciones suaves y paleta Gruvbox Material.</li>
112
+ <li>🔹 100% autohospedable.</li>
113
+ </ul>
114
+ </div>
115
+
116
+ <div class="space-y-4">
117
+ <h2 class="text-xl font-semibold">Cómo Autohospedarlo</h2>
118
+ <p>1. Despliega en Hugging Face Spaces (Docker).</p>
119
+ <p>2. Agrega tus llaves API en "Secrets" (OPENROUTER_API_KEY, GROK_API_KEY, etc).</p>
120
+ <p>3. Configura <code>llm/model_config.json</code> para agregar modelos o proveedores.</p>
121
+ <p>4. ¡Listo! No requiere base de datos.</p>
122
+ </div>
123
+
124
+ <div class="space-y-4">
125
+ <h2 class="text-xl font-semibold">Agregar Modelos</h2>
126
+ <p>
127
+ Para agregar nuevos modelos, solo edita <code>llm/model_config.json</code>.
128
+ La app actualizará las opciones automáticamente.
129
+ </p>
130
+ </div>
131
+
132
+ <div class="space-y-4">
133
+ <h2 class="text-xl font-semibold">Licencia</h2>
134
+ <p>Este proyecto usa la licencia <strong>AGPLv3</strong>.</p>
135
+ </div>
136
+
137
+ <div class="space-y-4">
138
+ <h2 class="text-xl font-semibold">Créditos</h2>
139
+ <p>Inspirado en <a href="https://github.com/togethercomputer/MoA" class="text-blue underline hover:text-purple" target="_blank">Together MoA</a> y construido con ❤️ en Panamá.</p>
140
+ </div>
141
 
142
  </section>
143
 
144
  </main>
145
 
146
+ <script src="/static/docs.js"></script>
147
 
148
  </body>
149
  </html>