mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 09:51:35 +00:00
fix: replies without reported token usage show an empty Info button (#33220)
A recent dev change marks a reply as having incomplete usage when the provider reports no token counts, so the session analytics can tell measured replies apart. The chat then treated that marker as usage and showed the Info button under every such reply, with a tooltip that only said "incomplete: true". The Info button now only appears when the reply carries actual usage data, while the stored marker stays as it is for analytics.
This commit is contained in:
parent
67875f7656
commit
dacb2c25fd
1 changed files with 1 additions and 1 deletions
|
|
@ -1205,7 +1205,7 @@
|
|||
</Tooltip>
|
||||
{/if}
|
||||
|
||||
{#if message.usage && $visibleControls['chat.usage']}
|
||||
{#if Object.keys(message.usage ?? {}).some((key) => key !== 'incomplete') && $visibleControls['chat.usage']}
|
||||
{@const usage = JSON.stringify(message.usage, null, 2)
|
||||
.replace(/"([^(")"]+)":/g, '$1:')
|
||||
.slice(1, -1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue