MCPcopy Create free account
hub / github.com/KerwinMai/Multi-Agent-Exp / __init__

Method __init__

agents/sql_agent.py:27–37  ·  view source on GitHub ↗

初始化SQL查询智能体 Args: llm: 语言模型实例 db_path: 数据库路径 num_examples: Few-shot示例数量

(self, llm: BaseLLM, db_path: str, num_examples: int = 3)

Source from the content-addressed store, hash-verified

25 """SQL查询子智能体,支持自动纠错循环(ReAct/Reflection 模式)"""
26
27 def __init__(self, llm: BaseLLM, db_path: str, num_examples: int = 3):
28 """初始化SQL查询智能体
29
30 Args:
31 llm: 语言模型实例
32 db_path: 数据库路径
33 num_examples: Few-shot示例数量
34 """
35 self.llm = llm
36 self.db_path = db_path
37 self.num_examples = num_examples
38
39 @staticmethod
40 def _llm_to_str(result) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected