mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #2602] [MERGED] feat: add OpenAI generation stats #7842
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/2602
Author: @cheahjs
Created: 5/27/2024
Status: ✅ Merged
Merged: 5/27/2024
Merged by: @tjbck
Base:
dev← Head:feat/openai-usage-stats📝 Commits (1)
99b1661feat: add OpenAI generation stats📊 Changes
6 files changed (+61 additions, -7 deletions)
View changed files
📝
backend/config.py(+1 -0)📝
src/lib/apis/streaming/index.ts(+15 -1)📝
src/lib/components/chat/Chat.svelte(+16 -1)📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+11 -5)📝
src/routes/(app)/workspace/models/create/+page.svelte(+14 -0)📝
src/routes/(app)/workspace/models/edit/+page.svelte(+4 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Adds a new
usagecapability for OpenAI models that toggles ifstream_options: { include_usage: true }is passed into the chat completion request.This is not default true, because this is a relatively new OpenAI addition, some providers/services will fail hard if it's passed.
Tested:
Not working:
Added
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.