Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🏆졸업작품 우수 포스터상 - 토닥토닥 프로젝트 (웹)

NotificationsYou must be signed in to change notification settings

henni99/WebChatbotAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dialogflow와 web nodejs 연동법

KoGPT-2와 web nodejs 연동법

Summary

final

이 토닥토닥 프로젝트는 불안 장애를 막기 위해 개발된 웹 기반 API입니다.불안 정도 검사, 불안 원인 검사, 딥러닝 기반 챗봇과의 자유로운 대화를 통해 불안한 감정을 확인하고 치유할 수 있습니다.

Demo App

캡처

requirement

  1. Dialog flow를 통해 정해진 질의 응답을 작성 (WIKI 참조)
  2. Dialog flow API를 사용하기 위해서 Google Cloud Platform에서 해당 Dialogflow project 찾은 후에 인증 키 발급 (https://github.com/googleapis/nodejs-dialogflow 참조)
  3. Json 파일 발급 후 public 파일 안에 넣어줍니다. (Chatbot 파일과 같은 위치에)
  4. 라이브러리 설치 (해당 디렉토리(Chatbot) 경로 변경 후 설치)
npminit
npmIdialogflow
npminstalluuidexpressbody-parser

chatbot api.js

  1. 아래 해당 주석 위치에 내용 추가
varserviceAccount=require("")// firebase json file positionadmin.initializeApp({credential:admin.credential.cert(serviceAccount),databaseURL:""// firebase database url});
  1. child 내부에 자신의 firebase uid 추가
db.ref('anxiety information').child('').push().set(newContact2);//myUiddb.ref('anxietyinformationforreport').child('').set(newContact2);//myuid
  1. 아래 function의 주석 위치에 정보 추가
asyncfunctionrunSample(msg,projectId= '') {// project nameconstsessionClient=newdialogflow.SessionsClient({keyFilename:""//json file position  });constsessionPath=sessionClient.projectAgentSessionPath(projectId,sessionId);constrequest= {session:sessionPath,queryInput: {text: {text:msg,languageCode:'en-US',      },    },  };

Dialogflow Web Chatbot 실행 방법

  1. cmd에서 chatbot.js가 있는 디렉토리로 이동
  2. 다음과 같은 명령어 실행
nodechatbotapi.js
  1. first_counsel.html / second_html 에 들어가서 원하는 말을 적는다
  2. 이후에 rule된 chatbot 대답을 확인할 수 있다.

KoGPT2 Web Chatbot 실행 방법

(KoGPT2 training 방법https://github.com/haven-jeon/KoGPT2-chatbot 참조)

  1. answering.py 실행
  2. nodejs의 local 서버 실행
  3. deep_counsel.html에 원하는 말을 적는다.
  4. 일정 시간 후에 딥러닝 Chatbot의 대답을 확인할 할 수 있음

※ 데이터 셋 종류

About

🏆졸업작품 우수 포스터상 - 토닥토닥 프로젝트 (웹)

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp