MCPcopy
hub / github.com/zai-org/Open-AutoGLM / main

Function main

examples/demo_thinking.py:15–48  ·  view source on GitHub ↗
(lang: str = "cn")

Source from the content-addressed store, hash-verified

13
14
15def main(lang: str = "cn"):
16 msgs = get_messages(lang)
17
18 print("=" * 60)
19 print("Phone Agent - Thinking Demo")
20 print("=" * 60)
21
22 # Configure model
23 model_config = ModelConfig(
24 base_url="http://localhost:8000/v1",
25 model_name="autoglm-phone-9b",
26 temperature=0.1,
27 )
28
29 # Configure Agent (verbose=True enables detailed output)
30 agent_config = AgentConfig(
31 max_steps=10,
32 verbose=True,
33 lang=lang,
34 )
35
36 # Create Agent
37 agent = PhoneAgent(
38 model_config=model_config,
39 agent_config=agent_config,
40 )
41
42 # Execute task
43 print(f"\n📱 {msgs['starting_task']}...\n")
44 result = agent.run("打开小红书搜索美食攻略")
45
46 print("\n" + "=" * 60)
47 print(f"📊 {msgs['final_result']}: {result}")
48 print("=" * 60)
49
50
51if __name__ == "__main__":

Callers 1

demo_thinking.pyFile · 0.70

Calls 5

runMethod · 0.95
get_messagesFunction · 0.90
ModelConfigClass · 0.90
AgentConfigClass · 0.90
PhoneAgentClass · 0.90

Tested by

no test coverage detected