You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 24, 2025. It is now read-only.
importosfromroutellm.controllerimportControllerclient=Controller(
routers=["mf"],
strong_model="llama3.1-8b-Q6_K",
weak_model="llama3.1-70b-IQ3_XS"
)
response=client.chat.completions.create(
# This tells RouteLLM to use the MF router with a cost threshold of 0.11593model="router-mf-0.11593",
messages=[
{"role": "user", "content": "Write the game snake in python"}
]
)
message_content=response['choices'][0]['message']['content']
model_name=response['model']
print(f"Message content: {message_content}")
print(f"Model name: {model_name}")
https://github.com/lm-sys/RouteLLM
e.g.
pip install "routellm[serve,eval]"