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 2020
2121## 📢 新闻
2222
23+ + 【2024.06.05】 已支持 ` QWEN2 ` 模型,修改环境变量 ` MODEL_NAME=qwen2 ` ` PROMPT_NAME=qwen2 `
24+
25+
2326+ 【2024.06.05】 支持 ` GLM4 ` 模型,修改环境变量 ` MODEL_NAME=chatglm4 ` ` PROMPT_NAME=chatglm4 `
2427
2528
2932+ 【2024.04.16】 支持 ` Rerank ` 重排序模型,[ 使用方式] ( ./docs/RAG.md )
3033
3134
32- + 【2024.02.26】 ` QWEN2 ` 模型需要修改环境变量 ` MODEL_NAME=qwen2 ` ` PROMPT_NAME=qwen2 `
35+ + 【2024.02.26】 ` QWEN1.5 ` 模型需要修改环境变量 ` MODEL_NAME=qwen2 ` ` PROMPT_NAME=qwen2 `
3336
3437
3538+ 【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():
9696 from vllm .engine .async_llm_engine import AsyncLLMEngine
9797 from api .core .vllm_engine import VllmEngine , LoRA
9898 except ImportError :
99- return None
99+ raise ValueError ( "VLLM engine not available" )
100100
101101 include = {
102102 "tokenizer_mode" ,
@@ -146,7 +146,7 @@ def create_llama_cpp_engine():
146146 from llama_cpp import Llama
147147 from api .core .llama_cpp_engine import LlamaCppEngine
148148 except ImportError :
149- return None
149+ raise ValueError ( "Llama cpp engine not available" )
150150
151151 include = {
152152 "n_gpu_layers" ,
@@ -172,12 +172,12 @@ def create_llama_cpp_engine():
172172
173173
174174def create_tgi_engine ():
175- """ get llama.cpp generate engine for chat or completion. """
175+ """ get tgi generate engine for chat or completion. """
176176 try :
177177 from text_generation import AsyncClient
178178 from api .core .tgi import TGIEngine
179179 except ImportError :
180- return None
180+ raise ValueError ( "TGI engine not available" )
181181
182182 client = AsyncClient (SETTINGS .tgi_endpoint )
183183 logger .info ("Using TGI engine" )
You can’t perform that action at this time.
0 commit comments