Skip to content

Add router model in pne.chat #838

@Undertone0809

Description

@Undertone0809

🚀 Feature Request

在一些场景里,我们需要用合适的模型去应用在不同的场景里,比如在简单问答的场景下,可以直接的使用 gpt-3.5,在需要复杂逻辑推理的场景下,用 gpt-4-turbo。

这意味着,对于一个问题来说,需要一种路由模型,来选择出一个合适的推理模型,下面还一种可能的示例代码。

import pne

pne.chat(messages="hello", model=["gpt-4o", "deepseek/deepseek-chat"])

ref: https://x.com/tuturetom/status/1819400584799441162

Question

  • 对于 https://x.com/tuturetom/status/1819400584799441162 中的代码演示,或许我们还需要判断一下,或许这种调用方式并不是最合适的调用方式,待讨论。
  • 在很多场景下,用一些简单的逻辑判断就可以构建出 model router 的功能,model router 这个比较强场景相关。

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions