Giter Club home page Giter Club logo

Comments (7)

navertalk avatar navertalk commented on August 12, 2024 1

@SHHam12
안녕하세요.
네이버톡톡입니다.

말씀하신 도미노피자챗봇의 경우 보내기API를 통해 2번 send이벤트를 보낸 경우입니다.

일반적인 경우 Webhook 이벤트에 대해 Responsesend이벤트 1개를 싣어서 보낼수가 있는데요.
이걸로는 2개의 이벤트를 연속으로 보낼 수 가 없습니다.

챗봇 내부적으로 처리시간이 오래걸리거나 제 3의 API를 호출해야해서 응답이 오래걸리는 경우 Webhook에 이벤트를 전송하기보다는 보내기API를 추천합니다.

다시말씀드리면, Webhook이벤트에 대해 빠르게 200으로 응답을 하고, 비동기적으로 내부 프로세싱 후 보내기API를 통해 이벤트를 전송하면 타임아웃현상으로 응답 못하는 케이스들이 사라집니다.

감사합니다.

from chatbot-api.

SHHam12 avatar SHHam12 commented on August 12, 2024

그러면 보내기 api로 textContent를 보낸 뒤에 res.sendStatus(200)을 한뒤에 다시 response를 보내기 api를 이용해서 보내면 된다는 말씀이신건가요?? 이렇게 해봤는데 되지가 않네요... 유저가 들어 왔을 때나 특정한 이벤트 발생시 챗봇이 두번 반응하려고 하는데 잘 안되네요... 예를 들면 안녕하세요 라고 먼저 보내고 바로 무엇을 도와드릴까요가 한개의 택스트 박스가 아닌 두개의 택스트 박스로 표현을 하려고 하거든요.

from chatbot-api.

 avatar commented on August 12, 2024

처음 한 번은 사용자가 발생시킨 요청에 대한 응답으로 200을 보내시고, (타임아웃이 될 수 있으므로)
연이어서 해당 유저의 키값을 가지고 있다가 보내실 내용을 새로운 요청으로 두 번 보내시면 될 것 같아요. 이벤트 타입은 반드시 send로 보내시구요. { "user": ... , "event": "send", "textContent": { "text": "무엇을 ... } }

from chatbot-api.

navertalk avatar navertalk commented on August 12, 2024

@SHHam12
안녕하세요.
네이버톡톡입니다.

@SHHam12send 두 번 보내기 성공하셨나요?

from chatbot-api.

SHHam12 avatar SHHam12 commented on August 12, 2024

아직 계속 시도 중 이에요... 보내기 api로 보내는 방식을 정확이 이해가 아직 안되서 다시 읽어보고 있습니다.

from chatbot-api.

navertalk avatar navertalk commented on August 12, 2024

안녕하세요.
네이버톡톡입니다.

@SHHam12 님, send 이벤트 두 번 보내기 성공하셨나요?

from chatbot-api.

SHHam12 avatar SHHam12 commented on August 12, 2024

네 성공해서 계속 개발중입니다 성공했다고 답하는 걸 잊고 있었네요... 감사합니다!!

from chatbot-api.

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.