watson-developer-cloud / assistant-toolkit

Toolkit for experimentation with watsonx Assistant
Apache License 2.0
108 stars 117 forks source link

adds deployed prompt endpoint functionality #249

Open modcarroll opened 4 months ago

modcarroll commented 4 months ago
modcarroll commented 4 months ago

@jwm4 fyi

theisen1337 commented 4 months ago

The deployment OpenAPI json works great. But the actions did not work out of the box. Both actions Invoke watsonx deployed prompt API, and Invoke watsonx generation API did not have the extension hooked in. image

I had to manually add the action hook for the integration and model_input, deployment_id, watson_api_version.

image

Invoke watsonx Generation API is also referencing the incorrect variables. image

Invoke watsonx deployed prompt API is referencing ran_successful but that variable is not set, or not set correctly. removing that condition fixed the issue.

"variable": "step_606",
            "condition": {
              "and": [
                {
                  "eq": [
                    {
                      "variable": "step_817_result_2",
                      "variable_path": "success"
                    },
                    {
                      "scalar": true
                    }
                  ]
                },
                {
                  "expression": "${step_817_result_2.body.results}.size() > 0"
                }
              ]
            },

Removing the condition for step_817_result_2 in the actions json. fixed the issue. updated json:

"variable": "step_606",
            "condition": {
              "expression": "${step_817_result_2.body.results}.size() > 0"
            },

Maybe The actions json should be updated to reflected this change, and the README should include hooking up the extension inside of the action in the UI, As it stands when trying to export the extension action json does not include that connection.