Skip to content

KirilChm/EzySheetsChatApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EzySheeysChatAPI

This is a project that provides the API that allows you to chat with an AI

Setup

  • Put necessary contents in the config.json file
  • Put the necessary contents in the client_secretes.json file

Those files go under .env folder in root of the project.

config.json requires the following keys:

See doc for additional info

How start project

Run the following command to start the flask backend

flask run

Local Testing

Run the following command to test the agent locally by entering the message thru the command prompt. python -m local_agent_chat

Manually Testing the API

# Run the following command back to back. Should give end result of: 105
curl -X POST http://127.0.0.1:5000/chat/conversation -H 'Content-Type: application/json' -d '{"userid":"1","message":"Whats 10 times 10"}'
curl -X POST http://127.0.0.1:5000/chat/conversation -H 'Content-Type: application/json' -d '{"userid":"1","message":"and plus 5"}'
curl -X POST http://127.0.0.1:5000/chat/conversation -H 'Content-Type: application/json' -d '{"userid":"1","message":"Write 1 to 5 to cell A1 to A5 in my google sheet with sheetid=0"}'

Session

Project utilises Redis for persistent storage of user sessions, see doc. Redis along with Redis-cli have to be installed in order for persistence to work. Once cli and server are installed, it must be run using 'redis-server' command first.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages