[docs]defload_vectordb_from_yaml(yaml_path:str,vectordb_name:str,project_dir:str):config_dict=load_yaml_config(yaml_path)vectordb_list=config_dict.get("vectordb",[])iflen(vectordb_list)==0orvectordb_name=="default":chroma_path=os.path.join(project_dir,"resources","chroma")returnload_vectordb("chroma",client_type="persistent",embedding_model="openai",collection_name="openai",path=chroma_path,)target_dict=list(filter(lambdax:x["name"]==vectordb_name,vectordb_list))target_dict[0].pop("name")# delete a name keytarget_vectordb_name=target_dict[0].pop("db_type")target_vectordb_params=target_dict[0]returnload_vectordb(target_vectordb_name,**target_vectordb_params)