microsoft / promptflow

Build high-quality LLM apps - from prototyping, testing to production deployment and monitoring.
https://microsoft.github.io/promptflow/
MIT License
9.55k stars 872 forks source link

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

Closed anuar12 closed 4 weeks ago

anuar12 commented 2 months ago

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.

github-actions[bot] commented 1 month ago

Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you!