61 |
62 |
63 |
64 | 下面介绍各个配置的含义。
65 |
66 | {% hint style="info" %}
67 | **请注意**
68 |
69 | 所有的配置项都要写在 `[response]` 的后面,你只需要写一个 `[response]`,然后跟着配置项和参数即可。
70 | {% endhint %}
71 |
72 | ## 响应模式
73 |
74 | ```toml
75 | [response]
76 | # 默认的响应模式
77 |
78 | mode = "mixed"
79 | ```
80 |
81 | 目前支持三种响应模式:
82 |
83 | * `mixed` - 图文混合模式
84 |
85 | 在这个模式下,普通文本会以文字形式发送,而 Markdown、公式等富文本会以图片形式发送。
86 | * `text` - 文本模式
87 |
88 | 在这个模式下,消息会全部以文字的形式发送。
89 |
90 | 需要注意的是,在 QQ 群中,由于腾讯风控比较严格,文字消息可能会发送失败。此时机器人会尝试使用图片模式来重新发送内容。
91 | * `image` - 图片模式
92 |
93 | 在这个模式下,机器人的消息会渲染成图片再发送。
94 |
95 | 有关渲染成图片的有关设置请阅读:
96 |
97 | [wen-zi-zhuan-tu-pian.md](../wen-zi-zhuan-tu-pian.md "mention")
98 |
99 | 除此之外,你也可以在聊天窗口发送命令来切换响应模式,关于这部分的操作请阅读指令章节。
100 |
101 |
102 |
103 | ## 分段发送
104 |
105 | 有些时候,AI 生成回复所花费的时间过长。 为了避免长时间的等待,我们加入了分段发送功能。
106 |
107 | ```toml
108 | [response]
109 |
110 | # 分段发送延迟
111 | # 设置为 0 关闭分段发送功能
112 | buffer_delay = 15
113 | ```
114 |
115 | 这个功能会每隔一段时间将 AI 生成的内容发送给用户,参数的单位为秒。
116 |
117 | 如果你要开启这个功能,建议把参数设置为 15 或以上,以免出现 BUG 和刷屏。
118 |
119 | 如果你把参数设置成 0,即表示关闭分段发送功能,消息会等待 AI 全部生成完毕以后再回复。
120 |
121 |
122 |
123 | ## 默认语言模型
124 |
125 | 你可以在配置文件中指定默认使用的语言模型。
126 |
127 | 默认情况下,程序会根据已经接入的语言模型设置,自动选择语言模型(不要钱的优先)。
128 |
129 | ```toml
130 | [response]
131 |
132 | default_ai = "chatgpt-web"
133 | ```
134 |
135 | 可以填的参数:
136 |
137 | * `chatgpt-web`- 网页版 ChatGPT
138 | * `chatgpt-api` - API 版 ChatGPT (GPT3.5-turbo)
139 | * `bing-c` - New Bing (新必应对话风格-创造力)
140 | * `bing-p` - New Bing (新必应对话风格-精确)
141 | * `bing-b` - New Bing (新必应对话风格-平衡)
142 | * `bard` - Google Bard
143 | * `yiyan` - 百度 文心一言 网页版
144 | * `chatglm-api` - 清华 ChatGLM-API 接口
145 | * `xinghuo` - 讯飞星火模型
146 | * `poe-sage` - POE Sage 模型
147 | * `poe-beaver` - POE GPT4 模型
148 | * `poe-claude2` - POE Claude2 模型
149 | * `poe-claude` - POE Claude 模型
150 | * `poe-chatgpt` - POE ChatGPT 模型
151 | * `poe-nutria` - POE Dragonfly 模型
152 |
153 | ## 引用发送的消息
154 |
155 | 你可以设置机器人在回复时引用发送的消息,方便定位上下文。
156 |
157 | ```toml
158 | [response]
159 |
160 | quote = true
161 | ```
162 |
163 | ## 消息排队
164 |
165 | 因为聊天是有上下文的,机器人必须一条一条地处理发送过来的消息,才能保证上下文的连贯性。
166 |
167 | 当消息发送过多,机器人还没来得及反应时,后来的消息会加入到一个队列中等待。
168 |
169 | ```toml
170 | [response]
171 |
172 | # 等待处理的消息的最大数量,如果要关闭此功能,设置为 0
173 | max_queue_size = 10
174 |
175 | # 队列满时的提示
176 | queue_full = "抱歉!我现在要回复的人有点多,暂时没有办法接收新的消息了,请过会儿再给我发吧!"
177 |
178 | # 新消息加入队列会发送通知的长度最小值
179 | queued_notice_size = 3
180 |
181 | # 新消息进入队列时,发送的通知。 queue_size 是当前排队的消息数
182 | queued_notice = "消息已收到!当前我还有{queue_size}条消息要回复,请您稍等。"
183 | ```
184 |
185 | ## 消息等待
186 |
187 | 如果语言模型太久没有响应,机器人可以发送一段消息安抚用户。
188 |
189 | ```toml
190 | [response]
191 |
192 | # 发送下面那个提醒之前的等待时间
193 | timeout = 30.0
194 |
195 | # 超过响应时间时要发送的提醒
196 | timeout_format = "我还在思考中,请再等一下~"
197 |
198 | max_timeout = 600
199 | # 对于每个提问的最长等待时间,超过此时间不再等待
200 |
201 | cancel_wait_too_long = "啊哦,这个问题有点难,让我想了好久也没想明白。试试换个问法?"
202 | # 超过最长等待时间后发送的信息
203 | ```
204 |
205 | 当超过最长等待时间时,机器人会取消这次语言模型的生成请求。
206 |
207 | ## 其他消息提示
208 |
209 | ```toml
210 | [response]
211 |
212 | # 匹配指令成功但没有对话内容时发送的消息
213 | placeholder = "您好!我是 Assistant,一个由 OpenAI 训练的大型语言模型。我不是真正的人,而是一个计算机程序,可以通过文本聊天来帮助您解决问题。如果您有任何问题,请随时告诉我,我将尽力回答。\n如果您需要重置我们的会话,请回复`重置会话`。"
214 |
215 | # 发生错误时要发送的消息
216 | error_format = "出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚会话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n{exc}"
217 |
218 | # 发生网络错误时发送的消息,请注意可以插入 {exc} 作为异常占位符
219 | error_network_failure = "网络故障!连接 OpenAI 服务器失败,我需要更好的网络才能服务!\n{exc}"
220 |
221 | # OpenAI 账号登录失效时的提示
222 | error_session_authenciate_failed = "身份验证失败!无法登录至 ChatGPT 服务器,请检查账号信息是否正确!\n{exc}"
223 |
224 | # OpenAI 提示 Too many requests(太多请求) 时的提示
225 | error_request_too_many = "糟糕!当前收到的请求太多了,我需要一段时间冷静冷静。你可以选择“重置会话”,或者过一会儿再来找我!\n{exc}"
226 |
227 | # 服务器提示 Server overloaded(过载) 时的提示
228 | error_server_overloaded = "抱歉,当前服务器压力有点大,请稍后再找我吧!"
229 |
230 | # 重置会话时发送的消息
231 | reset = "会话已重置。"
232 |
233 | # 回滚成功时发送的消息
234 | rollback_success = "已回滚至上一条对话,你刚刚发的我就忘记啦!"
235 |
236 | # 回滚失败时发送的消息
237 | rollback_fail = "回滚失败,没有更早的记录了!"
238 | ```
239 |
240 |
--------------------------------------------------------------------------------
/pei-zhi-wen-jian-jiao-cheng/jie-ru-ai-ping-tai/jie-ru-openai-de-chatgpt.md:
--------------------------------------------------------------------------------
1 | # 🤨 接入 OpenAI 的 ChatGPT
2 |
3 | OpenAI 的 ChatGPT 是我们最早支持的语言模型。
4 |
5 | ChatGPT 分为两种,一种是网页版,另一种是 API 版。
6 |
7 | OpenAI 的设置开始于一行 `[openai]` ,随后每个账号的设置开始于一行 `[[openai.accounts]]`。
8 |
9 | ## **👨🏻💻 接入网页版 OpenAI ChatGPT**
10 |
11 | 网页版即使用 `https://chat.openai.com` 里的 ChatGPT。
12 |
13 | **优点**:更聪明、不花钱
14 |
15 | **缺点**:一次只能回复一个人、可能会封号
16 |
17 | 我们提供了多种不同的方式登录网页版,你可以选择你觉得最好用的那一种。
18 |
19 | ### **登录方式一:access\_token**
20 |
21 | 这种登录方式被认为是最简单的登录方式。
22 |
23 | 你只需要在 `[openai]` 的后面加入这一段:
24 |
25 | ```toml
26 | # 第 N 个 OpenAI 账号的登录信息ml
27 | [[openai.accounts]]
28 | access_token = "一串 ey 开头的东西"
29 | ```
30 |
31 | **access\_token 获取方法:**
32 |
33 | 1. 浏览器打开并登录登录 ChatGPT
34 | 2. 打开 [https://chat.openai.com/api/auth/session](https://chat.openai.com/api/auth/session)
35 | 3. 你可以看见下面一段 JSON 代码:
36 |
37 | ```json
38 | {
39 | "user": {
40 | "id": "user-*****",
41 | "name": "***",
42 | "email": "***",
43 | "image": "***",
44 | "picture": "***",
45 | "groups": []
46 | },
47 | "expires": "2023-03-18T09:11:03.546Z",
48 | "accessToken": "eyJhbGciOiJS*****X7GdA"
49 | }
50 | ```
51 |
52 | 4. 提取出这段代码中的 `"eyJhbGciOiJS*****X7GdA"` ,填写到配置文件中即可。
53 | 5. accessToken 的有效期为 14 天,到期后需要使用同样的方法进行更换。
54 |
55 | ### **登录方式二:邮箱密码**
56 |
57 | 邮箱密码登录的方式可以解决 accessToken 过期的问题。
58 |
59 | 如果你要用这种方法,只要这么写:
60 |
61 | ```toml
62 | # 第 N 个 OpenAI 账号的登录信息
63 | [[openai.accounts]]
64 | # 你的 OpenAI 邮箱
65 | email = "xxxx"
66 | # 你的 OpenAI 密码
67 | password = "xxx"
68 | ```
69 |
70 | ### **相关设置**
71 |
72 | 在设置账号之后,你还可以为每个账号进行一些不同的设置。
73 |
74 | #### **1. 网页版接入点**
75 |
76 | {% hint style="info" %}
77 | 这项设置是全局生效的(所有账号只需要设置一次)。
78 | {% endhint %}
79 |
80 | 我们通过一种特殊的方法访问 OpenAI 的网页版 ChatGPT,这需要我们指定一个网页版的接入点。
81 |
82 | 你可以用这个项目搭建一个自己的接入点:[https://github.com/linweiyuan/go-chatgpt-api](https://github.com/linweiyuan/go-chatgpt-api)
83 |
84 | ```toml
85 | [openai]
86 | # 网页版 ChatGPT 接入点,欢迎在交流群中分享你的接入点
87 | browserless_endpoint = "https://chatgpt-proxy.lss233.com/api/"
88 | ```
89 |
90 | #### **2. 对话记录自动删除**
91 |
92 | {% hint style="info" %}
93 | 这项设置是每个账号独立的。
94 | {% endhint %}
95 |
96 | 开启后,当用户重置会话时,旧的会话会自动删除。
97 |
98 | ```toml
99 | [[openai.accounts]]
100 | # 省略的账号信息
101 |
102 | auto_remove_old_conversations = true
103 | ```
104 |
105 | #### **3.会话标题重命名**
106 |
107 | {% hint style="info" %}
108 | 这项设置是每个账号独立的。
109 | {% endhint %}
110 |
111 | 开启后,当用户创建新的会话时,会根据设置中的规则来修改会话的标题。
112 |
113 | ```toml
114 | [[openai.accounts]]
115 | # 省略的账号信息
116 |
117 | title_pattern="qq-{session_id}"
118 | ```
119 |
120 | 当你按照这个格式进行设置之后,新创建的对话将会以 `qq-friend-好友QQ` 或 `qq-group-群号` 进行命名。
121 |
122 | 这里的 `{session_id}` 是一个变量,它在程序启动之后会根据聊天信息的发送者动态变化。
123 |
124 | * 如果是一个好友给机器人发送消息,则 `{session_id}` 会变成 `qq-friend-好友QQ`
125 | * 如果是一个群聊给机器人发送消息,则 `{session_id}` 会变成 `qq-group-群号`
126 |
127 | #### **4.使用代理**
128 |
129 | {% hint style="info" %}
130 | 这项设置是每个账号独立的。
131 | {% endhint %}
132 |
133 | 由于 OpenAI 现在封锁了中国大陆的 IP 请求,因此我们建议在国内部署的同学都使用代理访问。
134 |
135 | ```toml
136 | [[openai.accounts]]
137 | # 省略的账号信息
138 |
139 | # 这里填写的内容由你的代理程序提供
140 | proxy="http://127.0.0.1:1080"
141 | ```
142 |
143 | 如果你不填写代理设置,程序在启动时会使用系统代理中的设置。
144 |
145 |
146 |
147 | 【小白专享】怎么看代理程序提供的地址
148 |
149 | 通常来说你的电脑上需要装一个叫做 Clash 或者 v2rayN 的软件,不同的软件看法不同。
150 |
151 | 我们要填写的是你电脑上通过这些代理软件提供的代理地址,而不是你的代理**节点地址**。
152 |
153 | ### v2rayN
154 |
155 |
156 |
157 | 你的地址就填 `http://127.0.0.1:10808` ,其中 `10808` 这个数字要改成图中红框标出的两个数字中的一个。
158 |
159 | ### Clash
160 |
161 | .png>)
162 |
163 | 你的地址就填 `http://127.0.0.1:7890`,其中 `7890`这个数字要改成图中红框标出的数字。
164 |
165 | ### 其他软件
166 |
167 | 你的软件应该会提供类似的端口号。如果你实在找不到的话可以问问客服,或者还有一种方法:
168 |
169 | 把有关代理的配置全部删除,然后在代理软件上开启全局模式。
170 |
171 |
172 |
173 |
174 |
175 | > Docker 部署的用户请注意:你可能需要把 127.0.0.1 修改为宿主机的 IP 地址,以使用宿主机中运行的代理程序。
176 |
177 | #### **5. 切换模型**
178 |
179 | {% hint style="info" %}
180 | 这项设置是每个账号独立的。
181 | {% endhint %}
182 |
183 | 如果你使用的是 ChatGPT Plus 的账号,那么你可以选择使用 ChatGPT Plus 专享的模型。
184 |
185 | ```toml
186 | [[openai.accounts]]
187 | # 省略的账号信息
188 |
189 | # 如果你是 Plus 用户,加入这一条,否则无法切换至 plus 模型
190 | paid=true
191 | # 这里填写的内容由你的代理服务器提供
192 | model="text-davinci-002-render-paid"
193 | ```
194 |
195 | 你可以使用这三种:
196 |
197 | * `text-davinci-002-render-sha` - 默认的模型
198 | * `text-davinci-002-render-paid` - Legacy 模型(Plus 专享)
199 | * `gpt-4` - GPT 4 模型(Plus 专享)
200 |
201 | ***
202 |
203 | ## **💲 接入 API 版 OpenAI ChatGPT**
204 |
205 | **优点**:更快、可以设置参数、可以同时回复多个人、不封号
206 |
207 | **缺点**:花钱
208 |
209 | ```toml
210 | [[openai.accounts]]
211 | # 这里填写你在 OpenAI 官网获取的 API Key
212 | api_key = "sk-xxxx"
213 | ```
214 |
215 | ### **相关设置**
216 |
217 | #### **1.API 版接入点**
218 |
219 | {% hint style="info" %}
220 | 这项设置是全局生效的(所有账号只需要设置一次)。
221 | {% endhint %}
222 |
223 | 正如网页版接入点一样,如果你所在的网络环境不能直接访问 OpenAI 的 API 接入点,可以通过搭建一个反向代理来访问它,然后在这里指定代理后的接入点地址。
224 |
225 | 你可以使用这个项目来搭建代理:[https://github.com/Ice-Hazymoon/openai-scf-proxy](https://github.com/Ice-Hazymoon/openai-scf-proxy)
226 |
227 | ```toml
228 | [openai]
229 | # API 接入点,欢迎在交流群中分享你的接入点
230 | api_endpoint = "https://api.openai.com/v1"
231 | ```
232 |
233 | #### **2.模型参数**
234 |
235 | {% hint style="info" %}
236 | 这项设置是全局生效的(所有账号只需要设置一次)。
237 | {% endhint %}
238 |
239 | 如果你觉得默认的 API 回复有些生硬,那么你可以通过调整 GPT 的参数来优化。
240 |
241 | 参数具体含义可以见: [https://platform.openai.com/docs/api-reference/completions/create](https://platform.openai.com/docs/api-reference/completions/create)
242 |
243 | ```toml
244 | [openai.gpt3_params]
245 | temperature = 0.5
246 | max_tokens = 4000
247 | top_p = 1.0
248 | presence_penalty = 0.0
249 | frequency_penalty = 0.0
250 | min_tokens = 1000
251 | ```
252 |
253 | #### **3.使用代理**
254 |
255 | {% hint style="info" %}
256 | 这项设置是每个账号独立的。
257 | {% endhint %}
258 |
259 | 参考: [#4.-shi-yong-dai-li](jie-ru-openai-de-chatgpt.md#4.-shi-yong-dai-li "mention")
260 |
261 | #### **4. 默认模型**
262 |
263 | {% hint style="info" %}
264 | 这项设置是每个账号独立的。
265 | {% endhint %}
266 |
267 | 如果你想切换默认使用的模型,可以加入下面的配置。
268 |
269 | ```toml
270 | [[openai.accounts]]
271 | # 省略的账号信息
272 |
273 | model="gpt-3.5-turbo"
274 | ```
275 |
276 | 你可以使用这三种:
277 |
278 | * `gpt-3.5-turbo` - GPT 3.5 模型
279 | * `gpt-4` - GPT 4 模型
280 |
281 | 后续官方有出新的模型,也可以直接写在里面使用。
282 |
--------------------------------------------------------------------------------
/pei-zhi-wen-jian-jiao-cheng/wan-zheng-pei-zhi-wen-jian-yang-li.md:
--------------------------------------------------------------------------------
1 | # 📰 完整配置文件样例
2 |
3 | 我们只有一个配置文件: `config.cfg` 。
4 |
5 | 以下是 config.cfg 的样例,你不必完全参考它的写法,这只是告诉你它可以怎么写:
6 |
7 | ```toml
8 | # 这里是 ChatGPT for QQ 的所有配置文件
9 | # 请注意:以 "#" 开头的文本均为注释
10 | # 不会被程序读取
11 | # 如果你想要使用某个设置,请确保前面没有 "#" 号
12 | [mirai]
13 | # Mirai 相关设置
14 |
15 | qq = 请填写机器人的 QQ 号,不要加引号
16 |
17 | manager_qq = 请修改为机器人管理员的QQ号,不要加引号
18 |
19 | # 以下设置如果不懂 无需理会
20 |
21 | api_key = "1234567890" # mirai-http-api 中的 verifyKey
22 | # mirai api http 反向连接模式
23 | # 使用此模式可以将本项目与 mirai 分离在两个不同服务器部署
24 | reverse_ws_host = "localhost"
25 | reverse_ws_port = 8554
26 | # mirai api http 正向连接模式
27 | # 使用此模式时需注释上面的反向连接模式
28 | # http_url = "http://localhost:8080"
29 | # ws_url = "http://localhost:8080"
30 |
31 | # Discord 设置,开启后可以支持 Discord 机器人
32 | # [discord]
33 | # bot_token = "xxx"
34 |
35 | # Telegram 设置,开启后可以支持 Telegram 机器人
36 | # [telegram]
37 | # # 这个 token 是找 BotFather 要的
38 | # bot_token = "你的 Bot token"
39 | # # 如果部署在国内,就填这个设置代理
40 | # # 不填的话就会读取系统的代理设置
41 | # proxy = "http://localhost:1080"
42 | # # 管理员的 chat id
43 | # manager_chat = 1234567890
44 |
45 | # ==== OpenAI 部分开始
46 | [openai]
47 | # OpenAI 相关设置
48 | # 自定义 ChatGPT 的 browserless 接入点
49 | # 自 3月9日 开始,不设置此项将无法正常使用 browserless 模式下的网页版 ChatGPT
50 | browserless_endpoint = "https://chatgpt-proxy.lss233.com/api/"
51 |
52 |
53 | # 自定义 OpenAI 的 API 接口基础地址
54 | # 通过此功能,你可以搭建一个 OpenAI 的反向代理来避免网络问题
55 | # 例如此项目:https://github.com/Ice-Hazymoon/openai-scf-proxy
56 | api_endpoint = "https://chatgpt-proxy.lss233.com/v1/"
57 |
58 | # 以下是 GPT3(.5) 和 GPT4 的模型参数
59 | # 在使用 API 调用时有效
60 | # 参数具体含义可以见 https://platform.openai.com/docs/api-reference/completions/create
61 | # 如果你不了解,可以保持默认
62 | [openai.gpt3_params]
63 | temperature = 1.0
64 | max_tokens = 4000
65 | top_p = 1.0
66 | presence_penalty = 0.5
67 | frequency_penalty = 0.5
68 | min_tokens = 1000
69 | # 以下是 OpenAI 账号设置
70 |
71 | # 你可以用多种不同的方式登录 OpenAI
72 | # 你也可以登录很多个不同的账号(无限多个)
73 | # 下面的例子会向你演示使用不同方式登录时
74 | # 配置文件的写法
75 |
76 | # 第 1 个 OpenAI 账号
77 | # 使用 access_token 登录
78 | # 优点:
79 | # 1. 适用于在国内网络环境
80 | # 2. 适用于通过 Google / 微软 注册的 OpenAI 账号
81 | # 3. 登录过程较快
82 | # 缺点:
83 | # 1. 有效期为 30 天,到期后需更换
84 | # 2. 有可能会封号
85 | [[openai.accounts]]
86 | mode = "browserless"
87 |
88 | # 你的 access_token,登录 OpenAI 后访问`https://chat.openai.com/api/auth/session`获取
89 | access_token = "一串 ey 开头的东西"
90 |
91 | # 下面是所有的 OpenAI 账号都可以有的设置
92 | # ========= 开始 ========
93 |
94 | # 如果你在国内,需要配置代理
95 | proxy="http://127.0.0.1:1080"
96 |
97 | # 使用 ChatGPT Plus(plus 用户此项设置为 true 使用 legacy 模型)
98 | paid = false
99 |
100 | # 是否开启标题自动重命名
101 | # 若为空或保持注释即不开启
102 | # 支持的变量: {session_id} - 此对话对应的上下文 ID,若产生在好友中,则为好友 QQ 号,若产生在群聊中,则为群号
103 | # 具体见 README 中的介绍
104 | # title_pattern="qq-{session_id}"
105 |
106 | # 是否自动删除旧的对话,开启后用户发送重置对话时会自动删除以前的会话内容
107 | # auto_remove_old_conversations = true
108 |
109 | # ===== 结束 =====
110 |
111 | # 第 2 个 OpenAI 账号
112 | # 使用 api key 登录
113 | # 当你设置了 API Key 之后
114 | # 你就可以使用 OpenAI 中收费的 ChatGPT API、AI 画图等功能
115 | # 优点:
116 | # 1. 响应快
117 | # 2. 不咋封号
118 | # 3, 可以调参
119 | # 缺点:
120 | # 1. 烧钱
121 | # 2. 暂不支持 GPT4 (3月15日)
122 | [[openai.accounts]]
123 | # 你的 API key,可以在这里看: https://platform.openai.com/account/api-keys
124 | api_key="sk-xxxxx"
125 | # 如果你在国内,需要配置代理
126 | proxy="http://127.0.0.1:1080"
127 |
128 | # 第 5 个 OpenAI 账号
129 | # 理论上你可以添加无限多个 OpenAI 账号
130 | # 你可以自行添加或删除配置文件来设置账号信息
131 | [[openai.accounts]]
132 | mode = "browserless"
133 |
134 | # 你的 OpenAI 邮箱
135 | email = "xxxx"
136 | # 你的 OpenAI 密码
137 | password = "xxx"
138 |
139 | # 如果你在国内,需要配置代理
140 | proxy="http://127.0.0.1:1080"
141 |
142 | # 使用 ChatGPT Plus(plus 用户此项设置为 true 使用 legacy 模型)
143 | paid = false
144 |
145 | # 是否开启标题自动重命名
146 | title_pattern="qq-{session_id}"
147 |
148 | # 是否自动删除旧的对话
149 | auto_remove_old_conversations = true
150 |
151 | # === OpenAI 账号部分结束
152 |
153 | # === Poe 账号部分开始
154 | # 如果你没有 Poe 账号,可以直接删除这部分
155 | [poe]
156 | [[poe.accounts]]
157 | # 登陆 poe.com 网站后,通过开发者工具查看Cookie获取
158 | p_b = "V4j***"
159 | # === Poe 账号部分结束
160 |
161 | # === Bing 设置部分开始
162 | # 如果你没有 Bing 账号,可以直接删除这部分
163 | [bing]
164 | # 在 Bing 的回复后加上猜你想问
165 | show_suggestions = true
166 | # 在 Bing 的回复前加上引用资料
167 | show_references = true
168 | # 在 Bing 的回复后加上剩余次数
169 | show_remaining_count = true
170 | # Bing 的 WS 接入点,中国大陆访问时可以修改成下面这个
171 | wss_link = "wss://chatgpt-proxy.lss233.com/sydney/ChatHub"
172 |
173 | # 第 1 个 Bing 账号
174 | # 理论上,你可以添加无限多个 Bing 账号。
175 | # 多账号的配置方法和 OpenAI 的一样。
176 | [[bing.accounts]]
177 | # 你的账号 Cookie,获取方法见 README
178 | cookie_content = '[{xxxxxx'
179 | # 如果你想用代理
180 | # proxy="http://127.0.0.1:1080"
181 | # === Bing 设置部分结束
182 |
183 | # === 文心一言 设置部分开始
184 | # 如果你没有 文心一言 账号,可以直接删除这部分
185 | [yiyan]
186 |
187 | # 第 1 个 文心一言 账号
188 | # 理论上,你可以添加无限多个 文心一言 账号。
189 | # 多账号的配置方法和 OpenAI 的一样。
190 | [[yiyan.accounts]]
191 | # 你的账号 Cookie,获取方法见 README
192 | # 该渠道为对接网页版文心一言,有封号风险,请自行取舍。
193 | cookie_content = 'BDUSS=xx;'
194 | # 如果你想用代理(可能有BUG)
195 | # proxy="http://127.0.0.1:1080"
196 | # === 文心一言 设置部分结束
197 |
198 | # === ChatGLM 设置部分开始
199 | # 如果你没有搭建本地 ChatGLM,可以直接删除这部分
200 | [chatglm]
201 |
202 | # 第 1 个 ChatGLM 账号
203 | # 理论上,你可以添加无限多个 ChatGLM 账号。
204 | # 多账号的配置方法和 OpenAI 的一样。
205 | [[chatglm.accounts]]
206 | # ChatGLM 的接口地址,搭建方法见 README
207 | api_endpoint = "http://127.0.0.1:8000"
208 | # 最大记忆的对话轮数
209 | max_turns=10
210 | # 请求超时时间(单位:秒)
211 | timeout=360
212 | # === ChatGLM 设置部分结束
213 |
214 | # == Bard 设置部分开始
215 | [bard]
216 | [[bard.accounts]]
217 | # Google Bard 页面的 Cookie,获取方法与 文心一言类似
218 | cookie_content = "xxx"
219 |
220 | # == Azure 账号设置
221 | # 设置后可以使用 Azure 的语音转文字功能
222 | [azure]
223 | tts_speech_key = 'xxx'
224 | tts_speech_service_region = 'xxx'
225 |
226 |
227 | [text_to_speech]
228 | # 语音转文字
229 | always = false
230 | engine="edge"
231 | # 默认音色
232 | # 可参考 Azure:
233 | # https://learn.microsoft.com/zh-CN/azure/cognitive-services/speech-service/language-support?tabs=tts#neural-voices
234 |
235 | default = "zh-CN-XiaoyouNeural"
236 |
237 |
238 | [text_to_image]
239 | # 文字转图片
240 |
241 | # 是否强制开启,设置后所有的消息强制以图片发送,减小风控概率
242 | always = true
243 |
244 | # 字体大小
245 | font_size = 30
246 |
247 | # 图片宽度
248 | width = 700
249 |
250 | # 字体
251 | font_path = "fonts/sarasa-mono-sc-regular.ttf"
252 |
253 | # [备用模式]起始点 X
254 | offset_x = 50
255 |
256 | # [备用模式]起始点 Y
257 | offset_y = 50
258 |
259 | [trigger]
260 | # 配置机器人要如何响应,下面所有项均可选 (也就是可以直接删掉那一行)
261 |
262 | # 全局聊天前缀,在群聊和私聊中,符合下面的前缀【才】会响应,可以自己增减
263 | prefix = [ "gpt",]
264 |
265 | # 私聊聊天前缀,在私聊中,符合下面的前缀【也】会响应,可以自己增减
266 | prefix_friend = [ "ask",]
267 |
268 | # 群聊聊天前缀,在群聊中,符合下面的前缀【也】会响应,可以自己增减
269 | prefix_group = [ "ai",]
270 |
271 | # 满足以下正则表达式则忽略此条消息
272 | ignore_regex = []
273 |
274 | # 直接和指定的 AI 对话(不切换AI)
275 | # 此处的前缀是在上面的前缀之后的
276 | # 例:
277 | # prefix = [ "ask" ]
278 | # prefix_ai = { "bing-c" = ["bing"] }
279 | # 则用户发送: ask bing 你好
280 | # 则会直接把 “你好” 两个字发给 New Bing AI
281 | prefix_ai = { "chatgpt-web" = ["gpt"], "bing-c" = ["bing"] }
282 |
283 | # AI 画图的前缀
284 | # 需要有 OpenAI 的 api_key 才能使用
285 | prefix_image = ["画", "看"]
286 | # 配置群里如何让机器人响应,"at" 表示需要群里 @ 机器人,"mention" 表示 @ 或者以机器人名字开头都可以,"none" 表示不需要
287 | require_mention = "at"
288 |
289 | # 重置会话的命令
290 | reset_command = [ "重置会话",]
291 |
292 | # 回滚会话的命令
293 | rollback_command = [ "回滚会话",]
294 |
295 | # 切换模型的命令
296 | switch_model = "切换模型 (.+)"
297 |
298 | # 允许普通用户切换的模型
299 | allowed_models = ["gpt-3.5-turbo", "gpt-3.5-turbo-0301", "text-davinci-002-render-sha", "text-davinci-002-render-paid"]
300 |
301 | # 允许普通用户切换AI
302 | allow_switching_ai = true
303 |
304 | [response]
305 | # 默认的响应模式,支持:
306 | # mixed - 图文混合 (实验性)
307 | # text - 文字模式
308 | # image - 图片模式
309 | mode = "mixed"
310 |
311 | # 分段发送延迟,消息会等待一段时间再发送,避免刷屏
312 | # 该功能目前仅在 mixed 模式有效
313 | # 设置为 0 关闭分段发送功能
314 | # 若要开启此功能,建议设置为 15 左右
315 | buffer_delay = 15
316 |
317 | # 默认使用的 AI 类型,不填写时自动推测
318 | # 目前支持的类型:
319 | # chatgpt-web 网页版 ChatGPT
320 | # chatgpt-api API 版 ChatGPT (GPT3.5-turbo)
321 | # bing-c 新必应-创造风格
322 | # bing-p 新必应-精确风格
323 | # bing-b 新必应-平衡风格
324 | # slack-claude Slack 版的 Claude
325 | # bard Google Bard
326 | # yiyan 百度 文心一言 网页版
327 | # chatglm-api 清华 ChatGLM-API 接口
328 | # poe-sage POE Sage 模型 (更会写代码的 ChatGPT)
329 | # poe-beaver POE GPT4 模型
330 | # poe-claude2 POE Claude2 模型
331 | # poe-claude POE Claude 模型
332 | # poe-chinchilla POE ChatGPT 模型
333 | # poe-nutria POE Dragonfly 模型
334 |
335 | # 默认注释掉这行配置,以免有人不看直接抄然后出问题
336 | # default_ai = "chatgpt-web"
337 | # 匹配指令成功但没有对话内容时发送的消息
338 | placeholder = "您好!我是 Assistant,一个由 OpenAI 训练的大型语言模型。我不是真正的人,而是一个计算机程序,可以通过文本聊天来帮助您解决问题。如果您有任何问题,请随时告诉我,我将尽力回答。\n如果您需要重置我们的会话,请回复`重置会话`。"
339 |
340 | # 发生错误时要发送的消息
341 | error_format = "出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚会话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n{exc}"
342 |
343 | # 发生网络错误时发送的消息,请注意可以插入 {exc} 作为异常占位符
344 | error_network_failure = "网络故障!连接 OpenAI 服务器失败,我需要更好的网络才能服务!\n{exc}"
345 |
346 | # OpenAI 账号登录失效时的提示
347 | error_session_authenciate_failed = "身份验证失败!无法登录至 ChatGPT 服务器,请检查账号信息是否正确!\n{exc}"
348 |
349 | # OpenAI 提示 Too many requests(太多请求) 时的提示
350 | error_request_too_many = "糟糕!当前收到的请求太多了,我需要一段时间冷静冷静。你可以选择“重置会话”,或者过一会儿再来找我!\n{exc}"
351 |
352 | # 服务器提示 Server overloaded(过载) 时的提示
353 | error_server_overloaded = "抱歉,当前服务器压力有点大,请稍后再找我吧!"
354 |
355 | # 是否要回复触发指令的消息
356 | quote = true
357 |
358 | # 发送下面那个提醒之前的等待时间
359 | timeout = 30.0
360 |
361 | # 超过响应时间时要发送的提醒
362 | timeout_format = "我还在思考中,请再等一下~"
363 |
364 | max_timeout = 600
365 | # 对于每个提问的最长等待时间,超过此时间不再等待
366 |
367 | cancel_wait_too_long = "啊哦,这个问题有点难,让我想了好久也没想明白。试试换个问法?"
368 | # 超过最长等待时间后发送的信息
369 |
370 | # 重置会话时发送的消息
371 | reset = "会话已重置。"
372 |
373 | # 回滚成功时发送的消息
374 | rollback_success = "已回滚至上一条对话,你刚刚发的我就忘记啦!"
375 |
376 | # 回滚失败时发送的消息
377 | rollback_fail = "回滚失败,没有更早的记录了!"
378 |
379 | # 等待处理的消息的最大数量,如果要关闭此功能,设置为 0
380 | max_queue_size = 10
381 |
382 | # 队列满时的提示
383 | queue_full = "抱歉!我现在要回复的人有点多,暂时没有办法接收新的消息了,请过会儿再给我发吧!"
384 |
385 | # 新消息加入队列会发送通知的长度最小值
386 | queued_notice_size = 3
387 |
388 | # 新消息进入队列时,发送的通知。 queue_size 是当前排队的消息数
389 | queued_notice = "消息已收到!当前我还有{queue_size}条消息要回复,请您稍等。"
390 |
391 | [baiducloud]
392 | # 是否启动百度云内容安全审核
393 | # 注册地址: http://console.bce.baidu.com/ai/#/ai/antiporn/overview/index
394 | check = false
395 |
396 | # 百度云API_KEY 24位英文数字字符串
397 | baidu_api_key = ""
398 |
399 | # 百度云SECRET_KEY 32位的英文数字字符串
400 | baidu_secret_key =""
401 |
402 | # 不合规消息自定义返回
403 | illgalmessage = "[百度云]请珍惜机器人,当前返回内容不合规"
404 |
405 | [system]
406 | # 是否自动同意进群邀请
407 | accept_group_invite = false
408 |
409 | # 是否自动同意好友请求
410 | accept_friend_request = false
411 |
412 | [presets]
413 | # 切换预设的命令: 加载预设 猫娘
414 | command = "加载预设 (\\w+)"
415 |
416 | loaded_successful = "预设加载成功!"
417 |
418 | [presets.keywords]
419 | # 预设关键词 <-> 实际文件
420 | "正常" = "presets/default.txt"
421 | "猫娘" = "presets/catgirl.txt"
422 |
423 | [ratelimit]
424 | # 额度限制功能,可以在 wiki 中了解此功能的用法
425 |
426 | # 额度使用达到此比例时进行警告
427 | warning_rate = 0.8
428 |
429 | # 警告消息
430 | warning_msg = "\n\n警告:额度即将耗尽!\n目前已发送:{usage}条消息,最大限制为{limit}条消息/小时,请调整您的节奏。\n额度限制整点重置,当前服务器时间:{current_time}"
431 |
432 | # 超额消息
433 | exceed = "已达到额度限制,请等待下一小时继续和我对话。"
434 |
435 | ```
436 |
437 | 该文件的格式为 TOML 格式,你可以用下面这个工具来检查你修改的配置文件是否有误:
438 |
439 | {% embed url="https://www.toml-lint.com/" %}
440 |
441 | {% hint style="info" %}
442 | 如果你感兴趣的话也可以了解一下 TOML 格式的完整规范: [https://toml.io/cn/v1.0.0](https://toml.io/cn/v1.0.0)
443 | {% endhint %}
444 |
445 | 简单来说,TOML 格式的基本结构如下:
446 |
447 | ```toml
448 | [这里是块]
449 | 这是配置项1 = "这是对应的值"
450 | 这是配置项2 = 123456
451 |
452 | [这里是块2]
453 | 这里是配置项a = "这是对应的值a"
454 | ```
455 |
456 | ### 错误示例:
457 |
458 | 你不能这么写:
459 |
460 | ```toml
461 | [这里是块]
462 | 这是配置项1 = "这是对应的值"
463 | 这是配置项2 = 123456
464 |
465 | [这里是块] # 注意看,这个块在上面写过了,这样是不行的
466 | 这里是配置项a = "这是对应的值b"
467 |
468 | ```
469 |
470 | 也不能这么写:
471 |
472 | ```
473 | [这里是表]
474 | 这是配置项1 = "这是对应的值"
475 | 这是配置项2 = 123456
476 |
477 | 这里是配置项1 = "这是对应的值b" # 这个配置项在上面也写过了
478 |
479 | ```
480 |
481 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Attribution 4.0 International
2 |
3 | =======================================================================
4 |
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and
6 | does not provide legal services or legal advice. Distribution of
7 | Creative Commons public licenses does not create a lawyer-client or
8 | other relationship. Creative Commons makes its licenses and related
9 | information available on an "as-is" basis. Creative Commons gives no
10 | warranties regarding its licenses, any material licensed under their
11 | terms and conditions, or any related information. Creative Commons
12 | disclaims all liability for damages resulting from their use to the
13 | fullest extent possible.
14 |
15 | Using Creative Commons Public Licenses
16 |
17 | Creative Commons public licenses provide a standard set of terms and
18 | conditions that creators and other rights holders may use to share
19 | original works of authorship and other material subject to copyright
20 | and certain other rights specified in the public license below. The
21 | following considerations are for informational purposes only, are not
22 | exhaustive, and do not form part of our licenses.
23 |
24 | Considerations for licensors: Our public licenses are
25 | intended for use by those authorized to give the public
26 | permission to use material in ways otherwise restricted by
27 | copyright and certain other rights. Our licenses are
28 | irrevocable. Licensors should read and understand the terms
29 | and conditions of the license they choose before applying it.
30 | Licensors should also secure all rights necessary before
31 | applying our licenses so that the public can reuse the
32 | material as expected. Licensors should clearly mark any
33 | material not subject to the license. This includes other CC-
34 | licensed material, or material used under an exception or
35 | limitation to copyright. More considerations for licensors:
36 | wiki.creativecommons.org/Considerations_for_licensors
37 |
38 | Considerations for the public: By using one of our public
39 | licenses, a licensor grants the public permission to use the
40 | licensed material under specified terms and conditions. If
41 | the licensor's permission is not necessary for any reason--for
42 | example, because of any applicable exception or limitation to
43 | copyright--then that use is not regulated by the license. Our
44 | licenses grant only permissions under copyright and certain
45 | other rights that a licensor has authority to grant. Use of
46 | the licensed material may still be restricted for other
47 | reasons, including because others have copyright or other
48 | rights in the material. A licensor may make special requests,
49 | such as asking that all changes be marked or described.
50 | Although not required by our licenses, you are encouraged to
51 | respect those requests where reasonable. More considerations
52 | for the public:
53 | wiki.creativecommons.org/Considerations_for_licensees
54 |
55 | =======================================================================
56 |
57 | Creative Commons Attribution 4.0 International Public License
58 |
59 | By exercising the Licensed Rights (defined below), You accept and agree
60 | to be bound by the terms and conditions of this Creative Commons
61 | Attribution 4.0 International Public License ("Public License"). To the
62 | extent this Public License may be interpreted as a contract, You are
63 | granted the Licensed Rights in consideration of Your acceptance of
64 | these terms and conditions, and the Licensor grants You such rights in
65 | consideration of benefits the Licensor receives from making the
66 | Licensed Material available under these terms and conditions.
67 |
68 |
69 | Section 1 -- Definitions.
70 |
71 | a. Adapted Material means material subject to Copyright and Similar
72 | Rights that is derived from or based upon the Licensed Material
73 | and in which the Licensed Material is translated, altered,
74 | arranged, transformed, or otherwise modified in a manner requiring
75 | permission under the Copyright and Similar Rights held by the
76 | Licensor. For purposes of this Public License, where the Licensed
77 | Material is a musical work, performance, or sound recording,
78 | Adapted Material is always produced where the Licensed Material is
79 | synched in timed relation with a moving image.
80 |
81 | b. Adapter's License means the license You apply to Your Copyright
82 | and Similar Rights in Your contributions to Adapted Material in
83 | accordance with the terms and conditions of this Public License.
84 |
85 | c. Copyright and Similar Rights means copyright and/or similar rights
86 | closely related to copyright including, without limitation,
87 | performance, broadcast, sound recording, and Sui Generis Database
88 | Rights, without regard to how the rights are labeled or
89 | categorized. For purposes of this Public License, the rights
90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
91 | Rights.
92 |
93 | d. Effective Technological Measures means those measures that, in the
94 | absence of proper authority, may not be circumvented under laws
95 | fulfilling obligations under Article 11 of the WIPO Copyright
96 | Treaty adopted on December 20, 1996, and/or similar international
97 | agreements.
98 |
99 | e. Exceptions and Limitations means fair use, fair dealing, and/or
100 | any other exception or limitation to Copyright and Similar Rights
101 | that applies to Your use of the Licensed Material.
102 |
103 | f. Licensed Material means the artistic or literary work, database,
104 | or other material to which the Licensor applied this Public
105 | License.
106 |
107 | g. Licensed Rights means the rights granted to You subject to the
108 | terms and conditions of this Public License, which are limited to
109 | all Copyright and Similar Rights that apply to Your use of the
110 | Licensed Material and that the Licensor has authority to license.
111 |
112 | h. Licensor means the individual(s) or entity(ies) granting rights
113 | under this Public License.
114 |
115 | i. Share means to provide material to the public by any means or
116 | process that requires permission under the Licensed Rights, such
117 | as reproduction, public display, public performance, distribution,
118 | dissemination, communication, or importation, and to make material
119 | available to the public including in ways that members of the
120 | public may access the material from a place and at a time
121 | individually chosen by them.
122 |
123 | j. Sui Generis Database Rights means rights other than copyright
124 | resulting from Directive 96/9/EC of the European Parliament and of
125 | the Council of 11 March 1996 on the legal protection of databases,
126 | as amended and/or succeeded, as well as other essentially
127 | equivalent rights anywhere in the world.
128 |
129 | k. You means the individual or entity exercising the Licensed Rights
130 | under this Public License. Your has a corresponding meaning.
131 |
132 |
133 | Section 2 -- Scope.
134 |
135 | a. License grant.
136 |
137 | 1. Subject to the terms and conditions of this Public License,
138 | the Licensor hereby grants You a worldwide, royalty-free,
139 | non-sublicensable, non-exclusive, irrevocable license to
140 | exercise the Licensed Rights in the Licensed Material to:
141 |
142 | a. reproduce and Share the Licensed Material, in whole or
143 | in part; and
144 |
145 | b. produce, reproduce, and Share Adapted Material.
146 |
147 | 2. Exceptions and Limitations. For the avoidance of doubt, where
148 | Exceptions and Limitations apply to Your use, this Public
149 | License does not apply, and You do not need to comply with
150 | its terms and conditions.
151 |
152 | 3. Term. The term of this Public License is specified in Section
153 | 6(a).
154 |
155 | 4. Media and formats; technical modifications allowed. The
156 | Licensor authorizes You to exercise the Licensed Rights in
157 | all media and formats whether now known or hereafter created,
158 | and to make technical modifications necessary to do so. The
159 | Licensor waives and/or agrees not to assert any right or
160 | authority to forbid You from making technical modifications
161 | necessary to exercise the Licensed Rights, including
162 | technical modifications necessary to circumvent Effective
163 | Technological Measures. For purposes of this Public License,
164 | simply making modifications authorized by this Section 2(a)
165 | (4) never produces Adapted Material.
166 |
167 | 5. Downstream recipients.
168 |
169 | a. Offer from the Licensor -- Licensed Material. Every
170 | recipient of the Licensed Material automatically
171 | receives an offer from the Licensor to exercise the
172 | Licensed Rights under the terms and conditions of this
173 | Public License.
174 |
175 | b. No downstream restrictions. You may not offer or impose
176 | any additional or different terms or conditions on, or
177 | apply any Effective Technological Measures to, the
178 | Licensed Material if doing so restricts exercise of the
179 | Licensed Rights by any recipient of the Licensed
180 | Material.
181 |
182 | 6. No endorsement. Nothing in this Public License constitutes or
183 | may be construed as permission to assert or imply that You
184 | are, or that Your use of the Licensed Material is, connected
185 | with, or sponsored, endorsed, or granted official status by,
186 | the Licensor or others designated to receive attribution as
187 | provided in Section 3(a)(1)(A)(i).
188 |
189 | b. Other rights.
190 |
191 | 1. Moral rights, such as the right of integrity, are not
192 | licensed under this Public License, nor are publicity,
193 | privacy, and/or other similar personality rights; however, to
194 | the extent possible, the Licensor waives and/or agrees not to
195 | assert any such rights held by the Licensor to the limited
196 | extent necessary to allow You to exercise the Licensed
197 | Rights, but not otherwise.
198 |
199 | 2. Patent and trademark rights are not licensed under this
200 | Public License.
201 |
202 | 3. To the extent possible, the Licensor waives any right to
203 | collect royalties from You for the exercise of the Licensed
204 | Rights, whether directly or through a collecting society
205 | under any voluntary or waivable statutory or compulsory
206 | licensing scheme. In all other cases the Licensor expressly
207 | reserves any right to collect such royalties.
208 |
209 |
210 | Section 3 -- License Conditions.
211 |
212 | Your exercise of the Licensed Rights is expressly made subject to the
213 | following conditions.
214 |
215 | a. Attribution.
216 |
217 | 1. If You Share the Licensed Material (including in modified
218 | form), You must:
219 |
220 | a. retain the following if it is supplied by the Licensor
221 | with the Licensed Material:
222 |
223 | i. identification of the creator(s) of the Licensed
224 | Material and any others designated to receive
225 | attribution, in any reasonable manner requested by
226 | the Licensor (including by pseudonym if
227 | designated);
228 |
229 | ii. a copyright notice;
230 |
231 | iii. a notice that refers to this Public License;
232 |
233 | iv. a notice that refers to the disclaimer of
234 | warranties;
235 |
236 | v. a URI or hyperlink to the Licensed Material to the
237 | extent reasonably practicable;
238 |
239 | b. indicate if You modified the Licensed Material and
240 | retain an indication of any previous modifications; and
241 |
242 | c. indicate the Licensed Material is licensed under this
243 | Public License, and include the text of, or the URI or
244 | hyperlink to, this Public License.
245 |
246 | 2. You may satisfy the conditions in Section 3(a)(1) in any
247 | reasonable manner based on the medium, means, and context in
248 | which You Share the Licensed Material. For example, it may be
249 | reasonable to satisfy the conditions by providing a URI or
250 | hyperlink to a resource that includes the required
251 | information.
252 |
253 | 3. If requested by the Licensor, You must remove any of the
254 | information required by Section 3(a)(1)(A) to the extent
255 | reasonably practicable.
256 |
257 | 4. If You Share Adapted Material You produce, the Adapter's
258 | License You apply must not prevent recipients of the Adapted
259 | Material from complying with this Public License.
260 |
261 |
262 | Section 4 -- Sui Generis Database Rights.
263 |
264 | Where the Licensed Rights include Sui Generis Database Rights that
265 | apply to Your use of the Licensed Material:
266 |
267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
268 | to extract, reuse, reproduce, and Share all or a substantial
269 | portion of the contents of the database;
270 |
271 | b. if You include all or a substantial portion of the database
272 | contents in a database in which You have Sui Generis Database
273 | Rights, then the database in which You have Sui Generis Database
274 | Rights (but not its individual contents) is Adapted Material; and
275 |
276 | c. You must comply with the conditions in Section 3(a) if You Share
277 | all or a substantial portion of the contents of the database.
278 |
279 | For the avoidance of doubt, this Section 4 supplements and does not
280 | replace Your obligations under this Public License where the Licensed
281 | Rights include other Copyright and Similar Rights.
282 |
283 |
284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
285 |
286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
296 |
297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
306 |
307 | c. The disclaimer of warranties and limitation of liability provided
308 | above shall be interpreted in a manner that, to the extent
309 | possible, most closely approximates an absolute disclaimer and
310 | waiver of all liability.
311 |
312 |
313 | Section 6 -- Term and Termination.
314 |
315 | a. This Public License applies for the term of the Copyright and
316 | Similar Rights licensed here. However, if You fail to comply with
317 | this Public License, then Your rights under this Public License
318 | terminate automatically.
319 |
320 | b. Where Your right to use the Licensed Material has terminated under
321 | Section 6(a), it reinstates:
322 |
323 | 1. automatically as of the date the violation is cured, provided
324 | it is cured within 30 days of Your discovery of the
325 | violation; or
326 |
327 | 2. upon express reinstatement by the Licensor.
328 |
329 | For the avoidance of doubt, this Section 6(b) does not affect any
330 | right the Licensor may have to seek remedies for Your violations
331 | of this Public License.
332 |
333 | c. For the avoidance of doubt, the Licensor may also offer the
334 | Licensed Material under separate terms or conditions or stop
335 | distributing the Licensed Material at any time; however, doing so
336 | will not terminate this Public License.
337 |
338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
339 | License.
340 |
341 |
342 | Section 7 -- Other Terms and Conditions.
343 |
344 | a. The Licensor shall not be bound by any additional or different
345 | terms or conditions communicated by You unless expressly agreed.
346 |
347 | b. Any arrangements, understandings, or agreements regarding the
348 | Licensed Material not stated herein are separate from and
349 | independent of the terms and conditions of this Public License.
350 |
351 |
352 | Section 8 -- Interpretation.
353 |
354 | a. For the avoidance of doubt, this Public License does not, and
355 | shall not be interpreted to, reduce, limit, restrict, or impose
356 | conditions on any use of the Licensed Material that could lawfully
357 | be made without permission under this Public License.
358 |
359 | b. To the extent possible, if any provision of this Public License is
360 | deemed unenforceable, it shall be automatically reformed to the
361 | minimum extent necessary to make it enforceable. If the provision
362 | cannot be reformed, it shall be severed from this Public License
363 | without affecting the enforceability of the remaining terms and
364 | conditions.
365 |
366 | c. No term or condition of this Public License will be waived and no
367 | failure to comply consented to unless expressly agreed to by the
368 | Licensor.
369 |
370 | d. Nothing in this Public License constitutes or may be interpreted
371 | as a limitation upon, or waiver of, any privileges and immunities
372 | that apply to the Licensor or You, including from the legal
373 | processes of any jurisdiction or authority.
374 |
375 |
376 | =======================================================================
377 |
378 | Creative Commons is not a party to its public
379 | licenses. Notwithstanding, Creative Commons may elect to apply one of
380 | its public licenses to material it publishes and in those instances
381 | will be considered the “Licensor.” The text of the Creative Commons
382 | public licenses is dedicated to the public domain under the CC0 Public
383 | Domain Dedication. Except for the limited purpose of indicating that
384 | material is shared under a Creative Commons public license or as
385 | otherwise permitted by the Creative Commons policies published at
386 | creativecommons.org/policies, Creative Commons does not authorize the
387 | use of the trademark "Creative Commons" or any other trademark or logo
388 | of Creative Commons without its prior written consent including,
389 | without limitation, in connection with any unauthorized modifications
390 | to any of its public licenses or any other arrangements,
391 | understandings, or agreements concerning use of licensed material. For
392 | the avoidance of doubt, this paragraph does not form part of the
393 | public licenses.
394 |
395 | Creative Commons may be contacted at creativecommons.org.
396 |
--------------------------------------------------------------------------------