mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
@ -1963,6 +1963,9 @@
|
||||
<span data-i18n="Use search capabilities provided by the backend.">
|
||||
Use search capabilities provided by the backend.
|
||||
</span>
|
||||
<b data-source="openrouter" data-i18n="openrouter_web_search_fee">
|
||||
Not free, adds a $0.02 fee to each prompt.
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block" data-source="openai,cohere,mistralai,custom,claude,openrouter,groq,deepseek,makersuite,ai21,xai">
|
||||
|
@ -1693,6 +1693,11 @@ function calculateOpenRouterCost() {
|
||||
}
|
||||
}
|
||||
|
||||
if (oai_settings.enable_web_search) {
|
||||
const webSearchCost = (0.02).toFixed(2);
|
||||
cost = t`${cost} + $${webSearchCost}`;
|
||||
}
|
||||
|
||||
$('#openrouter_max_prompt_cost').text(cost);
|
||||
}
|
||||
|
||||
@ -5700,6 +5705,7 @@ export function initOpenAI() {
|
||||
|
||||
$('#openai_enable_web_search').on('input', function () {
|
||||
oai_settings.enable_web_search = !!$(this).prop('checked');
|
||||
calculateOpenRouterCost();
|
||||
saveSettingsDebounced();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user