From f3485bf176f2d6b4a848e388362cb9645466b397 Mon Sep 17 00:00:00 2001 From: ovchynnikov Date: Sat, 17 May 2025 13:15:27 +0200 Subject: [PATCH 1/2] fix: increase response length --- src/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index d6cde82..673bbe9 100644 --- a/src/main.py +++ b/src/main.py @@ -34,8 +34,8 @@ # Reply with user data for Healthcheck send_user_info_with_healthcheck = os.getenv("SEND_USER_INFO_WITH_HEALTHCHECK", "False").lower() == "true" USE_LLM = os.getenv("USE_LLM", "False").lower() == "true" -LLM_MODEL = os.getenv("LLM_MODEL", "gemma3:4b") -LLM_API_ADDR = os.getenv("LLM_API_ADDR", "http://localhost:11434") +# LLM_MODEL = os.getenv("LLM_MODEL", "gemma3:4b") +LLM_API_ADDR = os.getenv("LLM_API_ADDR", "http://localhost:11435") TELEGRAM_WRITE_TIMEOUT = 8000 TELEGRAM_READ_TIMEOUT = 8000 @@ -461,14 +461,14 @@ async def respond_with_llm_message(update): f"{LLM_API_ADDR}/completion", json={ "prompt": prompt, - "n_predict": 200, + "n_predict": 1024, "temperature": 0.7, "stop": ["", "User:", "Assistant:"], }, ) as response: if response.status == 200: result = await response.json() - bot_response = result.get("content", "Sorry, I couldn't generate a response.") + bot_response = result.get("content", "Sorry, I couldn't generate a response.").strip() else: bot_response = "Sorry, I encountered an error while processing your request." From 3211f41e5a0059beafe8fc7cbf2bbbfd024ba874 Mon Sep 17 00:00:00 2001 From: ovchynnikov Date: Sat, 17 May 2025 13:16:26 +0200 Subject: [PATCH 2/2] github action push image version --- .github/workflows/github-actions-push-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-push-image.yml b/.github/workflows/github-actions-push-image.yml index 5fd6f63..b68c520 100644 --- a/.github/workflows/github-actions-push-image.yml +++ b/.github/workflows/github-actions-push-image.yml @@ -45,7 +45,7 @@ jobs: - name: Build and push Docker image id: push - uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 + uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 with: context: . file: ./Dockerfile