TaskWeaver icon indicating copy to clipboard operation
TaskWeaver copied to clipboard

Plugin Reuse

Open dcieslak19973 opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. This is more of a question - suppose we want users to be able to query multiple databases and we're happy with the implementation of project/plugins/sql_pull_data.py - can we have multiple instances of project/plugins/sql_pull_data.yaml each with a different description and value of sqlite_db_path ? If so, it's not entirely clear from the documentation how to properly configure this.

Describe the solution you'd like Either support for above or improved documentation that specifies how this can already be acheived.

Describe alternatives you've considered Would hate to have to duplicate sql_pull_data.py in this example. Not entirely clear how the YAML files relate to the python files, aside from the default convention where the python and yaml have the same names.

Additional context N/A

dcieslak19973 avatar Jan 17 '24 16:01 dcieslak19973

Hi @dcieslak19973, we have supported this feature. You can create a second yaml file and then add a field named code. The value should be your plugin code name, for example, sql_pull_data in this example. More details can be referred by scolling down to the page We will improve the document to make it more clear.

ShilinHe avatar Jan 18 '24 07:01 ShilinHe