ancient-wolf-19325
06/20/2024, 6:37 AMfrom flytekit import workflow, task
from flytekit.types.schema import FlyteSchema
@task
def example_task(color: str) -> str:
return f"Selected color is {color}"
@workflow
def example_workflow(color: str) -> str:
return example_task(color=color)
example_workflow.add_input("color", str, default='green', options=['green', 'blue', 'orange'])
Would you like more detail on this or other related features?
Sources:
- GitHub Issue: Support "Enum/Options" type as Flyte Input
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1718865437.745509 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.