seed
django_spire.knowledge.seeding.seed
parent_collections = CollectionSeeder.seed_database(count=5)
module-attribute
child_collections = CollectionSeeder.seed_child_collections(count=15)
module-attribute
CollectionSeeder
Bases: DjangoModelSeeder
model_class = models.Collection
class-attribute
instance-attribute
fields = {'id': 'exclude', 'parent': 'exclude', 'name': ('llm', 'A name for a collection of documents. Make it fun and give it a theme'), 'description': ('llm', 'Short description on the what the documents are about, keep it related to the name.')}
class-attribute
instance-attribute
seed_child_collections
classmethod
Source code in django_spire/knowledge/collection/seeding/seeder.py
EntrySeeder
Bases: DjangoModelSeeder