Replies: 2 comments 4 replies
-
@16oeahr Please help take a look at this, thanks. |
Beta Was this translation helpful? Give feedback.
4 replies
-
Thanks a lot!
It solves the problem.
I actually did use the tool to generate the initial package.
I would expect the type inheritance to be resolved by reflection when
connection types are registered vs explicitly configuring custom_type/type.
…On Mon, 12 Aug 2024 at 03:43, Yao ***@***.***> wrote:
@amichel <https://github.com/amichel> Thanks for sharing the information.
The problem lies in your package tool yaml file. The connection is not
correctly written. Please pay attention to the part in bold.
test_tools.tools.test_connection.validate:
function: validate
inputs:
**connection:
custom_type:
- TestConnection
type:
- CustomConnection**
module: test_tools.tools.test_connection
name: Test Connection Validate
description: Validate a custom strong typed connection
type: python
I am afraid current tutorial does not highlight this special config in
yaml for custom strong type connection. But you can use the script in this
guide
<https://microsoft.github.io/promptflow/how-to-guides/develop-a-tool/create-and-use-tool-package.html#:~:text=hello_world/yamls/hello_world_tool.yaml%3A%20Tool%20YAMLs%20defines%20the%20metadata%20of%20the%20tool.%20The%20tool%20list%20method%2C%20as%20outlined%20in%20the%20utils.py%2C%20fetches%20these%20tool%20YAMLs.>
to auto generate the tool yaml.
—
Reply to this email directly, view it on GitHub
<#3629 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM5BYZW3HO5LQSIMF57OYLZRBRQ3AVCNFSM6AAAAABMFNMYGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZRGA4TANQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to create a custom connection following this example:
After building and importing the tools package, I am able to create the connection from yaml that points to the tools package/module and it also works fine from a script tool, but exactly same tool method does not work when built as part of the tools package as in the above example.
I get the following exception:
I tried to work around this by calling register_connections(MyCustomConnection) inside the tool module but then I got another exception:
Any ideas welcome
Beta Was this translation helpful? Give feedback.
All reactions