Skip to content

5sControl/GuruChat-API-Open

Repository files navigation

About Chat Guru

The ultimate AI-powered digital assistant for your business. With its extensive expertise in your industry, business operations, customers, and company history, it's like having a second brain at your disposal. Communicating in plain and friendly language, ChatGuru effortlessly tackles even the toughest questions and offers invaluable recommendations.

By serving as a knowledge repository and intelligent interface, ChatGuru aims to be a powerful partner that accelerates your business and helps you to stay ahead of the competition.

ChatGuru is an on-premise solution. With this model, you and only you control your data and infrastructure, ensuring that your info remains secure and private.

Remember: the value of GhatGurtu would increase substantially as its knowledge base grows.

Getting started

Install guru chat api

Pull and Run model container

If you use NVIDIA driver to run model:

docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

If you use CPU to run model:

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

Download llama model

docker exec -it ollama ollama run llama2:13b

Run guru chat api

npm run start

Also you can run our docker container

docker pull 5scontrol/chat-guru-api
docker run -p 3002:3002 5scontrol/chat-guru-api

API Reference

Get all knowledge base categories

ChatData interface

{
categoryName: string;
chatId: string;
sources: string[];
chatName: string;
modelName: string;
}

  GET /aiChat/getCategories

Get available language models

  GET /aiChat/getModels

Create knowledge base category

  POST /aiChat/createCategory?{name}&{description}
Parameter Type Description
name string Required. Category name.
description string Required. Category description.

Edit knowledge base category

  POST /aiChat/editCategory?{oldName}&{newName}&{description}
Parameter Type Description
oldName string Required. Category name.
newName string Optional. New name to apply to category.
description string Optional. Category description.

Remove knowledge base category

  POST /aiChat/removeCategory?{name}
Parameter Type Description
name string Required. Category name.

Upload content to knowledge base category

  POST /aiChat/upload?{categoryNname}

Content-Type: 'multipart/form-data'

Parameter Type Description
name string Required. Category name.
body form-data {file?: File, link?: string}

Download file from knowledge base category

  POST /aiChat/download?{categoryName}&{fileName}
Parameter Type Description
categoryName string Required. Category name.
fileName string Required. File name.

Remove content from knowledge base category

  POST /aiChat/removeSource?{categoryName}&{fileName}
Parameter Type Description
categoryName string Required. Category name.
fileName string Required. File name.

Create new chat

  POST /aiChat/createChat?{categoryName}&{modelName}
Parameter Type Description
categoryName string Required. Category name.
modelName string Required. Name of the model (from available models).

Remove chat

  POST /aiChat/removeChat?{categoryName}&{chatId}
Parameter Type Description
categoryName string Required. Category name.
chatId string Required. Chat Id to delete

Edit chat

  POST /aiChat/editChat
Parameter Type Description
body ChatData Required. New data to apply to selected chat

Send prompt to selected chat

  POST /aiChat/ask?{chatId}&{prompt}&{categoryName}
Parameter Type Description
chatId ChatData Required. Selected chat id.
prompt ChatData Required. Your question to selected chat

Documentation

Documentation for Developers

User Documentation

Contributing

Thank you for considering contributing to 5sControl. We truly believe that we can build an outstanding product together!

We welcome a variety of ways to contribute. Read below to learn how you can take part in improving 5sControl.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Code contributing

If you want to contribute, read our contributing guide to learn about our development process and pull requests workflow.

We also have a list of good first issues that will help you make your first step to beсoming a 5S contributor.

License

GNU GPL-3.0

Chat Guru API uses third party libraries that are distributed under their own terms (see LICENSE-3RD-PARTY.md).