mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
* feat: agent templates and seeding premade agents * fix: ensure ObjectId is used for source reference in agent configuration * fix: improve source handling in DatabaseSeeder and update tool config processing * feat: add prompt handling in DatabaseSeeder for agent configuration * Docs premade agents * link to prescraped docs * feat: add template agent retrieval and adopt agent functionality * feat: simplify agent descriptions in premade_agents.yaml added docs --------- Co-authored-by: Pavel <pabin@yandex.ru> Co-authored-by: Alex <a@tushynski.me>
27 lines
582 B
Python
27 lines
582 B
Python
import click
|
|
|
|
from application.core.mongo_db import MongoDB
|
|
from application.core.settings import settings
|
|
from application.seed.seeder import DatabaseSeeder
|
|
|
|
|
|
@click.group()
|
|
def seed():
|
|
"""Database seeding commands"""
|
|
pass
|
|
|
|
|
|
@seed.command()
|
|
@click.option("--force", is_flag=True, help="Force reseeding even if data exists")
|
|
def init(force):
|
|
"""Initialize database with seed data"""
|
|
mongo = MongoDB.get_client()
|
|
db = mongo[settings.MONGO_DB_NAME]
|
|
|
|
seeder = DatabaseSeeder(db)
|
|
seeder.seed_initial_data(force=force)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
seed()
|