File size: 2,372 Bytes
82a00d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# -*- coding:utf-8 -*-
use_websearch_checkbox=False
use_streaming_checkbox=True
model_select_dropdown="gpt-3.5-turbo"
# top_p=1
dockerflag = True
authflag = False

# ChatGPT 设置
initial_prompt = "You are a helpful assistant."
API_URL = "https://api.openai.com/v1/chat/completions"
HISTORY_DIR = "history"
TEMPLATES_DIR = "templates"

# 错误信息
standard_error_msg = "Error:"  # 错误信息的标准前缀
error_retrieve_prompt = "Please check the network connection and the API-Key"  # 获取对话时发生错误
connection_timeout_prompt = "Time out"  # 连接超时
read_timeout_prompt = "Time out"  # 读取超时
proxy_error_prompt = "Proxy error"  # 代理错误
ssl_error_prompt = "SSL error"  # SSL 错误
no_apikey_msg = "please check whether the input is correct"  # API key 长度不足 51 位

max_token_streaming = 3500  # 流式对话时的最大 token 数
timeout_streaming = 5  # 流式对话时的超时时间
max_token_all = 3500  # 非流式对话时的最大 token 数
timeout_all = 200  # 非流式对话时的超时时间
enable_streaming_option = True  # 是否启用选择选择是否实时显示回答的勾选框
HIDE_MY_KEY = True  # 如果你想在UI中隐藏你的 API 密钥,将此值设置为 True

SIM_K = 5
INDEX_QUERY_TEMPRATURE = 1.0
title= """\
# <p align="center">Sydney-AI 2.0<b>"""

description = """\
<p>
<p>

本应用是一款基于最新OpenAI API“gpt-3.5-turbo”开发的智能在线聊天应用。 该应用程序的运营成本由“45 Degrees Research Fellows”赞助。 目前,token 限制为 3500。如果你想取消这个限制,你可以输入你自己的 OpenAI API 密钥。 <p>
App默认角色为ChatGPT原版助手,但您也可以从模板提供的角色中进行选择。 如果您对自定义Prompt有好的建议,请联系我们!<p>
This app is an intelligent online chat app developed based on the newly released OpenAI API "gpt-3.5-turbo". The app's operating costs are sponsored by "45度科研人". Currently, the tokens is limited to 3500. If you want to remove this restriction, you can input your own OpenAI API key.<p>
The default model role of the app is the original assistant of ChatGPT, but you can also choose from the provided roles. If you have good suggestions for customizing Prompt, please contact us!<p>
"""
        
MODELS = ["gpt-3.5-turbo", "gpt-3.5-turbo-0301",]