Skip to content

Commit c82ad34

Browse files
authored
Fix typos in agent and interoperability modules (#723)
* fix typo web_surfer.py * fix typo agent_builder.py * fix typos interoperability.py * fix typos agent_optimizer.py
1 parent f9c8bc4 commit c82ad34

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

autogen/agentchat/contrib/agent_optimizer.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def reset_optimizer(self):
330330

331331
def _update_function_call(self, incumbent_functions, actions):
332332
"""Update function call."""
333-
formated_actions = []
333+
formatted_actions = []
334334
for action in actions:
335335
func = json.loads(action.function.arguments.strip('"'))
336336
func["action_name"] = action.function.name
@@ -349,8 +349,8 @@ def _update_function_call(self, incumbent_functions, actions):
349349
"packages": func.get("packages"),
350350
"code": func.get("code"),
351351
}
352-
formated_actions.append(item)
353-
actions = formated_actions
352+
formatted_actions.append(item)
353+
actions = formatted_actions
354354

355355
for action in actions:
356356
name, description, arguments, packages, code, action_name = (

autogen/agentchat/contrib/captainagent/agent_builder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def build_from_library(
523523
"""
524524
import sqlite3
525525

526-
# Some system will have an unexcepted sqlite3 version.
526+
# Some system will have an unexpected sqlite3 version.
527527
# Check if the user has installed pysqlite3.
528528
if int(sqlite3.version.split(".")[0]) < 3:
529529
try:

autogen/agentchat/contrib/web_surfer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def _navigational_search(query: Annotated[str, "The navigational web search quer
164164
@self._assistant.register_for_llm(
165165
name="visit_page", description="Visit a webpage at a given URL and return its text."
166166
)
167-
def _visit_page(url: Annotated[str, "The relative or absolute url of the webapge to visit."]) -> str:
167+
def _visit_page(url: Annotated[str, "The relative or absolute url of the webpage to visit."]) -> str:
168168
self.browser.visit_page(url)
169169
header, content = _browser_state()
170170
return header.strip() + "\n=======================\n" + content

autogen/interop/interoperability.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def get_interoperability_class(cls, type: str) -> type[Interoperable]:
5454
"""
5555
supported_types = cls.registry.get_supported_types()
5656
if type not in supported_types:
57-
supported_types_formated = ", ".join(["'t'" for t in supported_types])
57+
supported_types_formatted = ", ".join(["'t'" for t in supported_types])
5858
raise ValueError(
59-
f"Interoperability class {type} is not supported, supported types: {supported_types_formated}"
59+
f"Interoperability class {type} is not supported, supported types: {supported_types_formatted}"
6060
)
6161

6262
return cls.registry.get_class(type)

0 commit comments

Comments
 (0)