Medrag retrieves medical knowledge from the medical knowledge base collected by MedRAG. The medcrops will be automatically downloaded when initializing the code for the first time. You can modify the db_dir
of the medrag at here to change the save path of the medcrops.
The UMLS tools need to registration in the NIH website and get the API key. The API key don't need to apply can can be found directly in teh Get Your API Key colum in the upper right corner of the website. You can set the API key as the environment variable in the terminal and put it into the ~/.bashrc
for easy usage.
UMLS_API_KEY={your_umls_api_key}
The drugbank database can be obtained from the DrugBank. You need to apply to use it for the academic reseach and put it into the ./drugbank/drugbank.pkl
. You can also modify the path of drugbank.pkl
at here.
No operations.
We choose three MultiModal Large Language Models (MLLMs) as the MultiModal tools. Download the models and add the folder path into the model_config. Enabling multimodal tools requires at least two A100s. You can disable these tools by using the parameter --action "all_wo_mm"
.
no operations.
We adopt en_core_sci_sm as the name entity recognization model. You can also choose other type of models here. Download the model and install it with pip
:
pip install {path_to_ner_model}
LongDocRAG adopts GPT-3.5-turbo as the chatbot and requires OpenAI API key and the proxy. You need to set the OpenAI API key and proxy as environment variables as follows:
OPENAI_API_KEY={your_openai_api_key}
http_proxy={proxy_url}
https_proxy={proxy_url}