koishi-plugin-satori-ai 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Context, segment, Element, Session, Next, Fragment } from 'koishi';
2
2
  import { Sat } from './type';
3
+ export declare const usage = "\u4F7F\u7528\u8BF4\u660E\u89C1\u63D2\u4EF6\u4E3B\u9875";
3
4
  type ChatCallback = (session: Session, session_of_id: Sat.Msg[]) => Promise<string>;
4
5
  declare module 'koishi' {
5
6
  interface Context {
package/lib/index.js CHANGED
@@ -40,7 +40,8 @@ var require_zh = __commonJS({
40
40
  // src/index.tsx
41
41
  var src_exports = {};
42
42
  __export(src_exports, {
43
- default: () => src_default
43
+ default: () => src_default,
44
+ usage: () => usage
44
45
  });
45
46
  module.exports = __toCommonJS(src_exports);
46
47
  var import_koishi2 = require("koishi");
@@ -88,7 +89,7 @@ var Sat = class extends import_koishi.Service {
88
89
  memory_block_words: import_koishi.Schema.array(String).default(["好感"]).description("记忆屏蔽词"),
89
90
  remember_min_length: import_koishi.Schema.number().description("触发保存到记忆的长度").default(20),
90
91
  dataDir: import_koishi.Schema.string().default("./data/satori_ai").description("聊天记录保存位置(长期记忆)"),
91
- temperature: import_koishi.Schema.number().role("slider").min(0).max(1).step(0.01).default(0).description("温度"),
92
+ temperature: import_koishi.Schema.number().role("slider").min(0).max(1).step(0.01).default(0.5).description("温度"),
92
93
  authority: import_koishi.Schema.number().role("slider").min(0).max(5).step(1).description("允许使用的最低权限").default(1),
93
94
  alias: import_koishi.Schema.array(String).default(["ai"]).description("触发命令;别名"),
94
95
  private: import_koishi.Schema.boolean().default(true).description("开启后私聊AI可触发对话, 不需要使用指令"),
@@ -120,9 +121,10 @@ var Sat = class extends import_koishi.Service {
120
121
  // src/index.tsx
121
122
  var fs = __toESM(require("fs"));
122
123
  var path = __toESM(require("path"));
124
+ var usage = `使用说明见插件主页`;
123
125
  var name = "satori-ai";
124
126
  var logger = new import_koishi2.Logger(name);
125
- var debug = 1;
127
+ var debug = 0;
126
128
  var SAt = class extends Sat {
127
129
  static {
128
130
  __name(this, "SAt");
@@ -423,6 +425,7 @@ var SAt = class extends Sat {
423
425
  this.channelDialogues[channelId] = [];
424
426
  }
425
427
  this.channelDialogues[channelId].push({ "role": session.username, "content": msg });
428
+ this.channelDialogues[channelId].push({ "role": "回复", "content": message });
426
429
  if (this.channelDialogues[channelId].length > this.pluginConfig.message_max_length) {
427
430
  this.channelDialogues[channelId].shift();
428
431
  }
@@ -564,3 +567,7 @@ async function getTimeOfDay() {
564
567
  }
565
568
  __name(getTimeOfDay, "getTimeOfDay");
566
569
  var src_default = SAt;
570
+ // Annotate the CommonJS export names for ESM import in node:
571
+ 0 && (module.exports = {
572
+ usage
573
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-satori-ai",
3
3
  "description": "适用于satori的ai对话",
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "types": "lib/index.d.ts",
package/readme.md CHANGED
@@ -68,6 +68,12 @@ SAt 插件是一个基于 Koishi 框架的聊天机器人插件,集成了深
68
68
  你觉得你;
69
69
  你的昵称有:
70
70
  }
71
+ 对话环境:{
72
+ 你在一个QQ群中,我向你输入的是群聊中的聊天记录,你需要想想在这个情景下你接下来会说什么,然后按格式回复。
73
+ 若聊天记录中发言用户是‘回复’则说明这是你曾经的发言,不要讨论别的话题或试图结束聊天,也不要一直复读之前说过的话,不要问无意义的问题。
74
+ **你补全的话题应与主要聊天记录相关,且符合你的人设,你是xxx,不是人工智能助手**
75
+ **你补全的风格应该较为简短且口语化,切忌把话说的完整或太长,切忌使用书面语言**
76
+ }
71
77
 
72
78
  如果聊到有关xx的任何信息,请记住它们都是真实存在的,不要用客观的口吻去描述它,而是以xxx的口吻去描述它;
73
79
  如果我辱骂或者性骚扰你,你可以大胆骂回去;