Skip to content

evalguard-api-model 1.0.0-dbe8e229

Install from the command line:
Learn more about npm packages
$ npm install @trustification/evalguard-api-model@1.0.0-dbe8e229
Install via package.json:
"@trustification/evalguard-api-model": "1.0.0-dbe8e229"

About this version

EvalGuard TypeScript API Client

This package provides a TypeScript client for the EvalGuard API using axios.

Installation

npm install @trustification/evalguard-api-model

Usage

Basic Usage

import EvalGuardApiClient from '@trustification/evalguard-api-model';

const client = new EvalGuardApiClient('http://localhost:8080');

// Get all reports
const reports = await client.getReports();

// Get reports for a specific model
const modelReports = await client.getReports({
  modelName: 'meta-llama/Llama-3.1-8B-Instruct'
});

// Get a specific report
const report = await client.getReport('report-id');

// Get thresholds for tasks
const thresholds = await client.getThresholds(['truthfulqa_mc1', 'winogender_schemas']);

// Get available models
const models = await client.getModels();

// Get available tasks
const tasks = await client.getTasks();

Advanced Usage

import { Configuration, DefaultApi } from '@trustification/evalguard-api-model';

// Use the generated API directly
const config = new Configuration({
  basePath: 'http://localhost:8080',
  apiKey: 'your-api-key'
});

const api = new DefaultApi(config);

// Make direct API calls
const reports = await api.listReports(
  'meta-llama/Llama-3.1-8B-Instruct', // modelName
  undefined, // modelSource
  undefined, // taskRef
  undefined, // metric
  10, // limit
  0  // offset
);

Development

Generate API Client

npm run generate

Build

npm run build

Clean Generated Files

npm run clean

Features

  • Simple: Uses axios for HTTP requests - no complex runtime fixes needed
  • Type Safe: Full TypeScript support with generated types
  • Lightweight: Minimal dependencies, just axios
  • Generated: Automatically generated from OpenAPI specification

Details


Assets

  • evalguard-api-model-1.0.0-dbe8e229.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0