-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hey! I'm running into errors when trying the basic setup flow for a new project.
What I did:
- Created a new project with
cogsol-admin startproject myproject - Created an agent with
python manage.py startagent MyAgent - Ran
python manage.py makemigrations - Ran
python manage.py migrate
What happened:
First, makemigrations fails with an ImportError because the generated agent tries to import ExampleTool from tools.py, but ExampleTool is commented out in the template. You have to manually uncomment it to get past this step.
After uncommenting and running migrate, I get:
API error while applying migrations: Lesson did not include an id: None
I think this is caused by two bugs:
-
startprojectgeneratesExampleToolcommented out, butstartagentgenerates an agent that imports and uses it. The tool should ship uncommented so the default flow works out of the box. -
Migration operations are generated in the wrong order. Lessons and FAQs end up before the agent in the migration file, but they depend on the agent existing first. The correct order should be: tools -> agents -> lessons/faqs/fixed_responses.
Files involved:
cogsol/core/migrations.py— entity iteration order indiff_states()cogsol/management/commands/startproject.py—TOOLS_PYtemplate