-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mypy Agent class error #1674
Comments
Hi @lucas-stellet |
Hi @dirkbrnd I see this warning in my vscode using an Mypy extension. The command being executed by extension was: mypy --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --show-error-end /Users/lucas/dev/learn/ai/hands-on/agents-with-phidata/web_search_agent.py
/Users/lucas/dev/learn/ai/hands-on/agents-with-phidata/web_search_agent.py:9:20:18:1: error: Unexpected keyword argument "model" for "Agent" [call-arg]
/Users/lucas/dev/learn/ai/hands-on/agents-with-phidata/web_search_agent.py:12:11:12:11: error: Name "Groq" is not defined [name-defined] |
I published the code in a repository: |
@lucas-stellet it could be the mypy settings in your repo or something with your plugin? |
Title: Mypy type checking error: Unexpected keyword argument "model" for "Agent"
Description:
When running Mypy for type checking, the following error is reported:
Code Example
Expected Behavior
The type hints in the Agent class should properly define all accepted parameters in its constructor, including the model parameter.
Current Behavior
Mypy is reporting that the model parameter is not defined in the type hints for the Agent class constructor, even though the code works at runtime.
Environment
Additional Notes
This appears to be a type hinting issue rather than a functional one, as the code executes correctly but fails Mypy's static type checking.
The text was updated successfully, but these errors were encountered: