mirror of
https://github.com/langgenius/dify.git
synced 2026-04-23 20:36:14 +08:00
feat: add LLM quota deduction functionality and enhance model configuration handling in llm_utils.py; update test cases for LLM node context handling
This commit is contained in:
@ -35,7 +35,14 @@ def patch_deduct_llm_quota(monkeypatch):
|
||||
def _make_llm_node(reasoning_format: str) -> LLMNode:
|
||||
node = LLMNode.__new__(LLMNode)
|
||||
object.__setattr__(node, "_node_data", types.SimpleNamespace(reasoning_format=reasoning_format, tools=[]))
|
||||
object.__setattr__(node, "tenant_id", "tenant")
|
||||
object.__setattr__(
|
||||
node,
|
||||
"_run_context",
|
||||
{"_dify": types.SimpleNamespace(
|
||||
tenant_id="tenant", app_id="app", user_id="user",
|
||||
user_from="account", invoke_from="debugger",
|
||||
)},
|
||||
)
|
||||
return node
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user