promptflow icon indicating copy to clipboard operation
promptflow copied to clipboard

[Feature Request] Allow for complex/nested types of flow inputs

Open anuar12 opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. I want to pass nested type like dict[str, dict[str, list]] to ChatFlow.__init__(vector_store: dict[str, dict[str, list]]) but I get an error below:

pf.flow.test failed with GenerateFlowMetaJsonError: Generate meta failed, detail error:
["Parse interface for tool 'ChatFlow.__call__' failed: The input 'vector_store' is of a complex python type. Please use a dict instead."]

Why is it not allowed to pass complex types? In my case the dict has fixed keys, so it can be a TypedDict.

Describe the solution you'd like Be able to pass anything at least to the __init__() or ideally to the __call__() too.

Describe alternatives you've considered The ugly alternative for me is to break down each (key, value) of the dict into multiple input arguments... Alternatively, I have to make the vector_store to be a callable service or loadable from disk, i.e. pass the url or path to the vector store...

Additional context Add any other context or screenshots about the feature request here.

anuar12 avatar Sep 20 '24 05:09 anuar12