Code Monkey home page Code Monkey logo

Comments (17)

Naktibalda avatar Naktibalda commented on June 1, 2024

According to https://github.com/ibm-cloud-docs/watson/blob/master/endpoints-change.md

The watsonplatform.net endpoint URLs were retired on 26 May 2021. Update your API calls to use new URLs.

You can find instructions how to find correct endpoint at https://cloud.ibm.com/apidocs/assistant-v1#endpoint-cloud

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

Maybe I am not looking in the right spot for the endpoints as well as API credentials
When I open up Watson Assistance and then click on settings I do not see a URL that links to a workspace nor can I find a workspace ID that matches what it requests in the middleware's .env files
ASSISTANT_URL=https://api.us-south.assistant.watson.cloud.ibm.com/instances/Imyinstanceid}/v2/assistants/(environmentid)/sessions
ASSISTANT_IAM_APIKEY=theapikey I am getting from the screenshot
WORKSPACE_ID=assistant id
image

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

I think the main issue from what I can gather is that the middleware was written with Watson Assistant version 1 and I see no way of reverting the Assistant from version 2 back to version 1. I can switch to classic experience in the IBM Cloud Manager however the Get API Details that used to be in skills is no longer there so I see no way of getting a workspace_ID that is being required for the middleware authentication.

from botkit-middleware.

Naktibalda avatar Naktibalda commented on June 1, 2024

Sorry, I can't help with that, I haven't used this library or Watson Assistant since April 2021.

from botkit-middleware.

pgoldweic avatar pgoldweic commented on June 1, 2024

@Mattw11486 and @Naktibalda , while I'm not sure this will answer your question, I thought I should mention a few details I'm aware of:

  • You should be able to use Watson Assistant V1 API in parallel with your use of the V2 API (IBM has claimed this for a long time, explaining that the v1 API is still around until v2 offers similar functionality level. As far as I understand, V1 is the only one that gives you direct access to a skill though. It's also the one I've been using since 2018 in my bots)
  • Having said the above, I'm not sure yet how to use V1 with an actual assistant instance (My old bots still use no 'assistant' instance, requiring an orchestration engine, which is mainly what I use botkit for, and then I connect to the skill using V1). I'm afraid that there might be no way to connect to V1 from within an assistant unless somebody upgrades the botkit-middleware module. If somebody is willing to do this, I'd suggest that there should be an option to use either V1 or V2 within the middleware (so as not to disrupt existent bots that depend on V1, for example).
    Disclaimer: I have not tried to do what you have done, as I'm yet to create a 'new' Watson Assistant instance and changing to the 'classic' experience - and hope that I can still connect via V1 to my skills. I'm hoping to experiment with this soon, but I haven't had the chance yet.

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

@pgoldweic I suspected this might be the issue as when I go into the source files for the middleware it only lists V1. When I go to the IBM Watson Assistant dashboard, I converted the bot to 'Classic Experience' Which seems to convert the bot to v1. However I still do not see a workspace ID listed when I click on a skill and select API details.

Do you currently have Watson working for botkit? Are you able to provide a guide?

from botkit-middleware.

pgoldweic avatar pgoldweic commented on June 1, 2024

Hi @Mattw11486 , while I still have Watson working for botkit, I am still using a Watson Assistant instance created a long time ago (when 'standard' was an option at the time of instance creation, which it has not been for a while now). Having said that, I plan to create a new instance in the next weeks for testing purposes. I'm not sure how soon I'll get to this though, but it's definitely in my plans. Then I'd be able to confirm (or hopefully not), what you're saying about the 'classic' experience and not being able to see the workspace id. However, in the meantime, I suggest you post in the Watson Community forum and try to get IBM to answer this. Since they claim that you should be able to use apis V1 and V2 side by side to each other, there has to be a way to obtain the workspace id that you need. If not, they would have to do something about it (which is why I think you should definitely post). There might be a simple answer to your question there actually (let's all hope so). Another thing: the kind of 'experience' you use in Watson should be independent of whether you can access APIs v1 or v2.

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

Yeah I submitted a post on the Watson Community a few days ago but unfortunately no response back yet.

from botkit-middleware.

pgoldweic avatar pgoldweic commented on June 1, 2024

@Mattw11486 , I'm wondering if the response you got yesterday worked for you (from the community forum). Would be good to know. BTW, I also wanted to mention that I was able to create a new skill in the new classic experience (new Watson Assistant instance, lite plan) to which I imported a json file for a skill that I had working in my old instance - reduced to 100 intents-, and I was able to see the regular 'View Details' with the workspace id information once it was uploaded. I believe that I had not been able to see the API details - just like you reported- for new skills that I created before successfully importing the old skill. Then, after this successful import, all the skills I create appear to display the 'View Details'.

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

I will try the steps tonight or whenever I get a chance to look at it. Been swamped at work this week. I might try downloading the json file and see if it provides what I need

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

Looks like its going to be a no go even with downloading the .json file I don't see a workspace ID and in skills view api details I just see a skill ID nothing of which works when trying to integrate it with the botkit middleware

from botkit-middleware.

pgoldweic avatar pgoldweic commented on June 1, 2024

skill id is what you need for integration @Mattw11486

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

When I use the skill ID it gives me the 404 error still
image

image

from botkit-middleware.

pgoldweic avatar pgoldweic commented on June 1, 2024

Hi @Mattw11486 , it's hard for me to understand the nature of the error you are describing. Perhaps if you share more of the stack trace that might help. BTW, I see that you are using Slack and I'm not familiar with using the Slack adapter (I've used the web adapter). I wonder if the error might be related to this adapter in particular? (I'm not seeing any mention of such adapter in the code you shared though).

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

Here is the stack trace not sure if this provides any more clarity
I also have the web adapter hooked up to this bot as well
image

from botkit-middleware.

pgoldweic avatar pgoldweic commented on June 1, 2024

Just to clarify, you said you have the web adapter working for it too. Does it work? If so, this would be clearly a slack-adapter related problem then (which I'm afraid I can't say much about - hopefully others that work with it can help!).
Also for my own understanding, you are now using the V1 API for Watson, and NOT using a Watson assistant instance, correct? (as you know by know, this middleware only works with V1, and this pretty much forces one not to use an actual Assistant instance but the skills directly to communicate with botkit)

from botkit-middleware.

Mattw11486 avatar Mattw11486 commented on June 1, 2024

Strangely enough, I started completely from scratch and now it seems to be working! I don't know where exactly I went wrong as I tried so many different things. It may have been an issue with the URL even though I was using the same exact URL from the .env file in the example included within this repo. It of course still will not work for V2 and only works for the classic experience (V1) but that is okay.

from botkit-middleware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.