Reduced some vuln after SAST scan
This commit is contained in:
@@ -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']
|
||||
|
Reference in New Issue
Block a user