Skip to content
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

Fixes AttributeError: 'CodeAgent' object has no attribute 'logger' #258 #259

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joaopauloschuler
Copy link
Contributor

This pull request fixes bug #258 :

AttributeError                            Traceback (most recent call last)
[<ipython-input-15-0e9291bb4122>](https://localhost:8080/#) in <cell line: 0>()
      2 tooled_agent = ToolCallingAgent(tools=tools, model=model, add_base_tools=False) # , max_iterations=2
      3 internet_search_agent = ToolCallingAgent(tools=[save_string_to_file, load_string_from_file], model=model, add_base_tools=False) # , max_iterations=2
----> 4 coder_agent = CodeAgent(
      5     tools=tools, model=coder_model,
      6     additional_authorized_imports=additional_authorized_imports,

[/usr/local/lib/python3.11/dist-packages/smolagents/agents.py](https://localhost:8080/#) in __init__(self, tools, model, system_prompt, grammar, additional_authorized_imports, planning_interval, use_e2b_executor, max_print_outputs_length, **kwargs)
    910 
    911         if "*" in self.additional_authorized_imports:
--> 912             self.logger.log(
    913                 "Caution: you set an authorization for all imports, meaning your agent can decide to import any package it deems necessary. This might raise issues if the package is not installed in your environment.",
    914                 0,

AttributeError: 'CodeAgent' object has no attribute 'logger'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant