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

Method __init__

eval_heldout/rewoo/algos/PWS.py:12–26  ·  view source on GitHub ↗
(self, available_tools=["Google", "LLM"], fewshot="\n", planner_model="text-davinci-003",
                 solver_model="text-davinci-003")

Source from the content-addressed store, hash-verified

10
11class PWS:
12 def __init__(self, available_tools=["Google", "LLM"], fewshot="\n", planner_model="text-davinci-003",
13 solver_model="text-davinci-003"):
14 self.workers = available_tools
15 self.planner = Planner(workers=self.workers,
16 model_name=planner_model,
17 fewshot=fewshot)
18 self.solver = Solver(model_name=solver_model)
19 self.plans = []
20 self.planner_evidences = {}
21 self.worker_evidences = {}
22 self.tool_counter = {}
23 self.planner_token_unit_price = get_token_unit_price(planner_model)
24 self.solver_token_unit_price = get_token_unit_price(solver_model)
25 self.tool_token_unit_price = get_token_unit_price("text-davinci-003")
26 self.google_unit_price = 0.01
27
28 # input: the question line. e.g. "Question: What is the capital of France?"
29 def run(self, input):

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 3

PlannerClass · 0.90
SolverClass · 0.90
get_token_unit_priceFunction · 0.85

Tested by

no test coverage detected