File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 34
34
# Reply with user data for Healthcheck
35
35
send_user_info_with_healthcheck = os .getenv ("SEND_USER_INFO_WITH_HEALTHCHECK" , "False" ).lower () == "true"
36
36
USE_LLM = os .getenv ("USE_LLM" , "False" ).lower () == "true"
37
- LLM_MODEL = os .getenv ("LLM_MODEL" , "gemma3:4b" )
38
- LLM_API_ADDR = os .getenv ("LLM_API_ADDR" , "http://localhost:11434 " )
37
+ # LLM_MODEL = os.getenv("LLM_MODEL", "gemma3:4b")
38
+ LLM_API_ADDR = os .getenv ("LLM_API_ADDR" , "http://localhost:11435 " )
39
39
TELEGRAM_WRITE_TIMEOUT = 8000
40
40
TELEGRAM_READ_TIMEOUT = 8000
41
41
@@ -461,14 +461,14 @@ async def respond_with_llm_message(update):
461
461
f"{ LLM_API_ADDR } /completion" ,
462
462
json = {
463
463
"prompt" : prompt ,
464
- "n_predict" : 200 ,
464
+ "n_predict" : 1024 ,
465
465
"temperature" : 0.7 ,
466
466
"stop" : ["</s>" , "User:" , "Assistant:" ],
467
467
},
468
468
) as response :
469
469
if response .status == 200 :
470
470
result = await response .json ()
471
- bot_response = result .get ("content" , "Sorry, I couldn't generate a response." )
471
+ bot_response = result .get ("content" , "Sorry, I couldn't generate a response." ). strip ()
472
472
else :
473
473
bot_response = "Sorry, I encountered an error while processing your request."
474
474
You can’t perform that action at this time.
0 commit comments