| 123456789101112131415161718 |
- import sys
- path = "/data/ai/audio/server/src/services/llm/index.ts"
- with open(path) as f:
- lines = f.readlines()
- # 找出几个关键函数的位置
- for i, l in enumerate(lines, 1):
- if any(k in l for k in [
- "function callLLMWithRetry",
- "function callLLMWithMessages",
- "function trySwitchModel",
- "shouldSwitchModel",
- "circuitBreaker",
- "getHealthyProvider",
- "exponentialBackoff",
- "export ",
- "async function callLLM",
- ]):
- print(f"{i:4d}: {l.rstrip()}")
|