Share

Create a Specialist Chatbot with a Modern Toolset: Streamlit, GPT-4 and the Assistants API | by Alan Jones | Jan, 2024

0 0

With the right tools — Streamlit, the GPT-4 LLM and the Assistants API — we can build almost any chatbot.

  • Streamlit combines the power of Python programming with an easily constructed chat interface to provide the ideal front end to an AI-based application;
  • GPT-4 is the most powerful LLM from OpenAI, so far;
  • and the Assistants API provides the link between the two, controlling the behaviour of the LLM, organising the communications between the front and back ends, as well as providing access to tools such as code interpretation and data retrieval.

The combination of these three elements gives us an extremely powerful framework for developing specialist chatbots.

The possibilities are endless! For example:

  • a company could upload product its documentation and company procedures and be on the way to creating a customer service chatbot;
  • a developer could grab the complete set of Streamlit documentation to build an expert coder for data science apps (note that while the Streamlit documentation is open-sourced under the Apache 2 licence, you should always check licences and copyright to ensure that you have the appropriate rights and permissions to use data from sources other than your own);
  • you could upload web pages scraped from online newspapers and easily create a news aggregator/summariser (again, you must check copyright and licences/permissions if you intend to re-publish any data from external sources — for private use it’s often ok but you should always check that you are using data legally!);
  • a bird fancier might like to upload bird-related articles from Wikipedia and create a virtual ornithologist.

OK, that last example might seem a little niche but it is what we are going to develop as a demonstrator to show how the three elements can come together to create a…

You may also like...