MCPcopy Create free account

hub / github.com/WenyuChiou/awesome-agentic-ai-zh / functions

Functions391 in github.com/WenyuChiou/awesome-agentic-ai-zh

↓ 2 callersFunctionfake_streaming_llm
Mock OpenAI streaming response — iterable of chunks.
examples/stage-7/04-sdk-advanced/test.py:15
↓ 2 callersFunctiongenerate
Use LLM to answer query given retrieved contexts.
examples/stage-6/04-full-rag-pipeline/starter.py:80
↓ 2 callersFunctiongenerate_anthropic
(query: str, contexts: list[str], client: Any = None)
examples/stage-6/04-full-rag-pipeline/starter_anthropic.py:31
↓ 2 callersFunctionhas_qualifier
Check if any qualifier term appears in ±window lines around idx.
scripts/check-2026-freshness.py:56
↓ 2 callersFunctionkeyword_query
簡化 keyword search(substring match、無 BM25)。
examples/stage-6/02-vector-db/starter.py:81
↓ 2 callersFunctionlookup_fact
Look up a fact (population / physical constants, etc.). Args: query: Fact key to look up, e.g. 'taipei population' or 'speed of light'.
examples/stage-4/04-codeact-vs-json-tool/starter.py:57
↓ 2 callersFunctionmake_resp
(content: str, tool_calls=None, finish_reason: str = "tool_calls")
examples/stage-3/02-multi-tool-selection/test.py:37
↓ 2 callersFunctionmake_resp
(content: str, tool_calls=None, finish_reason: str = "tool_calls")
examples/stage-3/06-schema-design/test.py:36
↓ 2 callersFunctionmake_resp
(stop_reason: str, *blocks)
examples/stage-3/06-schema-design/test_anthropic.py:31
↓ 2 callersFunctionmake_tool_call
(call_id: str, name: str, args: dict)
examples/stage-3/06-schema-design/test.py:28
↓ 2 callersFunctionmatches_any
(pat: str)
scripts/check-stage-template.py:80
↓ 2 callersFunctionmulti_step_agent
模擬 multi-step agent:search → reason → answer、每步 traced。
examples/stage-7/03-observability/starter.py:117
↓ 2 callersFunctionobservable_agent
LLM call wrapped in trace span + token logging。
examples/stage-7/03-observability/starter.py:96
↓ 2 callersFunctionobservable_agent_anthropic
(question: str, ctx: TraceContext, client: Any = None)
examples/stage-7/03-observability/starter_anthropic.py:29
↓ 2 callersFunctionparse_stars_text
`12k+` -> 12000, `1.5k+` -> 1500
scripts/refresh-stars.py:77
↓ 2 callersFunctionrounded_rect
Pillow's rounded_rectangle wrapper for older versions.
scripts/generate-stage5-stack.py:87
↓ 2 callersFunctionrun
(question: str, model: Any = None)
examples/stage-4/05-typed-agent/starter.py:67
↓ 2 callersFunctionrun
(question: str, model: Any = None)
examples/stage-4/04-codeact-vs-json-tool/starter.py:78
↓ 2 callersFunctionrun
(topic: str, llm_model: str = MODEL)
examples/stage-4/02-multi-agent-roles/starter.py:112
↓ 2 callersFunctionsearch_node
(state: State)
examples/stage-4/03-graph-workflow/starter.py:55
↓ 2 callersFunctionshould_search
(state: State)
examples/stage-4/03-graph-workflow/starter.py:82
↓ 2 callersFunctionslugify
GitHub-style anchor slug (matches github-slugger npm package). Critical: GitHub does NOT collapse consecutive whitespace — each space be
scripts/check-anchors.py:45
↓ 2 callersFunctionstream_anthropic
(prompt: str, client: Any = None)
examples/stage-7/04-sdk-advanced/starter_anthropic.py:29
↓ 2 callersFunctionstream_to_string
Helper:consume streaming generator + 統計 latency。
examples/stage-7/04-sdk-advanced/starter.py:44
↓ 2 callersFunctionto_percentage
(ratio: float)
examples/stage-3/04-multi-step-reasoning/starter_anthropic.py:39
↓ 2 callersFunctionto_percentage
(ratio: float)
examples/stage-3/04-multi-step-reasoning/starter.py:49
↓ 1 callersFunction_make_auth_error
()
examples/stage-1/05-error-handling/test.py:40
↓ 1 callersFunction_make_auth_error
()
examples/stage-1/05-error-handling/test_anthropic.py:39
↓ 1 callersFunction_make_rate_limit_error
openai.RateLimitError 需要 message + response + body。
examples/stage-1/05-error-handling/test.py:35
↓ 1 callersFunction_make_rate_limit_error
anthropic.RateLimitError 需要 response 參數。
examples/stage-1/05-error-handling/test_anthropic.py:34
↓ 1 callersFunction_mask
Replace fenced + inline code with placeholders so substitutions never touch code. Returns (masked_text, restore_map).
scripts/zh-hans-localize.py:86
↓ 1 callersFunction_run_selftest
Regression test for the ADD double-switcher defect. Builds throw-away fixtures reproducing every old/stub shape, runs --apply, and asserts:
scripts/sync-language-switchers.py:326
↓ 1 callersFunction_unmask
(text: str, store: list[str])
scripts/zh-hans-localize.py:100
↓ 1 callersMethodadd_error
(self, msg: str)
examples/stage-7/03-observability/starter.py:62
↓ 1 callersFunctionagent_answer_anthropic
(question: str, instruction: str = "", client: Any = None)
examples/stage-7/02-eval/starter_anthropic.py:27
↓ 1 callersFunctionagent_call_anthropic
(message: str, max_tokens: int, client: Any = None)
examples/stage-7/05-deploy/starter_anthropic.py:49
↓ 1 callersFunctionblock_text
(text: str)
examples/stage-3/02-multi-tool-selection/test_anthropic.py:22
↓ 1 callersFunctionblock_tool_use
(tool_id: str, name: str, inp: dict)
examples/stage-3/02-multi-tool-selection/test_anthropic.py:26
↓ 1 callersFunctionbuild_crew
CrewAI 風格:一個 agent + 一個 task。
examples/stage-4/01-same-agent-two-frameworks/starter_crewai.py:42
↓ 1 callersFunctionbuild_graph
(checkpointer: Any = None)
examples/stage-4/03-graph-workflow/starter.py:88
↓ 1 callersFunctionbuild_graph
組一個 search → summarize 的圖:LLM 看 query 決定要不要呼叫 search、看到 tool result 後給摘要。
examples/stage-4/01-same-agent-two-frameworks/starter.py:55
↓ 1 callersFunctioncalendar_lookup
(date: str)
examples/stage-3/02-multi-tool-selection/starter_anthropic.py:43
↓ 1 callersFunctioncalendar_lookup
(date: str)
examples/stage-3/02-multi-tool-selection/starter.py:50
↓ 1 callersFunctioncall_claude
(prompt: str)
examples/stage-1/04-cross-provider/starter.py:42
↓ 1 callersFunctioncall_gemini
(prompt: str)
examples/stage-1/04-cross-provider/starter.py:86
↓ 1 callersFunctioncall_openai
(prompt: str)
examples/stage-1/04-cross-provider/starter.py:64
↓ 1 callersFunctioncheck_stage
Return (missing_required, missing_expected) labels.
scripts/check-stage-template.py:75
↓ 1 callersFunctioncompress_png
嘗試多階段壓縮,回傳是否成功 (< target size)。
scripts/compress-images.py:27
↓ 1 callersFunctionconvert_temperature
(value: float, unit: str)
examples/stage-3/06-schema-design/starter_good_anthropic.py:36
↓ 1 callersFunctionconvert_temperature
(value: float, unit: str)
examples/stage-3/06-schema-design/starter_good.py:36
↓ 1 callersFunctionconvert_temperature
(value: str = "")
examples/stage-3/06-schema-design/starter_bad.py:33
↓ 1 callersFunctionconvert_temperature
(value: str = "")
examples/stage-3/06-schema-design/starter_bad_anthropic.py:33
↓ 1 callersFunctiondemo_bad_key
情境 1: 故意用壞 key、看 AuthenticationError 怎麼 raise。
examples/stage-1/05-error-handling/starter_anthropic.py:67
↓ 1 callersFunctiondemo_bad_key
情境 1: 故意用壞 base_url、看 APIConnectionError(Ollama 沒在跑時)。
examples/stage-1/05-error-handling/starter.py:77
↓ 1 callersFunctiondemo_too_long_prompt
情境 3: 故意丟超大 prompt、看 context window 滿了怎樣。
examples/stage-1/05-error-handling/starter_anthropic.py:98
↓ 1 callersFunctiondemo_too_long_prompt
情境 3: 故意丟超大 prompt、看 context window 滿了怎樣。
examples/stage-1/05-error-handling/starter.py:111
↓ 1 callersFunctiondemo_with_retry
情境 2: 包 with_retry 跑一次正常 call、應該第 1 次就成功。
examples/stage-1/05-error-handling/starter_anthropic.py:82
↓ 1 callersFunctiondemo_with_retry
情境 2: 包 with_retry 跑一次正常 call、應該第 1 次就成功。
examples/stage-1/05-error-handling/starter.py:92
↓ 1 callersFunctiondetect_switcher_block
找出檔案頂部的 switcher 區塊位置。 回傳 (start_line, end_line, kind) 或 (None, None, '')。 kind = 'div' 或 'inline' 或 ''。
scripts/sync-language-switchers.py:128
↓ 1 callersFunctiondetect_sync_gaps
Return list of (canonical_file_changed, [missing_mirror_files]) tuples. Only flag canonical files whose mirrors EXIST in repo (so contributor
scripts/check-mirror-sync.py:63
↓ 1 callersFunctionembed_chunks
(chunks: list[str], model: SentenceTransformer)
examples/stage-6/03-chunking-comparison/starter.py:78
↓ 1 callersFunctionextract_urls
回傳 [(line_no, url), ...],跳過程式碼區塊內的 URL。
scripts/check-links.py:51
↓ 1 callersFunctionfind_md_files
(root: Path)
scripts/check-links.py:42
↓ 1 callersFunctionfind_md_files
(root: Path)
scripts/refresh-stars.py:68
↓ 1 callersFunctionfind_nearest_openai
(query: str, sentences: list[str], top_k: int = 3)
examples/stage-6/01-embeddings/starter_anthropic.py:40
↓ 1 callersFunctionfind_paired_files
找所有 (zh-TW, en, zh-Hans) 三檔組合。
scripts/sync-language-switchers.py:54
↓ 1 callersFunctionget_changed_files
Get list of files changed in PR vs base_ref.
scripts/check-mirror-sync.py:31
↓ 1 callersFunctionget_h2_sections
(content: str)
scripts/check-stage-template.py:71
↓ 1 callersFunctionis_canonical_md
zh-TW canonical = .md but not .en.md / .zh-Hans.md.
scripts/check-mirror-sync.py:52
↓ 1 callersFunctionload_config
(repo_root: Path)
scripts/check-2026-freshness.py:41
↓ 1 callersFunctionlocalize
(text: str)
scripts/zh-hans-localize.py:106
↓ 1 callersFunctionlookup_population
(city: str)
examples/stage-3/04-multi-step-reasoning/starter_anthropic.py:29
↓ 1 callersFunctionlookup_population
(city: str)
examples/stage-3/04-multi-step-reasoning/starter.py:39
↓ 1 callersFunctionmain
()
scripts/check-stage-template.py:98
↓ 1 callersFunctionmain
()
scripts/compress-images.py:73
↓ 1 callersFunctionmain
()
scripts/check-mirror-sync.py:138
↓ 1 callersFunctionmain
()
scripts/sync-language-switchers.py:442
↓ 1 callersFunctionmain
()
scripts/generate-stage5-stack.py:95
↓ 1 callersFunctionmain
()
scripts/build-docs-tree.py:57
↓ 1 callersFunctionmain
()
scripts/check-2026-freshness.py:140
↓ 1 callersFunctionmain
()
scripts/check-links.py:90
↓ 1 callersFunctionmain
()
scripts/zh-hans-localize.py:117
↓ 1 callersFunctionmain
()
scripts/refresh-stars.py:115
↓ 1 callersFunctionmain
()
scripts/check-anchors.py:171
↓ 1 callersFunctionmake_anthropic_client
(answer: str)
examples/stage-6/04-full-rag-pipeline/test_anthropic.py:16
↓ 1 callersFunctionmake_mock_llm
(answer: str = "ok")
examples/stage-6/05-long-term-memory/test.py:22
↓ 1 callersFunctionmake_readme_switcher
README.md / README.en.md / README.zh-Hans.md 用的 div 區塊 switcher。
scripts/sync-language-switchers.py:84
↓ 1 callersFunctionmake_resp
(stop_reason: str, *blocks)
examples/stage-3/02-multi-tool-selection/test_anthropic.py:30
↓ 1 callersFunctionmake_tool_call
(call_id: str, name: str, args: dict)
examples/stage-3/02-multi-tool-selection/test.py:29
↓ 1 callersFunctionmatches_exclude
Check if file path matches any exclude glob pattern.
scripts/check-2026-freshness.py:47
↓ 1 callersFunctionnormalize_repo
正規化 repo identifier。回傳 None 表示應該跳過。
scripts/refresh-stars.py:52
↓ 1 callersFunctionparse_anchor_links
Extract (line_no, target_file, anchor) tuples from anchor-style links. Skips matches inside code blocks.
scripts/check-anchors.py:108
↓ 1 callersFunctionprocess_data
(data: list[dict], operation: str)
examples/stage-3/06-schema-design/starter_good_anthropic.py:28
↓ 1 callersFunctionprocess_data
(data: list[dict], operation: str)
examples/stage-3/06-schema-design/starter_good.py:28
↓ 1 callersFunctionprocess_data
(data: str = "")
examples/stage-3/06-schema-design/starter_bad.py:29
↓ 1 callersFunctionprocess_data
(data: str = "")
examples/stage-3/06-schema-design/starter_bad_anthropic.py:29
↓ 1 callersFunctionrag_anthropic
(query: str, doc: str = KB_DOC, top_k: int = 2)
examples/stage-6/04-full-rag-pipeline/starter_anthropic.py:50
↓ 1 callersFunctionround_int
(x: float)
examples/stage-3/04-multi-step-reasoning/starter_anthropic.py:43
↓ 1 callersFunctionround_int
(x: float)
examples/stage-3/04-multi-step-reasoning/starter.py:53
↓ 1 callersFunctionrun
(query: str)
examples/stage-4/01-same-agent-two-frameworks/starter_crewai.py:63
← previousnext →101–200 of 391, ranked by callers