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
21d71a2a
authored
Nov 28, 2024
by
CalciumIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update default STREAMING_TIMEOUT
parent
ba6c908f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
README.md
+1
-1
constant/env.go
+2
-2
No files found.
README.md
View file @
21d71a2a
...
...
@@ -68,7 +68,7 @@
## 比原版One API多出的配置
-
`GENERATE_DEFAULT_TOKEN`
:是否为新注册用户生成初始令牌,默认为
`false`
。
-
`STREAMING_TIMEOUT`
:设置流式一次回复的超时时间,默认为
3
0 秒。
-
`STREAMING_TIMEOUT`
:设置流式一次回复的超时时间,默认为
6
0 秒。
-
`DIFY_DEBUG`
:设置 Dify 渠道是否输出工作流和节点信息到客户端,默认为
`true`
。
-
`FORCE_STREAM_OPTION`
:是否覆盖客户端stream_options参数,请求上游返回流模式usage,默认为
`true`
,建议开启,不影响客户端传入stream_options参数返回结果。
-
`GET_MEDIA_TOKEN`
:是统计图片token,默认为
`true`
,关闭后将不再在本地计算图片token,可能会导致和上游计费不同,此项覆盖
`GET_MEDIA_TOKEN_NOT_STREAM`
选项作用。
...
...
constant/env.go
View file @
21d71a2a
...
...
@@ -7,7 +7,7 @@ import (
"strings"
)
var
StreamingTimeout
=
common
.
GetEnvOrDefault
(
"STREAMING_TIMEOUT"
,
3
0
)
var
StreamingTimeout
=
common
.
GetEnvOrDefault
(
"STREAMING_TIMEOUT"
,
6
0
)
var
DifyDebug
=
common
.
GetEnvOrDefaultBool
(
"DIFY_DEBUG"
,
true
)
// ForceStreamOption 覆盖请求参数,强制返回usage信息
...
...
@@ -20,7 +20,7 @@ var GetMediaTokenNotStream = common.GetEnvOrDefaultBool("GET_MEDIA_TOKEN_NOT_STR
var
UpdateTask
=
common
.
GetEnvOrDefaultBool
(
"UPDATE_TASK"
,
true
)
var
GeminiModelMap
=
map
[
string
]
string
{
"gemini-1.0-pro"
:
"v1"
,
"gemini-1.0-pro"
:
"v1"
,
}
func
InitEnv
()
{
...
...
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