Add Default Options Value Override Feature #1859
Open
+140
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
已实现
实现默认参数的覆盖,可以修改一些参数的默认值而无需用户主动请求指定该参数的值。使用方法为在default主题的渠道设置中,以json格式指定需要覆盖参数的模型以及其对应的参数和值。
几个问题
temperature
,max_tokens
,top_p
,frequency_penalty
,presence_penalty
,stop
,n
,stream
,num_ctx
。如需添加其它参数需前往relay/controller/text.go
编辑applyParameterOverrides
函数。close #1753
我已确认该 PR 已自测通过,相关截图如下: