This is just what the text in your Wikipedia document gets turned into in order to be understood and made sense of by the chatbot. Throughout this code, I mention the word “embeddings”. The higher the temperature, the more creative and less factually accurate the chatbot is. The temperature parameter determines the creativity of the chatbot, where a temperature of 0 means that the chatbot is always factually accurate and a temperature of 1 means that the chatbot has complete freedom to make up answers and details for the sake of creativity, even if they’re not accurate. I did this to make the chatbot as factually accurate as possible. As you may have noticed if you’ve looked at the code, I set the temperature of the chatbot to 0. Once you’ve done that, download the libraries that we’re going to be using by running the following in your terminal: pip3 install langchain flask llama_index gradio openai pandas numpy glob datetimeįinally, once you’ve installed all the necessary libraries, paste in this Python code from our repo into your Python file.įor this tutorial, I’m using the gpt-3.5-turbo OpenAI model, since it’s the fastest and is the most cost efficient. Go to your project folder and create an empty Python file inside your new project folder. Once you have your API key and dataset file, you can get started with the actual code. Training and Testing a Simple Chatbot on Your Data
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |