evals 1.0.5 → 1.0.6
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/dist/index.js +4 -2
- package/package.json +1 -1
- package/src/index.js +4 -2
package/dist/index.js
CHANGED
|
@@ -15266,7 +15266,8 @@ program.command("fetch-evals").description("Fetch the latest evals for the proje
|
|
|
15266
15266
|
}
|
|
15267
15267
|
};
|
|
15268
15268
|
try {
|
|
15269
|
-
const
|
|
15269
|
+
const currentWorkingDir = process.cwd();
|
|
15270
|
+
const promptsDir = `${currentWorkingDir}/prompts/`;
|
|
15270
15271
|
const promptFiles = fs2.readdirSync(promptsDir).filter((file) => file.endsWith(".prompt.js"));
|
|
15271
15272
|
const processingPromises = promptFiles.map(processPromptFile);
|
|
15272
15273
|
await Promise.all(processingPromises);
|
|
@@ -15280,7 +15281,8 @@ program.command("run-evals").description("Run evals in the current directory and
|
|
|
15280
15281
|
throw new Error("OPENAI_API_KEY is not set in the environment variables.");
|
|
15281
15282
|
}
|
|
15282
15283
|
const openai = new openai_default;
|
|
15283
|
-
const
|
|
15284
|
+
const currentWorkingDir = process.cwd();
|
|
15285
|
+
const promptsDir = `${currentWorkingDir}/prompts/`;
|
|
15284
15286
|
const model = "gpt-4-1106-preview";
|
|
15285
15287
|
const temperature = 0;
|
|
15286
15288
|
const processMarkdownFile = async (evalsFolder, evalFile, promptInstance) => {
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -59,7 +59,8 @@ program
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
try {
|
|
62
|
-
const
|
|
62
|
+
const currentWorkingDir = process.cwd(); // Get the current working directory
|
|
63
|
+
const promptsDir = `${currentWorkingDir}/prompts/`; // Use it as the base for your prompts directory
|
|
63
64
|
const promptFiles = fs.readdirSync(promptsDir).filter(file => file.endsWith('.prompt.js'));
|
|
64
65
|
|
|
65
66
|
const processingPromises = promptFiles.map(processPromptFile);
|
|
@@ -80,7 +81,8 @@ program
|
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
const openai = new OpenAI(); // Assumes OPENAI_API_KEY is set in environment
|
|
83
|
-
const
|
|
84
|
+
const currentWorkingDir = process.cwd(); // Get the current working directory
|
|
85
|
+
const promptsDir = `${currentWorkingDir}/prompts/`; // Use it as the base for your prompts directory
|
|
84
86
|
const model = 'gpt-4-1106-preview';
|
|
85
87
|
const temperature = 0;
|
|
86
88
|
|