From 0eaa26415accc77a69d1fbcfabc775e111688d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81bastien=20Campion?= Date: Mon, 27 Jan 2025 09:51:50 +0100 Subject: [PATCH] fix --- conf.yml | 1 + markdown | 101 ------------------------------------------------- www/chat.html | 9 ++--- www/parsers.js | 3 +- 4 files changed, 6 insertions(+), 108 deletions(-) delete mode 100644 markdown diff --git a/conf.yml b/conf.yml index 7b42048..501a118 100644 --- a/conf.yml +++ b/conf.yml @@ -27,6 +27,7 @@ models: proxy_pass: "http://127.0.0.1:6193/echo" parser: "echo" api_key: "$DEEPSEEK_API_KEY" + pii_protection_url: "http://127.0.0.1:8001/check-pii-base64" - location: "/ollama/gemma2/2b/" model_name: "gemma2:2b-instruct-q6_K" diff --git a/markdown b/markdown deleted file mode 100644 index be6c36d..0000000 --- a/markdown +++ /dev/null @@ -1,101 +0,0 @@ -# About Burgonet - -## License - -Burgonet is provided under the [Commons Clause License Condition v1.0](LICENSE) which allows free non-production use. - -The license includes these key terms: -- Free use for non-production purposes -- Commercial use requires a separate license -- No right to sell the software or services derived from it -- Attribution requirements - -## Enterprise Support - -For production deployments or commercial use, enterprise licenses and support packages are available. These include: - -- Production deployment rights -- Priority support -- Custom feature development -- Security audits -- Compliance consulting - -Contact sebastien.campion@foss4.eu to discuss licensing options and enterprise support. - -## Copyright - -Copyright (c) 2025 Sébastien Campion, FOSS4. All rights reserved. - -The software follows [Fair-code](https://faircode.io) principles, balancing open access with sustainable development. -# Chat Interface - -The Burgonet Gateway provides a web-based chat interface for interacting with supported LLM models. - -## Features - -- 🗨️ **Conversation History**: View and manage past conversations -- 🤖 **Model Selection**: Choose from available LLM models -- 🔑 **Token Management**: Set and save API tokens -- 🌐 **Server Configuration**: Configure gateway URL -- 📝 **Message Formatting**: Supports markdown and code blocks -- ⏱️ **Real-time Responses**: Streamed responses for fast interaction - -## Accessing the Chat Interface - -The chat interface is available at: - -``` -http://: -``` - -Default values: -- Host: `127.0.0.1` -- Port: `6190` - -## Interface Components - -1. **Navigation Bar** - - Gateway URL configuration - - API Token input - - Save button - -2. **Sidebar** - - New Chat button - - Conversation history list - -3. **Chat Window** - - Message display area - - User and assistant messages - -4. **Input Area** - - Model selection dropdown - - Message input field - - Send button - -## Configuration - -The chat interface can be configured in `conf.yml`: - -```yaml -chat_host: 127.0.0.1 # Host to serve chat interface -chat_port: 6190 # Port for chat interface -``` - -## Keyboard Shortcuts - -- **Enter**: Send message (without shift) -- **Shift+Enter**: New line in message input -- **Ctrl+Enter**: Send message (alternative) -- **Esc**: Clear message input - -## Troubleshooting - -**Issue**: Chat interface not loading -- Verify chat service is running -- Check firewall settings for chat port -- Confirm correct gateway URL in navigation bar - -**Issue**: Messages not sending -- Verify API token is valid -- Check model selection -- Confirm gateway is running and accessible diff --git a/www/chat.html b/www/chat.html index b2c4a05..f0ea4a2 100644 --- a/www/chat.html +++ b/www/chat.html @@ -171,11 +171,8 @@

Conversations

// Create a Set to track unique model names const uniqueModels = new Set(); - - models.forEach(modelObj => { - const modelName = Object.keys(modelObj)[0]; - const modelData = modelObj[modelName]; - + + Object.entries(models).forEach(([modelName, modelData]) => { if (!uniqueModels.has(modelName)) { uniqueModels.add(modelName); const option = document.createElement('option'); @@ -187,7 +184,7 @@

Conversations

select.appendChild(option); } }); - + // Set default selection to first model if (select.options.length > 0) { select.selectedIndex = 0; diff --git a/www/parsers.js b/www/parsers.js index a241ab1..9479d8b 100644 --- a/www/parsers.js +++ b/www/parsers.js @@ -83,9 +83,10 @@ const parsers = { return messages; }, parseResponse: (response) => { + console.log('Echo response:', response); return [{ role: 'assistant', - content: response.content || 'Echo response' + content: response.messages[0].content || 'Echo response' }]; } }