# Generated by Django 4.2.10 on 2024-03-13 07:38

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("database", "0030_conversation_slug_and_title"),
    ]

    operations = [
        migrations.CreateModel(
            name="Agent",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("name", models.CharField(max_length=200)),
                ("tuning", models.TextField()),
                ("avatar", models.URLField(blank=True, default=None, max_length=400, null=True)),
                ("tools", models.JSONField(default=list)),
                ("public", models.BooleanField(default=False)),
                ("managed_by_admin", models.BooleanField(default=False)),
                ("slug", models.CharField(max_length=200)),
                (
                    "chat_model",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="database.chatmodeloptions"),
                ),
                (
                    "creator",
                    models.ForeignKey(
                        blank=True,
                        default=None,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="conversation",
            name="agent",
            field=models.ForeignKey(
                blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to="database.agent"
            ),
        ),
    ]
