Update server.js
Browse files
server.js
CHANGED
|
@@ -34,6 +34,21 @@ console.log('ββββββββββββββββββββββ
|
|
| 34 |
console.log(`Model: ${MODEL}`);
|
| 35 |
console.log(`Ollama: ${OLLAMA_URL}\n`);
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
// Health check
|
| 38 |
app.get('/health', async (req, res) => {
|
| 39 |
try {
|
|
@@ -226,4 +241,4 @@ app.listen(PORT, () => {
|
|
| 226 |
console.log('');
|
| 227 |
console.log('No API keys - runs locally!');
|
| 228 |
console.log('ββββββββββββββββββββββββββββββββββββββββββ\n');
|
| 229 |
-
});
|
|
|
|
| 34 |
console.log(`Model: ${MODEL}`);
|
| 35 |
console.log(`Ollama: ${OLLAMA_URL}\n`);
|
| 36 |
|
| 37 |
+
// Root route - API info
|
| 38 |
+
app.get('/', (req, res) => {
|
| 39 |
+
res.json({
|
| 40 |
+
name: 'Tera V2 API',
|
| 41 |
+
version: '2.0.0',
|
| 42 |
+
model: MODEL,
|
| 43 |
+
status: 'running',
|
| 44 |
+
endpoints: {
|
| 45 |
+
health: '/health',
|
| 46 |
+
chat: '/api/chat',
|
| 47 |
+
audio: '/api/generate-audio-script'
|
| 48 |
+
}
|
| 49 |
+
});
|
| 50 |
+
});
|
| 51 |
+
|
| 52 |
// Health check
|
| 53 |
app.get('/health', async (req, res) => {
|
| 54 |
try {
|
|
|
|
| 241 |
console.log('');
|
| 242 |
console.log('No API keys - runs locally!');
|
| 243 |
console.log('ββββββββββββββββββββββββββββββββββββββββββ\n');
|
| 244 |
+
});
|