mirror of
https://github.com/katanemo/plano.git
synced 2026-04-25 00:36:34 +02:00
refactor(demos): remove Xiaomi MiMo integration demo and update documentation
This commit is contained in:
parent
6edf3594b3
commit
6f1e028588
5 changed files with 46 additions and 120 deletions
|
|
@ -37,7 +37,6 @@ This directory contains demos showcasing Plano's capabilities as an AI-native pr
|
|||
| Demo | Description |
|
||||
|------|-------------|
|
||||
| [Ollama](integrations/ollama/) | Use Ollama as a local LLM provider through Plano |
|
||||
| [Xiaomi MiMo](integrations/xiaomi_mimo/) | Route OpenAI-compatible MiMo API calls through Plano as a model provider |
|
||||
| [Spotify Bearer Auth](integrations/spotify_bearer_auth/) | Bearer token authentication for third-party APIs (Spotify new releases and top tracks) |
|
||||
|
||||
## Advanced
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
# Xiaomi MiMo via Plano
|
||||
|
||||
This demo configures Plano to call Xiaomi MiMo as a standard LLM upstream using the OpenAI-compatible API surface.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. Ensure the [prerequisites](https://github.com/katanemo/arch/?tab=readme-ov-file#prerequisites) are installed correctly.
|
||||
2. Export your MiMo API key:
|
||||
|
||||
```sh
|
||||
export MIMO_API_KEY=your_mimo_api_key
|
||||
```
|
||||
|
||||
## Start the demo
|
||||
|
||||
```sh
|
||||
sh run_demo.sh
|
||||
```
|
||||
|
||||
Plano will start a model listener on `http://localhost:12000`.
|
||||
|
||||
## First API call through Plano
|
||||
|
||||
```sh
|
||||
curl --location --request POST 'http://localhost:12000/v1/chat/completions' \
|
||||
--header "Content-Type: application/json" \
|
||||
--data-raw '{
|
||||
"model": "mimo-v2-pro",
|
||||
"messages": [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "You are MiMo, an AI assistant developed by Xiaomi. Today is Tuesday, December 16, 2025. Your knowledge cutoff date is December 2024."
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": "please introduce yourself"
|
||||
}
|
||||
],
|
||||
"max_completion_tokens": 1024,
|
||||
"temperature": 1.0,
|
||||
"top_p": 0.95,
|
||||
"stream": false
|
||||
}'
|
||||
```
|
||||
|
||||
## Optional: OpenAI Python SDK against Plano
|
||||
|
||||
```python
|
||||
from openai import OpenAI
|
||||
|
||||
client = OpenAI(
|
||||
api_key="unused-when-calling-plano",
|
||||
base_url="http://localhost:12000/v1",
|
||||
)
|
||||
|
||||
resp = client.chat.completions.create(
|
||||
model="mimo-v2-pro",
|
||||
messages=[{"role": "user", "content": "please introduce yourself"}],
|
||||
)
|
||||
|
||||
print(resp.model_dump_json(indent=2))
|
||||
```
|
||||
|
||||
## Stop the demo
|
||||
|
||||
```sh
|
||||
sh run_demo.sh down
|
||||
```
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
version: v0.3.0
|
||||
|
||||
listeners:
|
||||
- type: model
|
||||
name: mimo_model_listener
|
||||
address: 0.0.0.0
|
||||
port: 12000
|
||||
max_retries: 3
|
||||
|
||||
model_providers:
|
||||
- model: xiaomi/mimo-v2-pro
|
||||
access_key: $MIMO_API_KEY
|
||||
default: true
|
||||
|
||||
system_prompt: |
|
||||
You are MiMo, an AI assistant developed by Xiaomi.
|
||||
|
||||
tracing:
|
||||
random_sampling: 100
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
start_demo() {
|
||||
if [ -f ".env" ]; then
|
||||
echo ".env file already exists. Skipping creation."
|
||||
else
|
||||
if [ -z "$MIMO_API_KEY" ]; then
|
||||
echo "Error: MIMO_API_KEY environment variable is not set for the demo."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Creating .env file..."
|
||||
echo "MIMO_API_KEY=$MIMO_API_KEY" > .env
|
||||
echo ".env file created with MIMO_API_KEY."
|
||||
fi
|
||||
|
||||
echo "Starting Plano with config.yaml..."
|
||||
planoai up config.yaml
|
||||
}
|
||||
|
||||
stop_demo() {
|
||||
echo "Stopping Plano..."
|
||||
planoai down
|
||||
}
|
||||
|
||||
if [ "$1" == "down" ]; then
|
||||
stop_demo
|
||||
else
|
||||
start_demo
|
||||
fi
|
||||
|
|
@ -496,6 +496,51 @@ Zhipu AI
|
|||
- model: zhipu/glm-4.5-air
|
||||
access_key: $ZHIPU_API_KEY
|
||||
|
||||
Xiaomi MiMo
|
||||
~~~~~~~~~~~
|
||||
|
||||
**Provider Prefix:** ``xiaomi/``
|
||||
|
||||
**API Endpoint:** ``/v1/chat/completions``
|
||||
|
||||
**Authentication:** API Key - Create your key in the `Xiaomi MiMo API Open Platform <https://platform.xiaomimimo.com/#/docs/quick-start/model-hyperparameters>`_ and set ``MIMO_API_KEY``.
|
||||
|
||||
**Supported Chat Models:** All Xiaomi MiMo chat models including mimo-v2-pro, mimo-v2-omni, mimo-v2-flash, and future chat model releases.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 30 20 50
|
||||
|
||||
* - Model Name
|
||||
- Model ID for Config
|
||||
- Description
|
||||
* - MiMo V2 Pro
|
||||
- ``xiaomi/mimo-v2-pro``
|
||||
- Highest capability general model
|
||||
* - MiMo V2 Omni
|
||||
- ``xiaomi/mimo-v2-omni``
|
||||
- Multimodal-capable assistant model
|
||||
* - MiMo V2 Flash
|
||||
- ``xiaomi/mimo-v2-flash``
|
||||
- Faster, lower-latency model
|
||||
|
||||
**Configuration Examples:**
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
llm_providers:
|
||||
# Configure all known Xiaomi models with wildcard expansion
|
||||
- model: xiaomi/*
|
||||
access_key: $MIMO_API_KEY
|
||||
|
||||
# Or configure specific models
|
||||
- model: xiaomi/mimo-v2-pro
|
||||
access_key: $MIMO_API_KEY
|
||||
default: true
|
||||
|
||||
- model: xiaomi/mimo-v2-omni
|
||||
access_key: $MIMO_API_KEY
|
||||
|
||||
Providers Requiring Base URL
|
||||
----------------------------
|
||||
|
||||
|
|
@ -733,7 +778,7 @@ Automatically configure all available models from a provider using wildcard patt
|
|||
|
||||
**How Wildcards Work:**
|
||||
|
||||
1. **Known Providers** (OpenAI, Anthropic, DeepSeek, Mistral, Groq, Gemini, Together AI, xAI, Moonshot, Zhipu):
|
||||
1. **Known Providers** (OpenAI, Anthropic, DeepSeek, Mistral, Groq, Gemini, Together AI, xAI, Moonshot, Zhipu, Xiaomi):
|
||||
|
||||
- Expands at config load time to all models in Plano's provider registry
|
||||
- Creates entries for both canonical (``openai/gpt-4``) and short names (``gpt-4``)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue