Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Yifan-Song793/RestGPT
/ functions
Functions
75 in github.com/Yifan-Song793/RestGPT
⨍
Functions
75
◇
Types & classes
10
↓ 17 callers
Method
run
Run command with own globals/locals and returns anything printed.
model/parser.py:162
↓ 4 callers
Function
reduce_openapi_spec
Simplify/distill/minify a spec somehow. I want a smaller target for retrieval and (more importantly) I want smaller results from retrieval.
utils/oas_utils.py:100
↓ 3 callers
Function
get_matched_endpoint
(api_spec: ReducedOpenAPISpec, plan: str)
utils/utils.py:55
↓ 2 callers
Method
__init__
(self, llm: BaseLLM, api_path: str, api_doc: Dict, with_example: bool = False)
model/parser.py:195
↓ 2 callers
Method
_get_api_selector_background
(self, planner_history: List[Tuple[str, str]])
model/rest_gpt.py:116
↓ 1 callers
Method
__init__
(self)
utils/utils.py:13
↓ 1 callers
Method
_construct_scratchpad
( self, history: List[Tuple[str, str]], instruction: str )
model/api_selector.py:156
↓ 1 callers
Method
_construct_scratchpad
( self, history: List[Tuple[str, str]] )
model/planner.py:126
↓ 1 callers
Method
_construct_scratchpad
( self, history: List[Tuple[str, str]] )
model/caller.py:167
↓ 1 callers
Function
_dereference_refs
( obj: Union[dict, list], stop: bool = False )
utils/oas_utils.py:28
↓ 1 callers
Method
_get_action_and_input
(self, llm_output: str)
model/caller.py:178
↓ 1 callers
Method
_get_response
(self, action: str, action_input: str)
model/caller.py:197
↓ 1 callers
Function
_merge_allof
(obj)
utils/oas_utils.py:72
↓ 1 callers
Function
_retrieve_ref_path
(path: str, full_spec: dict)
utils/oas_utils.py:17
↓ 1 callers
Method
_should_continue
(self, iterations: int, time_elapsed: float)
model/caller.py:139
↓ 1 callers
Method
_should_continue
(self, iterations: int, time_elapsed: float)
model/rest_gpt.py:96
↓ 1 callers
Method
_should_continue_plan
(self, plan)
model/rest_gpt.py:121
↓ 1 callers
Method
_should_end
(self, plan)
model/rest_gpt.py:126
↓ 1 callers
Function
dereference_refs
Try to substitute $refs. The goal is to get the complete docs for each endpoint in context for now. In the few OpenAPI specs I studied, $ref
utils/oas_utils.py:7
↓ 1 callers
Method
doRollover
(self)
utils/utils.py:35
↓ 1 callers
Function
fix_json_error
(data: str, return_str=True)
utils/utils.py:99
↓ 1 callers
Function
init_spotify
(requests_wrapper)
utils/utils.py:124
↓ 1 callers
Function
main
()
run.py:18
↓ 1 callers
Function
main
()
run_tmdb.py:28
↓ 1 callers
Function
main
()
init_spotify.py:13
↓ 1 callers
Function
main
()
run_spotify.py:17
↓ 1 callers
Function
merge
(to_merge)
utils/oas_utils.py:57
↓ 1 callers
Function
merge_allof_properties
(obj)
utils/oas_utils.py:56
↓ 1 callers
Function
reduce_endpoint_docs
(docs: dict)
utils/oas_utils.py:145
↓ 1 callers
Function
run
(query, api_spec, requests_wrapper, simple_parser=False)
run_tmdb.py:16
↓ 1 callers
Function
simplify_json
(raw_json: dict)
utils/utils.py:83
Method
__init__
(self, filename, mode='a', encoding=None, delay=False)
utils/utils.py:31
Method
__init__
(self, llm: BaseLLM, scenario: str, api_spec: ReducedOpenAPISpec)
model/api_selector.py:117
Method
__init__
(self, llm: BaseLLM, scenario: str, planner_prompt=PLANNER_PROMPT)
model/planner.py:94
Method
__init__
(self, llm: BaseLLM, api_spec: ReducedOpenAPISpec, scenario: str, requests_wrapper: RequestsWrapper, simple_pa
model/caller.py:124
Method
__init__
(self, llm: BaseLLM, api_path: str, api_doc: Dict, with_example: bool = False)
model/parser.py:344
Method
__init__
( self, llm: BaseLLM, api_spec: ReducedOpenAPISpec, scenario: str, req
model/rest_gpt.py:37
Method
_call
(self, inputs: Dict[str, Any])
model/api_selector.py:170
Method
_call
(self, inputs: Dict[str, str])
model/planner.py:137
Method
_call
(self, inputs: Dict[str, str])
model/caller.py:243
Method
_call
(self, inputs: Dict[str, str])
model/parser.py:286
Method
_call
(self, inputs: Dict[str, str])
model/parser.py:394
Method
_call
( self, inputs: Dict[str, Any], run_manager: Optional[CallbackManagerForChainRun] = No
model/rest_gpt.py:131
Method
_chain_type
(self)
model/api_selector.py:128
Method
_chain_type
(self)
model/planner.py:98
Method
_chain_type
(self)
model/caller.py:128
Method
_chain_type
(self)
model/parser.py:264
Method
_chain_type
(self)
model/parser.py:372
Method
_chain_type
(self)
model/rest_gpt.py:73
Method
_return
(self, output, intermediate_steps: list)
model/rest_gpt.py:107
Method
_stop
(self)
model/api_selector.py:150
Method
_stop
(self)
model/planner.py:120
Method
_stop
(self)
model/caller.py:161
Method
debug_input
(self)
model/rest_gpt.py:92
Method
input_keys
(self)
model/api_selector.py:132
Method
input_keys
(self)
model/planner.py:102
Method
input_keys
(self)
model/caller.py:132
Method
input_keys
Return the singular input key. :meta private:
model/parser.py:268
Method
input_keys
Return the singular input key. :meta private:
model/parser.py:376
Method
input_keys
Return the input keys. :meta private:
model/rest_gpt.py:77
Method
llm_prefix
Prefix to append the llm call with.
model/api_selector.py:145
Method
llm_prefix
Prefix to append the llm call with.
model/planner.py:115
Method
llm_prefix
Prefix to append the llm call with.
model/caller.py:156
Method
observation_prefix
Prefix to append the observation with.
model/api_selector.py:140
Method
observation_prefix
Prefix to append the observation with.
model/planner.py:110
Method
observation_prefix
Prefix to append the observation with.
model/caller.py:151
Method
output_keys
(self)
model/api_selector.py:136
Method
output_keys
(self)
model/planner.py:106
Method
output_keys
(self)
model/caller.py:136
Method
output_keys
Return the singular output key. :meta private:
model/parser.py:276
Method
output_keys
Return the singular output key. :meta private:
model/parser.py:384
Method
output_keys
Return the singular output key. :meta private:
model/rest_gpt.py:85
Method
save
Raise error - saving not supported for Agent Executors.
model/rest_gpt.py:64
Method
shouldRollover
(self, record)
utils/utils.py:49
Method
write
(self, data)
utils/utils.py:22