qualifire 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -8
- package/lib/index.js +1 -8
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -17,14 +17,7 @@ export declare class Qualifire {
|
|
|
17
17
|
apiKey?: string;
|
|
18
18
|
baseUrl?: string;
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
* Evaluates the input and output using the Qualifire API.
|
|
22
|
-
* @param input - The input data for evaluation.
|
|
23
|
-
* @param output - The expected output data for evaluation.
|
|
24
|
-
* @param options - Additional options for evaluation.
|
|
25
|
-
* @returns A promise that resolves to the evaluation response.
|
|
26
|
-
*/
|
|
27
|
-
evaluate: (input: Input, output: Output, { async, }: {
|
|
20
|
+
evaluate: (input: Input, output: Output, { async, }?: {
|
|
28
21
|
async?: boolean | undefined;
|
|
29
22
|
}) => Promise<EvaluationResponse | undefined>;
|
|
30
23
|
}
|
package/lib/index.js
CHANGED
|
@@ -15,14 +15,7 @@ class Qualifire {
|
|
|
15
15
|
* @param baseUrl - The base URL for the Qualifire API.
|
|
16
16
|
*/
|
|
17
17
|
constructor({ apiKey, baseUrl }) {
|
|
18
|
-
|
|
19
|
-
* Evaluates the input and output using the Qualifire API.
|
|
20
|
-
* @param input - The input data for evaluation.
|
|
21
|
-
* @param output - The expected output data for evaluation.
|
|
22
|
-
* @param options - Additional options for evaluation.
|
|
23
|
-
* @returns A promise that resolves to the evaluation response.
|
|
24
|
-
*/
|
|
25
|
-
this.evaluate = async (input, output, { async = false, }) => {
|
|
18
|
+
this.evaluate = async (input, output, { async, } = {}) => {
|
|
26
19
|
const url = `${this.baseUrl}/api/evaluate/v1`;
|
|
27
20
|
const body = JSON.stringify({ async, input, output });
|
|
28
21
|
const headers = {
|