assistant-toolkit icon indicating copy to clipboard operation
assistant-toolkit copied to clipboard

adds deployed prompt endpoint functionality

Open modcarroll opened this issue 1 year ago • 2 comments

  • Adds the ...deployments/{deployment-id}/generation/text endpoing to the openAPI file in order to use deployed prompts
  • Adds an example for calling this endpoint to the action

modcarroll avatar Feb 19 '24 18:02 modcarroll

@jwm4 fyi

modcarroll avatar Feb 19 '24 18:02 modcarroll

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.

theisen1337 avatar Feb 27 '24 21:02 theisen1337