mcp2 / tool_registry.py
deepak191z's picture
Create tool_registry.py
86faca9 verified
raw
history blame contribute delete
602 Bytes
# tool_registry.py
from gradio_client import Client
import gradio as gr
def chatgpt_tool(text_input):
client = Client("yuntian-deng/ChatGPT")
result = client.predict(
inputs=text_input,
top_p=1,
temperature=1,
chat_counter=0,
chatbot=[],
api_name="/predict"
)
return result
TOOL_REGISTRY = [
{
"name": "ChatGPT Remote",
"func": chatgpt_tool,
"inputs": gr.Textbox(label="Input"),
"outputs": gr.Textbox(label="Response"),
"api_name": "chatgpt_remote",
},
# Add more remote tools here
]