CoolFace
Apppublic

build-small-hackathon/oneiros

sourceHugging Faceupdated 4mo agoView on Hugging Face
1likes
smoke_model.py25 linesDownload Raw Back to scripts
1#!/usr/bin/env python32"""Smoke test: load model dan generate satu token."""3import sys4 5sys.path.insert(0, ".")6 7from model.loader import MODEL_PATH, get_model8 9 10def main():11    print(f"MODEL_PATH={MODEL_PATH}")12    model = get_model()13    out = model.create_chat_completion(14        messages=[{"role": "user", "content": "Say OK in one word."}],15        max_tokens=4,16        temperature=0.0,17    )18    teks = out["choices"][0]["message"]["content"]19    print(f"Response: {teks!r}")20    print("Smoke OK")21 22 23if __name__ == "__main__":24    main()25