GithubHelp home page GithubHelp logo

Comments (6)

stevkan avatar stevkan commented on June 2, 2024

@karinaSC - I am unfamiliar with Hotline or its uses, so I can't advise you on whether it can be used with DirectLineJS or not. Can you provide a link to this product?

What I can say is DirectLineJS is used specifically for building client applications with the purpose of connecting a chat interface with a BotFramework built bot. The only credentials it takes is for establishing a connection with the "middle layer", the Azure Bot Service Connector. So, given that, I would guess that it wouldn't work.

But, again, I'm unfamiliar with Hotline so I can't say this definitively.

from botframework-directlinejs.

karinaSC avatar karinaSC commented on June 2, 2024

sorry @stevkan i meant "directLine" not Hotline.

what I would like to know, is where I enter my DirectLine secret here in this package, so I can start talking to the bot and running tests. Its possible?

from botframework-directlinejs.

stevkan avatar stevkan commented on June 2, 2024

Have you looked over the DirectLineJS README.md file? If not, the instructions are there on how to create a DirectLine object and what properties need to be passed into it.

Unless I'm much mistaken, I believe that is what you are looking for. Does that help?

from botframework-directlinejs.

karinaSC avatar karinaSC commented on June 2, 2024

Yes, but see how I'm using the directline object.

When running it returns nothing.

image

from botframework-directlinejs.

stevkan avatar stevkan commented on June 2, 2024

A few things to check that may be interfering:

  • Be sure you have your bot running. Whether it is in the cloud or you are running it locally and are using a tunneling service (ngrok, for example) to connect it to your Azure Bot Service bot resource.
  • Be sure you have the DirectLine channel enabled in the Channels blade in your Azure bot resource. Also, to start, be sure you have "Enhanced authentication" disabled. It is a security feature that you can/should enable at a later point.

Curiously, when running in Node, you may want to change the secret parameter to token, instead. For some reason (in my testing), if I use secret the client connects and receives the bot's response, but then immediately shuts down. This doesn't happen when I use token.

To be clear, this setup isn't going to do much of anything other than connect and show that a response was received because there is no user interface to work with the DirectLine object.

I attached a file that gives a simple demonstration of using DirectLineJS in a custom HTML client to give you an idea on setup. Obviously, there would need to be some changes if you wanted to run in Node. But this can help point the way. Be sure to add in your DirectLine secret.

directline-chat.zip

from botframework-directlinejs.

stevkan avatar stevkan commented on June 2, 2024

Closing due to inactivity.

from botframework-directlinejs.

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.