22 lines
782 B
Python
22 lines
782 B
Python
from apps.ai.models import AgentConfig
|
|
|
|
agent, created = AgentConfig.objects.get_or_create(
|
|
name="IXG Assistant",
|
|
defaults={
|
|
"description": "Default IXG platform AI assistant",
|
|
"provider": AgentConfig.Provider.DEEPSEEK,
|
|
"api_key": "sk-46ab1f52da81495fa1f712354b0cdcef",
|
|
"model_name": "deepseek-chat",
|
|
"system_prompt": "You are a helpful assistant for the IXG platform, a Nigerian ginger export company.",
|
|
"temperature": 0.7,
|
|
"max_tokens": 2000,
|
|
"is_active": True,
|
|
"is_default": True,
|
|
"capabilities": ["chat"],
|
|
}
|
|
)
|
|
|
|
if created:
|
|
print("Created agent: " + agent.name + " (ID: " + str(agent.id) + ")")
|
|
else:
|
|
print("Agent already exists: " + agent.name + " (ID: " + str(agent.id) + ")")
|