Coverage for mindsdb / integrations / handlers / qdrant_handler / connection_args.py: 0%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-21 00:36 +0000

1from collections import OrderedDict 

2 

3from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE 

4 

5 

6connection_args = OrderedDict( 

7 location={ 

8 "type": ARG_TYPE.STR, 

9 "description": "If `:memory:` - use in-memory Qdrant instance. If a remote URL - connect to a remote Qdrant instance. Example: `http://localhost:6333`", 

10 "required": False, 

11 }, 

12 url={ 

13 "type": ARG_TYPE.STR, 

14 "description": "URL of Qdrant service. Either host or a string of type [scheme]<host><[port][prefix]. Ex: http://localhost:6333/service/v1", 

15 }, 

16 host={ 

17 "type": ARG_TYPE.STR, 

18 "description": "Host name of Qdrant service. The port and host are used to construct the connection URL.", 

19 "required": False, 

20 }, 

21 port={ 

22 "type": ARG_TYPE.INT, 

23 "description": "Port of the REST API interface. Default: 6333", 

24 "required": False, 

25 }, 

26 grpc_port={ 

27 "type": ARG_TYPE.INT, 

28 "description": "Port of the gRPC interface. Default: 6334", 

29 "required": False, 

30 }, 

31 prefer_grpc={ 

32 "type": ARG_TYPE.BOOL, 

33 "description": "If `true` - use gPRC interface whenever possible in custom methods. Default: false", 

34 "required": False, 

35 }, 

36 https={ 

37 "type": ARG_TYPE.BOOL, 

38 "description": "If `true` - use https protocol.", 

39 "required": False, 

40 }, 

41 api_key={ 

42 "type": ARG_TYPE.PWD, 

43 "description": "API key for authentication in Qdrant Cloud.", 

44 "required": False, 

45 "secret": True 

46 }, 

47 prefix={ 

48 "type": ARG_TYPE.STR, 

49 "description": "If set, the value is added to the REST URL path. Example: `service/v1` will result in `http://localhost:6333/service/v1/{qdrant-endpoint}` for REST API", 

50 "required": False, 

51 }, 

52 timeout={ 

53 "type": ARG_TYPE.INT, 

54 "description": "Timeout for REST and gRPC API requests. Defaults to 5.0 seconds for REST and unlimited for gRPC", 

55 "required": False, 

56 }, 

57 path={ 

58 "type": ARG_TYPE.STR, 

59 "description": "Persistence path for a local Qdrant instance.", 

60 "required": False, 

61 }, 

62 collection_config={ 

63 "type": ARG_TYPE.DICT, 

64 "description": "Collection creation configuration. See https://qdrant.github.io/qdrant/redoc/index.html#tag/collections/operation/create_collection", 

65 "required": True, 

66 }, 

67) 

68 

69connection_args_example = { 

70 "location": ":memory:", 

71 "collection_config": { 

72 "size": 386, 

73 "distance": "Cosine" 

74 } 

75}