Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f0c9203e33
3 changed files with 8 additions and 7 deletions
|
@ -28,7 +28,7 @@ export const ai = {
|
|||
<div class="b3-label">
|
||||
${window.siyuan.languages.apiMaxTokens}
|
||||
<div class="fn__hr"></div>
|
||||
<input class="b3-text-field fn__flex-center fn__block" type="number" step="1" min="0" id="apiMaxTokens" max="4096" value="${window.siyuan.config.ai.openAI.apiMaxTokens}"/>
|
||||
<input class="b3-text-field fn__flex-center fn__block" type="number" step="1" min="0" id="apiMaxTokens" value="${window.siyuan.config.ai.openAI.apiMaxTokens}"/>
|
||||
<div class="b3-label__text">${window.siyuan.languages.apiMaxTokensTip}</div>
|
||||
</div>
|
||||
<div class="b3-label">
|
||||
|
@ -77,7 +77,7 @@ export const ai = {
|
|||
<div class="b3-label__text">${window.siyuan.languages.apiMaxTokensTip}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-text-field fn__flex-center fn__size200" type="number" step="1" min="0" id="apiMaxTokens" max="4096" value="${window.siyuan.config.ai.openAI.apiMaxTokens}"/>
|
||||
<input class="b3-text-field fn__flex-center fn__size200" type="number" step="1" min="0" id="apiMaxTokens" value="${window.siyuan.config.ai.openAI.apiMaxTokens}"/>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
|
|
|
@ -91,9 +91,6 @@ func setAI(c *gin.Context) {
|
|||
if 0 > ai.OpenAI.APIMaxTokens {
|
||||
ai.OpenAI.APIMaxTokens = 0
|
||||
}
|
||||
if 4096 < ai.OpenAI.APIMaxTokens {
|
||||
ai.OpenAI.APIMaxTokens = 4096
|
||||
}
|
||||
|
||||
model.Conf.AI = ai
|
||||
model.Conf.Save()
|
||||
|
|
|
@ -516,8 +516,12 @@ func GetDoc(startID, endID, id string, index int, query string, queryTypes map[s
|
|||
luteEngine := NewLute()
|
||||
node := treenode.GetNodeInTree(tree, id)
|
||||
if nil == node {
|
||||
err = ErrBlockNotFound
|
||||
return
|
||||
// Unable to open the doc when the block pointed by the scroll position does not exist https://github.com/siyuan-note/siyuan/issues/9030
|
||||
node = treenode.GetNodeInTree(tree, tree.Root.ID)
|
||||
if nil == node {
|
||||
err = ErrBlockNotFound
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if isBacklink { // 引用计数浮窗请求,需要按照反链逻辑组装 https://github.com/siyuan-note/siyuan/issues/6853
|
||||
|
|
Loading…
Add table
Reference in a new issue