tylerprogramming / ai

This repository will have different projects using AutoGen and Tutorials
428 stars 141 forks source link

main.py ... from _crew_ import [projectname] or from _[projectname].crew import [Projectname] #4

Open johnwhalen opened 1 month ago

johnwhalen commented 1 month ago

Hi @tylerprogramming, in your third video (https://github.com/tylerprogramming/ai/tree/main/crewai_series/day_03) you mentioned you could start the main.py with:

import sys from crew import [Projectanme]

rather than using the default from create crewai:

import sys from [projectname].crew import [Projectname]

but I get a pylance error about resolving "crew" in the above statement. Is there anything else you change to make that work? What are the consequences of leaving it?

Thank you for your thoughtfulness in producing these videos!

tylerprogramming commented 1 month ago

hey @johnwhalen I just took the recent update, and tested again yeah I had to remove the [projectname] before it:

import sys from crew import TestCrew

I just did crewai create crew test, and then it created the test crew. I just removed the 'test.' from the second line above where it did say 'test.crew'.

would you mind copying the error here? I can see if something else may have happened.