fallback_template = { | |
"function_name": "deployable_function", | |
"function_code": """def your_function_name(): | |
def score(input_data): | |
original_string = input_data.get("input_data")[0].get("values")[0][0] | |
append_string = input_data.get("input_data")[0].get("values")[0][1] | |
hello_world_message = "Hello World + {0}".format(original_string) | |
concatenated_string = original_string + append_string | |
score_response = { | |
'predictions': [{'fields': ['Response_message_field', 'Random_appended_string'], | |
'values': [[hello_world_message, concatenated_string]] | |
}] | |
} | |
return score_response | |
return score""", | |
"use_cases": ["add_tags"], | |
"input_schema": [ | |
{ | |
"id": "1", | |
"type": "struct", | |
"fields": [ | |
{ | |
"name": "<variable name 1>", | |
"type": "string", | |
"nullable": False, | |
"metadata": {}, | |
}, | |
{ | |
"name": "<variable name 2>", | |
"type": "string", | |
"nullable": False, | |
"metadata": {}, | |
}, | |
], | |
} | |
], | |
"output_schema": [ | |
{ | |
"id": "1", | |
"type": "struct", | |
"fields": [ | |
{ | |
"name": "<output return name>", | |
"type": "string", | |
"nullable": False, | |
"metadata": {}, | |
} | |
], | |
} | |
], | |
"dependencies": ["<library_to_add>"], | |
} | |