WEBVTT 1 00:00:00.500 --> 00:00:04.265 Having discussed several features about Milvus in the 2 00:00:04.265 --> 00:00:06.618 earlier chapter, let's exercise them 3 00:00:06.618 --> 00:00:07.694 in this chapter. 4 00:00:07.694 --> 00:00:10.580 We will create a collection, create indexes, 5 00:00:10.580 --> 00:00:13.889 populate data, and query the collection. 6 00:00:13.889 --> 00:00:18.952 In this video, we will start with creating a client connection 7 00:00:18.952 --> 00:00:19.865 to Milvus. 8 00:00:19.865 --> 00:00:26.347 The notebook for this chapter is in the file code_03_XX Milvus 9 00:00:26.347 --> 00:00:28.342 database operations. 10 00:00:28.342 --> 00:00:30.943 I have the notebook loaded up here. 11 00:00:30.943 --> 00:00:34.909 We first need to install prerequisite packages 12 00:00:34.909 --> 00:00:36.672 for these exercises. 13 00:00:36.672 --> 00:00:37.406 PyMilvus 14 00:00:37.406 --> 00:00:40.037 is the Python SDK for Milvus. 15 00:00:40.037 --> 00:00:45.525 OpenAI is the library we will use for OpenAI for both embeddings 16 00:00:45.525 --> 00:00:46.640 and for LLMs. 17 00:00:46.640 --> 00:00:53.530 Let's install these prerequisites now. 18 00:00:53.530 --> 00:00:58.282 We then move to the first step, connecting to a Milvus 19 00:00:58.282 --> 00:01:00.866 database. To connect to Milvus, 20 00:01:00.866 --> 00:01:05.129 we first need to add a connection to the list of connections. 21 00:01:05.129 --> 00:01:08.780 We specify a name for the collection as learn. 22 00:01:08.780 --> 00:01:12.096 Then we need to specify the host, port, 23 00:01:12.096 --> 00:01:16.763 username, and password for the connection. 24 00:01:16.763 --> 00:01:20.346 We have not set up any username or password yet, 25 00:01:20.346 --> 00:01:25.180 but this information is optional. 26 00:01:25.180 --> 00:01:28.733 We store the name of the connection in a variable 27 00:01:28.733 --> 00:01:30.256 for future reference. 28 00:01:30.256 --> 00:01:34.286 Then calling the connect method will create a connection 29 00:01:34.286 --> 00:01:35.165 to Milvus. 30 00:01:35.165 --> 00:01:36.736 Doing a list 31 00:01:36.736 --> 00:01:41.031 connections shows the list of connections from this client. 32 00:01:41.031 --> 00:01:44.266 Let's run this code now. 33 00:01:44.266 --> 00:01:48.607 Having opened a connection, we can now perform further 34 00:01:48.607 --> 00:01:51.310 operations using this connection.