mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 20:56:03 +08:00
Co-authored-by: Peter Xin <iami@Artemis.local>
This commit is contained in:
parent
b4b59148dc
commit
8025ad0661
@ -55,6 +55,13 @@ class ApiBasedToolSchemaParser:
|
|||||||
# convert parameters
|
# convert parameters
|
||||||
parameters = []
|
parameters = []
|
||||||
if "parameters" in interface["operation"]:
|
if "parameters" in interface["operation"]:
|
||||||
|
for i, parameter in enumerate(interface["operation"]["parameters"]):
|
||||||
|
if "$ref" in parameter:
|
||||||
|
root = openapi
|
||||||
|
reference = parameter["$ref"].split("/")[1:]
|
||||||
|
for ref in reference:
|
||||||
|
root = root[ref]
|
||||||
|
interface["operation"]["parameters"][i] = root
|
||||||
for parameter in interface["operation"]["parameters"]:
|
for parameter in interface["operation"]["parameters"]:
|
||||||
tool_parameter = ToolParameter(
|
tool_parameter = ToolParameter(
|
||||||
name=parameter["name"],
|
name=parameter["name"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user