forked from microsoft/UFO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlearn.py
47 lines (37 loc) · 966 Bytes
/
learn.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import argparse
from . import indexer
args = argparse.ArgumentParser()
args.add_argument(
"--app", help="The name of application to learn.", type=str, default="./"
)
args.add_argument(
"--docs", help="The help application of the app.", type=str, default="./"
)
args.add_argument(
"--format", help="The format of the help doc.", type=str, default="xml"
)
args.add_argument(
"--incremental", action="store_true", help="Enable incremental update."
)
args.add_argument(
"--save_path",
help="The format of the help doc.",
type=str,
default="./vectordb/docs/",
)
parsed_args = args.parse_args()
def main():
"""
Main function.
"""
indexer.create_indexer(
parsed_args.app,
parsed_args.docs,
parsed_args.format,
parsed_args.incremental,
parsed_args.save_path,
)
if __name__ == "__main__":
main()