<@U06RKAMK0UC> I would like to specify a string-li...
# ask-ai
s
@ancient-wolf-19325 I would like to specify a string-literal for a task parameter, but it seems that this is not supported as these get serialized as pickle-files:
Copy code
from typing import Literal

@task
def my_task(my_spec: Literal["foo", "bar"]):
    print(f"Hello {my_spec}")
j
The Flyte's documentation I have ingested does not mention how to specify a string-literal for a task parameter, as these get serialized as pickle-files. You might want to provide more context on the specific use case or any error messages you are encountering. If this doesn't help, please reach out to the Flyte support team for further assistance. πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
By the way, I found these links that might be relevant to what you're looking for. Let me know if this helps: - [Flyte Documentation](https://docs.flyte.org/en/latest/) - [Flyte GitHub Repository](https://github.com/flyteorg/flyte)
f
We don’t support string literal as is, it will be picked unless you use enum
We will add support for literal - good idea
s
Nice. I added a feature request for it already πŸ™‚