CPM-jev / example.py
link921's picture
Release v0.1 research preview files
257d034 verified
Raw History Blame Contribute Delete
369 Bytes
import json
import os
from inference import DecisionModel
model = DecisionModel(".", base_model=os.getenv("CPM_JEV_BASE_MODEL", "openbmb/MiniCPM5-2B-Base"))
result = model.decide(
state="The previous tool call failed twice.",
question="What should the agent do next?",
options=["retry", "switch_tool", "ask_user"],
)
print(json.dumps(result, indent=2))