Skip to content

kedatech/julio-gpt-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chatbot-julio-gpt-api

This is a chatbot API for Julio_GPT made with Python using the Flask framework

Use

  1. Initialize your virtual environment
  2. Install the dependencies in the requirements.txt file
  3. Make a file named:env.py and enter this variables: your OPENAI_API_KEY from the OpenAI key and the url of your Flask server in BACKEND_SERVER
  4. Upload your Markdown files with which you will train your AI into the Markdowns directory, the AI will take the first topic "#" as a reference and finish that section (embbeding) with "###" so classify your sections or themes well
  5. In the console run: flask --app app.py --debug run
  6. Train AI by request to /process
  7. Ask your question with a request to /query?text=
  8. Ready!

Endpoints

/process -> the process to train your AI
/query?text= -> this endpoint makes a question to your AI, send your question by the args

About it

Project description

the project is made with Flask, the project is a simple API that communicates with two services: OpenAI and ChromaDb. ChromaDB serves as a vector database and thus create embeddings, which is expensive in terms of tokens or use refers to the OpenAI API, instead OpenAI is used in conjunction with the project in order to respond sensibly and conditionally with the indicated training

Training

The training is based on using Markdown files with the content you want to train, it can be kitchen items or the desired theme. AI will understand and train

The AI will seek to classify the files by the main theme or h1 of the Markdowns which is "#", so your topic must be concise and clear so that the AI is easier to save and search for that topic

The AI will separate each topic or section (embedding) by a sub-sub-topic or a "###", from there, the AI will take the previous text as a separate section or topic and take the new one as a new section or topic. Eg :

'# Methods to center a div
blablablabla'
'###' '# How to import this into JS'
'blablabla. "'

Sources to view

Flask: https://flask.palletsprojects.com/en/3.0.x/
ChromaDB: https://docs.trychroma.com/
OpenAI: https://platform.openai.com/

TODO

  1. Make a better code 💩
  2. Refact the code ♻️
  3. Change de Endpoint /process to /train
  4. Add to env.py a variable OPENAI_PROMPT to a better access to modify it 🔨
  5. Add speech AI 🤖

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages