MCPcopy Create free account
hub / github.com/Louisym/MiniCC / run_agent

Function run_agent

tutorials/18_design_patterns_for_agents.py:124–127  ·  view source on GitHub ↗

这个函数不知道也不关心 client 是真的还是假的

(client: ApiClient)

Source from the content-addressed store, hash-verified

122 # ---- 步骤 3: 使用——完全相同的代码, 不同的行为 ----
123
124 def run_agent(client: ApiClient):
125 """这个函数不知道也不关心 client 是真的还是假的"""
126 events = client.stream([{"role": "user", "content": "hello"}])
127 return events[0]["text"]
128
129 # 生产
130 real = RealApiClient()

Callers 1

lesson_1_interfaceFunction · 0.70

Calls 1

streamMethod · 0.45

Tested by

no test coverage detected