Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds deployed prompt endpoint functionality #249

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

modcarroll
Copy link

  • 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
Copy link
Author

@jwm4 fyi

@theisen1337
Copy link

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.

Copy link

@theisen1337 theisen1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actions json does not work as intended on load in to Watson X assistant. For deployed models in WatsonX AI.

Variable is not correctly set and thus the condition that relies on the variable always fails.

"skill_variable": "model_parameters_max_new_tokens"
},
"parameter": "parameters.max_new_tokens"
"variable": "step_817_result_2",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work in Invoke Watson Deployment prompt API and shows up as missing variable in Invoke watsonx Generation API

image

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tried it out yet, but that typically happens when the actions.json file was exported from an older version of the openapi spec. So @modcarroll , I would recommend that you set this up again with the latest openapi spec and then re-do the export of the actions.json file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I fixed this issue - can you check the latest commit and check again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants