Spaces:
Running
Running
pseudotensor
commited on
Commit
•
0c753e8
1
Parent(s):
df5eeb7
Update with h2oGPT hash abc352fb7f37932e918f36f428dfb6243219666c
Browse files- src/gen.py +16 -13
src/gen.py
CHANGED
@@ -2291,19 +2291,22 @@ def evaluate(
|
|
2291 |
set(langchain_agents).difference(langchain_agents_list)) == 0, "Invalid langchain_agents %s" % langchain_agents
|
2292 |
|
2293 |
# get db, but also fill db state so return already has my_db_state and dbs filled so faster next query
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
|
|
|
|
|
|
2307 |
|
2308 |
t_generate = time.time()
|
2309 |
langchain_only_model = base_model in non_hf_types or \
|
|
|
2291 |
set(langchain_agents).difference(langchain_agents_list)) == 0, "Invalid langchain_agents %s" % langchain_agents
|
2292 |
|
2293 |
# get db, but also fill db state so return already has my_db_state and dbs filled so faster next query
|
2294 |
+
if langchain_mode != LangChainMode.DISABLED.value:
|
2295 |
+
from src.gpt_langchain import get_any_db
|
2296 |
+
db = get_any_db(my_db_state, langchain_mode, langchain_mode_paths, langchain_mode_types,
|
2297 |
+
dbs=dbs,
|
2298 |
+
load_db_if_exists=load_db_if_exists,
|
2299 |
+
db_type=db_type,
|
2300 |
+
use_openai_embedding=use_openai_embedding,
|
2301 |
+
hf_embedding_model=hf_embedding_model,
|
2302 |
+
migrate_embedding_model=migrate_embedding_model,
|
2303 |
+
auto_migrate_db=auto_migrate_db,
|
2304 |
+
for_sources_list=True,
|
2305 |
+
verbose=verbose,
|
2306 |
+
n_jobs=n_jobs,
|
2307 |
+
)
|
2308 |
+
else:
|
2309 |
+
db = None
|
2310 |
|
2311 |
t_generate = time.time()
|
2312 |
langchain_only_model = base_model in non_hf_types or \
|