Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/billxbf/ReWOO
/ functions
Functions
106 in github.com/billxbf/ReWOO
⨍
Functions
106
◇
Types & classes
28
↓ 9 callers
Method
__init__
(self, name="LLM")
nodes/Worker.py:138
↓ 6 callers
Method
run
(self, input)
algos/PWS.py:29
↓ 5 callers
Method
_update_eval_dict
(self, question, label, response)
utils/Evaluator.py:153
↓ 5 callers
Function
get_token_unit_price
(model)
utils/util.py:32
↓ 4 callers
Function
normalize_answer
(s)
utils/Evaluator.py:16
↓ 3 callers
Method
call_llm
(self, prompt, stop)
nodes/LLMNode.py:32
↓ 3 callers
Method
get_metrics
(self, query, label, pred)
utils/Evaluator.py:185
↓ 3 callers
Method
run
(self, input, log=False)
nodes/Worker.py:145
↓ 2 callers
Method
__init__
(self, available_tools=["Google", "LLM"], fewshot="\n", planner_model="text-davinci-003", sol
algos/PWS.py:12
↓ 2 callers
Method
_load_tools
(self)
algos/react.py:56
↓ 2 callers
Method
_load_tools
(self)
algos/react.py:135
↓ 2 callers
Method
load
(self, sample_size=None, type="train")
utils/DataLoader.py:10
↓ 1 callers
Method
_failed_response
(self)
utils/Evaluator.py:207
↓ 1 callers
Method
_generate_tool_prompt
(self)
algos/react.py:168
↓ 1 callers
Method
_generate_worker_prompt
(self)
nodes/Planner.py:34
↓ 1 callers
Method
_get_avg_results
(self)
utils/Evaluator.py:172
↓ 1 callers
Method
_get_worker
(self, name)
nodes/Planner.py:28
↓ 1 callers
Method
_get_worker
(self, name)
algos/react.py:162
↓ 1 callers
Method
_get_worker_evidences
(self)
algos/PWS.py:94
↓ 1 callers
Method
_initialize_eval_dict
(self)
utils/Evaluator.py:146
↓ 1 callers
Method
_parse_planner_evidences
(self, response)
algos/PWS.py:81
↓ 1 callers
Method
_parse_plans
(self, response)
algos/PWS.py:74
↓ 1 callers
Method
_parse_prediction
(self, output)
utils/Evaluator.py:195
↓ 1 callers
Method
_parse_tool
(self, intermediate_steps)
algos/react.py:89
↓ 1 callers
Method
_parse_tool
(self, intermediate_steps)
algos/react.py:153
↓ 1 callers
Method
_reinitialize
(self)
algos/PWS.py:120
↓ 1 callers
Function
f1_score
(prediction, ground_truth)
utils/Evaluator.py:33
↓ 1 callers
Method
generate_prompt
( self, instruction: str, input: Union[None, str] = None, label: Union[None, s
alpaca/utils/prompter.py:30
↓ 1 callers
Method
get_current_zipcode
(self)
nodes/Worker.py:183
↓ 1 callers
Method
get_ip_address
(self)
nodes/Worker.py:167
↓ 1 callers
Method
get_location_data
(sefl, ip_address)
nodes/Worker.py:172
↓ 1 callers
Method
get_response
(self, output: str)
alpaca/utils/prompter.py:52
↓ 1 callers
Method
get_zipcode_from_lat_long
(self, lat, long)
nodes/Worker.py:178
↓ 1 callers
Function
llm_accuracy_score
(query, prediction, ground_truth)
utils/Evaluator.py:54
↓ 1 callers
Method
load_disfl_qa
(self, cache_dir="data/bigbench/disfl_qa.csv", sample_size=None)
utils/DataLoader.py:74
↓ 1 callers
Method
load_fever
(self, cache_dir="data/fever", sample_size=100, type="test")
utils/DataLoader.py:39
↓ 1 callers
Method
load_gsm8k
(self, cache_dir="data/gsm8k", sample_size=100, type="test")
utils/DataLoader.py:53
↓ 1 callers
Method
load_hotpot_qa
(self, cache_dir="data/hotpot_qa", sample_size=100, type="test")
utils/DataLoader.py:32
↓ 1 callers
Method
load_physics_question
(self, cache_dir="data/bigbench/physics_question.csv", sample_size=None)
utils/DataLoader.py:60
↓ 1 callers
Method
load_sotu_qa
(self, cache_dir="data/SOTU/SOTU_QA.csv", sample_size=None)
utils/DataLoader.py:88
↓ 1 callers
Method
load_sports_understanding
(self, cache_dir="data/bigbench/sports_understanding.csv", sample_size=None)
utils/DataLoader.py:67
↓ 1 callers
Method
load_strategy_qa
(self, cache_dir="data/bigbench/strategy_qa.csv", sample_size=None)
utils/DataLoader.py:81
↓ 1 callers
Method
load_trivia_qa
(self, cache_dir="data/trivia_qa", sample_size=100, type="test")
utils/DataLoader.py:46
↓ 1 callers
Method
lora_generate
(self, instruction, input)
alpaca/lora.py:80
↓ 1 callers
Function
lower
(text)
utils/Evaluator.py:27
↓ 1 callers
Function
main
(args)
run.py:56
↓ 1 callers
Function
main
(args)
run_eval.py:85
↓ 1 callers
Function
remove_articles
(text)
utils/Evaluator.py:17
↓ 1 callers
Function
remove_punc
(text)
utils/Evaluator.py:23
↓ 1 callers
Method
reset
(self)
algos/react.py:71
↓ 1 callers
Method
reset
(self)
algos/react.py:144
↓ 1 callers
Method
run
(self)
utils/Evaluator.py:83
↓ 1 callers
Method
run
Run query through WolframAlpha and parse result.
nodes/Worker.py:86
↓ 1 callers
Method
run
(self, input)
algos/notool.py:14
↓ 1 callers
Function
save_data
(dataset, data, save_path)
run_eval.py:70
↓ 1 callers
Function
white_space_fix
(text)
utils/Evaluator.py:20
Method
__call__
(self, input_ids, scores)
alpaca/utils/callbacks.py:19
Method
__enter__
(self)
alpaca/utils/callbacks.py:71
Method
__exit__
(self, exc_type, exc_val, exc_tb)
alpaca/utils/callbacks.py:74
Method
__init__
(self, docstore: Docstore)
utils/CustomDocstoreExplorer.py:8
Method
__init__
(self, data="hotpot_qa", seed=2023)
utils/DataLoader.py:6
Method
__init__
(self, task, dataset, algo, maxtry=3)
utils/Evaluator.py:70
Method
__init__
(self, load_8bit: bool = True, base_model: str = "decapoda-research/llama-7b-hf",
alpaca/lora.py:23
Method
__init__
(self, callback_func=None)
alpaca/utils/callbacks.py:16
Method
__init__
(self, func, kwargs={}, callback=None)
alpaca/utils/callbacks.py:32
Method
__init__
(self, template_name: str = "", verbose: bool = False)
alpaca/utils/prompter.py:14
Method
__init__
(self, workers, prefix=DEFAULT_PREFIX, suffix=DEFAULT_SUFFIX, fewshot=DEFAULT_FEWSHOT, model_
nodes/Planner.py:8
Method
__init__
(self, name, input_type, output_type)
nodes/Node.py:3
Method
__init__
(self, name="BaseLLMNode", model_name="text-davinci-003", stop=None, input_type=str, output_type=str)
nodes/LLMNode.py:15
Method
__init__
(self, name="Google")
nodes/Worker.py:15
Method
__init__
(self, name="Wikipedia", docstore=None)
nodes/Worker.py:32
Method
__init__
(self, name="LookUp", docstore=None)
nodes/Worker.py:58
Method
__init__
(self)
nodes/Worker.py:83
Method
__init__
(self, name="WolframAlpha")
nodes/Worker.py:102
Method
__init__
(self, name="Calculator")
nodes/Worker.py:119
Method
__init__
(self, name="ZipCodeRetriever")
nodes/Worker.py:161
Method
__init__
(self, doc_name, doc_path, name="SearchDoc")
nodes/Worker.py:198
Method
__init__
(self, name="SearchSOTU")
nodes/Worker.py:218
Method
__init__
(self, prefix=DEFAULT_PREFIX, suffix=DEFAULT_SUFFIX, model_name="text-davinci-003", stop=None)
nodes/Solver.py:6
Method
__init__
(self, fewshot, model_name="text-davinci-002", max_iter=8, verbose=True)
algos/react.py:14
Method
__init__
(self, model_name="text-davinci-003", available_tools=["Google", "Calculator"], fewshot="\n",
algos/react.py:100
Method
__init__
(self, fewshot="\n", model_name="text-davinci-003")
algos/notool.py:7
Method
__init__
(self, fewshot="\n", model_name="text-davinci-003")
algos/notool.py:33
Method
__init__
(self, fewshot=fewshots.HOTPOTQA_PWS_BASE, planner_model="text-davinci-003", solver_model="te
algos/PWS.py:128
Method
__init__
(self, fewshot=fewshots.HOTPOTQA_PWS_EXTRA, planner_model="text-davinci-003", solver_model="t
algos/PWS.py:137
Method
__iter__
(self)
alpaca/utils/callbacks.py:61
Method
__next__
(self)
alpaca/utils/callbacks.py:64
Method
_callback
(val)
alpaca/utils/callbacks.py:40
Method
_sentence
(self)
utils/CustomDocstoreExplorer.py:32
Method
gentask
()
alpaca/utils/callbacks.py:45
Method
lookup
Lookup a term in document (if saved).
utils/CustomDocstoreExplorer.py:13
Function
process
(tools, model, input_text)
app.py:11
Method
run
(self, input, log=False)
nodes/Planner.py:17
Method
run
(self, input, log=False)
nodes/Node.py:8
Method
run
(self, input, log=False)
nodes/LLMNode.py:24
Method
run
(self, input, log=False)
nodes/Worker.py:21
Method
run
(self, input, log=False)
nodes/Worker.py:41
Method
run
(self, input, log=False)
nodes/Worker.py:66
Method
run
(self, input, log=False)
nodes/Worker.py:108
Method
run
(self, input, log=False)
nodes/Worker.py:125
next →
1–100 of 106, ranked by callers