mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-05 14:55:18 +02:00
logging
This commit is contained in:
parent
540542834e
commit
0f245f530e
2 changed files with 2 additions and 3 deletions
|
|
@ -44,7 +44,7 @@ def docstring_to_schema(docstring: str):
|
|||
# variable_pattern = re.compile(r"(\w+)\s*\((.*?)\):\s*(.*)")
|
||||
variable_pattern = re.compile(
|
||||
r"(\w+)\s*\((.*?)\):\s*(.*?)(?=\n\s*\w+\s*\(|\Z)", re.DOTALL
|
||||
) # (?=\n\w+\s*\(|\Z) isb to assert that what follows is either the start of the next parameter (indicated by a newline, some word characters, and an opening parenthesis) or the end of the string (\Z).
|
||||
) # (?=\n\w+\s*\(|\Z) is to assert that what follows is either the start of the next parameter (indicated by a newline, some word characters, and an opening parenthesis) or the end of the string (\Z).
|
||||
|
||||
params = variable_pattern.findall(_args)
|
||||
parameter_schema = {"properties": {}, "required": []}
|
||||
|
|
|
|||
|
|
@ -137,8 +137,7 @@ def make_schema(tool_source_object, include, path):
|
|||
logger.info(f"schema made at {path}")
|
||||
except Exception as e:
|
||||
schema = {}
|
||||
logger.error("Fail to make schema")
|
||||
print(e)
|
||||
logger.error(f"Fail to make schema: {e}")
|
||||
|
||||
return schema
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue