Reduced some vuln after SAST scan

This commit is contained in:
2025-10-14 17:56:06 -05:00
parent 5d746027e2
commit 2feeb339f2
12 changed files with 372 additions and 92 deletions

View File

@@ -61,7 +61,7 @@ async def handle_ai_command(room, bot, command, args, config):
data = {
"prompt": f"<s>[INST]{config[command]['prompt']}{prompt}[/INST]",
"max_tokens": 1024,
"max_tokens": 4096,
"temperature": config[command]["temperature"],
"top_p": config[command]["top_p"],
"top_k": config[command]["top_k"],
@@ -72,7 +72,7 @@ async def handle_ai_command(room, bot, command, args, config):
# Make HTTP request to the API endpoint
try:
response = requests.post(url, headers=headers, json=data, verify=False)
response = requests.post(url, headers=headers, json=data, verify=False, timeout=300)
response.raise_for_status() # Raise HTTPError for bad responses
payload = response.json()
new_text = payload['choices'][0]['text']