Skip to content

Commit

Permalink
支持探索版和K1模型,修复图像解析能力
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinlic committed Dec 17, 2024
1 parent 1dd7f89 commit 1375e7c
Show file tree
Hide file tree
Showing 8 changed files with 2,017 additions and 235 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,14 @@ Authorization: Bearer [refresh_token]
请求数据:
```json
{
// model随意填写,如果不希望输出检索过程模型名称请包含silent_search
// 模型名称
// kimi:默认模型
// kimi-search:联网检索模型
// kimi-research:探索版模型
// kimi-k1:K1模型
// kimi-math:数学模型
// kimi-silent:不输出检索过程模型
// search/research/k1/math/silent:可自由组合使用
// 如果使用kimi+智能体,model请填写智能体ID,就是浏览器地址栏上尾部的一串英文+数字20个字符的ID
"model": "kimi",
// 目前多轮对话基于消息合并实现,某些场景可能导致能力下降且受单轮最大Token数限制
Expand Down Expand Up @@ -341,7 +348,15 @@ Authorization: Bearer [refresh_token]
请求数据:
```json
{
// 模型名称随意填写,如果不希望输出检索过程模型名称请包含silent_search
// 模型名称
// kimi:默认模型
// kimi-search:联网检索模型
// kimi-research:探索版模型
// kimi-k1:K1模型
// kimi-math:数学模型
// kimi-silent:不输出检索过程模型
// search/research/k1/math/silent:可自由组合使用
// 如果使用kimi+智能体,model请填写智能体ID,就是浏览器地址栏上尾部的一串英文+数字20个字符的ID
"model": "kimi",
"messages": [
{
Expand Down Expand Up @@ -407,7 +422,15 @@ Authorization: Bearer [refresh_token]
请求数据:
```json
{
// 模型名称随意填写,如果不希望输出检索过程模型名称请包含silent_search
// 模型名称
// kimi:默认模型
// kimi-search:联网检索模型
// kimi-research:探索版模型
// kimi-k1:K1模型
// kimi-math:数学模型
// kimi-silent:不输出检索过程模型
// search/research/k1/math/silent:可自由组合使用
// 如果使用kimi+智能体,model请填写智能体ID,就是浏览器地址栏上尾部的一串英文+数字20个字符的ID
"model": "kimi",
"messages": [
{
Expand Down
70 changes: 47 additions & 23 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,15 @@ Authorization: Bearer [refresh_token]
Request data:
```json
{
// Fill in the model name as you like. If you do not want to output the retrieval process model name, please include silent_search.
// Model name
// kimi: default model
// kimi-search: online search model
// kimi-research: exploration version model
// kimi-k1: K1 model
// kimi-math: math model
// kimi-silent: model without search process output
// search/research/k1/math/silent: can be freely combined
// If using kimi+agent, fill in the agent ID for model, which is the 20-character ID of letters and numbers at the end of the browser address bar
"model": "kimi",
"messages": [
{
Expand Down Expand Up @@ -317,27 +325,35 @@ Authorization: Bearer [refresh_token]
Request data:
```json
{
// Fill in the model name as you like. If you do not want to output the retrieval process model name, please include silent_search.
"model": "kimi",
"messages": [
{
"role": "user",
"content": [
{
"type": "file",
"file_url": {
"url": "https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf"
}
},
{
"type": "text",
"text": "What does the document say?"
}
]
}
],
// It is recommended to turn off online search to prevent interference in interpreting results.
"use_search": false
// Model name
// kimi: default model
// kimi-search: online search model
// kimi-research: exploration version model
// kimi-k1: K1 model
// kimi-math: math model
// kimi-silent: model without search process output
// search/research/k1/math/silent: can be freely combined
// If using kimi+agent, fill in the agent ID for model, which is the 20-character ID of letters and numbers at the end of the browser address bar
"model": "kimi",
"messages": [
{
"role": "user",
"content": [
{
"type": "file",
"file_url": {
"url": "https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf"
}
},
{
"type": "text",
"text": "What does the document say?"
}
]
}
],
// It is recommended to turn off online search to prevent interference in interpreting results.
"use_search": false
}
```

Expand Down Expand Up @@ -383,7 +399,15 @@ Authorization: Bearer [refresh_token]
Request data:
```json
{
// Fill in the model name as you like. If you do not want to output the retrieval process model name, please include silent_search.
// Model name
// kimi: default model
// kimi-search: online search model
// kimi-research: exploration version model
// kimi-k1: K1 model
// kimi-math: math model
// kimi-silent: model without search process output
// search/research/k1/math/silent: can be freely combined
// If using kimi+agent, fill in the agent ID for model, which is the 20-character ID of letters and numbers at the end of the browser address bar
"model": "kimi",
"messages": [
{
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kimi-free-api",
"version": "0.0.34",
"version": "0.0.36",
"description": "Kimi Free API Server",
"type": "module",
"main": "dist/index.js",
Expand All @@ -13,8 +13,8 @@
"dist/"
],
"scripts": {
"dev": "tsup src/index.ts --format cjs,esm --sourcemap --dts --publicDir public --watch --onSuccess \"node dist/index.js\"",
"start": "node dist/index.js",
"dev": "tsup src/index.ts --format cjs,esm --sourcemap --dts --publicDir public --watch --onSuccess \"node --enable-source-maps --no-node-snapshot dist/index.js\"",
"start": "node --enable-source-maps --no-node-snapshot dist/index.js",
"build": "tsup src/index.ts --format cjs,esm --sourcemap --dts --clean --publicDir public"
},
"author": "Vinlic",
Expand Down
3 changes: 2 additions & 1 deletion src/api/consts/exceptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export default {
API_TOKEN_EXPIRES: [-2002, 'Token已失效'],
API_FILE_URL_INVALID: [-2003, '远程文件URL非法'],
API_FILE_EXECEEDS_SIZE: [-2004, '远程文件超出大小'],
API_CHAT_STREAM_PUSHING: [-2005, '已有对话流正在输出']
API_CHAT_STREAM_PUSHING: [-2005, '已有对话流正在输出'],
API_RESEARCH_EXCEEDS_LIMIT: [-2006, '探索版使用量已达到上限']
}
Loading

0 comments on commit 1375e7c

Please sign in to comment.