feat(oaiapp): 让项目能支持 OpenAI-compatible /v1/chat/completions#344
Closed
RobinRush wants to merge 2 commits into
Closed
feat(oaiapp): 让项目能支持 OpenAI-compatible /v1/chat/completions#344RobinRush wants to merge 2 commits into
RobinRush wants to merge 2 commits into
Conversation
added 2 commits
May 12, 2026 10:54
Owner
|
Thanks for your contribution! This PR modifies 4 files with +431 lines of changes. To maintain our review quality and adhere to our modularity principles, we prefer smaller, focused PRs. Please consider breaking this into more targeted pieces and resubmitting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
frontends/oaiapp.py:把整个智能体(带工具循环、分层记忆等完整行为)作为一个 OpenAI 风格"模型"暴露出去,任何兼容 OpenAI 接口的客户端(NextChat / Open WebUI / LobeChat / OpenAI SDK / curl 等)即可接入。bottle+ 标准库wsgiref多线程服务器)。launch.pyw增加--api启动开关;mykey_template.py增加配置示例段;README.md中英双语补充文档。Endpoints
POST /v1/chat/completions— Chat Completions,支持stream: true/falseGET /v1/models— 列出当前配置的全部 LLM 后端Configuration (
mykey.py)