Skip to content

优化:支持直连模式 #347

@szl97

Description

@szl97
  1. 增加请求头: X-BELLA-DIRECT 和 X-BELLA_MODEL,开启直连模式
  2. 开启直连模式后,直接将InputStream发给渠道,使用请求头中的模型名进行路由。此模式下的路由,只查找对应的渠道和数据流向,不对渠道可用性进行判断,减少查询redis的次数。
  3. 此模式下渠道响应直接透传。不过需要先读到内存中进行异步处理(日志等)
  4. 需要实现一个特殊的Adaptor,参照QueueAdaptor
  5. 暂时只支持chat completion渠道,但是要注意其他渠道的可扩展性。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions