refac: remove iosession as required
This commit is contained in:
parent
43e79e2c90
commit
66e4b33b7c
1 changed files with 9 additions and 3 deletions
|
|
@ -86,7 +86,7 @@ def get_tool_signature(name: str):
|
||||||
type_dict = {
|
type_dict = {
|
||||||
"str": {
|
"str": {
|
||||||
"type": "str",
|
"type": "str",
|
||||||
"required": False,
|
"required": True,
|
||||||
"list": False,
|
"list": False,
|
||||||
"show": True,
|
"show": True,
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
|
|
@ -111,9 +111,15 @@ def get_tool_signature(name: str):
|
||||||
params = []
|
params = []
|
||||||
|
|
||||||
template = {
|
template = {
|
||||||
param: (type_dict[param] if param == "llm" else type_dict["str"])
|
param: (type_dict[param].copy() if param == "llm" else type_dict["str"].copy())
|
||||||
for param in params
|
for param in params
|
||||||
} # type: Dict[str, Any]
|
}
|
||||||
|
|
||||||
|
# Remove required from aiosession
|
||||||
|
if "aiosession" in template.keys():
|
||||||
|
template["aiosession"]["required"] = False
|
||||||
|
template["aiosession"]["show"] = False
|
||||||
|
|
||||||
template["_type"] = tool_type
|
template["_type"] = tool_type
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue