Skip to content

jainsid24/narada

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Narada

Python version License Commit Activity Repo Size OpenAI API key Docker Code style: black

TBD

Getting Started

To use this utility:

  1. Clone the repository
git clone https://github.com/jainsid24/narada
  1. Build the Docker image by running the following command in the terminal:
docker build -t narada:latest .
  1. Once the image is built, run the Docker container using the following command:
docker run -p 5001:5001 narada
  1. Use curl/postman for API call
curl --header "Content-Type: application/json" \
     --request POST \
     --data '{"question": "Narayan Narayan?"}' \
     http://<pods-ip-address>:5001/api/chat

Configuration

Before you can use the utility, you need to set up the configuration file. The configuration file is a YAML file that contains the following options:

  • openai_api_key: Your OpenAI API key.

Usage

To start the chatbot, run:

python app.py

This will start the chatbot on port 5000.

To use the chatbot, send a POST request to http://localhost:5000/api/chat with a JSON payload containing the question to ask, like this:

curl -X POST \
  http://localhost:5001/api/chat \
  -H 'Content-Type: application/json' \
  -d '{"question": "What is the capital of France?"}'

This will return a JSON response containing the chatbot's answer to the question:

{"response": "The capital of France is Paris."}

Contributing

If you find a bug or have an idea for a new feature, please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors