File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 20
20
21
21
## 📢 新闻
22
22
23
+ + 【2024.06.05】 已支持 ` QWEN2 ` 模型,修改环境变量 ` MODEL_NAME=qwen2 ` ` PROMPT_NAME=qwen2 `
24
+
25
+
23
26
+ 【2024.06.05】 支持 ` GLM4 ` 模型,修改环境变量 ` MODEL_NAME=chatglm4 ` ` PROMPT_NAME=chatglm4 `
24
27
25
28
29
32
+ 【2024.04.16】 支持 ` Rerank ` 重排序模型,[ 使用方式] ( ./docs/RAG.md )
30
33
31
34
32
- + 【2024.02.26】 ` QWEN2 ` 模型需要修改环境变量 ` MODEL_NAME=qwen2 ` ` PROMPT_NAME=qwen2 `
35
+ + 【2024.02.26】 ` QWEN1.5 ` 模型需要修改环境变量 ` MODEL_NAME=qwen2 ` ` PROMPT_NAME=qwen2 `
33
36
34
37
35
38
+ 【2024.01.19】 添加 [ InternLM2] ( https://github.com/InternLM/InternLM ) 模型支持,[ 启动方式] ( https://github.com/xusenlinzy/api-for-open-llm/blob/master/docs/SCRIPT.md#internlm2 )
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def create_vllm_engine():
96
96
from vllm .engine .async_llm_engine import AsyncLLMEngine
97
97
from api .core .vllm_engine import VllmEngine , LoRA
98
98
except ImportError :
99
- return None
99
+ raise ValueError ( "VLLM engine not available" )
100
100
101
101
include = {
102
102
"tokenizer_mode" ,
@@ -146,7 +146,7 @@ def create_llama_cpp_engine():
146
146
from llama_cpp import Llama
147
147
from api .core .llama_cpp_engine import LlamaCppEngine
148
148
except ImportError :
149
- return None
149
+ raise ValueError ( "Llama cpp engine not available" )
150
150
151
151
include = {
152
152
"n_gpu_layers" ,
@@ -172,12 +172,12 @@ def create_llama_cpp_engine():
172
172
173
173
174
174
def create_tgi_engine ():
175
- """ get llama.cpp generate engine for chat or completion. """
175
+ """ get tgi generate engine for chat or completion. """
176
176
try :
177
177
from text_generation import AsyncClient
178
178
from api .core .tgi import TGIEngine
179
179
except ImportError :
180
- return None
180
+ raise ValueError ( "TGI engine not available" )
181
181
182
182
client = AsyncClient (SETTINGS .tgi_endpoint )
183
183
logger .info ("Using TGI engine" )
You can’t perform that action at this time.
0 commit comments