JavaScript and TypeScript client library for interacting with Gradio APIs, providing methods to connect to, submit predictions to, and manage connections with Gradio applications.
Overall
score
96%
{
"context": "This criteria evaluates how well the engineer uses @gradio/client's session management features to build a session-aware prediction tracker. The focus is on proper utilization of session hashes, the Client.connect() method with session configuration, and session state handling.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Client.connect() usage",
"description": "Uses Client.connect() method to establish connection to the Gradio application, properly handling the async connection and returning a Client instance.",
"max_score": 20
},
{
"name": "Custom session hash",
"description": "Implements custom session hash support by passing session_hash parameter to Client.connect() when provided in config, allowing users to specify their own session identifiers.",
"max_score": 25
},
{
"name": "Session hash retrieval",
"description": "Retrieves and exposes the session hash from the connected Client instance (via client.session_hash property or similar) to enable session identification.",
"max_score": 15
},
{
"name": "predict() method usage",
"description": "Uses the client.predict() method to make predictions, properly passing endpoint identifier and input data, and handling the returned promise.",
"max_score": 15
},
{
"name": "State parameter handling",
"description": "Handles optional state parameter in predictions by properly passing it to the predict() method when provided, enabling stateful interactions.",
"max_score": 10
},
{
"name": "reconnect() method usage",
"description": "Uses the client.reconnect() method to verify session validity and returns the connection status ('connected', 'broken', or 'changed').",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-gradio--clientevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10