Download scripts/test_chain.py from ruslanmv/matrix-ai: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/spaces/ruslanmv/matrix-ai/resolve/main/scripts/test_chain.py
- Command line
-
hf download hf://spaces/ruslanmv/matrix-ai/scripts/test_chain.py
-
curl -L -o test_chain.py https://huggingface.co/spaces/ruslanmv/matrix-ai/resolve/main/scripts/test_chain.py
356 Bytes
| """ | |
| Quick end-to-end smoke test for the provider cascade. | |
| Run after setting configs/.env with your keys. | |
| """ | |
| from app.core.inference import chat | |
| msgs = [ | |
| {"role": "system", "content": "You are concise."}, | |
| {"role": "user", "content": "Say hello in one sentence and mention which provider you are (if you can)."}, | |
| ] | |
| print(chat(msgs, stream=False)) | |