Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu commited on
Commit ·
55e027c
1
Parent(s): d4ca6d8
次要调整:Python文件编码方式声明,调整默认值
Browse files- ChuanhuChatbot.py +1 -1
- presets.py +3 -2
- utils.py +1 -4
ChuanhuChatbot.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
-
# import openai
|
| 3 |
import os
|
| 4 |
import sys
|
| 5 |
import argparse
|
|
|
|
| 1 |
+
# -*- coding:utf-8 -*-
|
| 2 |
import gradio as gr
|
|
|
|
| 3 |
import os
|
| 4 |
import sys
|
| 5 |
import argparse
|
presets.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
title = """<h1 align="center">川虎ChatGPT 🚀</h1>"""
|
| 2 |
description = """<div align=center>
|
| 3 |
|
|
@@ -33,9 +34,9 @@ pre code {
|
|
| 33 |
standard_error_msg = "☹️发生了错误:" # 错误信息的标准前缀
|
| 34 |
error_retrieve_prompt = "连接超时,无法获取对话。请检查网络连接,或者API-Key是否有效。" # 获取对话时发生错误
|
| 35 |
summarize_prompt = "请总结以上对话,不超过100字。" # 总结对话时的 prompt
|
| 36 |
-
max_token_streaming =
|
| 37 |
timeout_streaming = 5 # 流式对话时的超时时间
|
| 38 |
max_token_all = 3500 # 非流式对话时的最大 token 数
|
| 39 |
timeout_all = 200 # 非流式对话时的超时时间
|
| 40 |
-
enable_streaming_option =
|
| 41 |
HIDE_MY_KEY = False # 如果你想在UI中隐藏你的 API 密钥,将此值设置为 True
|
|
|
|
| 1 |
+
# -*- coding:utf-8 -*-
|
| 2 |
title = """<h1 align="center">川虎ChatGPT 🚀</h1>"""
|
| 3 |
description = """<div align=center>
|
| 4 |
|
|
|
|
| 34 |
standard_error_msg = "☹️发生了错误:" # 错误信息的标准前缀
|
| 35 |
error_retrieve_prompt = "连接超时,无法获取对话。请检查网络连接,或者API-Key是否有效。" # 获取对话时发生错误
|
| 36 |
summarize_prompt = "请总结以上对话,不超过100字。" # 总结对话时的 prompt
|
| 37 |
+
max_token_streaming = 2000 # 流式对话时的最大 token 数
|
| 38 |
timeout_streaming = 5 # 流式对话时的超时时间
|
| 39 |
max_token_all = 3500 # 非流式对话时的最大 token 数
|
| 40 |
timeout_all = 200 # 非流式对话时的超时时间
|
| 41 |
+
enable_streaming_option = True # 是否启用选择选择是否实时显示回答的勾选框
|
| 42 |
HIDE_MY_KEY = False # 如果你想在UI中隐藏你的 API 密钥,将此值设置为 True
|
utils.py
CHANGED
|
@@ -1,7 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
Along with the docs for each component, you can find the names of example demos that use
|
| 3 |
-
each component. These demos are located in the `demo` directory."""
|
| 4 |
-
|
| 5 |
from __future__ import annotations
|
| 6 |
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Tuple, Type
|
| 7 |
import json
|
|
|
|
| 1 |
+
# -*- coding:utf-8 -*-
|
|
|
|
|
|
|
|
|
|
| 2 |
from __future__ import annotations
|
| 3 |
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Tuple, Type
|
| 4 |
import json
|