UNPKG

parea-ai

Version:

Client SDK library to connect to Parea AI.

25 lines (24 loc) 1.24 kB
import { EvalFunctionReturn, EvaluationResult } from '../types'; /** * Extracts the parameter names from a given function. * @param func - The function to extract parameter names from. * @returns An array of parameter names as strings. * @throws {Error} If there's an error during the extraction process. */ export declare function extractFunctionParamNames(func: Function): string[]; /** * Extracts function parameters and their values from a given function and arguments. * @param func - The function to extract parameters from. * @param args - An array of argument values passed to the function. * @returns An object where keys are parameter names and values are the corresponding argument values. */ export declare function extractFunctionParams(func: Function, args: any[]): { [key: string]: any; }; /** * Processes the result of an evaluation function and pushes it to the scores array. * @param funcName - The name of the evaluation function. * @param result - The result returned by the evaluation function. * @param scores - The array to which the processed result will be pushed. */ export declare function processEvaluationResult(funcName: string, result: EvalFunctionReturn, scores: EvaluationResult[]): void;