From the course: Vector Databases in Practice: Deep Dive

Get set up for the course

From the course: Vector Databases in Practice: Deep Dive

Get set up for the course

- [Instructor] Before we go further, let's get set up with the tools and resources that you'll need for the course. The main tools that we'll be using are Python for our programming, Weaviate as our vector database, and the OpenAI API for their various AI models. So here, we'll set you up with Python and the related tools, an example script to connect to Weaviate, and an OpenAI API key. Let's start by getting set up with Python. This is going to depend a lot on your system, but I recommend following the official Python documentation and installing Python 3.10 or newer. Once you have Python installed on your system, I recommend working with a virtual environment. If you're using a Mac, Linux, or even Windows with WSL, you can do this by navigating to your working directory and running a command like this. This runs the venv script, which will create a virtual environment in the .venv subdirectory. Then you can activate the virtual environment with this command. Then you can install your desired libraries into the environment. We'll install the Weaviate Python client and these other libraries, which will be used throughout the course. Additionally, I recommend using an IDE for development. Personally, I use VS code, which is free on open source, but you can use any others. We'll also need access to some AI models, one to generate vectors and another which will be a large language model. You can use any number of different models for this. With Weaviate, you could use local models or services like, Cohere, HuggingFace, and so on, but for the course, we'll be using OpenAI's models. Let's go to the OpenAI website, sign up if you haven't, and then create a new API key. Once you log in, you can go to the API keys tab, like so, and click on this button. Give it a name. This is just for you to keep track of the different keys, and then make sure to save the key, for example, in a password management application, as you won't see it again. Now, let's make sure that we can also run our code examples. Navigate to the project repository, which you should have cloned, and then, open this file. For now, we'll use this function, which provides the details for connecting to our demo database. You should replace this part here to update that with your own key. And if you run this file, it should print this success message without any errors. You will also see this function be used in other places for convenience, and don't worry, you'll get to build your own database as well. From the next video onwards, you'll start to see some code examples, and as you get started, if you don't fully understand everything in those snippets, that's okay. You can always look up the correct latest syntax from the official documentation. For now, aim to get a high level understanding of what the key parts of the code are doing and experimenting by changing small parts of it, as we'll be suggesting throughout the course. Well, you should now have your coding environment set up, have an OpenAI API key, and be able to connect to our demo Weaviate server. Next, let's start to put those tools to use, starting with searches.

Contents