CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-gradio--client

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%

Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well the engineer uses the @gradio/client package's API introspection capabilities (specifically view_api() method) to implement parameter validation. The focus is on proper usage of the Client class, correct extraction of schema information, and implementation of validation logic based on retrieved API metadata.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Client.connect() usage",
      "description": "Uses Client.connect() static method to establish connection to Gradio application. Should properly await the connection and handle the returned Client instance for subsequent operations.",
      "max_score": 15
    },
    {
      "name": "view_api() for schema retrieval",
      "description": "Uses the view_api() method from the Client instance to retrieve API schema information. Should call view_api() and correctly access the returned ApiInfo object containing endpoint definitions and parameter metadata.",
      "max_score": 25
    },
    {
      "name": "Required parameter identification",
      "description": "Correctly extracts and identifies required vs optional parameters from the API schema. Should parse parameter definitions from the ApiInfo structure and determine which parameters are marked as required.",
      "max_score": 15
    },
    {
      "name": "Invalid parameter detection",
      "description": "Validates user-provided parameters against the schema's defined parameter names. Should compare user parameter names with those in the API schema and flag parameters not defined in the endpoint.",
      "max_score": 15
    },
    {
      "name": "Positional array format support",
      "description": "Handles positional (array) parameter format by mapping array indices to parameter names based on schema parameter order. Should detect array input and use parameter ordering from the API schema.",
      "max_score": 15
    },
    {
      "name": "Keyword object format support",
      "description": "Handles keyword (object) parameter format by name lookup. Should detect object input and validate parameter names exist in schema regardless of the order provided.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-gradio--client

tile.json