🐛 fix(agents.py): change type annotation of name parameter in format_field method to Optional[str] for better clarity
The type annotation of the name parameter in the format_field method has been changed to Optional[str] to indicate that it can be either a string or None. This change improves the clarity of the code and makes it easier to understand the expected input for the method.
This commit is contained in:
parent
7645e24796
commit
8cba8514c4
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ NON_CHAT_AGENTS = {
|
|||
|
||||
class AgentFrontendNode(FrontendNode):
|
||||
@staticmethod
|
||||
def format_field(field: TemplateField, name: str | None = None) -> None:
|
||||
def format_field(field: TemplateField, name: Optional[str] = None) -> None:
|
||||
if field.name in ["suffix", "prefix"]:
|
||||
field.show = True
|
||||
if field.name == "Tools" and name == "ZeroShotAgent":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue