diff --git a/docs/en/samples/pre_post_processing/golden.txt b/docs/en/samples/pre_post_processing/golden.txt deleted file mode 100644 index 5ee773d450..0000000000 --- a/docs/en/samples/pre_post_processing/golden.txt +++ /dev/null @@ -1,4 +0,0 @@ -Final Client Response: -AI: -Loyalty Points -POLICY CHECK: Intercepting 'update-hotel' \ No newline at end of file diff --git a/docs/en/samples/pre_post_processing/js/agent.test.js b/docs/en/samples/pre_post_processing/js/agent.test.js index d06b5e8719..030793b322 100644 --- a/docs/en/samples/pre_post_processing/js/agent.test.js +++ b/docs/en/samples/pre_post_processing/js/agent.test.js @@ -14,7 +14,7 @@ import { describe, test, before, after } from "node:test"; import assert from "node:assert/strict"; -import fs from "fs"; + import path from "path"; import { fileURLToPath } from "url"; @@ -25,7 +25,11 @@ const agentPath = path.join(orchDir, "agent.js"); const { main: runAgent } = await import(agentPath); -const GOLDEN_FILE_PATH = path.resolve(__dirname, "../golden.txt"); +const GOLDEN_KEYWORDS = [ + "AI:", + "Loyalty Points", + "POLICY CHECK: Intercepting 'update-hotel'" +]; describe(`${ORCH_NAME} Pre/Post Processing Agent`, () => { let capturedOutput = []; @@ -71,11 +75,9 @@ describe(`${ORCH_NAME} Pre/Post Processing Agent`, () => { "Assertion Failed: Script ran successfully but produced no output." ); - const goldenFile = fs.readFileSync(GOLDEN_FILE_PATH, "utf8"); - const keywords = goldenFile.split("\n").filter((kw) => kw.trim() !== ""); const missingKeywords = []; - for (const keyword of keywords) { + for (const keyword of GOLDEN_KEYWORDS) { if (!actualOutput.includes(keyword)) { missingKeywords.push(keyword); } diff --git a/docs/en/samples/pre_post_processing/python/langchain/__init__.py b/docs/en/samples/pre_post_processing/python/langchain/__init__.py deleted file mode 100644 index 3ad6377894..0000000000 --- a/docs/en/samples/pre_post_processing/python/langchain/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Empty init for package resolution