mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 22:21:27 -05:00
[PR #927] [MERGED] Fix OpenAI integration: allow OpenAI to make chat completion calls with a valid API key #7331
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/927
Author: @sakkus-ai
Created: 2/26/2024
Status: ✅ Merged
Merged: 2/28/2024
Merged by: @tjbck
Base:
dev← Head:fix-openai-integration📝 Commits (10+)
3c10c3bMerge pull request #910 from open-webui/dev81a50c5Merge pull request #912 from open-webui/dev588daacMerge pull request #913 from open-webui/dev0a2ee69fix: add semver to container builds6b0eae9Merge pull request #915 from open-webui/dev334d524Merge pull request #916 from open-webui/dev95dd618Merge pull request #914 from buroa/main6df2505Merge pull request #919 from open-webui/devbbeaa92Fix OpenAI integration:781be27refac: unnecessary max_token value removed📊 Changes
2 files changed (+8 additions, -0 deletions)
View changed files
📝
.github/workflows/docker-build.yaml(+1 -0)📝
backend/apps/openai/main.py(+7 -0)📄 Description
From docker on mac get errors since num_ctx not recognized; remove num_ctx from, and add max_tokens to, body in API calls.
Pull Request Checklist
Description
Model file calls to the OpenAI API works fine, but chat completions fail withan error related to num_ctx in the body of the call.
backend/openai/main.py has a change to the main route to remove num_ctx from the body; this is replaced with max_tokens.
Chat completions now work.
Changelog Entry
Fixed
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.