Prerequisites
For the purposes of this exercise, we need to prepare a couple of things: Tair cloud instance. Langchain as a framework. An OpenAI API key.

Install requirements
This notebook requires the following Python packages: openai, tiktoken, langchain, and tair.

openai provides convenient access to the OpenAI API.
tiktoken is a fast BPE tokeniser for use with OpenAI's models.
langchain helps us to build applications with LLM more easily.
tair library is used to interact with the tair vector database.
! pip install openai tiktoken langchain tair