Spaces:
Running
Running
Omar Solano
commited on
update gpt model version (#43)
Browse files
cfg.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import logging
|
2 |
import os
|
3 |
|
|
|
|
|
4 |
from buster.busterbot import Buster, BusterConfig
|
5 |
from buster.completers import ChatGPTCompleter, DocumentAnswerer
|
6 |
from buster.formatters.documents import DocumentsFormatterJSON
|
@@ -8,12 +10,17 @@ from buster.formatters.prompts import PromptFormatter
|
|
8 |
from buster.retriever import DeepLakeRetriever, Retriever
|
9 |
from buster.tokenizers import GPTTokenizer
|
10 |
from buster.validators import QuestionAnswerValidator, Validator
|
11 |
-
import deeplake
|
12 |
-
|
13 |
from utils import init_mongo_db
|
14 |
|
|
|
|
|
|
|
15 |
MONGODB_URI = os.getenv("MONGODB_URI")
|
16 |
-
mongo_db =
|
|
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
logger = logging.getLogger(__name__)
|
@@ -36,6 +43,7 @@ deeplake.deepcopy(
|
|
36 |
DEEPLAKE_DATASET_PATH,
|
37 |
"local_dataset",
|
38 |
overwrite=True,
|
|
|
39 |
)
|
40 |
DEEPLAKE_DATASET_PATH = "local_dataset"
|
41 |
|
@@ -81,7 +89,7 @@ true
|
|
81 |
Q:
|
82 |
""",
|
83 |
"completion_kwargs": {
|
84 |
-
"model": "gpt-3.5-turbo",
|
85 |
"stream": False,
|
86 |
"temperature": 0,
|
87 |
},
|
@@ -102,13 +110,13 @@ Q:
|
|
102 |
},
|
103 |
completion_cfg={
|
104 |
"completion_kwargs": {
|
105 |
-
"model": "gpt-3.5-turbo-
|
106 |
"stream": True,
|
107 |
"temperature": 0,
|
108 |
},
|
109 |
},
|
110 |
tokenizer_cfg={
|
111 |
-
"model_name": "gpt-3.5-turbo-
|
112 |
},
|
113 |
documents_formatter_cfg={
|
114 |
"max_tokens": 13500,
|
|
|
1 |
import logging
|
2 |
import os
|
3 |
|
4 |
+
import deeplake
|
5 |
+
|
6 |
from buster.busterbot import Buster, BusterConfig
|
7 |
from buster.completers import ChatGPTCompleter, DocumentAnswerer
|
8 |
from buster.formatters.documents import DocumentsFormatterJSON
|
|
|
10 |
from buster.retriever import DeepLakeRetriever, Retriever
|
11 |
from buster.tokenizers import GPTTokenizer
|
12 |
from buster.validators import QuestionAnswerValidator, Validator
|
|
|
|
|
13 |
from utils import init_mongo_db
|
14 |
|
15 |
+
logger = logging.getLogger(__name__)
|
16 |
+
logging.basicConfig(level=logging.INFO)
|
17 |
+
|
18 |
MONGODB_URI = os.getenv("MONGODB_URI")
|
19 |
+
mongo_db = (
|
20 |
+
init_mongo_db(uri=MONGODB_URI, db_name="towardsai-buster")
|
21 |
+
if MONGODB_URI
|
22 |
+
else logger.warning("No mongodb uri found, you will not be able to save data.")
|
23 |
+
)
|
24 |
|
25 |
|
26 |
logger = logging.getLogger(__name__)
|
|
|
43 |
DEEPLAKE_DATASET_PATH,
|
44 |
"local_dataset",
|
45 |
overwrite=True,
|
46 |
+
num_workers=12,
|
47 |
)
|
48 |
DEEPLAKE_DATASET_PATH = "local_dataset"
|
49 |
|
|
|
89 |
Q:
|
90 |
""",
|
91 |
"completion_kwargs": {
|
92 |
+
"model": "gpt-3.5-turbo-1106",
|
93 |
"stream": False,
|
94 |
"temperature": 0,
|
95 |
},
|
|
|
110 |
},
|
111 |
completion_cfg={
|
112 |
"completion_kwargs": {
|
113 |
+
"model": "gpt-3.5-turbo-1106",
|
114 |
"stream": True,
|
115 |
"temperature": 0,
|
116 |
},
|
117 |
},
|
118 |
tokenizer_cfg={
|
119 |
+
"model_name": "gpt-3.5-turbo-1106",
|
120 |
},
|
121 |
documents_formatter_cfg={
|
122 |
"max_tokens": 13500,
|