The platform for continuously improving AI agents.
/* tslint:disable */
/* eslint-disable */
/**
* Overbae API
* Backend API for the Overclaw / Overmind platform.
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type {
EvalMatrix,
EvalMatrixRequest,
PaginatedEvalMatrixList,
} from '../models/index';
import {
EvalMatrixFromJSON,
EvalMatrixToJSON,
EvalMatrixRequestFromJSON,
EvalMatrixRequestToJSON,
PaginatedEvalMatrixListFromJSON,
PaginatedEvalMatrixListToJSON,
} from '../models/index';
export interface EvalMatrixCreateRequest {
evalMatrixRequest: EvalMatrixRequest;
}
export interface EvalMatrixDestroyRequest {
id: string;
}
export interface EvalMatrixListRequest {
capability?: string;
enabled?: boolean;
ordering?: string;
page?: number;
pageSize?: number;
project?: string;
search?: string;
spanType?: string;
type?: EvalMatrixListTypeEnum;
}
export interface EvalMatrixRetrieveRequest {
id: string;
}
/**
*
*/
export class EvalMatrixApi extends runtime.BaseAPI {
/**
* Deterministic checks and llm expectations; live span scoring reads the enabled rows.
* Add an eval matrix row
*/
async evalMatrixCreateRaw(requestParameters: EvalMatrixCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EvalMatrix>> {
if (requestParameters['evalMatrixRequest'] == null) {
throw new runtime.RequiredError(
'evalMatrixRequest',
'Required parameter "evalMatrixRequest" was null or undefined when calling evalMatrixCreate().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("ClerkBearerAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("BearerAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/eval-matrix/`;
const response = await this.request({
path: urlPath,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: EvalMatrixRequestToJSON(requestParameters['evalMatrixRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => EvalMatrixFromJSON(jsonValue));
}
/**
* Deterministic checks and llm expectations; live span scoring reads the enabled rows.
* Add an eval matrix row
*/
async evalMatrixCreate(requestParameters: EvalMatrixCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EvalMatrix> {
const response = await this.evalMatrixCreateRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Deterministic checks and llm expectations; live span scoring reads the enabled rows.
* Delete an eval matrix row
*/
async evalMatrixDestroyRaw(requestParameters: EvalMatrixDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters['id'] == null) {
throw new runtime.RequiredError(
'id',
'Required parameter "id" was null or undefined when calling evalMatrixDestroy().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("ClerkBearerAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("BearerAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/eval-matrix/{id}/`;
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
const response = await this.request({
path: urlPath,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Deterministic checks and llm expectations; live span scoring reads the enabled rows.
* Delete an eval matrix row
*/
async evalMatrixDestroy(requestParameters: EvalMatrixDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.evalMatrixDestroyRaw(requestParameters, initOverrides);
}
/**
* Deterministic checks and llm expectations; live span scoring reads the enabled rows.
* List eval matrix rows
*/
async evalMatrixListRaw(requestParameters: EvalMatrixListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedEvalMatrixList>> {
const queryParameters: any = {};
if (requestParameters['capability'] != null) {
queryParameters['capability'] = requestParameters['capability'];
}
if (requestParameters['enabled'] != null) {
queryParameters['enabled'] = requestParameters['enabled'];
}
if (requestParameters['ordering'] != null) {
queryParameters['ordering'] = requestParameters['ordering'];
}
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['page_size'] = requestParameters['pageSize'];
}
if (requestParameters['project'] != null) {
queryParameters['project'] = requestParameters['project'];
}
if (requestParameters['search'] != null) {
queryParameters['search'] = requestParameters['search'];
}
if (requestParameters['spanType'] != null) {
queryParameters['span_type'] = requestParameters['spanType'];
}
if (requestParameters['type'] != null) {
queryParameters['type'] = requestParameters['type'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("ClerkBearerAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("BearerAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/eval-matrix/`;
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEvalMatrixListFromJSON(jsonValue));
}
/**
* Deterministic checks and llm expectations; live span scoring reads the enabled rows.
* List eval matrix rows
*/
async evalMatrixList(requestParameters: EvalMatrixListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedEvalMatrixList> {
const response = await this.evalMatrixListRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Deterministic checks and llm expectations; live span scoring reads the enabled rows.
* Get an eval matrix row
*/
async evalMatrixRetrieveRaw(requestParameters: EvalMatrixRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EvalMatrix>> {
if (requestParameters['id'] == null) {
throw new runtime.RequiredError(
'id',
'Required parameter "id" was null or undefined when calling evalMatrixRetrieve().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("ClerkBearerAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Api-Key"] = await this.configuration.apiKey("X-Api-Key"); // ApiKeyAuth authentication
}
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("BearerAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/eval-matrix/{id}/`;
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => EvalMatrixFromJSON(jsonValue));
}
/**
* Deterministic checks and llm expectations; live span scoring reads the enabled rows.
* Get an eval matrix row
*/
async evalMatrixRetrieve(requestParameters: EvalMatrixRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EvalMatrix> {
const response = await this.evalMatrixRetrieveRaw(requestParameters, initOverrides);
return await response.value();
}
}
/**
* @export
*/
export const EvalMatrixListTypeEnum = {
deterministic: 'deterministic',
llm: 'llm'
} as const;
export type EvalMatrixListTypeEnum = typeof EvalMatrixListTypeEnum[keyof typeof EvalMatrixListTypeEnum];