Compare commits

..

No commits in common. "779ac1f4628689df344b7ec30a8c9cc4d6989295" and "d4e85638176d34a03903a2cc78c447b626ab821f" have entirely different histories.

3 changed files with 2 additions and 6 deletions

View File

@ -7,9 +7,6 @@ CACHE = 1
N_THREADS = 4 N_THREADS = 4
MAX_TOKENS = 1024 MAX_TOKENS = 1024
# Bot specific settings
REFRESH_INTERVAL=7
# ROOT_IP is only used when running the bot without docker compose # ROOT_IP is only used when running the bot without docker compose
ROOT_IP = 192.168.0.15 ROOT_IP = 192.168.0.15

View File

@ -21,7 +21,6 @@ services:
- llama-python-server - llama-python-server
environment: environment:
- THE_TOKEN - THE_TOKEN
- REFRESH_INTERVAL
- CHANNEL_IDS - CHANNEL_IDS
- ROOT_IP=llama-python-server - ROOT_IP=llama-python-server
- ROOT_PORT=8000 - ROOT_PORT=8000

View File

@ -241,8 +241,8 @@ async function generateResponse(conversation, message) {
// call the function initially // call the function initially
await showSystemLoad(); await showSystemLoad();
// Grab the REFRESH_INTERVAL from ENV if not exist, lets use 7 (seconds) // refresh the system load percentage and update the message every 7 seconds
const refreshInterval = setInterval(showSystemLoad, (process.env.REFRESH_INTERVAL || 7) * 1000); const refreshInterval = setInterval(showSystemLoad, 7000);
try { try {
const response = await fetch(`http://${process.env.ROOT_IP}:${process.env.ROOT_PORT}/v1/chat/completions`, { const response = await fetch(`http://${process.env.ROOT_IP}:${process.env.ROOT_PORT}/v1/chat/completions`, {