Documentation
¶
Overview ¶
Command model_switch continues one conversation across two protocols.
Turn 1 goes to DeepSeek, which speaks OpenAI-compatible Chat Completions. Turn 2 sends the same history — unchanged — to MiniMax on its China endpoint, which speaks Anthropic-compatible Messages. The caller does not rebuild the conversation: llm re-adapts the stored history for the target protocol on each request (downgrading images, reconciling tool-call IDs, and so on).
Because the two turns use different protocols, both provider packages must be registered. Each needs its own key:
DEEPSEEK_API_KEY=sk-... (DeepSeek, OpenAI-compatible) MINIMAX_CN_API_KEY=... (MiniMax CN, Anthropic-compatible) DEEPSEEK_API_KEY=... MINIMAX_CN_API_KEY=... go run ./example/llm/model_switch
Click to show internal directories.
Click to hide internal directories.