-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Delete prompts_path argument and use prompt_templates #541
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
Delete prompts_path argument and use prompt_templates #541
Conversation
@albertvillanova the "s" in |
I need to resolve the conflicts after having merged: I aligned the singular name with |
What about both in plural (for explicit clarity)?
|
Finally:
|
@@ -779,10 +780,13 @@ def __init__( | |||
): | |||
self.additional_authorized_imports = additional_authorized_imports if additional_authorized_imports else [] | |||
self.authorized_imports = list(set(BASE_BUILTIN_MODULES) | set(self.additional_authorized_imports)) | |||
self.prompt_templates = yaml.safe_load(importlib.resources.read_text("smolagents.prompts", "code_agent.yaml")) | |||
prompt_templates = prompt_templates or yaml.safe_load( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this, really clean!
EDIT:
Remove unused
prompts_path
argument and useprompt_templates
instead.EDIT:
Useprompt_path
argument, previously introduced but not used.Remove unusedprompts_path
argument.This argument was introduced (but not used) in:
Or maybe you wanted to use it somehow? @aymeric-roucher