Oapi-Feishu/code/config.example.yaml
2024-01-28 01:57:06 +08:00

39 lines
1.8 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 是否启用日志。
ENABLE_LOG: true
# 飞书
APP_ID: cli_axxx
APP_SECRET: xxx
APP_ENCRYPT_KEY: xxx
APP_VERIFICATION_TOKEN: xxx
# 请确保和飞书应用管理平台中的设置一致。这里建议直接用 Feishu-OpenAI-Stream-Chatbot 作为机器人名称这样的话如果你有多个bot就好区分
BOT_NAME: xxx
# openAI key 支持负载均衡 可以填写多个key 用逗号分隔
OPENAI_KEY: sk-xxx,sk-xxx,sk-xxx
# 服务器配置
HTTP_PORT: 9000
HTTPS_PORT: 9001
USE_HTTPS: false
CERT_FILE: cert.pem
KEY_FILE: key.pem
# openai 地址, 一般不需要修改, 除非你有自己的反向代理
API_URL: https://oapi.czl.net
# 代理设置, 例如 "http://127.0.0.1:7890", ""代表不使用代理
HTTP_PROXY: ""
# 访问OpenAi的 普通 Http请求的超时时间单位秒不配置的话默认为 550 秒
OPENAI_HTTP_CLIENT_TIMEOUT:
# openai 指定模型, 更多见 https://platform.openai.com/docs/models/model-endpoint-compatibility 中 /v1/chat/completions
OPENAI_MODEL: gpt-3.5-turbo
# AZURE OPENAI
AZURE_ON: true # set to true to use Azure rather than OpenAI
AZURE_API_VERSION: 2023-03-15-preview # 2023-03-15-preview or 2022-12-01 refer https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions
AZURE_RESOURCE_NAME: xxxx # you can find in endpoint url. Usually looks like https://{RESOURCE_NAME}.openai.azure.com
AZURE_DEPLOYMENT_NAME: xxxx # usually looks like ...openai.azure.com/openai/deployments/{DEPLOYMENT_NAME}/chat/completions.
AZURE_OPENAI_TOKEN: xxxx # Authentication key. We can use Azure Active Directory Authentication(TBD).
## 访问控制
# 是否启用访问控制。默认不启用。
ACCESS_CONTROL_ENABLE: false
# 每个用户每天最多问多少个问题。默认为不限制. 配置成为小于等于0表示不限制。
ACCESS_CONTROL_MAX_COUNT_PER_USER_PER_DAY: 0