Code Monkey home page Code Monkey logo

hellobot-clone's Introduction

made-with-python python django

HelloBot Clone API 가이드

[TOc]

Tools

pyenv == 1.2.26

sqlite3 == 3.32.3

vscode == 1.55.1

macOS == 11.2.3


Guide

  1. git clone

    $ git clone https://github.com/withyeah/HelloBot-Clone.git
  2. 가상환경 생성 및 실행

    $ python -m venv venv
    
    # macOS
    $ source venv/bin/activate
    
    # windows
    $ source venv/Scripts/activate
  3. 패키지 설치

    $ pip install -r requirements.txt
  4. run server

    $ python manage.py runserver

API SWAGGER

http://127.0.0.1:8000/api/v1/swagger/

api_swagger

1. Scenario

챗봇과의 대화 구현 및 사용을 위한 API

  1. GET /scenarios/ : 전체 시나리오 리스트 Read

  2. POST /scenarios/ : 시나리오 Create

    예시) {'input_message': '오늘의 썸 연애운',

    ​ 'output_message': '설레지만 애매하고 답답한 우리 사이...\n/images/1\n오늘의 썸 연애운을 타로 카드로 확인해보자',

    ​ 'next_question': '썸상대를 뭐라고 부르면 좋은지 말해줘'}

    참고) output_message 처럼 메세지가 길어지거나 선택지를 제공할 때는 \n으로 구분하여 추후 잘라서 사용

  3. GET, PUT, PATCH, DELETE /scenarios/{id}/ : 개별 시나리오 Read, Create, Update, Partial Update, Delete


2. Tarot

타로 카드 해설 구현 및 사용을 위한 API

  1. GET /tarots/ : 전체 타로 해설 리스트 Read

  2. POST /tarots/ : 타로 카드 해설 Create

    예시) {'card_number': 1,

    ​ 'card_image': 'R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==',

    ​ 'explanation': '오.. 농작물을 바라보고 사람이 서있어\n/images/emoticon/2\n나는 고백을 추천한다'}

  3. GET, PUT, PATCH, DELETE /tarots/{id}/ : 개별 타로 카드 해설 Read, Create, Update, Partial Update, Delete


Testing

  • 테스트 파일 위치 : /chats/tests/

  • 테스트 방법

    $ python manage.py test

hellobot-clone's People

Contributors

withyeah avatar

Watchers

James Cloos avatar  avatar

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.