GraphQL
GraphQL工具规范 #
基类:EventBaseToolSpec
请求工具。
workflows/handler.py 中的源代码llama_index/tools/graphql/base.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
graphql_request #
graphql_request(query: str, variables: str, operation_name: str)
使用此工具对服务器执行 GraphQL 查询。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
query
|
str
|
要执行的 GraphQL 查询 |
required |
variables
|
str
|
查询的变量值 |
required |
operation_name
|
str
|
查询的名称 |
required |
示例输入
"query":"query 飞船 {\n 飞船 {\n 标识\n 型号\n 名称\n 类型\n 状态\n }\n}", "variables":{}, "operation_name":"飞船"
workflows/handler.py 中的源代码llama_index/tools/graphql/base.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
选项: 成员:- GraphQLToolSpec