MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / __init__

Method __init__

eval_heldout/hotpotQA/src/agent_arch.py:105–128  ·  view source on GitHub ↗
(self,
                 question: str,
                 key: str,
                 llm: BaseLLM,
                 context_len: int = 2000,
                 max_steps: int= 10,
                 docstore: Docstore = Wikipedia()
                 )

Source from the content-addressed store, hash-verified

103
104class BaseAgent:
105 def __init__(self,
106 question: str,
107 key: str,
108 llm: BaseLLM,
109 context_len: int = 2000,
110 max_steps: int= 10,
111 docstore: Docstore = Wikipedia()
112 ) -> None:
113
114 self.question = question
115 self.answer = ''
116 self.key = key
117 self.max_steps = max_steps
118 self.agent_prompt = ""
119 self.examples = ""
120 self.context_len = context_len
121 self.run_error = False
122 self.name = "Base_HotPotQA_run_Agent"
123
124 self.docstore = DocstoreExplorer(docstore) # Search, Lookup
125 self.llm = llm
126
127 self.enc = token_enc
128 self.__reset_agent()
129
130 def run(self, reset = True) -> None:
131 if reset:

Callers 5

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

__reset_agentMethod · 0.95

Tested by

no test coverage detected