pushed, added AI model text
This commit is contained in:
parent
57d4f64989
commit
59032ce1c4
@ -49,7 +49,7 @@ enabled = true
|
||||
generate_models = ["llama-3.2-90b-vision-preview","llama-3.3-70b-versatile","llama-3.3-70b-specdec","llama-3.2-11b-vision-preview","llama3-70b-8192","llama-3.1-8b-instant","llama3-8b-8192","llama-3.2-3b-preview","llama-3.2-1b-preview"] # for home usage gemma3:1b recommended, for Groq llama-3.1-8b-instant
|
||||
generate_endpoint = "http://IP:PORT/api/generate" # Can be empty if using groq
|
||||
use_groq = true
|
||||
groq_api_token = "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" # Get one at https://console.groq.com/keys
|
||||
groq_api_token = "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" # Get one at https://console.groq.com/keys
|
||||
# Example API key
|
||||
|
||||
|
||||
@ -58,6 +58,6 @@ prompt = "Analyze the given code and return an abuse score (0-10) with a brief r
|
||||
[INTEGRATION.DISCORD]
|
||||
|
||||
enabled = true
|
||||
webhook_url = "https://discord.com/api/webhooks/1353420407511973948/knrSGrfLDvi_60Mese1LAIBmkrK05a_L4PmyyE7R7wvGZEXiWdzrRT8pdicj0aHe88m4"
|
||||
webhook_url = "https://discord.com/api/webhooks/1353420411018416128/2lK_3tB4DGYfO6bUMfghNuf6N1tr4A8mPM-S3Lct0qwnibuGbzsDfSoK62231Qi3QQsM"
|
||||
# Example webhook
|
||||
truncate_text = true # Used only if AI INTEGRATION is enabled, trunclates text if true to maxium allowed characters or when false splits in few webhook messages.
|
||||
|
@ -62,7 +62,7 @@ def generate_response(data):
|
||||
response = requests.post(generate_endpoint, json=payload, headers=headers)
|
||||
response.raise_for_status()
|
||||
if use_groq:
|
||||
return response.json()["choices"][0]["message"]["content"] + f"\nAI Model: {generate_model}"
|
||||
return response.json()["choices"][0]["message"]["content"] + f"\n\n> AI Model: {generate_model}"
|
||||
else:
|
||||
return response.json()
|
||||
|
||||
|
Reference in New Issue
Block a user