flashrag-dev 0.1.2.dev20241102__tar.gz → 0.1.3.dev20241103__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {flashrag-dev-0.1.2.dev20241102/flashrag_dev.egg-info → flashrag-dev-0.1.3.dev20241103}/PKG-INFO +4 -3
  2. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/README.md +3 -2
  3. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/prompt/base_prompt.py +1 -5
  4. flashrag-dev-0.1.3.dev20241103/flashrag/version.py +1 -0
  5. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103/flashrag_dev.egg-info}/PKG-INFO +4 -3
  6. flashrag-dev-0.1.2.dev20241102/flashrag/version.py +0 -1
  7. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/LICENSE +0 -0
  8. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/__init__.py +0 -0
  9. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/config/__init__.py +0 -0
  10. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/config/basic_config.yaml +0 -0
  11. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/config/config.py +0 -0
  12. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/dataset/__init__.py +0 -0
  13. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/dataset/dataset.py +0 -0
  14. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/dataset/utils.py +0 -0
  15. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/evaluator/__init__.py +0 -0
  16. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/evaluator/_bleu.py +0 -0
  17. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/evaluator/evaluator.py +0 -0
  18. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/evaluator/metrics.py +0 -0
  19. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/evaluator/utils.py +0 -0
  20. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/generator/__init__.py +0 -0
  21. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/generator/fid.py +0 -0
  22. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/generator/generator.py +0 -0
  23. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/generator/openai_generator.py +0 -0
  24. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/generator/stop_word_criteria.py +0 -0
  25. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/judger/__init__.py +0 -0
  26. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/judger/judger.py +0 -0
  27. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/pipeline/__init__.py +0 -0
  28. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/pipeline/active_pipeline.py +0 -0
  29. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/pipeline/branching_pipeline.py +0 -0
  30. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/pipeline/pipeline.py +0 -0
  31. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/pipeline/replug_utils.py +0 -0
  32. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/prompt/__init__.py +0 -0
  33. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/prompt/selfask_examplars.py +0 -0
  34. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/prompt/trace_examplars.py +0 -0
  35. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/refiner/__init__.py +0 -0
  36. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/refiner/kg_refiner.py +0 -0
  37. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/refiner/llmlingua_compressor.py +0 -0
  38. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/refiner/refiner.py +0 -0
  39. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/refiner/selective_context_compressor.py +0 -0
  40. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/retriever/__init__.py +0 -0
  41. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/retriever/__main__.py +0 -0
  42. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/retriever/encoder.py +0 -0
  43. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/retriever/index_builder.py +0 -0
  44. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/retriever/reranker.py +0 -0
  45. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/retriever/retriever.py +0 -0
  46. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/retriever/utils.py +0 -0
  47. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/utils/__init__.py +0 -0
  48. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/utils/constants.py +0 -0
  49. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/utils/pred_parse.py +0 -0
  50. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag/utils/utils.py +0 -0
  51. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag_dev.egg-info/SOURCES.txt +0 -0
  52. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag_dev.egg-info/dependency_links.txt +0 -0
  53. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag_dev.egg-info/requires.txt +0 -0
  54. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/flashrag_dev.egg-info/top_level.txt +0 -0
  55. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/pyproject.toml +0 -0
  56. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/setup.cfg +0 -0
  57. {flashrag-dev-0.1.2.dev20241102 → flashrag-dev-0.1.3.dev20241103}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flashrag-dev
3
- Version: 0.1.2.dev20241102
3
+ Version: 0.1.3.dev20241103
4
4
  Summary: A library for efficient Retrieval-Augmented Generation research
5
5
  Home-page: https://github.com/RUC-NLPIR/FlashRAG
6
6
  Author: Jiajie Jin, Yutao Zhu, Chenghao Zhang, Xinyu Yang, Zhicheng Dou
@@ -20,6 +20,7 @@ License-File: LICENSE
20
20
  <div align="center">
21
21
  <a href="https://arxiv.org/abs/2405.13576" target="_blank"><img src=https://img.shields.io/badge/arXiv-b5212f.svg?logo=arxiv></a>
22
22
  <a href="https://huggingface.co/datasets/RUC-NLPIR/FlashRAG_datasets/" target="_blank"><img src=https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace%20Datasets-27b3b4.svg></a>
23
+ <a href="https://www.modelscope.cn/datasets/hhjinjiajie/FlashRAG_Dataset" target="_blank"><img src=https://custom-icon-badges.demolab.com/badge/ModelScope%20Datasets-624aff?style=flat&logo=modelscope&logoColor=white></a>
23
24
  <a href="https://github.com/RUC-NLPIR/FlashRAG/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/LICENSE-MIT-green"></a>
24
25
  <a><img alt="Static Badge" src="https://img.shields.io/badge/made_with-Python-blue"></a>
25
26
  </div>
@@ -112,7 +113,7 @@ FlashRAG is still under development and there are many issues and room for impro
112
113
 
113
114
  To get started with FlashRAG, you can simply install it with pip:
114
115
  ```base
115
- pip install flashrag-dev[core]
116
+ pip install flashrag-dev --pre
116
117
  ```
117
118
 
118
119
  Or you can clone it from Github and install (requires Python 3.9+):
@@ -120,7 +121,7 @@ Or you can clone it from Github and install (requires Python 3.9+):
120
121
  ```bash
121
122
  git clone https://github.com/RUC-NLPIR/FlashRAG.git
122
123
  cd FlashRAG
123
- pip install -e .[core]
124
+ pip install -e .
124
125
  ```
125
126
 
126
127
  If you want to use vllm, sentence-transformers or pyserini, you can install the optional dependencies:
@@ -4,6 +4,7 @@
4
4
  <div align="center">
5
5
  <a href="https://arxiv.org/abs/2405.13576" target="_blank"><img src=https://img.shields.io/badge/arXiv-b5212f.svg?logo=arxiv></a>
6
6
  <a href="https://huggingface.co/datasets/RUC-NLPIR/FlashRAG_datasets/" target="_blank"><img src=https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace%20Datasets-27b3b4.svg></a>
7
+ <a href="https://www.modelscope.cn/datasets/hhjinjiajie/FlashRAG_Dataset" target="_blank"><img src=https://custom-icon-badges.demolab.com/badge/ModelScope%20Datasets-624aff?style=flat&logo=modelscope&logoColor=white></a>
7
8
  <a href="https://github.com/RUC-NLPIR/FlashRAG/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/LICENSE-MIT-green"></a>
8
9
  <a><img alt="Static Badge" src="https://img.shields.io/badge/made_with-Python-blue"></a>
9
10
  </div>
@@ -96,7 +97,7 @@ FlashRAG is still under development and there are many issues and room for impro
96
97
 
97
98
  To get started with FlashRAG, you can simply install it with pip:
98
99
  ```base
99
- pip install flashrag-dev[core]
100
+ pip install flashrag-dev --pre
100
101
  ```
101
102
 
102
103
  Or you can clone it from Github and install (requires Python 3.9+):
@@ -104,7 +105,7 @@ Or you can clone it from Github and install (requires Python 3.9+):
104
105
  ```bash
105
106
  git clone https://github.com/RUC-NLPIR/FlashRAG.git
106
107
  cd FlashRAG
107
- pip install -e .[core]
108
+ pip install -e .
108
109
  ```
109
110
 
110
111
  If you want to use vllm, sentence-transformers or pyserini, you can install the optional dependencies:
@@ -124,11 +124,7 @@ class PromptTemplate:
124
124
  input.append({"role": "system", "content": system_prompt})
125
125
  if user_prompt != "":
126
126
  input.append({"role": "user", "content": user_prompt})
127
- if self.is_openai:
128
- for item in input:
129
- if item["role"] == "system":
130
- item["role"] = "assistant"
131
- else:
127
+ if not self.is_openai:
132
128
  input = self.tokenizer.apply_chat_template(input, tokenize=False, add_generation_prompt=True)
133
129
  else:
134
130
  input = "\n\n".join([prompt for prompt in [system_prompt, user_prompt] if prompt != ""])
@@ -0,0 +1 @@
1
+ __version__ = "0.1.3dev20241103"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flashrag-dev
3
- Version: 0.1.2.dev20241102
3
+ Version: 0.1.3.dev20241103
4
4
  Summary: A library for efficient Retrieval-Augmented Generation research
5
5
  Home-page: https://github.com/RUC-NLPIR/FlashRAG
6
6
  Author: Jiajie Jin, Yutao Zhu, Chenghao Zhang, Xinyu Yang, Zhicheng Dou
@@ -20,6 +20,7 @@ License-File: LICENSE
20
20
  <div align="center">
21
21
  <a href="https://arxiv.org/abs/2405.13576" target="_blank"><img src=https://img.shields.io/badge/arXiv-b5212f.svg?logo=arxiv></a>
22
22
  <a href="https://huggingface.co/datasets/RUC-NLPIR/FlashRAG_datasets/" target="_blank"><img src=https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace%20Datasets-27b3b4.svg></a>
23
+ <a href="https://www.modelscope.cn/datasets/hhjinjiajie/FlashRAG_Dataset" target="_blank"><img src=https://custom-icon-badges.demolab.com/badge/ModelScope%20Datasets-624aff?style=flat&logo=modelscope&logoColor=white></a>
23
24
  <a href="https://github.com/RUC-NLPIR/FlashRAG/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/LICENSE-MIT-green"></a>
24
25
  <a><img alt="Static Badge" src="https://img.shields.io/badge/made_with-Python-blue"></a>
25
26
  </div>
@@ -112,7 +113,7 @@ FlashRAG is still under development and there are many issues and room for impro
112
113
 
113
114
  To get started with FlashRAG, you can simply install it with pip:
114
115
  ```base
115
- pip install flashrag-dev[core]
116
+ pip install flashrag-dev --pre
116
117
  ```
117
118
 
118
119
  Or you can clone it from Github and install (requires Python 3.9+):
@@ -120,7 +121,7 @@ Or you can clone it from Github and install (requires Python 3.9+):
120
121
  ```bash
121
122
  git clone https://github.com/RUC-NLPIR/FlashRAG.git
122
123
  cd FlashRAG
123
- pip install -e .[core]
124
+ pip install -e .
124
125
  ```
125
126
 
126
127
  If you want to use vllm, sentence-transformers or pyserini, you can install the optional dependencies:
@@ -1 +0,0 @@
1
- __version__ = "0.1.2dev20241102"