chore: update main function name test
Browse files
app.py
CHANGED
|
@@ -56,10 +56,10 @@ def _validate_base64_encoding(encoded_payload: str) -> None:
|
|
| 56 |
raise ValueError("Invalid payload - must be valid base64")
|
| 57 |
|
| 58 |
# ---------------------------------------------------------------------------
|
| 59 |
-
# Tool:
|
| 60 |
# ---------------------------------------------------------------------------
|
| 61 |
|
| 62 |
-
def
|
| 63 |
employee_id: str,
|
| 64 |
case_type: Literal["1", "2", "3", "4"],
|
| 65 |
encoded_payload: str,
|
|
@@ -135,7 +135,7 @@ with gr.Blocks(title="Case Management (MCP via Gradio)") as app:
|
|
| 135 |
gr.Markdown(
|
| 136 |
"## Case Management System\n\n"
|
| 137 |
"Creates internal cases. **`encoded_payload` must be base64-encoded**.\n\n"
|
| 138 |
-
"- The `
|
| 139 |
)
|
| 140 |
|
| 141 |
with gr.Tab("Create Case (MCP Tool)"):
|
|
@@ -146,10 +146,10 @@ with gr.Blocks(title="Case Management (MCP via Gradio)") as app:
|
|
| 146 |
|
| 147 |
btn = gr.Button("Create Case")
|
| 148 |
btn.click(
|
| 149 |
-
|
| 150 |
inputs=[employee_id_in, case_type_in, encoded_payload_in],
|
| 151 |
outputs=out,
|
| 152 |
-
api_name="
|
| 153 |
)
|
| 154 |
|
| 155 |
with gr.Tab("UI Helper: Encode (testing only)"):
|
|
|
|
| 56 |
raise ValueError("Invalid payload - must be valid base64")
|
| 57 |
|
| 58 |
# ---------------------------------------------------------------------------
|
| 59 |
+
# Tool: pheel
|
| 60 |
# ---------------------------------------------------------------------------
|
| 61 |
|
| 62 |
+
def pheel(
|
| 63 |
employee_id: str,
|
| 64 |
case_type: Literal["1", "2", "3", "4"],
|
| 65 |
encoded_payload: str,
|
|
|
|
| 135 |
gr.Markdown(
|
| 136 |
"## Case Management System\n\n"
|
| 137 |
"Creates internal cases. **`encoded_payload` must be base64-encoded**.\n\n"
|
| 138 |
+
"- The `pheel` endpoint is exposed for MCP when launched with `mcp_server=True`."
|
| 139 |
)
|
| 140 |
|
| 141 |
with gr.Tab("Create Case (MCP Tool)"):
|
|
|
|
| 146 |
|
| 147 |
btn = gr.Button("Create Case")
|
| 148 |
btn.click(
|
| 149 |
+
pheel,
|
| 150 |
inputs=[employee_id_in, case_type_in, encoded_payload_in],
|
| 151 |
outputs=out,
|
| 152 |
+
api_name="pheel",
|
| 153 |
)
|
| 154 |
|
| 155 |
with gr.Tab("UI Helper: Encode (testing only)"):
|