MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / retrieve

Function retrieve

web_demo.py:114–125  ·  view source on GitHub ↗
(tools_search)

Source from the content-addressed store, hash-verified

112 yield [gr.update(visible=True, value=return_msg), gr.update(visible=True), gr.update(visible=False)]
113
114def retrieve(tools_search):
115 if tools_search == "":
116 return gr.update(choices=all_tools_list)
117 else:
118 url = "http://127.0.0.1:8079/retrieve"
119 param = {
120 "query": tools_search
121 }
122 response = requests.post(url, json=param)
123 result = response.json()
124 retrieved_tools = result["tools"]
125 return gr.update(choices=retrieved_tools)
126
127def clear_retrieve():
128 return [gr.update(value=""), gr.update(choices=all_tools_list)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected