Coverage for mindsdb / integrations / handlers / milvus_handler / connection_args.py: 0%
4 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1from collections import OrderedDict
3from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE
6connection_args = OrderedDict(
7 uri={
8 "type": ARG_TYPE.STR,
9 "description": "uri of milvus service",
10 "required": True,
11 },
12 token={
13 "type": ARG_TYPE.STR,
14 "description": "token to support docker or cloud service",
15 "required": False,
16 },
17 search_default_limit={
18 "type": ARG_TYPE.INT,
19 "description": "default limit to be passed in select statements",
20 "required": False,
21 },
22 search_metric_type={
23 "type": ARG_TYPE.STR,
24 "description": "metric type used for searches",
25 "required": False,
26 },
27 search_ignore_growing={
28 "type": ARG_TYPE.BOOL,
29 "description": "whether to ignore growing segments during similarity searches",
30 "required": False,
31 },
32 search_params={
33 "type": ARG_TYPE.DICT,
34 "description": "specific to the `search_metric_type`",
35 "required": False,
36 },
37 create_auto_id={
38 "type": ARG_TYPE.BOOL,
39 "description": "whether to auto generate id when inserting records with no ID (default=False)",
40 "required": False,
41 },
42 create_id_max_len={
43 "type": ARG_TYPE.STR,
44 "description": "maximum length of the id field when creating a table (default=64)",
45 "required": False,
46 },
47 create_embedding_dim={
48 "type": ARG_TYPE.INT,
49 "description": "embedding dimension for creating table (default=8)",
50 "required": False,
51 },
52 create_dynamic_field={
53 "type": ARG_TYPE.BOOL,
54 "description": "whether or not the created tables have dynamic fields or not (default=True)",
55 "required": False,
56 },
57 create_content_max_len={
58 "type": ARG_TYPE.INT,
59 "description": "max length of the content column (default=200)",
60 "required": False,
61 },
62 create_content_default_value={
63 "type": ARG_TYPE.STR,
64 "description": "default value of content column (default='')",
65 "required": False,
66 },
67 create_schema_description={
68 "type": ARG_TYPE.STR,
69 "description": "description of the created schemas (default='')",
70 "required": False,
71 },
72 create_alias={
73 "type": ARG_TYPE.STR,
74 "description": "alias of the created schemas (default='default')",
75 "required": False,
76 },
77 create_index_params={
78 "type": ARG_TYPE.DICT,
79 "description": "parameters of the index created on embeddings column (default={})",
80 "required": False,
81 },
82 create_index_metric_type={
83 "type": ARG_TYPE.STR,
84 "description": "metric used to create the index (default='L2')",
85 "required": False,
86 },
87 create_index_type={
88 "type": ARG_TYPE.STR,
89 "description": "the type of index (default='AUTOINDEX')",
90 "required": False,
91 },
92)
94connection_args_example = OrderedDict(
95 uri="./milvus_local.db",
96 token="",
97 search_default_limit=100,
98 search_metric_type="L2",
99 search_ignore_growing=True,
100 search_params={"nprobe": 10},
101 create_auto_id=False,
102 create_id_max_len=64,
103 create_embedding_dim=8,
104 create_dynamic_field=True,
105 create_content_max_len=200,
106 create_content_default_value="",
107 create_schema_description="MindsDB generated table",
108 create_alias="default",
109 create_index_params={},
110 create_index_metric_type="L2",
111 create_index_type="AUTOINDEX",
112)