1
0
Fork 0

Thinking for chats

This commit is contained in:
Pabloader 2026-11-02 09:00:13 +00:00
parent b1c10e44ec
commit 8acac07c04
2 changed files with 13 additions and 14 deletions

View File

@ -591,20 +591,18 @@ export const ChatPanel = ({ visible }: { visible: boolean }) => {
{tokenCount.taken} / {tokenCount.total} {tokenCount.taken} / {tokenCount.total}
</span> </span>
)} )}
{!currentWorld?.chatOnly && ( <label class={styles.toggleContainer}>
<label class={styles.toggleContainer}> <input
<input type="checkbox"
type="checkbox" checked={enableThinking}
checked={enableThinking} onChange={(e) => dispatch({
onChange={(e) => dispatch({ type: 'SET_ENABLE_THINKING',
type: 'SET_ENABLE_THINKING', enable: (e.target as HTMLInputElement).checked,
enable: (e.target as HTMLInputElement).checked, })}
})} disabled={isDisabled}
disabled={isDisabled} />
/> <span>Thinking</span>
<span>Thinking</span> </label>
</label>
)}
</div> </div>
<div class={styles.inputFooterRight}> <div class={styles.inputFooterRight}>
{isLoading ? ( {isLoading ? (

View File

@ -423,6 +423,7 @@ namespace Prompt {
tools: Tools.getTools([...Tools.CHAT_ONLY_TOOLS]), tools: Tools.getTools([...Tools.CHAT_ONLY_TOOLS]),
max_tokens: model.top_provider.max_completion_tokens || 2048, max_tokens: model.top_provider.max_completion_tokens || 2048,
banned_tokens: state.bannedTokens, banned_tokens: state.bannedTokens,
reasoning: { effort: enableThinking ? 'high' : 'none' },
...state.generationSettings, ...state.generationSettings,
...(continueLast && { remove_last_eos: true }), ...(continueLast && { remove_last_eos: true }),
}; };