This is a simple chatbot implementation
This is a .env_sample file. This needs to be copied to a .env file and the values need to be filled in.
This chatbot uses parcel
to bundle the code. To run the chatbot, run the following commands:
npm start
- The query is sent to elasticsearch
- The results are then sent to the chatbot with some prompt engineering
- The chatbot then sends the results to the user
Is configurable in the .env file
- All the prompt engineering is done in the openai.ts file.
- The choice of which url to use and the apikey are in the .env file (which you need to make as described above)
- Currently no known issues
- There are assumptions about the shape of the data in 'elasticsearch'. These should be injected.
- It doesn't handle the url of the content yet. Mostly because the index I use by default doesn't have a url field yet!
- A 'loading' spinner, or even better the
chat gpt loading...
would be nice - Maybe we want to do something when no messages