Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8a1e437c
authored
Jun 22, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔧
chore: update STREAMING_TIMEOUT default value to 120 seconds in configuration
parent
6cac7d96
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
.env.example
+1
-1
README.en.md
+1
-1
README.md
+1
-1
constant/env.go
+1
-1
No files found.
.env.example
View file @
8a1e437c
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
# 设置 Dify 渠道是否输出工作流和节点信息到客户端
# 设置 Dify 渠道是否输出工作流和节点信息到客户端
# DIFY_DEBUG=true
# DIFY_DEBUG=true
# 设置流式一次回复的超时时间
# 设置流式一次回复的超时时间
# STREAMING_TIMEOUT=
9
0
# STREAMING_TIMEOUT=
12
0
# 节点类型
# 节点类型
...
...
README.en.md
View file @
8a1e437c
...
@@ -100,7 +100,7 @@ This version supports multiple models, please refer to [API Documentation-Relay
...
@@ -100,7 +100,7 @@ This version supports multiple models, please refer to [API Documentation-Relay
For detailed configuration instructions, please refer to
[
Installation Guide-Environment Variables Configuration
](
https://docs.newapi.pro/installation/environment-variables
)
:
For detailed configuration instructions, please refer to
[
Installation Guide-Environment Variables Configuration
](
https://docs.newapi.pro/installation/environment-variables
)
:
-
`GENERATE_DEFAULT_TOKEN`
: Whether to generate initial tokens for newly registered users, default is
`false`
-
`GENERATE_DEFAULT_TOKEN`
: Whether to generate initial tokens for newly registered users, default is
`false`
-
`STREAMING_TIMEOUT`
: Streaming response timeout, default is
6
0 seconds
-
`STREAMING_TIMEOUT`
: Streaming response timeout, default is
12
0 seconds
-
`DIFY_DEBUG`
: Whether to output workflow and node information for Dify channels, default is
`true`
-
`DIFY_DEBUG`
: Whether to output workflow and node information for Dify channels, default is
`true`
-
`FORCE_STREAM_OPTION`
: Whether to override client stream_options parameter, default is
`true`
-
`FORCE_STREAM_OPTION`
: Whether to override client stream_options parameter, default is
`true`
-
`GET_MEDIA_TOKEN`
: Whether to count image tokens, default is
`true`
-
`GET_MEDIA_TOKEN`
: Whether to count image tokens, default is
`true`
...
...
README.md
View file @
8a1e437c
...
@@ -103,7 +103,7 @@ New API提供了丰富的功能,详细特性请参考[特性说明](https://do
...
@@ -103,7 +103,7 @@ New API提供了丰富的功能,详细特性请参考[特性说明](https://do
详细配置说明请参考
[
安装指南-环境变量配置
](
https://docs.newapi.pro/installation/environment-variables
)
:
详细配置说明请参考
[
安装指南-环境变量配置
](
https://docs.newapi.pro/installation/environment-variables
)
:
-
`GENERATE_DEFAULT_TOKEN`
:是否为新注册用户生成初始令牌,默认为
`false`
-
`GENERATE_DEFAULT_TOKEN`
:是否为新注册用户生成初始令牌,默认为
`false`
-
`STREAMING_TIMEOUT`
:流式回复超时时间,默认
6
0秒
-
`STREAMING_TIMEOUT`
:流式回复超时时间,默认
12
0秒
-
`DIFY_DEBUG`
:Dify渠道是否输出工作流和节点信息,默认
`true`
-
`DIFY_DEBUG`
:Dify渠道是否输出工作流和节点信息,默认
`true`
-
`FORCE_STREAM_OPTION`
:是否覆盖客户端stream_options参数,默认
`true`
-
`FORCE_STREAM_OPTION`
:是否覆盖客户端stream_options参数,默认
`true`
-
`GET_MEDIA_TOKEN`
:是否统计图片token,默认
`true`
-
`GET_MEDIA_TOKEN`
:是否统计图片token,默认
`true`
...
...
constant/env.go
View file @
8a1e437c
...
@@ -23,7 +23,7 @@ var ErrorLogEnabled bool
...
@@ -23,7 +23,7 @@ var ErrorLogEnabled bool
//}
//}
func
InitEnv
()
{
func
InitEnv
()
{
StreamingTimeout
=
common
.
GetEnvOrDefault
(
"STREAMING_TIMEOUT"
,
6
0
)
StreamingTimeout
=
common
.
GetEnvOrDefault
(
"STREAMING_TIMEOUT"
,
12
0
)
DifyDebug
=
common
.
GetEnvOrDefaultBool
(
"DIFY_DEBUG"
,
true
)
DifyDebug
=
common
.
GetEnvOrDefaultBool
(
"DIFY_DEBUG"
,
true
)
MaxFileDownloadMB
=
common
.
GetEnvOrDefault
(
"MAX_FILE_DOWNLOAD_MB"
,
20
)
MaxFileDownloadMB
=
common
.
GetEnvOrDefault
(
"MAX_FILE_DOWNLOAD_MB"
,
20
)
// ForceStreamOption 覆盖请求参数,强制返回usage信息
// ForceStreamOption 覆盖请求参数,强制返回usage信息
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment