(tools_search)
| 112 | yield [gr.update(visible=True, value=return_msg), gr.update(visible=True), gr.update(visible=False)] |
| 113 | |
| 114 | def 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 | |
| 127 | def clear_retrieve(): |
| 128 | return [gr.update(value=""), gr.update(choices=all_tools_list)] |
nothing calls this directly
no outgoing calls
no test coverage detected