Giter Site home page Giter Site logo

Comments (4)

stevkan avatar stevkan commented on June 7, 2024

@uprg - Thank you for your patience. Are you still having an issue with this? My initial guess to the cause of the problem is with Emulator which depends Web Chat. Web Chat, at this point, is not setup to work with streaming responses like those generated from something like ChatGPT. What is more, Emulator is using an older version of Web Chat. This needs to be updated to current version, however there is no ETA on that, at the moment.

If you use another client that isn't Web Chat based, does the issue persist there?
If you perform logging in App.py on the if...else statement, are you certain it is accurately filtering the incoming text between questions and non-questions?
To that end, since it is an echo bot, is it repeating responses because the text in both the original message as well as in the echoed response are virtually the same?

from botbuilder-python.

uprg avatar uprg commented on June 7, 2024

@stevkan Thank you for responding.

  • Yes the messages are getting correctly identified for if they are a question or if they are not.

  • The user request message and response message are not same.

  • The issue isn't resolved but we have stopped further development because of the two times response issue.

from botbuilder-python.

stevkan avatar stevkan commented on June 7, 2024

@uprg - Ok, I will attempt a repro of the issue using the code above, providing I'm not missing anything.

from botbuilder-python.

tracyboehrer avatar tracyboehrer commented on June 7, 2024

There isn't enough info here to make a firm determination. However, I question how this is done. Typically, the 'message' implementation would just call 'process_activity'. The the ActivityHandler (the bot) would handle the business logic.

Given:

        if status["isQuestion"] == False:
            body["text"] = status["text"]
            activity = Activity().deserialize(body)
            auth_header = req.headers["Authorization"] if "Authorization" in req.headers else ""
            await ADAPTER.process_activity(activity, auth_header, BOT.on_turn)
        else:
              callOpenAI(status["text"])
             body["text"] = status["text"]
             activity = Activity().deserialize(body)
             auth_header = req.headers["Authorization"] if "Authorization" in req.headers else ""
             await ADAPTER.process_activity(activity, auth_header, BOT.on_turn)

Whatever 'callOpenAI' does would not stop the EchoBot.on_message_activity from executing.

  1. isQuestion == False: EchoBot sends back (echo's) whatever the user sent
  2. isQuestion == true: Something happens is 'callOpenAI', then EchoBot sends back whatever the user sent

Check: The indentation on the line with 'callOpenAI'

from botbuilder-python.

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.