Evan Curtin

04/21/2023, 1:48 PM
Hey y’all, just started using the UI. Loving the pydantic integration. I have a few questions/feedback. Apologies if these have already been discussed. • Long text: I have an input (Prompt template for a Large language model) and the input box is only suitable for short text, is there a way to make the text box larger (say, to fit a paragraph or 2 worth of text?) • Lists - one parameter is a
and the UI is a bit confusing, Ideally for me it would be individual
rows, with the ability to
and add more / delete • Nesting: I have structs that are somewhat nested 3/4 levels, it looks like after a few levels it just gives up and prompts me for JSON, this is ok, but it means I have to lookup the schema of the fields in the codebase, is there a workaround, or even a way to get a popup showing which fields are expected?


04/21/2023, 8:28 PM
Hey @Evan Curtin! • I'm don't think there's a way to expand the text box in the UI, but would it be possible to define something like a jinja template in your code so that the flow just accepts a
of values that you'd want to render in the template? also, just to be clear, are you asking about flow run parameters here? • thanks for the feedback here! • would you be open to defining a Pydantic model for the nested structure? that way you could do something like
from pydantic import BaseModel

from prefect import flow

class Level3Model(BaseModel):
    some_str: str
    some_int: int

class Level2Model(BaseModel):
    level3: Level3Model
class ParentModel(BaseModel):
    level2: Level2Model    

def accepts_nested_model(model: ParentModel):
if __name__ == "__main__":
            "level2": {
                "level3": {
                    "some_str": "hello",
                    "some_int": 42
also because you mentioned LLM templates, small plug for our recently open-sourced lib for interacting with LLMs if you're interested in a high-level library 🙂