(origin: string)
| 162 | } |
| 163 | |
| 164 | export function cozeTemplate(origin: string) { |
| 165 | |
| 166 | let system = config.system_role[config.service] || defaultOption.system_role; |
| 167 | let user = (config.user_role[config.service] || defaultOption.user_role) |
| 168 | .replace('{{to}}', config.to).replace('{{origin}}', origin); |
| 169 | |
| 170 | return JSON.stringify({ |
| 171 | bot_id: config.robot_id[config.service], |
| 172 | user: "FluentRead", |
| 173 | query: system + user, |
| 174 | stream: false |
| 175 | }); |
| 176 | } |