Revert "Use local Whisper compose stack"

This reverts commit 5f833e84a6.
This commit is contained in:
William Valentin
2026-02-13 23:28:49 -08:00
parent 8fa2a6de9d
commit 4f3810ba4c
3 changed files with 30 additions and 49 deletions
+8 -8
View File
@@ -7,8 +7,7 @@
telegram: telegram:
bot_token: ${FLYNN_TELEGRAM_TOKEN} bot_token: ${FLYNN_TELEGRAM_TOKEN}
allowed_chat_ids: [-1003673132186] allowed_chat_ids: [] # Add your Telegram chat ID
require_mention: false
server: server:
tailscale_only: true tailscale_only: true
@@ -168,9 +167,10 @@ hooks:
# --host 0.0.0.0 --port 8080 --convert --language en \ # --host 0.0.0.0 --port 8080 --convert --language en \
# --inference-path /v1/audio/transcriptions # --inference-path /v1/audio/transcriptions
# #
audio: # audio:
enabled: true # enabled: true
provider: # provider:
type: custom # type: custom # openai, groq, ollama, llamacpp, custom
endpoint: "http://whisper-server:8080/v1/audio/transcriptions" # endpoint: "http://localhost:18801/v1/audio/transcriptions"
model: "whisper-1" # api_key: "${WHISPER_API_KEY}" # Optional Bearer token
# model: "whisper-1" # Model name (default: whisper-1)
+20 -33
View File
@@ -1,5 +1,3 @@
version: '3.9'
services: services:
flynn: flynn:
build: . build: .
@@ -31,39 +29,28 @@ services:
timeout: 5s timeout: 5s
start_period: 15s start_period: 15s
retries: 3 retries: 3
depends_on:
whisper-server:
condition: service_healthy
networks:
- flynn-net
# Optional: Whisper server for audio transcription # Optional: Whisper server for audio transcription
whisper-server: # Uncomment and adjust as needed for voice message support
image: ghcr.io/ggml-org/whisper.cpp:main # whisper-server:
container_name: whisper-server # image: ghcr.io/ggml-org/whisper.cpp:main
restart: unless-stopped # container_name: whisper-server
ports: # restart: unless-stopped
- "18801:8080" # ports:
command: > # - "18801:8080"
whisper-server # command: whisper-server
--model /app/models/ggml-base.en.bin # --model /app/models/ggml-base.en.bin
--host 0.0.0.0 # --host 0.0.0.0
--port 8080 # --port 8080
--convert # --convert
--language en # --language en
--inference-path /v1/audio/transcriptions # --inference-path /v1/audio/transcriptions
volumes: # healthcheck:
- ./whisper-models:/app/models:ro # test: ["CMD-SHELL", "curl", "-f", "http://localhost:8080/"]
healthcheck: # interval: 30s
test: ["CMD-SHELL", "curl", "-f", "http://localhost:8080/"] # timeout: 5s
interval: 30s # start_period: 15s
timeout: 5s # retries: 3
start_period: 15s
retries: 3
networks:
- flynn-net
volumes: volumes:
flynn-data: flynn-data:
networks:
flynn-net:
+2 -8
View File
@@ -56,10 +56,7 @@ export class SessionStore {
const stmt = this.db.prepare( const stmt = this.db.prepare(
'INSERT INTO messages (session_id, role, content, metadata) VALUES (?, ?, ?, ?)', 'INSERT INTO messages (session_id, role, content, metadata) VALUES (?, ?, ?, ?)',
); );
const contentString = typeof message.content === 'string' stmt.run(sessionId, message.role, message.content, metadata ? JSON.stringify(metadata) : null);
? message.content
: JSON.stringify(message.content);
stmt.run(sessionId, message.role, contentString, metadata ? JSON.stringify(metadata) : null);
} }
getMessages(sessionId: string): Message[] { getMessages(sessionId: string): Message[] {
@@ -87,10 +84,7 @@ export class SessionStore {
'INSERT INTO messages (session_id, role, content, metadata) VALUES (?, ?, ?, ?)', 'INSERT INTO messages (session_id, role, content, metadata) VALUES (?, ?, ?, ?)',
); );
for (const msg of messages) { for (const msg of messages) {
const contentString = typeof msg.content === 'string' insert.run(sessionId, msg.role, msg.content, null);
? msg.content
: JSON.stringify(msg.content);
insert.run(sessionId, msg.role, contentString, null);
} }
}); });
transaction(); transaction();