gr-workflow-concept-e-multi-endpoint / e_multi_endpoint_api.json
ysharma's picture
ysharma HF Staff
Deploy gr.Workflow example
d058923 verified
Raw
History Blame Contribute Delete
3.94 kB
{
"schema_version": "2",
"name": "Two Endpoints",
"references": [
{
"id": "ref_text",
"role": "reference",
"label": "Text",
"asset_type": "text",
"inputs": [
{
"id": "in",
"label": "Text",
"type": "text"
}
],
"outputs": [
{
"id": "out",
"label": "Text",
"type": "text"
}
],
"data": {
"out": "hello there friend"
},
"x": 60,
"y": 60,
"width": 200,
"height": 90
},
{
"id": "ref_c",
"role": "reference",
"label": "Celsius",
"asset_type": "number",
"inputs": [
{
"id": "in",
"label": "Celsius",
"type": "number"
}
],
"outputs": [
{
"id": "out",
"label": "Celsius",
"type": "number"
}
],
"data": {
"out": 20
},
"x": 60,
"y": 260,
"width": 200,
"height": 90
}
],
"operators": [
{
"id": "op_wc",
"role": "operator",
"kind": "fn",
"fn": "word_count",
"label": "word_count",
"inputs": [
{
"id": "in_0",
"label": "input",
"type": "text",
"required": true
}
],
"outputs": [
{
"id": "out_0",
"label": "output",
"type": "number"
}
],
"data": {},
"x": 320,
"y": 60,
"width": 200,
"height": 90
},
{
"id": "op_f",
"role": "operator",
"kind": "fn",
"fn": "to_fahrenheit",
"label": "to_fahrenheit",
"inputs": [
{
"id": "in_0",
"label": "input",
"type": "number",
"required": true
}
],
"outputs": [
{
"id": "out_0",
"label": "output",
"type": "number"
}
],
"data": {},
"x": 320,
"y": 260,
"width": 200,
"height": 90
}
],
"subjects": [
{
"id": "sub_wc",
"role": "subject",
"label": "Word count",
"asset_type": "number",
"inputs": [
{
"id": "in",
"label": "Word count",
"type": "number"
}
],
"outputs": [
{
"id": "out",
"label": "Word count",
"type": "number"
}
],
"data": {},
"x": 580,
"y": 60,
"width": 200,
"height": 120
},
{
"id": "sub_f",
"role": "subject",
"label": "Fahrenheit",
"asset_type": "number",
"inputs": [
{
"id": "in",
"label": "Fahrenheit",
"type": "number"
}
],
"outputs": [
{
"id": "out",
"label": "Fahrenheit",
"type": "number"
}
],
"data": {},
"x": 580,
"y": 260,
"width": 200,
"height": 120
}
],
"edges": [
{
"id": "e1",
"from_node_id": "ref_text",
"from_port_id": "out",
"to_node_id": "op_wc",
"to_port_id": "in_0",
"type": "text"
},
{
"id": "e2",
"from_node_id": "op_wc",
"from_port_id": "out_0",
"to_node_id": "sub_wc",
"to_port_id": "in",
"type": "number"
},
{
"id": "e3",
"from_node_id": "ref_c",
"from_port_id": "out",
"to_node_id": "op_f",
"to_port_id": "in_0",
"type": "number"
},
{
"id": "e4",
"from_node_id": "op_f",
"from_port_id": "out_0",
"to_node_id": "sub_f",
"to_port_id": "in",
"type": "number"
}
]
}