Skip to content

How to accept optional parameters #23

@dashesy

Description

@dashesy

I want the endpoint to get 2 keys, 1 being optional. e.g.

@input_schema('b64', StandardPythonParameterType("base64_encoded_image"), convert_to_provided_type=False)
@input_schema('url', StandardPythonParameterType("image url"), convert_to_provided_type=False)
@output_schema(StandardPythonParameterType(output_sample))
def run(b64, url):
    pass

I still have to pass both inputs. And if I change this to

@input_schema('b64', StandardPythonParameterType("base64_encoded_image"), convert_to_provided_type=False)
@input_schema('url', StandardPythonParameterType("image url"), convert_to_provided_type=False)
@output_schema(StandardPythonParameterType(output_sample))
def run(b64="", url=""):
    pass

Local instance works as expected (Both parameters become optional). But if I deploy to Aci then both parameters will be always empty! They will not get values

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions