Skip to content

Commit b670511

Browse files
clean codes notes for autogen-core. (#6218)
Signed-off-by: zhanluxianshen <[email protected]> Co-authored-by: Eric Zhu <[email protected]>
1 parent b24df29 commit b670511

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

python/packages/autogen-core/src/autogen_core/_constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ROOT_LOGGER_NAME = "autogen_core"
2-
"""str: Logger name used for structured event logging"""
2+
"""str: Logger name used for root logger"""
33

44
EVENT_LOGGER_NAME = "autogen_core.events"
55
"""str: Logger name used for structured event logging"""

python/packages/autogen-core/src/autogen_core/_function_utils.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_required_params(typed_signature: inspect.Signature) -> List[str]:
155155
"""Get the required parameters of a function
156156
157157
Args:
158-
signature: The signature of the function as returned by inspect.signature
158+
typed_signature: The signature of the function as returned by inspect.signature
159159
160160
Returns:
161161
A list of the required parameters of the function
@@ -167,7 +167,7 @@ def get_default_values(typed_signature: inspect.Signature) -> Dict[str, Any]:
167167
"""Get default values of parameters of a function
168168
169169
Args:
170-
signature: The signature of the function as returned by inspect.signature
170+
typed_signature: The signature of the function as returned by inspect.signature
171171
172172
Returns:
173173
A dictionary of the default values of the parameters of the function
@@ -184,7 +184,8 @@ def get_parameters(
184184
185185
Args:
186186
required: The required parameters of the function
187-
hints: The type hints of the function as returned by typing.get_type_hints
187+
param_annotations: A dictionary of the type annotations of the parameters of the function
188+
default_values: The default values of the parameters of the function
188189
189190
Returns:
190191
A Pydantic model for the parameters of the function

python/packages/autogen-core/src/autogen_core/_routed_agent.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def decorator(
123123
raise AssertionError("message parameter not found in function signature")
124124

125125
if "return" not in type_hints:
126-
raise AssertionError("return not found in function signature")
126+
raise AssertionError("return parameter not found in function signature")
127127

128128
# Get the type of the message parameter
129129
target_types = get_types(type_hints["message"])
@@ -243,7 +243,7 @@ def decorator(
243243
raise AssertionError("message parameter not found in function signature")
244244

245245
if "return" not in type_hints:
246-
raise AssertionError("return not found in function signature")
246+
raise AssertionError("return parameter not found in function signature")
247247

248248
# Get the type of the message parameter
249249
target_types = get_types(type_hints["message"])
@@ -363,7 +363,7 @@ def decorator(
363363
raise AssertionError("message parameter not found in function signature")
364364

365365
if "return" not in type_hints:
366-
raise AssertionError("return not found in function signature")
366+
raise AssertionError("return parameter not found in function signature")
367367

368368
# Get the type of the message parameter
369369
target_types = get_types(type_hints["message"])

python/packages/autogen-core/src/autogen_core/logging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __init__(
113113
completion_tokens: int,
114114
**kwargs: Any,
115115
) -> None:
116-
"""To be used by model to log the call to the LLM.
116+
"""To be used by model clients to log the end of a stream.
117117
118118
Args:
119119
response (Dict[str, Any]): The response of the call. Must be json serializable.

0 commit comments

Comments
 (0)