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

Provider failed to return /conversational_skills #316

Open
nheidloff opened this issue Nov 29, 2024 · 4 comments
Open

Provider failed to return /conversational_skills #316

nheidloff opened this issue Nov 29, 2024 · 4 comments
Assignees

Comments

@nheidloff
Copy link

Hi, I've followed these instructions: https://github.com/watson-developer-cloud/assistant-toolkit/tree/master/conversational-skills/procode-skill-sdk-js

I've deployed the code to Code Engine, registered the provider and get registered providers when running GET /v2/providers.

In the UI "Skill-based" action option. When trying to create an action I get the error: "Provider failed to return /conversational_skills". I've tried Dallas and FRA.

Screenshot 2024-11-29 at 07 46 56

Could you please help?
Thanks

@nheidloff
Copy link
Author

nheidloff commented Nov 29, 2024

Logs:

Nov 29 09:50:04 Code Engine niklas-conversational-00001-deployment-xxx
Nov 29 09:50:04 Code Engine niklas-conversational-00001-deployment-xxx > [email protected] start
Nov 29 09:50:04 Code Engine niklas-conversational-00001-deployment-xxx > node src/mock-server/app.js
Nov 29 09:50:04 Code Engine niklas-conversational-00001-deployment-xxx
Nov 29 09:50:04 Code Engine niklas-conversational-00001-deployment-xxx (node:19) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
Nov 29 09:50:04 Code Engine niklas-conversational-00001-deployment-xxx (Use node --trace-warnings ... to show where the warning was created)
Nov 29 09:50:04 Code Engine niklas-conversational-00001-deployment-xxx App available at http://localhost:4000
Nov 29 09:52:21 Code Engine niklas-conversational-00001-deployment-xxx npm error path /usr/src/app
Nov 29 09:52:21 Code Engine niklas-conversational-00001-deployment-xxx npm error command failed
Nov 29 09:52:21 Code Engine niklas-conversational-00001-deployment-xxx npm error signal SIGTERM
Nov 29 09:52:21 Code Engine niklas-conversational-00001-deployment-xxx npm error command sh -c node src/mock-server/app.js
Nov 29 09:52:21 Code Engine niklas-conversational-00001-deployment-xxx npm error A complete log of this run can be found in: /root/.npm/_logs/2024-11-29T08_50_04_241Z-debug-0.log

Running locally:

niklasheidloff@MBP-von-Niklas procode-skill-sdk-js % podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a8952cace229 localhost/niklas-conversational:latest npm start 5 minutes ago Up 5 minutes 0.0.0.0:8080->8080/tcp, 8080/tcp niklas-conversational
niklasheidloff@MBP-von-Niklas procode-skill-sdk-js % curl -X GET localhost:8080/providers/:provider_id/conversational_skills
{"conversational_skills":[{"id":"7a161635-fc8b-420b-8112-dbd742131390","name":"Example","description":"sample bluepoints","created":"2024-11-29T09:33:28.559Z","modified":"2024-11-29T09:33:28.559Z","metadata":{"last_modified_by":"[email protected]"}}]}%

Via curl:

niklasheidloff@MBP-von-Niklas procode-skill-sdk-js % curl -X GET 'https://api.us-south.assistant.watson.cloud.ibm.com/instances/xxx/v2/providers?version=2021-11-27'
-u "apikey:xxx"
--header 'Content-Type: application/json'
{"conversational_skill_providers":[{"provider_id":"niklas-myProCodeProvider","specification":{"servers":[{"url":"https://conversational.xxx.eu-de.codeengine.appdomain.cloud/"}],"components":{"securitySchemes":{"basic":{"username":{"type":"value","value":"myBasicUserName"}},"authentication_method":"basic"}}}}],"pagination":{"refresh_url":"/v2/providers?version=2021-11-27"}}

niklasheidloff@MBP-von-Niklas procode-skill-sdk-js % curl -X POST 'https://api.us-south.assistant.watson.cloud.ibm.com/instances/xxx/v2/assistants/xxx/skills/7a161635-fc8b-420b-8112-dbd742131390?version=2021-11-27' \
-u "apikey:xxx"
--header 'Content-Type: application/json'
--data '{
}'
{"error":"Resource not found","code":404}

@yuqiuli2 yuqiuli2 self-assigned this Dec 10, 2024
@yuqiuli2
Copy link
Contributor

Will take a look

@nheidloff
Copy link
Author

Hi YuQiu, is there an update?

@yuqiuli2
Copy link
Contributor

Hey Niklas, apologies for the delay. This is what I see in our backend logs matching that transactionID

{"level":"ERROR","time":"2024-11-29T06:46:49.082Z","name":"http-call-wrapper","api":"callout execution","status":404,"request_method":"GET","request_uri":"https://conversational..../providers/niklas-myProCodeProvider/conversational_skills","integration_id":"55c31983-faec-4097-9226-6dc5e20e03cc","message":"unsuccessfully received response from undefined","timings_ms":{"get-redis-integrations-config":{"elapsedTime":5.468357},"integration-get-instance":{"elapsedTime":107},"update-redis-integrations-config":{"elapsedTime":9.750035}}}

and

{"level":"ERROR","time":"2024-11-29T06:46:49.082Z","name":"http","status":404,"request_method":"GET","request_uri":"https://conversational..../providers/niklas-myProCodeProvider/conversational_skills","integration_id":"55c31983-faec-4097-9226-6dc5e20e03cc","message":"http transaction failed for outgoing-traffic, with message: Unexpected token '<', \"<!DOCTYPE \"... is not valid JSON","timings_ms":{"get-redis-integrations-config":{"elapsedTime":5.468357},"integration-get-instance":{"elapsedTime":107},"update-redis-integrations-config":{"elapsedTime":9.750035}}}

Seems like the response that is being returned is not JSON, hence the 503. Could you do one thing for me?

Can you construct the curl for your pro-code provider, and then try hitting it from your local machine

Something like:

niklasheidloff@MBP-von-Niklas procode-skill-sdk-js % curl -X GET https://conversational..../providers/niklas-myProCodeProvider/conversational_skills
--header  'Authorization: Basic XXXXXXXX ' \ <-- your constructed basic auth
--header 'Content-Type: application/json' 

Thanks

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

No branches or pull requests

2 participants