mirror of
https://github.com/LLM-Red-Team/kimi-free-api.git
synced 2024-11-01 18:09:20 +08:00
Release 0.0.21
This commit is contained in:
parent
462c64656e
commit
520f26f72f
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kimi-free-api",
|
||||
"version": "0.0.20",
|
||||
"version": "0.0.21",
|
||||
"description": "Kimi Free API Server",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
@ -386,13 +386,12 @@ function messagesPrepare(messages: any[]) {
|
||||
if (Array.isArray(message.content)) {
|
||||
return message.content.reduce((_content, v) => {
|
||||
if (!_.isObject(v) || v['type'] != 'text') return _content;
|
||||
return _content + `\n${message.role || "user"}:${v["text"] || ""}`;
|
||||
return _content + `${message.role || "user"}:${v["text"] || ""}\n`;
|
||||
}, content);
|
||||
}
|
||||
return content += `\n${message.role || 'user'}:${wrapUrlsToTags(message.content)}`;
|
||||
return content += `${message.role || 'user'}:${wrapUrlsToTags(message.content)}\n`;
|
||||
}, '');
|
||||
|
||||
logger.info("\n对话合并:" + content);
|
||||
logger.info("\n对话合并:\n" + content);
|
||||
return [
|
||||
{ role: 'user', content }
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user