Skip to content

Commit 93e5c9d

Browse files
committed
feat: enhance model provider with additional LLM and embedding models
1 parent a05573b commit 93e5c9d

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

apps/models_provider/impl/wenxin_model_provider/wenxin_model_provider.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,28 @@
3131
ModelTypeConst.LLM, win_xin_llm_model_credential, QianfanChatModel),
3232
ModelInfo('qianfan-chinese-llama-2-13b',
3333
'',
34-
ModelTypeConst.LLM, win_xin_llm_model_credential, QianfanChatModel)
34+
ModelTypeConst.LLM, win_xin_llm_model_credential, QianfanChatModel),
35+
ModelInfo('ernie-4.5-turbo-32k', '', ModelTypeConst.LLM, win_xin_llm_model_credential,
36+
QianfanChatModel),
37+
ModelInfo('ernie-speed-8k', '', ModelTypeConst.LLM, win_xin_llm_model_credential, QianfanChatModel),
38+
ModelInfo('ernie-4.5-0.3b', '', ModelTypeConst.LLM, win_xin_llm_model_credential, QianfanChatModel)
3539

3640
]
37-
embedding_model_info = ModelInfo('Embedding-V1',
38-
_('Embedding-V1 is a text representation model based on Baidu Wenxin large model technology. It can convert text into a vector form represented by numerical values and can be used in text retrieval, information recommendation, knowledge mining and other scenarios. Embedding-V1 provides the Embeddings interface, which can generate corresponding vector representations based on input content. You can call this interface to input text into the model and obtain the corresponding vector representation for subsequent text processing and analysis.'),
39-
ModelTypeConst.EMBEDDING, qianfan_embedding_credential, QianfanEmbeddings)
41+
embedding_model_info_list = [ModelInfo('Embedding-V1',
42+
_('Embedding-V1 is a text representation model based on Baidu Wenxin large model technology. It can convert text into a vector form represented by numerical values and can be used in text retrieval, information recommendation, knowledge mining and other scenarios. Embedding-V1 provides the Embeddings interface, which can generate corresponding vector representations based on input content. You can call this interface to input text into the model and obtain the corresponding vector representation for subsequent text processing and analysis.'),
43+
ModelTypeConst.EMBEDDING, qianfan_embedding_credential, QianfanEmbeddings),
44+
ModelInfo('tao-8k', '', ModelTypeConst.EMBEDDING, qianfan_embedding_credential,
45+
QianfanEmbeddings),
46+
ModelInfo('bge-large-zh', '', ModelTypeConst.EMBEDDING, qianfan_embedding_credential,
47+
QianfanEmbeddings)
48+
]
4049
model_info_manage = ModelInfoManage.builder().append_model_info_list(model_info_list).append_default_model_info(
4150
ModelInfo('ERNIE-Bot-4',
4251
_('ERNIE-Bot-4 is a large language model independently developed by Baidu. It covers massive Chinese data and has stronger capabilities in dialogue Q&A, content creation and generation.'),
4352
ModelTypeConst.LLM,
4453
win_xin_llm_model_credential,
45-
QianfanChatModel)).append_model_info(embedding_model_info).append_default_model_info(
46-
embedding_model_info).build()
54+
QianfanChatModel)).append_model_info_list(embedding_model_info_list).append_default_model_info(
55+
embedding_model_info_list[0]).build()
4756

4857

4958
class WenxinModelProvider(IModelProvider):

0 commit comments

Comments
 (0)