mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-22 07:31:05 +08:00
Fix: add new default moonshot model (#17106)
This commit is contained in:
@@ -717,11 +717,13 @@ async def verify_api_key(provider_id_or_name: str, api_key: str | dict, base_url
|
||||
continue
|
||||
mdl = ChatModel[provider_name](api_key_str, llm["llm_name"], base_url=base_url, **extra)
|
||||
|
||||
temperature = 1 if llm["llm_name"] in ("kimi-k3", "kimi-k2.7-code") else 0.9
|
||||
|
||||
async def check_streamly():
|
||||
async for chunk in mdl.async_chat_streamly(
|
||||
None,
|
||||
[{"role": "user", "content": "Hi"}],
|
||||
{"temperature": 0.9},
|
||||
{"temperature": temperature},
|
||||
):
|
||||
if chunk and isinstance(chunk, str) and chunk.find("**ERROR**") < 0:
|
||||
return True
|
||||
|
||||
@@ -1806,6 +1806,27 @@
|
||||
"rank": "995",
|
||||
"url": "https://api.moonshot.cn/v1",
|
||||
"llm": [
|
||||
{
|
||||
"llm_name": "kimi-k3",
|
||||
"tags": "LLM,CHAT,1M",
|
||||
"max_tokens": 1048576,
|
||||
"model_type": "chat",
|
||||
"is_tools": true
|
||||
},
|
||||
{
|
||||
"llm_name": "kimi-k2.6",
|
||||
"tags": "LLM,CHAT,256k",
|
||||
"max_tokens": 262144,
|
||||
"model_type": "chat",
|
||||
"is_tools": true
|
||||
},
|
||||
{
|
||||
"llm_name": "kimi-k2.7-code",
|
||||
"tags": "LLM,CHAT,256k",
|
||||
"max_tokens": 262144,
|
||||
"model_type": "chat",
|
||||
"is_tools": true
|
||||
},
|
||||
{
|
||||
"llm_name": "kimi-thinking-preview",
|
||||
"tags": "LLM,CHAT,1M",
|
||||
|
||||
Reference in New Issue
Block a user