开发者文档

响应与更新

响应格式

OmniStudio 客户端背后的 Gateway 返回兼容 OpenAI 风格的响应结构,示例如下:

{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "你好!我是一个本地运行的 AI 助手..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 50,
    "total_tokens": 60
  }
}

更新代码与运行时

源码仓库模式下,更新通常分成两部分:

  1. 更新主仓库代码
  2. 更新或重建对应平台 runtime

例如:

git pull origin main
git submodule update --init --recursive

随后按平台重新构建需要的 backend。

发布包模式

如果你使用的是打包版本,通常只需要替换到新的发布包目录,而不是单独执行 pip install -r requirements.txt

建议保留的版本信息

  • OmniInfer 提交号或发布版本
  • runtime backend 类型
  • llama-server 或相关 runtime 版本信息
  • 已知兼容性说明
OmniMind

万象智维

Omni Studio 公众号二维码

公众号

Omni Studio 小红书二维码

小红书

© 2025 万象智维科技有限公司. All rights reserved.

京ICP备2025136340号-1