promptfoo 0.59.1 → 0.61.0

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.
Files changed (137) hide show
  1. package/README.md +14 -2
  2. package/dist/package.json +5 -2
  3. package/dist/src/assertions.d.ts +2 -1
  4. package/dist/src/assertions.d.ts.map +1 -1
  5. package/dist/src/assertions.js +31 -3
  6. package/dist/src/assertions.js.map +1 -1
  7. package/dist/src/evaluator.d.ts.map +1 -1
  8. package/dist/src/evaluator.js +26 -12
  9. package/dist/src/evaluator.js.map +1 -1
  10. package/dist/src/index.d.ts +1 -0
  11. package/dist/src/index.d.ts.map +1 -1
  12. package/dist/src/index.js +3 -3
  13. package/dist/src/index.js.map +1 -1
  14. package/dist/src/main.js +109 -14
  15. package/dist/src/main.js.map +1 -1
  16. package/dist/src/matchers.d.ts +14 -3
  17. package/dist/src/matchers.d.ts.map +1 -1
  18. package/dist/src/matchers.js +40 -1
  19. package/dist/src/matchers.js.map +1 -1
  20. package/dist/src/prompts.d.ts +1 -1
  21. package/dist/src/prompts.d.ts.map +1 -1
  22. package/dist/src/prompts.js +38 -23
  23. package/dist/src/prompts.js.map +1 -1
  24. package/dist/src/providers/cloudflare-ai.d.ts +103 -0
  25. package/dist/src/providers/cloudflare-ai.d.ts.map +1 -0
  26. package/dist/src/providers/cloudflare-ai.js +224 -0
  27. package/dist/src/providers/cloudflare-ai.js.map +1 -0
  28. package/dist/src/providers/defaults.d.ts +2 -0
  29. package/dist/src/providers/defaults.d.ts.map +1 -1
  30. package/dist/src/providers/defaults.js +2 -0
  31. package/dist/src/providers/defaults.js.map +1 -1
  32. package/dist/src/providers/http.d.ts +11 -0
  33. package/dist/src/providers/http.d.ts.map +1 -0
  34. package/dist/src/providers/http.js +64 -0
  35. package/dist/src/providers/http.js.map +1 -0
  36. package/dist/src/providers/huggingface.d.ts +15 -17
  37. package/dist/src/providers/huggingface.d.ts.map +1 -1
  38. package/dist/src/providers/huggingface.js +16 -10
  39. package/dist/src/providers/huggingface.js.map +1 -1
  40. package/dist/src/providers/mistral.d.ts.map +1 -1
  41. package/dist/src/providers/mistral.js +7 -0
  42. package/dist/src/providers/mistral.js.map +1 -1
  43. package/dist/src/providers/openai.d.ts +6 -1
  44. package/dist/src/providers/openai.d.ts.map +1 -1
  45. package/dist/src/providers/openai.js +76 -12
  46. package/dist/src/providers/openai.js.map +1 -1
  47. package/dist/src/providers/portkey.d.ts +6 -0
  48. package/dist/src/providers/portkey.d.ts.map +1 -0
  49. package/dist/src/providers/portkey.js +47 -0
  50. package/dist/src/providers/portkey.js.map +1 -0
  51. package/dist/src/providers/promptfoo.d.ts +15 -0
  52. package/dist/src/providers/promptfoo.d.ts.map +1 -0
  53. package/dist/src/providers/promptfoo.js +50 -0
  54. package/dist/src/providers/promptfoo.js.map +1 -0
  55. package/dist/src/providers/replicate.d.ts +6 -1
  56. package/dist/src/providers/replicate.d.ts.map +1 -1
  57. package/dist/src/providers/replicate.js +91 -1
  58. package/dist/src/providers/replicate.js.map +1 -1
  59. package/dist/src/providers.d.ts.map +1 -1
  60. package/dist/src/providers.js +73 -5
  61. package/dist/src/providers.js.map +1 -1
  62. package/dist/src/python/wrapper.d.ts.map +1 -1
  63. package/dist/src/python/wrapper.js +12 -2
  64. package/dist/src/python/wrapper.js.map +1 -1
  65. package/dist/src/redteam/constants.d.ts +2 -0
  66. package/dist/src/redteam/constants.d.ts.map +1 -0
  67. package/dist/src/redteam/constants.js +5 -0
  68. package/dist/src/redteam/constants.js.map +1 -0
  69. package/dist/src/redteam/getHallucinationTests.d.ts +3 -0
  70. package/dist/src/redteam/getHallucinationTests.d.ts.map +1 -0
  71. package/dist/src/redteam/getHallucinationTests.js +64 -0
  72. package/dist/src/redteam/getHallucinationTests.js.map +1 -0
  73. package/dist/src/redteam/getHarmfulTests.d.ts +36 -0
  74. package/dist/src/redteam/getHarmfulTests.d.ts.map +1 -0
  75. package/dist/src/redteam/getHarmfulTests.js +162 -0
  76. package/dist/src/redteam/getHarmfulTests.js.map +1 -0
  77. package/dist/src/redteam/getHijackingTests.d.ts +3 -0
  78. package/dist/src/redteam/getHijackingTests.d.ts.map +1 -0
  79. package/dist/src/redteam/getHijackingTests.js +68 -0
  80. package/dist/src/redteam/getHijackingTests.js.map +1 -0
  81. package/dist/src/redteam/getOverconfidenceTests.d.ts +3 -0
  82. package/dist/src/redteam/getOverconfidenceTests.d.ts.map +1 -0
  83. package/dist/src/redteam/getOverconfidenceTests.js +63 -0
  84. package/dist/src/redteam/getOverconfidenceTests.js.map +1 -0
  85. package/dist/src/redteam/getUnderconfidenceTests.d.ts +3 -0
  86. package/dist/src/redteam/getUnderconfidenceTests.d.ts.map +1 -0
  87. package/dist/src/redteam/getUnderconfidenceTests.js +63 -0
  88. package/dist/src/redteam/getUnderconfidenceTests.js.map +1 -0
  89. package/dist/src/redteam/index.d.ts +11 -0
  90. package/dist/src/redteam/index.d.ts.map +1 -0
  91. package/dist/src/redteam/index.js +154 -0
  92. package/dist/src/redteam/index.js.map +1 -0
  93. package/dist/src/redteam/iterative.d.ts +9 -0
  94. package/dist/src/redteam/iterative.d.ts.map +1 -0
  95. package/dist/src/redteam/iterative.js +178 -0
  96. package/dist/src/redteam/iterative.js.map +1 -0
  97. package/dist/src/table.js +1 -1
  98. package/dist/src/table.js.map +1 -1
  99. package/dist/src/types.d.ts +24 -4
  100. package/dist/src/types.d.ts.map +1 -1
  101. package/dist/src/types.js.map +1 -1
  102. package/dist/src/util.d.ts.map +1 -1
  103. package/dist/src/util.js +39 -10
  104. package/dist/src/util.js.map +1 -1
  105. package/dist/src/web/nextui/404/index.html +1 -1
  106. package/dist/src/web/nextui/404.html +1 -1
  107. package/dist/src/web/nextui/_next/static/chunks/712-13fab020a2ea9e39.js +1 -0
  108. package/dist/src/web/nextui/_next/static/chunks/app/setup/page-f363cb4f00822cb0.js +1 -0
  109. package/dist/src/web/nextui/_next/static/chunks/webpack-6db4c95c90cd16a8.js +1 -0
  110. package/dist/src/web/nextui/_next/static/css/012e7480208170b3.css +1 -0
  111. package/dist/src/web/nextui/_next/static/css/d6087a68d5b5af7c.css +1 -0
  112. package/dist/src/web/nextui/auth/login/index.html +1 -1
  113. package/dist/src/web/nextui/auth/login/index.txt +3 -3
  114. package/dist/src/web/nextui/auth/signup/index.html +1 -1
  115. package/dist/src/web/nextui/auth/signup/index.txt +3 -3
  116. package/dist/src/web/nextui/datasets/index.html +1 -1
  117. package/dist/src/web/nextui/datasets/index.txt +3 -3
  118. package/dist/src/web/nextui/eval/index.html +1 -1
  119. package/dist/src/web/nextui/eval/index.txt +6 -6
  120. package/dist/src/web/nextui/index.html +1 -1
  121. package/dist/src/web/nextui/index.txt +3 -3
  122. package/dist/src/web/nextui/progress/index.html +1 -1
  123. package/dist/src/web/nextui/progress/index.txt +3 -3
  124. package/dist/src/web/nextui/prompts/index.html +1 -1
  125. package/dist/src/web/nextui/prompts/index.txt +3 -3
  126. package/dist/src/web/nextui/setup/index.html +2 -2
  127. package/dist/src/web/nextui/setup/index.txt +5 -5
  128. package/package.json +5 -2
  129. package/dist/src/web/nextui/_next/static/chunks/712-b075de116030d628.js +0 -1
  130. package/dist/src/web/nextui/_next/static/chunks/app/setup/page-1e746f842289d480.js +0 -1
  131. package/dist/src/web/nextui/_next/static/chunks/webpack-e02a742b401be2a0.js +0 -1
  132. package/dist/src/web/nextui/_next/static/css/635638c73d973eb7.css +0 -1
  133. package/dist/src/web/nextui/_next/static/css/dded26353bff8496.css +0 -1
  134. /package/dist/src/web/nextui/_next/static/{M6DuBbMeEniSe5YhgYql4 → LMbNc2VH3HooEZMtC2nR3}/_buildManifest.js +0 -0
  135. /package/dist/src/web/nextui/_next/static/{M6DuBbMeEniSe5YhgYql4 → LMbNc2VH3HooEZMtC2nR3}/_ssgManifest.js +0 -0
  136. /package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/{page-220f1e1ba1ae2ad9.js → page-cf43e2e1a57168e1.js} +0 -0
  137. /package/dist/src/web/nextui/_next/static/chunks/app/eval/{page-b242a9f90d8df411.js → page-21ed48ee7bd48001.js} +0 -0
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preload" as="font" href="/_next/static/media/0e4fe491bf84089c-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/3a04115668d8070d-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/3a18fc8da1cdcd01-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/627622453ef56b0d-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/699512af39861afa-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/934c4b7cb736f2a3-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/51a17e8edcdfdbb2.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/16c1dd82fc87c9d7.css" data-precedence="next"/><link rel="preload" href="/_next/static/chunks/webpack-e02a742b401be2a0.js" as="script"/><link rel="preload" href="/_next/static/chunks/fd9d1056-a95b789c94c05ff6.js" as="script"/><link rel="preload" href="/_next/static/chunks/596-f3a131b7c336dd5d.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app-581ccf0003955b21.js" as="script"/><title>promptfoo</title><meta name="description" content="LLM testing and evaluation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta property="og:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_c5054f"><div><style data-emotion="css jj2ztu">.css-jj2ztu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.css-jj2ztu>:not(style):not(style){margin:0;}.css-jj2ztu>:not(style)~:not(style){margin-left:16px;}</style><div class="MuiStack-root nav css-jj2ztu"><div class="logo MuiBox-root css-0"><img alt="Promptfoo logo" loading="lazy" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/logo.svg"/> <span>promptfoo</span></div><a class="active" href="/setup/">New Eval</a><a class="" href="/eval/">Evals</a><a class="" href="/prompts/">Prompts</a><a class="" href="/datasets/">Datasets</a><a class="" href="/progress/">Progress</a><div class="right-aligned"><div class="dark-mode-toggle"><style data-emotion="css vubbuv">.css-vubbuv{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="LightModeIcon"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"></path></svg></div></div></div><div><style data-emotion="css 19t2hy6">.css-19t2hy6{width:100%;margin-left:auto;box-sizing:border-box;margin-right:auto;display:block;padding-left:16px;padding-right:16px;margin-top:2rem;}@media (min-width:600px){.css-19t2hy6{padding-left:24px;padding-right:24px;}}@media (min-width:1200px){.css-19t2hy6{max-width:1200px;}}</style><div class="MuiContainer-root MuiContainer-maxWidthLg css-19t2hy6"><style data-emotion="css 1w57jtv">.css-1w57jtv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;}.css-1w57jtv>:not(style):not(style){margin:0;}.css-1w57jtv>:not(style)~:not(style){margin-left:16px;}</style><div class="MuiStack-root css-1w57jtv"><style data-emotion="css jqhduh">.css-jqhduh{margin:0;font-family:inherit;font-weight:400;font-size:2.125rem;line-height:1.235;}</style><h4 class="MuiTypography-root MuiTypography-h4 css-jqhduh">Set up an evaluation</h4><style data-emotion="css jj2ztu">.css-jj2ztu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.css-jj2ztu>:not(style):not(style){margin:0;}.css-jj2ztu>:not(style)~:not(style){margin-left:16px;}</style><div class="MuiStack-root css-jj2ztu"><style data-emotion="css 11kchfx">.css-11kchfx{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:6px 16px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#fff;background-color:#1976d2;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12);}.css-11kchfx:hover{-webkit-text-decoration:none;text-decoration:none;background-color:#1565c0;box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);}@media (hover: none){.css-11kchfx:hover{background-color:#1976d2;}}.css-11kchfx:active{box-shadow:0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12);}.css-11kchfx.Mui-focusVisible{box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12);}.css-11kchfx.Mui-disabled{color:rgba(0, 0, 0, 0.26);box-shadow:none;background-color:rgba(0, 0, 0, 0.12);}</style><style data-emotion="css 1r4sjx4">.css-1r4sjx4{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:6px 16px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#fff;background-color:#1976d2;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12);}.css-1r4sjx4::-moz-focus-inner{border-style:none;}.css-1r4sjx4.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1r4sjx4{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1r4sjx4:hover{-webkit-text-decoration:none;text-decoration:none;background-color:#1565c0;box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);}@media (hover: none){.css-1r4sjx4:hover{background-color:#1976d2;}}.css-1r4sjx4:active{box-shadow:0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12);}.css-1r4sjx4.Mui-focusVisible{box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12);}.css-1r4sjx4.Mui-disabled{color:rgba(0, 0, 0, 0.26);box-shadow:none;background-color:rgba(0, 0, 0, 0.12);}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-1r4sjx4" tabindex="0" type="button">Run Evaluation</button><style data-emotion="css 1l5hj2g">.css-1l5hj2g{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:5px 15px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;border:1px solid rgba(25, 118, 210, 0.5);color:#1976d2;}.css-1l5hj2g:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);border:1px solid #1976d2;}@media (hover: none){.css-1l5hj2g:hover{background-color:transparent;}}.css-1l5hj2g.Mui-disabled{color:rgba(0, 0, 0, 0.26);border:1px solid rgba(0, 0, 0, 0.12);}</style><style data-emotion="css 1avs8v6">.css-1avs8v6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:5px 15px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;border:1px solid rgba(25, 118, 210, 0.5);color:#1976d2;}.css-1avs8v6::-moz-focus-inner{border-style:none;}.css-1avs8v6.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1avs8v6{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1avs8v6:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);border:1px solid #1976d2;}@media (hover: none){.css-1avs8v6:hover{background-color:transparent;}}.css-1avs8v6.Mui-disabled{color:rgba(0, 0, 0, 0.26);border:1px solid rgba(0, 0, 0, 0.12);}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium css-1avs8v6" tabindex="0" type="button"><style data-emotion="css 6xugel">.css-6xugel{display:inherit;margin-right:8px;margin-left:-4px;}.css-6xugel>*:nth-of-type(1){font-size:20px;}</style><span class="MuiButton-startIcon MuiButton-iconSizeMedium css-6xugel"><style data-emotion="css vubbuv">.css-vubbuv{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="SettingsIcon"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"></path></svg></span>API keys</button><style data-emotion="css 1k371a6">@media print{.css-1k371a6{position:absolute!important;}}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium css-1avs8v6" tabindex="0" type="button">Reset</button></div></div><style data-emotion="css h5fkc8">.css-h5fkc8{margin-top:32px;}</style><div class="MuiBox-root css-h5fkc8"></div><style data-emotion="css 1yuhvjn">.css-1yuhvjn{margin-top:16px;}</style><div class="MuiBox-root css-1yuhvjn"><style data-emotion="css 1nguorl">.css-1nguorl{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;}.css-1nguorl>:not(style):not(style){margin:0;}.css-1nguorl>:not(style)~:not(style){margin-top:16px;}</style><div class="MuiStack-root css-1nguorl"><style data-emotion="css 1d79rw6">.css-1d79rw6{margin:0;font-family:inherit;font-weight:400;font-size:1.5rem;line-height:1.334;}</style><h5 class="MuiTypography-root MuiTypography-h5 css-1d79rw6">Providers</h5><div class="MuiBox-root css-1yuhvjn"><style data-emotion="css 18nc3u2">.css-18nc3u2.Mui-focused .MuiAutocomplete-clearIndicator{visibility:visible;}@media (pointer: fine){.css-18nc3u2:hover .MuiAutocomplete-clearIndicator{visibility:visible;}}.css-18nc3u2 .MuiAutocomplete-tag{margin:3px;max-width:calc(100% - 6px);}.css-18nc3u2 .MuiAutocomplete-inputRoot{-webkit-box-flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}.MuiAutocomplete-hasPopupIcon.css-18nc3u2 .MuiAutocomplete-inputRoot,.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiAutocomplete-inputRoot{padding-right:30px;}.MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiAutocomplete-inputRoot{padding-right:56px;}.css-18nc3u2 .MuiAutocomplete-inputRoot .MuiAutocomplete-input{width:0;min-width:30px;}.css-18nc3u2 .MuiInput-root{padding-bottom:1px;}.css-18nc3u2 .MuiInput-root .MuiInput-input{padding:4px 4px 4px 0px;}.css-18nc3u2 .MuiInput-root.MuiInputBase-sizeSmall .MuiInput-input{padding:2px 4px 3px 0;}.css-18nc3u2 .MuiOutlinedInput-root{padding:9px;}.MuiAutocomplete-hasPopupIcon.css-18nc3u2 .MuiOutlinedInput-root,.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiOutlinedInput-root{padding-right:39px;}.MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiOutlinedInput-root{padding-right:65px;}.css-18nc3u2 .MuiOutlinedInput-root .MuiAutocomplete-input{padding:7.5px 4px 7.5px 5px;}.css-18nc3u2 .MuiOutlinedInput-root .MuiAutocomplete-endAdornment{right:9px;}.css-18nc3u2 .MuiOutlinedInput-root.MuiInputBase-sizeSmall{padding-top:6px;padding-bottom:6px;padding-left:6px;}.css-18nc3u2 .MuiOutlinedInput-root.MuiInputBase-sizeSmall .MuiAutocomplete-input{padding:2.5px 4px 2.5px 8px;}.css-18nc3u2 .MuiFilledInput-root{padding-top:19px;padding-left:8px;}.MuiAutocomplete-hasPopupIcon.css-18nc3u2 .MuiFilledInput-root,.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiFilledInput-root{padding-right:39px;}.MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiFilledInput-root{padding-right:65px;}.css-18nc3u2 .MuiFilledInput-root .MuiFilledInput-input{padding:7px 4px;}.css-18nc3u2 .MuiFilledInput-root .MuiAutocomplete-endAdornment{right:9px;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-sizeSmall{padding-bottom:1px;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-sizeSmall .MuiFilledInput-input{padding:2.5px 4px;}.css-18nc3u2 .MuiInputBase-hiddenLabel{padding-top:8px;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-hiddenLabel{padding-top:0;padding-bottom:0;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-hiddenLabel .MuiAutocomplete-input{padding-top:16px;padding-bottom:17px;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-hiddenLabel.MuiInputBase-sizeSmall .MuiAutocomplete-input{padding-top:8px;padding-bottom:9px;}.css-18nc3u2 .MuiAutocomplete-input{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;text-overflow:ellipsis;opacity:1;}</style><div class="MuiAutocomplete-root css-18nc3u2"><style data-emotion="css feqhe6">.css-feqhe6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;min-width:0;padding:0;margin:0;border:0;vertical-align:top;width:100%;}</style><div class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-feqhe6"><style data-emotion="css-global 1prfaxn">@-webkit-keyframes mui-auto-fill{from{display:block;}}@keyframes mui-auto-fill{from{display:block;}}@-webkit-keyframes mui-auto-fill-cancel{from{display:block;}}@keyframes mui-auto-fill-cancel{from{display:block;}}</style><style data-emotion="css 18bxsfn">.css-18bxsfn{font-family:inherit;font-weight:400;font-size:1rem;line-height:1.4375em;color:rgba(0, 0, 0, 0.87);box-sizing:border-box;position:relative;cursor:text;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;border-radius:4px;}.css-18bxsfn.Mui-disabled{color:rgba(0, 0, 0, 0.38);cursor:default;}.css-18bxsfn:hover .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.87);}@media (hover: none){.css-18bxsfn:hover .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.23);}}.css-18bxsfn.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:#1976d2;border-width:2px;}.css-18bxsfn.Mui-error .MuiOutlinedInput-notchedOutline{border-color:#d32f2f;}.css-18bxsfn.Mui-disabled .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.26);}</style><div class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiAutocomplete-inputRoot css-18bxsfn"><style data-emotion="css 1x5jdmq">.css-1x5jdmq{font:inherit;letter-spacing:inherit;color:currentColor;padding:4px 0 5px;border:0;box-sizing:content-box;background:none;height:1.4375em;margin:0;-webkit-tap-highlight-color:transparent;display:block;min-width:0;width:100%;-webkit-animation-name:mui-auto-fill-cancel;animation-name:mui-auto-fill-cancel;-webkit-animation-duration:10ms;animation-duration:10ms;padding:16.5px 14px;}.css-1x5jdmq::-webkit-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1x5jdmq::-moz-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1x5jdmq:-ms-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1x5jdmq::-ms-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1x5jdmq:focus{outline:0;}.css-1x5jdmq:invalid{box-shadow:none;}.css-1x5jdmq::-webkit-search-decoration{-webkit-appearance:none;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq::-webkit-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq::-moz-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:-ms-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq::-ms-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:focus::-webkit-input-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:focus::-moz-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:focus:-ms-input-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:focus::-ms-input-placeholder{opacity:0.42;}.css-1x5jdmq.Mui-disabled{opacity:1;-webkit-text-fill-color:rgba(0, 0, 0, 0.38);}.css-1x5jdmq:-webkit-autofill{-webkit-animation-duration:5000s;animation-duration:5000s;-webkit-animation-name:mui-auto-fill;animation-name:mui-auto-fill;}.css-1x5jdmq:-webkit-autofill{border-radius:inherit;}</style><input aria-invalid="false" autoComplete="off" id=":R3ahqmmla:" placeholder="Select LLM providers" type="text" class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused css-1x5jdmq" aria-autocomplete="list" aria-expanded="false" autoCapitalize="none" spellCheck="false" role="combobox" value=""/><style data-emotion="css 19w1uun">.css-19w1uun{border-color:rgba(0, 0, 0, 0.23);}</style><style data-emotion="css igs3ac">.css-igs3ac{text-align:left;position:absolute;bottom:0;right:0;top:-5px;left:0;margin:0;padding:0 8px;pointer-events:none;border-radius:inherit;border-style:solid;border-width:1px;overflow:hidden;min-width:0%;border-color:rgba(0, 0, 0, 0.23);}</style><fieldset aria-hidden="true" class="MuiOutlinedInput-notchedOutline css-igs3ac"><style data-emotion="css ihdtdm">.css-ihdtdm{float:unset;width:auto;overflow:hidden;padding:0;line-height:11px;-webkit-transition:width 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;transition:width 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;}</style><legend class="css-ihdtdm"><span class="notranslate">​</span></legend></fieldset></div></div></div></div></div></div><div class="MuiBox-root css-h5fkc8"></div><div><div class="MuiStack-root css-1w57jtv"><h5 class="MuiTypography-root MuiTypography-h5 css-1d79rw6">Prompts</h5><div><label for="file-input-add-prompt"><span aria-label="Upload prompt from file" class=""><style data-emotion="css 1wf493t">.css-1wf493t{text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1wf493t:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-1wf493t:hover{background-color:transparent;}}.css-1wf493t.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}</style><style data-emotion="css 1yxmbwk">.css-1yxmbwk{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1yxmbwk::-moz-focus-inner{border-style:none;}.css-1yxmbwk.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1yxmbwk{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1yxmbwk:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-1yxmbwk:hover{background-color:transparent;}}.css-1yxmbwk.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}</style><span class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-1yxmbwk" tabindex="0" role="button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="PublishIcon"><path d="M5 4v2h14V4H5zm0 10h4v6h6v-6h4l-7-7-7 7z"></path></svg></span><input id="file-input-add-prompt" type="file" accept=".txt,.md" style="display:none"/></span><style data-emotion="css 1e2dcm1">.css-1e2dcm1{z-index:1500;pointer-events:none;}</style><style data-emotion="css okvapm">.css-okvapm{z-index:1500;pointer-events:none;}</style></label><button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-1r4sjx4" tabindex="0" type="button">Add Prompt</button></div></div><style data-emotion="css kge0eu">.css-kge0eu{width:100%;overflow-x:auto;}</style><div class="MuiTableContainer-root css-kge0eu"><style data-emotion="css 1od17fy">.css-1od17fy{display:table;width:100%;border-collapse:collapse;border-spacing:0;}.css-1od17fy caption{font-family:inherit;font-weight:400;font-size:0.875rem;line-height:1.43;padding:16px;color:rgba(0, 0, 0, 0.6);text-align:left;caption-side:bottom;}</style><table class="MuiTable-root css-1od17fy"><style data-emotion="css 1xnox0e">.css-1xnox0e{display:table-row-group;}</style><tbody class="MuiTableBody-root css-1xnox0e"><style data-emotion="css 1gqug66">.css-1gqug66{color:inherit;display:table-row;vertical-align:middle;outline:0;}.css-1gqug66.MuiTableRow-hover:hover{background-color:rgba(0, 0, 0, 0.04);}.css-1gqug66.Mui-selected{background-color:rgba(25, 118, 210, 0.08);}.css-1gqug66.Mui-selected:hover{background-color:rgba(25, 118, 210, 0.12);}</style><tr class="MuiTableRow-root css-1gqug66"><style data-emotion="css qzozz">.css-qzozz{font-family:inherit;font-weight:400;font-size:0.875rem;line-height:1.43;display:table-cell;vertical-align:inherit;border-bottom:1px solid rgba(224, 224, 224, 1);text-align:center;padding:16px;color:rgba(0, 0, 0, 0.87);}</style><td class="MuiTableCell-root MuiTableCell-body MuiTableCell-alignCenter MuiTableCell-sizeMedium css-qzozz" colSpan="2">No prompts added yet.</td></tr></tbody></table></div></div><style data-emotion="css 1hnm6b6">.css-1hnm6b6{margin-top:48px;}</style><div class="MuiBox-root css-1hnm6b6"></div><div class="MuiStack-root css-1w57jtv"><h5 class="MuiTypography-root MuiTypography-h5 css-1d79rw6">Test Cases</h5><div><label for="file-input-add-test-case"><span aria-label="Upload test cases from csv" class=""><span class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-1yxmbwk" tabindex="0" role="button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="PublishIcon"><path d="M5 4v2h14V4H5zm0 10h4v6h6v-6h4l-7-7-7 7z"></path></svg></span><input id="file-input-add-test-case" type="file" accept=".csv" style="display:none"/></span></label><button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-1r4sjx4" tabindex="0" type="button">Add Test Case</button></div></div><div class="MuiTableContainer-root css-kge0eu"><table class="MuiTable-root css-1od17fy"><style data-emotion="css 1wbz3t9">.css-1wbz3t9{display:table-header-group;}</style><thead class="MuiTableHead-root css-1wbz3t9"><tr class="MuiTableRow-root MuiTableRow-head css-1gqug66"><style data-emotion="css 75le9z">.css-75le9z{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.5rem;display:table-cell;vertical-align:inherit;border-bottom:1px solid rgba(224, 224, 224, 1);text-align:left;padding:16px;color:rgba(0, 0, 0, 0.87);}</style><th class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeMedium css-75le9z" scope="col">Description</th><th class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeMedium css-75le9z" scope="col">Assertions</th><th class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeMedium css-75le9z" scope="col">Variables</th><style data-emotion="css qnurhq">.css-qnurhq{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.5rem;display:table-cell;vertical-align:inherit;border-bottom:1px solid rgba(224, 224, 224, 1);text-align:right;padding:16px;color:rgba(0, 0, 0, 0.87);-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;}</style><th class="MuiTableCell-root MuiTableCell-head MuiTableCell-alignRight MuiTableCell-sizeMedium css-qnurhq" scope="col"></th></tr></thead><tbody class="MuiTableBody-root css-1xnox0e"><tr class="MuiTableRow-root css-1gqug66"><td class="MuiTableCell-root MuiTableCell-body MuiTableCell-alignCenter MuiTableCell-sizeMedium css-qzozz" colSpan="4">No test cases added yet.</td></tr></tbody></table></div><div class="MuiBox-root css-h5fkc8"><style data-emotion="css i3ihim">.css-i3ihim{margin:0;font-family:inherit;font-weight:400;font-size:1.5rem;line-height:1.334;margin-bottom:0.35em;}</style><h5 class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-i3ihim">Configuration</h5><style data-emotion="css wgumsr">.css-wgumsr{margin:0;font-family:inherit;font-weight:400;font-size:1rem;line-height:1.5;margin-bottom:0.35em;}</style><p class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom css-wgumsr">This is the YAML config that defines the evaluation and is processed by promptfoo. See<!-- --> <a target="_blank" href="https://promptfoo.dev/docs/configuration/guide">configuration docs</a> <!-- -->to learn more.</p><style data-emotion="css e0n8s">.css-e0n8s{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#1976d2;}.css-e0n8s:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);}@media (hover: none){.css-e0n8s:hover{background-color:transparent;}}.css-e0n8s.Mui-disabled{color:rgba(0, 0, 0, 0.26);}</style><style data-emotion="css 5rr5x6">.css-5rr5x6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#1976d2;}.css-5rr5x6::-moz-focus-inner{border-style:none;}.css-5rr5x6.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-5rr5x6{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-5rr5x6:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);}@media (hover: none){.css-5rr5x6:hover{background-color:transparent;}}.css-5rr5x6.Mui-disabled{color:rgba(0, 0, 0, 0.26);}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium css-5rr5x6" tabindex="0" type="button"><span class="MuiButton-startIcon MuiButton-iconSizeMedium css-6xugel"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="EditIcon"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg></span>Edit YAML</button><div autoCapitalize="off" class="" style="position:relative;text-align:left;box-sizing:border-box;padding:0;overflow:hidden;font-family:&quot;Fira code&quot;, &quot;Fira Mono&quot;, monospace;font-size:14px"><pre aria-hidden="true" style="margin:0;border:0;background:none;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;tab-size:inherit;text-indent:inherit;text-rendering:inherit;text-transform:inherit;white-space:pre-wrap;word-break:keep-all;overflow-wrap:break-word;position:relative;pointer-events:none;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px"><br /></pre><textarea style="margin:0;border:0;background:none;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;tab-size:inherit;text-indent:inherit;text-rendering:inherit;text-transform:inherit;white-space:pre-wrap;word-break:keep-all;overflow-wrap:break-word;position:absolute;top:0;left:0;height:100%;width:100%;resize:none;color:inherit;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-text-fill-color:transparent;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px" class="npm__react-simple-code-editor__textarea" disabled="" autoCapitalize="off" autoComplete="off" autoCorrect="off" spellCheck="false" data-gramm="false"></textarea><style>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preload" as="font" href="/_next/static/media/0e4fe491bf84089c-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/3a04115668d8070d-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/3a18fc8da1cdcd01-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/627622453ef56b0d-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/699512af39861afa-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="preload" as="font" href="/_next/static/media/934c4b7cb736f2a3-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/51a17e8edcdfdbb2.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/16c1dd82fc87c9d7.css" data-precedence="next"/><link rel="preload" href="/_next/static/chunks/webpack-6db4c95c90cd16a8.js" as="script"/><link rel="preload" href="/_next/static/chunks/fd9d1056-a95b789c94c05ff6.js" as="script"/><link rel="preload" href="/_next/static/chunks/596-f3a131b7c336dd5d.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app-581ccf0003955b21.js" as="script"/><title>promptfoo</title><meta name="description" content="LLM testing and evaluation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta property="og:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_c5054f"><div><style data-emotion="css jj2ztu">.css-jj2ztu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.css-jj2ztu>:not(style):not(style){margin:0;}.css-jj2ztu>:not(style)~:not(style){margin-left:16px;}</style><div class="MuiStack-root nav css-jj2ztu"><div class="logo MuiBox-root css-0"><img alt="Promptfoo logo" loading="lazy" width="25" height="25" decoding="async" data-nimg="1" style="color:transparent" src="/logo.svg"/> <span>promptfoo</span></div><a class="active" href="/setup/">New Eval</a><a class="" href="/eval/">Evals</a><a class="" href="/prompts/">Prompts</a><a class="" href="/datasets/">Datasets</a><a class="" href="/progress/">Progress</a><div class="right-aligned"><div class="dark-mode-toggle"><style data-emotion="css vubbuv">.css-vubbuv{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="LightModeIcon"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"></path></svg></div></div></div><div><style data-emotion="css 19t2hy6">.css-19t2hy6{width:100%;margin-left:auto;box-sizing:border-box;margin-right:auto;display:block;padding-left:16px;padding-right:16px;margin-top:2rem;}@media (min-width:600px){.css-19t2hy6{padding-left:24px;padding-right:24px;}}@media (min-width:1200px){.css-19t2hy6{max-width:1200px;}}</style><div class="MuiContainer-root MuiContainer-maxWidthLg css-19t2hy6"><style data-emotion="css 1w57jtv">.css-1w57jtv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;}.css-1w57jtv>:not(style):not(style){margin:0;}.css-1w57jtv>:not(style)~:not(style){margin-left:16px;}</style><div class="MuiStack-root css-1w57jtv"><style data-emotion="css jqhduh">.css-jqhduh{margin:0;font-family:inherit;font-weight:400;font-size:2.125rem;line-height:1.235;}</style><h4 class="MuiTypography-root MuiTypography-h4 css-jqhduh">Set up an evaluation</h4><style data-emotion="css jj2ztu">.css-jj2ztu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.css-jj2ztu>:not(style):not(style){margin:0;}.css-jj2ztu>:not(style)~:not(style){margin-left:16px;}</style><div class="MuiStack-root css-jj2ztu"><style data-emotion="css 11kchfx">.css-11kchfx{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:6px 16px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#fff;background-color:#1976d2;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12);}.css-11kchfx:hover{-webkit-text-decoration:none;text-decoration:none;background-color:#1565c0;box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);}@media (hover: none){.css-11kchfx:hover{background-color:#1976d2;}}.css-11kchfx:active{box-shadow:0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12);}.css-11kchfx.Mui-focusVisible{box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12);}.css-11kchfx.Mui-disabled{color:rgba(0, 0, 0, 0.26);box-shadow:none;background-color:rgba(0, 0, 0, 0.12);}</style><style data-emotion="css 1r4sjx4">.css-1r4sjx4{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:6px 16px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#fff;background-color:#1976d2;box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12);}.css-1r4sjx4::-moz-focus-inner{border-style:none;}.css-1r4sjx4.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1r4sjx4{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1r4sjx4:hover{-webkit-text-decoration:none;text-decoration:none;background-color:#1565c0;box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);}@media (hover: none){.css-1r4sjx4:hover{background-color:#1976d2;}}.css-1r4sjx4:active{box-shadow:0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12);}.css-1r4sjx4.Mui-focusVisible{box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12);}.css-1r4sjx4.Mui-disabled{color:rgba(0, 0, 0, 0.26);box-shadow:none;background-color:rgba(0, 0, 0, 0.12);}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-1r4sjx4" tabindex="0" type="button">Run Evaluation</button><style data-emotion="css 1l5hj2g">.css-1l5hj2g{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:5px 15px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;border:1px solid rgba(25, 118, 210, 0.5);color:#1976d2;}.css-1l5hj2g:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);border:1px solid #1976d2;}@media (hover: none){.css-1l5hj2g:hover{background-color:transparent;}}.css-1l5hj2g.Mui-disabled{color:rgba(0, 0, 0, 0.26);border:1px solid rgba(0, 0, 0, 0.12);}</style><style data-emotion="css 1avs8v6">.css-1avs8v6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:5px 15px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;border:1px solid rgba(25, 118, 210, 0.5);color:#1976d2;}.css-1avs8v6::-moz-focus-inner{border-style:none;}.css-1avs8v6.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1avs8v6{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1avs8v6:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);border:1px solid #1976d2;}@media (hover: none){.css-1avs8v6:hover{background-color:transparent;}}.css-1avs8v6.Mui-disabled{color:rgba(0, 0, 0, 0.26);border:1px solid rgba(0, 0, 0, 0.12);}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium css-1avs8v6" tabindex="0" type="button"><style data-emotion="css 6xugel">.css-6xugel{display:inherit;margin-right:8px;margin-left:-4px;}.css-6xugel>*:nth-of-type(1){font-size:20px;}</style><span class="MuiButton-startIcon MuiButton-iconSizeMedium css-6xugel"><style data-emotion="css vubbuv">.css-vubbuv{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;font-size:1.5rem;}</style><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="SettingsIcon"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"></path></svg></span>API keys</button><style data-emotion="css 1k371a6">@media print{.css-1k371a6{position:absolute!important;}}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium css-1avs8v6" tabindex="0" type="button">Reset</button></div></div><style data-emotion="css h5fkc8">.css-h5fkc8{margin-top:32px;}</style><div class="MuiBox-root css-h5fkc8"></div><style data-emotion="css 1yuhvjn">.css-1yuhvjn{margin-top:16px;}</style><div class="MuiBox-root css-1yuhvjn"><style data-emotion="css 1nguorl">.css-1nguorl{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;}.css-1nguorl>:not(style):not(style){margin:0;}.css-1nguorl>:not(style)~:not(style){margin-top:16px;}</style><div class="MuiStack-root css-1nguorl"><style data-emotion="css 1d79rw6">.css-1d79rw6{margin:0;font-family:inherit;font-weight:400;font-size:1.5rem;line-height:1.334;}</style><h5 class="MuiTypography-root MuiTypography-h5 css-1d79rw6">Providers</h5><div class="MuiBox-root css-1yuhvjn"><style data-emotion="css 18nc3u2">.css-18nc3u2.Mui-focused .MuiAutocomplete-clearIndicator{visibility:visible;}@media (pointer: fine){.css-18nc3u2:hover .MuiAutocomplete-clearIndicator{visibility:visible;}}.css-18nc3u2 .MuiAutocomplete-tag{margin:3px;max-width:calc(100% - 6px);}.css-18nc3u2 .MuiAutocomplete-inputRoot{-webkit-box-flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}.MuiAutocomplete-hasPopupIcon.css-18nc3u2 .MuiAutocomplete-inputRoot,.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiAutocomplete-inputRoot{padding-right:30px;}.MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiAutocomplete-inputRoot{padding-right:56px;}.css-18nc3u2 .MuiAutocomplete-inputRoot .MuiAutocomplete-input{width:0;min-width:30px;}.css-18nc3u2 .MuiInput-root{padding-bottom:1px;}.css-18nc3u2 .MuiInput-root .MuiInput-input{padding:4px 4px 4px 0px;}.css-18nc3u2 .MuiInput-root.MuiInputBase-sizeSmall .MuiInput-input{padding:2px 4px 3px 0;}.css-18nc3u2 .MuiOutlinedInput-root{padding:9px;}.MuiAutocomplete-hasPopupIcon.css-18nc3u2 .MuiOutlinedInput-root,.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiOutlinedInput-root{padding-right:39px;}.MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiOutlinedInput-root{padding-right:65px;}.css-18nc3u2 .MuiOutlinedInput-root .MuiAutocomplete-input{padding:7.5px 4px 7.5px 5px;}.css-18nc3u2 .MuiOutlinedInput-root .MuiAutocomplete-endAdornment{right:9px;}.css-18nc3u2 .MuiOutlinedInput-root.MuiInputBase-sizeSmall{padding-top:6px;padding-bottom:6px;padding-left:6px;}.css-18nc3u2 .MuiOutlinedInput-root.MuiInputBase-sizeSmall .MuiAutocomplete-input{padding:2.5px 4px 2.5px 8px;}.css-18nc3u2 .MuiFilledInput-root{padding-top:19px;padding-left:8px;}.MuiAutocomplete-hasPopupIcon.css-18nc3u2 .MuiFilledInput-root,.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiFilledInput-root{padding-right:39px;}.MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon.css-18nc3u2 .MuiFilledInput-root{padding-right:65px;}.css-18nc3u2 .MuiFilledInput-root .MuiFilledInput-input{padding:7px 4px;}.css-18nc3u2 .MuiFilledInput-root .MuiAutocomplete-endAdornment{right:9px;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-sizeSmall{padding-bottom:1px;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-sizeSmall .MuiFilledInput-input{padding:2.5px 4px;}.css-18nc3u2 .MuiInputBase-hiddenLabel{padding-top:8px;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-hiddenLabel{padding-top:0;padding-bottom:0;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-hiddenLabel .MuiAutocomplete-input{padding-top:16px;padding-bottom:17px;}.css-18nc3u2 .MuiFilledInput-root.MuiInputBase-hiddenLabel.MuiInputBase-sizeSmall .MuiAutocomplete-input{padding-top:8px;padding-bottom:9px;}.css-18nc3u2 .MuiAutocomplete-input{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;text-overflow:ellipsis;opacity:1;}</style><div class="MuiAutocomplete-root css-18nc3u2"><style data-emotion="css feqhe6">.css-feqhe6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;min-width:0;padding:0;margin:0;border:0;vertical-align:top;width:100%;}</style><div class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-feqhe6"><style data-emotion="css-global 1prfaxn">@-webkit-keyframes mui-auto-fill{from{display:block;}}@keyframes mui-auto-fill{from{display:block;}}@-webkit-keyframes mui-auto-fill-cancel{from{display:block;}}@keyframes mui-auto-fill-cancel{from{display:block;}}</style><style data-emotion="css 18bxsfn">.css-18bxsfn{font-family:inherit;font-weight:400;font-size:1rem;line-height:1.4375em;color:rgba(0, 0, 0, 0.87);box-sizing:border-box;position:relative;cursor:text;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;border-radius:4px;}.css-18bxsfn.Mui-disabled{color:rgba(0, 0, 0, 0.38);cursor:default;}.css-18bxsfn:hover .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.87);}@media (hover: none){.css-18bxsfn:hover .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.23);}}.css-18bxsfn.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:#1976d2;border-width:2px;}.css-18bxsfn.Mui-error .MuiOutlinedInput-notchedOutline{border-color:#d32f2f;}.css-18bxsfn.Mui-disabled .MuiOutlinedInput-notchedOutline{border-color:rgba(0, 0, 0, 0.26);}</style><div class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiAutocomplete-inputRoot css-18bxsfn"><style data-emotion="css 1x5jdmq">.css-1x5jdmq{font:inherit;letter-spacing:inherit;color:currentColor;padding:4px 0 5px;border:0;box-sizing:content-box;background:none;height:1.4375em;margin:0;-webkit-tap-highlight-color:transparent;display:block;min-width:0;width:100%;-webkit-animation-name:mui-auto-fill-cancel;animation-name:mui-auto-fill-cancel;-webkit-animation-duration:10ms;animation-duration:10ms;padding:16.5px 14px;}.css-1x5jdmq::-webkit-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1x5jdmq::-moz-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1x5jdmq:-ms-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1x5jdmq::-ms-input-placeholder{color:currentColor;opacity:0.42;-webkit-transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1x5jdmq:focus{outline:0;}.css-1x5jdmq:invalid{box-shadow:none;}.css-1x5jdmq::-webkit-search-decoration{-webkit-appearance:none;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq::-webkit-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq::-moz-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:-ms-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq::-ms-input-placeholder{opacity:0!important;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:focus::-webkit-input-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:focus::-moz-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:focus:-ms-input-placeholder{opacity:0.42;}label[data-shrink=false]+.MuiInputBase-formControl .css-1x5jdmq:focus::-ms-input-placeholder{opacity:0.42;}.css-1x5jdmq.Mui-disabled{opacity:1;-webkit-text-fill-color:rgba(0, 0, 0, 0.38);}.css-1x5jdmq:-webkit-autofill{-webkit-animation-duration:5000s;animation-duration:5000s;-webkit-animation-name:mui-auto-fill;animation-name:mui-auto-fill;}.css-1x5jdmq:-webkit-autofill{border-radius:inherit;}</style><input aria-invalid="false" autoComplete="off" id=":R3ahqmmla:" placeholder="Select LLM providers" type="text" class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused css-1x5jdmq" aria-autocomplete="list" aria-expanded="false" autoCapitalize="none" spellCheck="false" role="combobox" value=""/><style data-emotion="css 19w1uun">.css-19w1uun{border-color:rgba(0, 0, 0, 0.23);}</style><style data-emotion="css igs3ac">.css-igs3ac{text-align:left;position:absolute;bottom:0;right:0;top:-5px;left:0;margin:0;padding:0 8px;pointer-events:none;border-radius:inherit;border-style:solid;border-width:1px;overflow:hidden;min-width:0%;border-color:rgba(0, 0, 0, 0.23);}</style><fieldset aria-hidden="true" class="MuiOutlinedInput-notchedOutline css-igs3ac"><style data-emotion="css ihdtdm">.css-ihdtdm{float:unset;width:auto;overflow:hidden;padding:0;line-height:11px;-webkit-transition:width 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;transition:width 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;}</style><legend class="css-ihdtdm"><span class="notranslate">​</span></legend></fieldset></div></div></div></div></div></div><div class="MuiBox-root css-h5fkc8"></div><div><div class="MuiStack-root css-1w57jtv"><h5 class="MuiTypography-root MuiTypography-h5 css-1d79rw6">Prompts</h5><div><label for="file-input-add-prompt"><span aria-label="Upload prompt from file" class=""><style data-emotion="css 1wf493t">.css-1wf493t{text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1wf493t:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-1wf493t:hover{background-color:transparent;}}.css-1wf493t.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}</style><style data-emotion="css 1yxmbwk">.css-1yxmbwk{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:rgba(0, 0, 0, 0.54);-webkit-transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.css-1yxmbwk::-moz-focus-inner{border-style:none;}.css-1yxmbwk.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-1yxmbwk{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-1yxmbwk:hover{background-color:rgba(0, 0, 0, 0.04);}@media (hover: none){.css-1yxmbwk:hover{background-color:transparent;}}.css-1yxmbwk.Mui-disabled{background-color:transparent;color:rgba(0, 0, 0, 0.26);}</style><span class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-1yxmbwk" tabindex="0" role="button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="PublishIcon"><path d="M5 4v2h14V4H5zm0 10h4v6h6v-6h4l-7-7-7 7z"></path></svg></span><input id="file-input-add-prompt" type="file" accept=".txt,.md" style="display:none"/></span><style data-emotion="css 1e2dcm1">.css-1e2dcm1{z-index:1500;pointer-events:none;}</style><style data-emotion="css okvapm">.css-okvapm{z-index:1500;pointer-events:none;}</style></label><button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-1r4sjx4" tabindex="0" type="button">Add Prompt</button></div></div><style data-emotion="css kge0eu">.css-kge0eu{width:100%;overflow-x:auto;}</style><div class="MuiTableContainer-root css-kge0eu"><style data-emotion="css 1od17fy">.css-1od17fy{display:table;width:100%;border-collapse:collapse;border-spacing:0;}.css-1od17fy caption{font-family:inherit;font-weight:400;font-size:0.875rem;line-height:1.43;padding:16px;color:rgba(0, 0, 0, 0.6);text-align:left;caption-side:bottom;}</style><table class="MuiTable-root css-1od17fy"><style data-emotion="css 1xnox0e">.css-1xnox0e{display:table-row-group;}</style><tbody class="MuiTableBody-root css-1xnox0e"><style data-emotion="css 1gqug66">.css-1gqug66{color:inherit;display:table-row;vertical-align:middle;outline:0;}.css-1gqug66.MuiTableRow-hover:hover{background-color:rgba(0, 0, 0, 0.04);}.css-1gqug66.Mui-selected{background-color:rgba(25, 118, 210, 0.08);}.css-1gqug66.Mui-selected:hover{background-color:rgba(25, 118, 210, 0.12);}</style><tr class="MuiTableRow-root css-1gqug66"><style data-emotion="css qzozz">.css-qzozz{font-family:inherit;font-weight:400;font-size:0.875rem;line-height:1.43;display:table-cell;vertical-align:inherit;border-bottom:1px solid rgba(224, 224, 224, 1);text-align:center;padding:16px;color:rgba(0, 0, 0, 0.87);}</style><td class="MuiTableCell-root MuiTableCell-body MuiTableCell-alignCenter MuiTableCell-sizeMedium css-qzozz" colSpan="2">No prompts added yet.</td></tr></tbody></table></div></div><style data-emotion="css 1hnm6b6">.css-1hnm6b6{margin-top:48px;}</style><div class="MuiBox-root css-1hnm6b6"></div><div class="MuiStack-root css-1w57jtv"><h5 class="MuiTypography-root MuiTypography-h5 css-1d79rw6">Test Cases</h5><div><label for="file-input-add-test-case"><span aria-label="Upload test cases from csv" class=""><span class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-1yxmbwk" tabindex="0" role="button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="PublishIcon"><path d="M5 4v2h14V4H5zm0 10h4v6h6v-6h4l-7-7-7 7z"></path></svg></span><input id="file-input-add-test-case" type="file" accept=".csv" style="display:none"/></span></label><button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-1r4sjx4" tabindex="0" type="button">Add Test Case</button></div></div><div class="MuiTableContainer-root css-kge0eu"><table class="MuiTable-root css-1od17fy"><style data-emotion="css 1wbz3t9">.css-1wbz3t9{display:table-header-group;}</style><thead class="MuiTableHead-root css-1wbz3t9"><tr class="MuiTableRow-root MuiTableRow-head css-1gqug66"><style data-emotion="css 75le9z">.css-75le9z{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.5rem;display:table-cell;vertical-align:inherit;border-bottom:1px solid rgba(224, 224, 224, 1);text-align:left;padding:16px;color:rgba(0, 0, 0, 0.87);}</style><th class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeMedium css-75le9z" scope="col">Description</th><th class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeMedium css-75le9z" scope="col">Assertions</th><th class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeMedium css-75le9z" scope="col">Variables</th><style data-emotion="css qnurhq">.css-qnurhq{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.5rem;display:table-cell;vertical-align:inherit;border-bottom:1px solid rgba(224, 224, 224, 1);text-align:right;padding:16px;color:rgba(0, 0, 0, 0.87);-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;}</style><th class="MuiTableCell-root MuiTableCell-head MuiTableCell-alignRight MuiTableCell-sizeMedium css-qnurhq" scope="col"></th></tr></thead><tbody class="MuiTableBody-root css-1xnox0e"><tr class="MuiTableRow-root css-1gqug66"><td class="MuiTableCell-root MuiTableCell-body MuiTableCell-alignCenter MuiTableCell-sizeMedium css-qzozz" colSpan="4">No test cases added yet.</td></tr></tbody></table></div><div class="MuiBox-root css-h5fkc8"><style data-emotion="css i3ihim">.css-i3ihim{margin:0;font-family:inherit;font-weight:400;font-size:1.5rem;line-height:1.334;margin-bottom:0.35em;}</style><h5 class="MuiTypography-root MuiTypography-h5 MuiTypography-gutterBottom css-i3ihim">Configuration</h5><style data-emotion="css wgumsr">.css-wgumsr{margin:0;font-family:inherit;font-weight:400;font-size:1rem;line-height:1.5;margin-bottom:0.35em;}</style><p class="MuiTypography-root MuiTypography-body1 MuiTypography-gutterBottom css-wgumsr">This is the YAML config that defines the evaluation and is processed by promptfoo. See<!-- --> <a target="_blank" href="https://promptfoo.dev/docs/configuration/guide">configuration docs</a> <!-- -->to learn more.</p><style data-emotion="css e0n8s">.css-e0n8s{font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#1976d2;}.css-e0n8s:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);}@media (hover: none){.css-e0n8s:hover{background-color:transparent;}}.css-e0n8s.Mui-disabled{color:rgba(0, 0, 0, 0.26);}</style><style data-emotion="css 5rr5x6">.css-5rr5x6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;background-color:transparent;outline:0;border:0;margin:0;border-radius:0;padding:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration:none;text-decoration:none;color:inherit;font-family:inherit;font-weight:500;font-size:0.875rem;line-height:1.75;text-transform:uppercase;min-width:64px;padding:6px 8px;border-radius:4px;-webkit-transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;color:#1976d2;}.css-5rr5x6::-moz-focus-inner{border-style:none;}.css-5rr5x6.Mui-disabled{pointer-events:none;cursor:default;}@media print{.css-5rr5x6{-webkit-print-color-adjust:exact;color-adjust:exact;}}.css-5rr5x6:hover{-webkit-text-decoration:none;text-decoration:none;background-color:rgba(25, 118, 210, 0.04);}@media (hover: none){.css-5rr5x6:hover{background-color:transparent;}}.css-5rr5x6.Mui-disabled{color:rgba(0, 0, 0, 0.26);}</style><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium css-5rr5x6" tabindex="0" type="button"><span class="MuiButton-startIcon MuiButton-iconSizeMedium css-6xugel"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="EditIcon"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg></span>Edit YAML</button><div autoCapitalize="off" class="" style="position:relative;text-align:left;box-sizing:border-box;padding:0;overflow:hidden;font-family:&quot;Fira code&quot;, &quot;Fira Mono&quot;, monospace;font-size:14px"><pre aria-hidden="true" style="margin:0;border:0;background:none;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;tab-size:inherit;text-indent:inherit;text-rendering:inherit;text-transform:inherit;white-space:pre-wrap;word-break:keep-all;overflow-wrap:break-word;position:relative;pointer-events:none;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px"><br /></pre><textarea style="margin:0;border:0;background:none;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;tab-size:inherit;text-indent:inherit;text-rendering:inherit;text-transform:inherit;white-space:pre-wrap;word-break:keep-all;overflow-wrap:break-word;position:absolute;top:0;left:0;height:100%;width:100%;resize:none;color:inherit;overflow:hidden;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-text-fill-color:transparent;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px" class="npm__react-simple-code-editor__textarea" disabled="" autoCapitalize="off" autoComplete="off" autoCorrect="off" spellCheck="false" data-gramm="false"></textarea><style>
2
2
  /**
3
3
  * Reset the text fill color so that placeholder is visible
4
4
  */
@@ -24,4 +24,4 @@
24
24
  color: transparent !important;
25
25
  }
26
26
  }
27
- </style></div></div></div></div></div><script src="/_next/static/chunks/webpack-e02a742b401be2a0.js" async=""></script><script src="/_next/static/chunks/fd9d1056-a95b789c94c05ff6.js" async=""></script><script src="/_next/static/chunks/596-f3a131b7c336dd5d.js" async=""></script><script src="/_next/static/chunks/main-app-581ccf0003955b21.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/0e4fe491bf84089c-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/3a04115668d8070d-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/3a18fc8da1cdcd01-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/627622453ef56b0d-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/699512af39861afa-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/934c4b7cb736f2a3-s.p.woff2\",{\"as\":\"font\","])</script><script>self.__next_f.push([1,"\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/css/51a17e8edcdfdbb2.css\",{\"as\":\"style\"}]\n0:\"$L8\"\n"])</script><script>self.__next_f.push([1,"9:HL[\"/_next/static/css/16c1dd82fc87c9d7.css\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"a:I{\"id\":7948,\"chunks\":[\"272:static/chunks/webpack-e02a742b401be2a0.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\nc:I{\"id\":6628,\"chunks\":[\"272:static/chunks/webpack-e02a742b401be2a0.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"\",\"async\":false}\nd:I{\"id\":2112,\"chunks\":[\"547:static/chunks/547-00556ed98de9671b.js\",\"72:static/chunks/72-202cb66305c1995a.js\",\"680:static/c"])</script><script>self.__next_f.push([1,"hunks/680-aa07f4d4d0312894.js\",\"864:static/chunks/864-406abb9f68cff6a3.js\",\"185:static/chunks/app/layout-0afd14c99b2fc9eb.js\"],\"name\":\"PageShell\",\"async\":false}\ne:I{\"id\":7767,\"chunks\":[\"272:static/chunks/webpack-e02a742b401be2a0.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\nf:I{\"id\":7920,\"chunks\":[\"272:static/chunks/webpack-e02a742b401be2a0.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c"])</script><script>self.__next_f.push([1,"336dd5d.js\"],\"name\":\"default\",\"async\":false}\n11:I{\"id\":4839,\"chunks\":[\"272:static/chunks/webpack-e02a742b401be2a0.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"12:I{\"id\":2378,\"chunks\":[\"547:static/chunks/547-00556ed98de9671b.js\",\"602:static/chunks/602-fce79bd3bd7891e9.js\",\"72:static/chunks/72-202cb66305c1995a.js\",\"975:static/chunks/975-41f6ad20b4031b30.js\",\"414:static/chunks/414-51e6cdc7aba4bb24.js\",\"113:static/chunks/113-1056b5f87446395e.js\",\"261:static/chunks/261-1bc0898df259d0fd.js\",\"339:static/chunks/339-501c32916b785ef1.js\",\"921:static/chunks/921-ea4bddb5c25058ea.js\",\"946:static/chunks/946-740c3c4d7e8acaf7.js\",\"413:static/chunks/app/setup/page-1e746f842289d480.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"8:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/51a17e8edcdfdbb2.css\",\"precedence\":\"next\"}]],[\"$\",\"$La\",null,{\"buildId\":\"M6DuBbMeEniSe5YhgYql4\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/setup/\",\"initialTree\":[\"\",{\"children\":[\"setup\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialHead\":\"$Lb\",\"globalErrorComponent\":\"$c\",\"children\":[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_c5054f\",\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$Le\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$\",\"$Le\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"setup\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$L10\",[\"$\",\"$L11\",null,{\"propsForComponent\":{\"params\":{}},\"Component\":\"$12\"}],null],\"segment\":\"__PAGE__\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/16c1dd82fc87c9d7.css\",\"precedence\":\"next\"}]]}],\"segment\":\"setup\"},\"styles\":[]}]}]}]}],null]}]]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"promptfoo\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"LLM testing and evaluation\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"5\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"6\",{\"name\":\"twitter:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"7\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"10:null\n"])</script></body></html>
27
+ </style></div></div></div></div></div><script src="/_next/static/chunks/webpack-6db4c95c90cd16a8.js" async=""></script><script src="/_next/static/chunks/fd9d1056-a95b789c94c05ff6.js" async=""></script><script src="/_next/static/chunks/596-f3a131b7c336dd5d.js" async=""></script><script src="/_next/static/chunks/main-app-581ccf0003955b21.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/0e4fe491bf84089c-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/3a04115668d8070d-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/3a18fc8da1cdcd01-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/627622453ef56b0d-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/699512af39861afa-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/934c4b7cb736f2a3-s.p.woff2\",{\"as\":\"font\","])</script><script>self.__next_f.push([1,"\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/css/51a17e8edcdfdbb2.css\",{\"as\":\"style\"}]\n0:\"$L8\"\n"])</script><script>self.__next_f.push([1,"9:HL[\"/_next/static/css/16c1dd82fc87c9d7.css\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"a:I{\"id\":7948,\"chunks\":[\"272:static/chunks/webpack-6db4c95c90cd16a8.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\nc:I{\"id\":6628,\"chunks\":[\"272:static/chunks/webpack-6db4c95c90cd16a8.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"\",\"async\":false}\nd:I{\"id\":2112,\"chunks\":[\"547:static/chunks/547-00556ed98de9671b.js\",\"72:static/chunks/72-202cb66305c1995a.js\",\"680:static/c"])</script><script>self.__next_f.push([1,"hunks/680-aa07f4d4d0312894.js\",\"864:static/chunks/864-406abb9f68cff6a3.js\",\"185:static/chunks/app/layout-0afd14c99b2fc9eb.js\"],\"name\":\"PageShell\",\"async\":false}\ne:I{\"id\":7767,\"chunks\":[\"272:static/chunks/webpack-6db4c95c90cd16a8.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\nf:I{\"id\":7920,\"chunks\":[\"272:static/chunks/webpack-6db4c95c90cd16a8.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c"])</script><script>self.__next_f.push([1,"336dd5d.js\"],\"name\":\"default\",\"async\":false}\n11:I{\"id\":4839,\"chunks\":[\"272:static/chunks/webpack-6db4c95c90cd16a8.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"12:I{\"id\":2378,\"chunks\":[\"547:static/chunks/547-00556ed98de9671b.js\",\"602:static/chunks/602-fce79bd3bd7891e9.js\",\"72:static/chunks/72-202cb66305c1995a.js\",\"975:static/chunks/975-41f6ad20b4031b30.js\",\"414:static/chunks/414-51e6cdc7aba4bb24.js\",\"113:static/chunks/113-1056b5f87446395e.js\",\"261:static/chunks/261-1bc0898df259d0fd.js\",\"339:static/chunks/339-501c32916b785ef1.js\",\"921:static/chunks/921-ea4bddb5c25058ea.js\",\"946:static/chunks/946-740c3c4d7e8acaf7.js\",\"413:static/chunks/app/setup/page-f363cb4f00822cb0.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"8:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/51a17e8edcdfdbb2.css\",\"precedence\":\"next\"}]],[\"$\",\"$La\",null,{\"buildId\":\"LMbNc2VH3HooEZMtC2nR3\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/setup/\",\"initialTree\":[\"\",{\"children\":[\"setup\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialHead\":\"$Lb\",\"globalErrorComponent\":\"$c\",\"children\":[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_c5054f\",\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$Le\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$\",\"$Le\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"setup\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$L10\",[\"$\",\"$L11\",null,{\"propsForComponent\":{\"params\":{}},\"Component\":\"$12\"}],null],\"segment\":\"__PAGE__\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/16c1dd82fc87c9d7.css\",\"precedence\":\"next\"}]]}],\"segment\":\"setup\"},\"styles\":[]}]}]}]}],null]}]]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"promptfoo\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"LLM testing and evaluation\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"5\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"6\",{\"name\":\"twitter:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"7\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"10:null\n"])</script></body></html>
@@ -5,13 +5,13 @@
5
5
  5:HL["/_next/static/media/699512af39861afa-s.p.woff2",{"as":"font","type":"font/woff2"}]
6
6
  6:HL["/_next/static/media/934c4b7cb736f2a3-s.p.woff2",{"as":"font","type":"font/woff2"}]
7
7
  7:HL["/_next/static/css/51a17e8edcdfdbb2.css",{"as":"style"}]
8
- 0:["M6DuBbMeEniSe5YhgYql4",[[["",{"children":["setup",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/51a17e8edcdfdbb2.css","precedence":"next"}]],"$L9"]]]]
8
+ 0:["LMbNc2VH3HooEZMtC2nR3",[[["",{"children":["setup",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/51a17e8edcdfdbb2.css","precedence":"next"}]],"$L9"]]]]
9
9
  a:HL["/_next/static/css/16c1dd82fc87c9d7.css",{"as":"style"}]
10
10
  b:I{"id":2112,"chunks":["547:static/chunks/547-00556ed98de9671b.js","72:static/chunks/72-202cb66305c1995a.js","680:static/chunks/680-aa07f4d4d0312894.js","864:static/chunks/864-406abb9f68cff6a3.js","185:static/chunks/app/layout-0afd14c99b2fc9eb.js"],"name":"PageShell","async":false}
11
- c:I{"id":7767,"chunks":["272:static/chunks/webpack-e02a742b401be2a0.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
12
- d:I{"id":7920,"chunks":["272:static/chunks/webpack-e02a742b401be2a0.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
13
- f:I{"id":4839,"chunks":["272:static/chunks/webpack-e02a742b401be2a0.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
14
- 10:I{"id":2378,"chunks":["547:static/chunks/547-00556ed98de9671b.js","602:static/chunks/602-fce79bd3bd7891e9.js","72:static/chunks/72-202cb66305c1995a.js","975:static/chunks/975-41f6ad20b4031b30.js","414:static/chunks/414-51e6cdc7aba4bb24.js","113:static/chunks/113-1056b5f87446395e.js","261:static/chunks/261-1bc0898df259d0fd.js","339:static/chunks/339-501c32916b785ef1.js","921:static/chunks/921-ea4bddb5c25058ea.js","946:static/chunks/946-740c3c4d7e8acaf7.js","413:static/chunks/app/setup/page-1e746f842289d480.js"],"name":"","async":false}
11
+ c:I{"id":7767,"chunks":["272:static/chunks/webpack-6db4c95c90cd16a8.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
12
+ d:I{"id":7920,"chunks":["272:static/chunks/webpack-6db4c95c90cd16a8.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
13
+ f:I{"id":4839,"chunks":["272:static/chunks/webpack-6db4c95c90cd16a8.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
14
+ 10:I{"id":2378,"chunks":["547:static/chunks/547-00556ed98de9671b.js","602:static/chunks/602-fce79bd3bd7891e9.js","72:static/chunks/72-202cb66305c1995a.js","975:static/chunks/975-41f6ad20b4031b30.js","414:static/chunks/414-51e6cdc7aba4bb24.js","113:static/chunks/113-1056b5f87446395e.js","261:static/chunks/261-1bc0898df259d0fd.js","339:static/chunks/339-501c32916b785ef1.js","921:static/chunks/921-ea4bddb5c25058ea.js","946:static/chunks/946-740c3c4d7e8acaf7.js","413:static/chunks/app/setup/page-f363cb4f00822cb0.js"],"name":"","async":false}
15
15
  8:[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_c5054f","children":["$","$Lb",null,{"children":["$","$Lc",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$Ld",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":"$undefined","childProp":{"current":["$","$Lc",null,{"parallelRouterKey":"children","segmentPath":["children","setup","children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$Ld",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$Le",["$","$Lf",null,{"propsForComponent":{"params":{}},"Component":"$10"}],null],"segment":"__PAGE__"},"styles":[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/16c1dd82fc87c9d7.css","precedence":"next"}]]}],"segment":"setup"},"styles":[]}]}]}]}],null]
16
16
  9:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"promptfoo"}],["$","meta","2",{"name":"description","content":"LLM testing and evaluation"}],["$","meta","3",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","4",{"property":"og:image","content":"https://www.promptfoo.dev/img/thumbnail.png"}],["$","meta","5",{"name":"twitter:card","content":"summary"}],["$","meta","6",{"name":"twitter:image","content":"https://www.promptfoo.dev/img/thumbnail.png"}],["$","meta","7",{"name":"next-size-adjust"}]]
17
17
  e:null
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "promptfoo",
3
3
  "description": "LLM eval & testing toolkit",
4
4
  "author": "Ian Webster",
5
- "version": "0.59.1",
5
+ "version": "0.61.0",
6
6
  "license": "MIT",
7
7
  "type": "commonjs",
8
8
  "repository": "promptfoo/promptfoo",
@@ -25,8 +25,9 @@
25
25
  "promptfoo": "dist/src/main.js"
26
26
  },
27
27
  "scripts": {
28
+ "bin": "dist/src/main.js",
28
29
  "tsc": "tsc",
29
- "local": "ts-node --esm --files src/main.ts",
30
+ "local": "ts-node --cwdMode --transpileOnly src/main.ts",
30
31
  "local:web": "cd src/web/nextui && npm run dev",
31
32
  "install:nextui": "cd src/web/nextui && npm install",
32
33
  "build:clean": "rm -rf dist",
@@ -71,6 +72,7 @@
71
72
  "@types/semver": "^7.5.0",
72
73
  "@types/uuid": "^9.0.2",
73
74
  "babel-jest": "^29.5.0",
75
+ "cloudflare": "^3.2.0",
74
76
  "drizzle-kit": "^0.20.13",
75
77
  "jest": "^29.5.0",
76
78
  "jest-watch-typeahead": "^2.2.2",
@@ -99,6 +101,7 @@
99
101
  "csv-parse": "^5.3.8",
100
102
  "csv-stringify": "^6.3.2",
101
103
  "debounce": "^1.2.1",
104
+ "dedent": "^1.5.3",
102
105
  "dotenv": "^16.4.5",
103
106
  "drizzle-orm": "^0.29.3",
104
107
  "express": "^4.18.2",
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{2810:function(e,t,s){"use strict";let n,l;async function a(){if(n||(l||(l=fetch("/api/config").then(e=>e.json()).then(e=>n=e.apiBaseUrl)),await l),void 0===n)throw Error("API base URL is undefined");return n}s.d(t,{b:function(){return a}})},4712:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eH}});var n=s(7437),l=s(2265),a=s(2130),i=s(6882),r=s(3388),o=s(4033),c=s(3082),d=s(1116),u=s(8440),p=s(6507),h=s(5551),m=s(7760),x=s(6446),j=s(3391),g=s(4081),f=s(3226),v=s(819),b=s(8212),y=s(8864),Z=s(3375),C=s(9114),w=s(923),k=s(654),S=s(3295),N=s(2467),R=s(3457),I=s(1975),P=s(8276),E=s(9605),O=s(9190),F=s(2053),T=s(8339),M=s(2481),L=s(9394),D=s(6337),U=s(4660),A=s(4810);let W=(0,U.Ue)()((0,A.tJ)((e,t)=>({evalId:null,setEvalId:t=>e(()=>({evalId:t})),table:null,setTable:t=>e(()=>({table:t})),config:null,setConfig:t=>e(()=>({config:t})),maxTextLength:250,setMaxTextLength:t=>e(()=>({maxTextLength:t})),wordBreak:"break-word",setWordBreak:t=>e(()=>({wordBreak:t})),showInferenceDetails:!0,setShowInferenceDetails:t=>e(()=>({showInferenceDetails:t})),renderMarkdown:!1,setRenderMarkdown:t=>e(()=>({renderMarkdown:t})),prettifyJson:!1,setPrettifyJson:t=>e(()=>({prettifyJson:t})),showPrompts:!1,setShowPrompts:t=>e(()=>({showPrompts:t}))}),{name:"ResultsViewStorage",storage:(0,A.FL)(()=>localStorage)}));var _=function(){let{table:e,config:t,evalId:s}=W(),[a,i]=l.useState(!1),r=(e,t)=>{let s=URL.createObjectURL(e),n=document.createElement("a");n.href=s,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(s)},o=()=>{i(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(C.Z,{onClick:()=>{i(!0)},children:[(0,n.jsx)(y.Z,{children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(b.Z,{children:"Download"})]}),(0,n.jsx)(L.Z,{onClose:o,open:a,children:(0,n.jsx)(D.Z,{children:(0,n.jsxs)(R.Z,{direction:"column",spacing:2,sx:{width:"100%"},children:[(0,n.jsx)(h.Z,{onClick:()=>{let e=T.default.dump(t),s=new Blob([e],{type:"text/yaml;charset=utf-8"});r(s,"promptfooconfig.yaml"),o()},startIcon:(0,n.jsx)(M.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download YAML Config"}),(0,n.jsx)(h.Z,{onClick:()=>{if(!e){alert("No table data");return}let t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"});r(t,"".concat(s,"-table.json")),o()},startIcon:(0,n.jsx)(M.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download Table JSON"}),(0,n.jsx)(h.Z,{onClick:()=>{if(!e){alert("No table data");return}let t=e.body.map((t,s)=>({chosen:t.outputs.filter(e=>e.pass).map(e=>e.text),rejected:t.outputs.filter(e=>!e.pass).map(e=>e.text),vars:t.test.vars,providers:e.head.prompts.map(e=>e.provider),prompts:e.head.prompts.map(e=>e.display)})),n=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});r(n,"".concat(s,"-dpo.json")),o()},startIcon:(0,n.jsx)(M.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download DPO JSON"})]})})})]})},z=s(6704),V=s(1797),B=s(1101),J=s(9872),H=s(2653),G=s(3533),X=s(4740);let Y=["#fd7f6f","#7eb0d5","#b2e061","#bd7ebe","#ffb55a","#ffee65","#beb9db","#fdcce5","#8bd3c7"];function q(e){let{table:t}=e,s=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(!s.current)return;a.current&&a.current.destroy();let e=t.body.flatMap(e=>e.outputs.map(e=>e.score)),n=Math.min(...e),l=(Math.ceil(Math.max(...e))-Math.floor(n))/10,i=Array.from({length:11},(e,t)=>parseFloat((Math.floor(n)+t*l).toFixed(2))),r=t.head.prompts.map((e,s)=>{let n=t.body.flatMap(e=>e.outputs[s].score),a=i.map(e=>n.filter(t=>t>=e&&t<e+l).length);return{label:"Column ".concat(s+1),data:a,backgroundColor:Y[s%Y.length]}});a.current=new z.kL(s.current,{type:"bar",data:{labels:i,datasets:r},options:{animation:!1,plugins:{title:{display:!0,text:"Score Distribution"},legend:{display:!1},tooltip:{callbacks:{title:function(e){let t=e[0].datasetIndex;return"Column ".concat(t+1)},label:function(e){let t=e.dataIndex,s=i[t],n=i[t+1];return n?"".concat(s," <= score < ").concat(n):"".concat(s," <= score")}}}}}})},[t]),(0,n.jsx)("canvas",{ref:s,style:{maxHeight:"300px"}})}function $(e){let{table:t}=e,s=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(!s.current)return;a.current&&a.current.destroy();let e=t.head.prompts.map((e,s)=>{let n=t.body.flatMap(e=>e.outputs[s]),l=n.filter(e=>e.pass).length,a=l/n.length*100;return{label:"Column ".concat(s+1),data:[a],backgroundColor:Y[s%Y.length]}});a.current=new z.kL(s.current,{type:"bar",data:{labels:["Pass Rate (%)"],datasets:e},options:{animation:!1,plugins:{title:{display:!0,text:"Pass rate"},legend:{display:!0}}}})},[t]),(0,n.jsx)("canvas",{ref:s,style:{maxHeight:"300px"}})}function K(e){let{table:t}=e,s=(0,l.useRef)(null),a=(0,l.useRef)(null),[i,r]=(0,l.useState)(0),[o,c]=(0,l.useState)(1),[d,u]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(!s.current)return;a.current&&a.current.destroy();let e=t.body.flatMap(e=>e.outputs.map(e=>e.score)),n=Math.min(...e),l=Math.max(...e),r=t.body.map(e=>{let t=e.outputs[i].score,s=e.outputs[o].score;return{x:t,y:s,backgroundColor:s>t?"green":s<t?"red":"gray"}});a.current=new z.kL(s.current,{type:"scatter",data:{datasets:[{data:r,backgroundColor:r.map(e=>e.backgroundColor)},{type:"line",data:[{x:n,y:n},{x:l,y:l}],borderColor:"gray",borderWidth:1,borderDash:[5,5],pointRadius:0}]},options:{animation:!1,plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(e){let s=t.body[e.dataIndex],n=s.outputs[0].text,l=s.outputs[1].text;return n.length>30&&(n=n.substring(0,30)+"..."),l.length>30&&(l=l.substring(0,30)+"..."),"Output 1: ".concat(n,"\nOutput 2: ").concat(l)}}}},scales:{x:{title:{display:!0,text:"Prompt ".concat(i+1," Score")}},y:{title:{display:!0,text:"Prompt ".concat(o+1," Score")}}}}})},[t,i,o]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(L.Z,{open:d,onClose:()=>u(!1),children:[(0,n.jsx)(V.Z,{children:"Compare prompt outputs"}),(0,n.jsxs)(D.Z,{children:[(0,n.jsx)(g.Z,{sx:{m:1,minWidth:120},children:(0,n.jsx)(k.Z,{value:i,onChange:e=>r(Number(e.target.value)),children:t.head.prompts.map((e,t)=>(0,n.jsxs)(C.Z,{value:t,children:["Prompt ",t+1]},t))})}),(0,n.jsx)(g.Z,{sx:{m:1,minWidth:120},children:(0,n.jsx)(k.Z,{value:o,onChange:e=>c(Number(e.target.value)),children:t.head.prompts.map((e,t)=>(0,n.jsxs)(C.Z,{value:t,children:["Prompt ",t+1]},t))})})]})]}),(0,n.jsx)("canvas",{ref:s,style:{maxHeight:"300px",cursor:"pointer"},onClick:()=>u(!0)})]})}z.kL.register(z.vn,z.ST,z.ho,z.uw,z.f$,z.ZL,z.jn,z.od,z.u,z.wL);var Q=l.memo(function(e){let{columnVisibility:t}=e,s=(0,B.Z)();z.kL.defaults.color="dark"===s.palette.mode?"#aaa":"#666";let[a,i]=(0,l.useState)(!0),{table:r}=W();if(!r||!a||r.head.prompts.length<2)return null;let o=r.body.flatMap(e=>e.outputs.map(e=>e.score));return 1===new Set(o).size?null:(0,n.jsx)(X.SV,{fallback:null,children:(0,n.jsxs)(J.Z,{style:{position:"relative",padding:s.spacing(3)},children:[(0,n.jsx)(H.Z,{style:{position:"absolute",right:0,top:0},onClick:()=>i(!1),children:(0,n.jsx)(G.Z,{})}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[(0,n.jsx)("div",{style:{width:"33%"},children:(0,n.jsx)($,{table:r})}),(0,n.jsx)("div",{style:{width:"33%"},children:(0,n.jsx)(q,{table:r})}),(0,n.jsx)("div",{style:{width:"33%"},children:(0,n.jsx)(K,{table:r})})]})]})})}),ee=s(9116);s(5777);var et=s(3425),es=s(7660),en=s(3216),el=s(182),ea=s(5391),ei=s(1396),er=s.n(ei),eo=s(2834),ec=e=>{let{open:t,contextText:s,commentText:l,onClose:a,onSave:i,onChange:r}=e;return(0,n.jsxs)(L.Z,{open:t,onClose:a,fullWidth:!0,maxWidth:"sm",children:[(0,n.jsx)(V.Z,{children:"Edit Comment"}),(0,n.jsxs)(D.Z,{children:[(0,n.jsx)(p.Z,{sx:{backgroundColor:"#f0f0f0",padding:2,marginBottom:2},children:s}),(0,n.jsx)(I.Z,{autoFocus:!0,margin:"dense",type:"text",fullWidth:!0,multiline:!0,rows:4,value:l,onChange:e=>r(e.target.value)})]}),(0,n.jsxs)(eo.Z,{children:[(0,n.jsx)(h.Z,{onClick:i,color:"primary",variant:"contained",children:"Save"}),(0,n.jsx)(h.Z,{onClick:a,color:"primary",children:"Cancel"})]})]})};s(8715);var ed=e=>{let{lookup:t}=e;return t&&Object.keys(t).length?(0,n.jsx)("div",{className:"custom-metric-container",children:Object.entries(t).map(e=>{let[t,s]=e;return t&&void 0!==s?(0,n.jsxs)("span",{children:[t,": ",s.toFixed(2)]},t):null})}):null},eu=s(5446),ep=s(9329),eh=s(4719),em=s(3701),ex=s(9279),ej=s(666),eg=s(5795),ef=s(6988),ev=s(4147);function eb(e){let{gradingResults:t}=e;return t?(0,n.jsxs)(p.Z,{mt:2,children:[(0,n.jsx)(f.Z,{variant:"subtitle1",children:"Assertions"}),(0,n.jsx)(eg.Z,{children:(0,n.jsxs)(em.Z,{children:[(0,n.jsx)(ef.Z,{children:(0,n.jsxs)(ev.Z,{children:[(0,n.jsx)(ej.Z,{style:{fontWeight:"bold"},children:"Pass"}),(0,n.jsx)(ej.Z,{style:{fontWeight:"bold"},children:"Score"}),(0,n.jsx)(ej.Z,{style:{fontWeight:"bold"},children:"Type"}),(0,n.jsx)(ej.Z,{style:{fontWeight:"bold"},children:"Value"}),(0,n.jsx)(ej.Z,{style:{fontWeight:"bold"},children:"Reason"})]})}),(0,n.jsx)(ex.Z,{children:t.map((e,t)=>{var s,l;return(0,n.jsxs)(ev.Z,{children:[(0,n.jsx)(ej.Z,{children:e.pass?"✅":"❌"}),(0,n.jsx)(ej.Z,{children:e.score.toFixed(2)}),(0,n.jsx)(ej.Z,{children:(null===(s=e.assertion)||void 0===s?void 0:s.type)||""}),(0,n.jsx)(ej.Z,{style:{whiteSpace:"pre-wrap"},children:(null===(l=e.assertion)||void 0===l?void 0:l.value)?String(e.assertion.value):"-"}),(0,n.jsx)(ej.Z,{style:{whiteSpace:"pre-wrap"},children:e.reason})]},t)})})]})})]}):null}function ey(e){let{open:t,onClose:s,prompt:a,provider:i,output:r,gradingResults:o}=e,[c,d]=(0,l.useState)(!1);(0,l.useEffect)(()=>{d(!1)},[a]);let u=async e=>{await navigator.clipboard.writeText(e),d(!0)};return(0,n.jsxs)(L.Z,{open:t,onClose:s,fullWidth:!0,maxWidth:"lg",children:[(0,n.jsxs)(V.Z,{children:["Details",i&&": ".concat(i)]}),(0,n.jsxs)(D.Z,{children:[(0,n.jsxs)(p.Z,{mb:2,children:[(0,n.jsx)(f.Z,{variant:"subtitle1",style:{marginBottom:"1rem"},children:"Prompt"}),(0,n.jsx)(eu.u,{readOnly:!0,value:a,style:{width:"100%",padding:"0.75rem"},maxRows:20}),(0,n.jsx)(H.Z,{onClick:()=>u(a),style:{position:"absolute",right:"10px",top:"10px"},children:c?(0,n.jsx)(eh.Z,{}):(0,n.jsx)(ep.Z,{})})]}),r&&(0,n.jsxs)(p.Z,{my:2,children:[(0,n.jsx)(f.Z,{variant:"subtitle1",style:{marginBottom:"1rem",marginTop:"1rem"},children:"Output"}),(0,n.jsx)(eu.u,{readOnly:!0,maxRows:20,value:r,style:{width:"100%",padding:"0.75rem"}})]}),(0,n.jsx)(eb,{gradingResults:o})]}),(0,n.jsx)(eo.Z,{children:(0,n.jsx)(h.Z,{onClick:s,children:"Close"})})]})}var eZ=s(9396),eC=s(4173),ew=function(){let e=(0,B.Z)(),[t,s]=l.useState(!1),a=()=>{s(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{textAlign:"center",marginTop:20,marginBottom:40},children:(0,n.jsx)(h.Z,{variant:"text",color:"primary",startIcon:(0,n.jsx)(eZ.Z,{}),onClick:()=>{s(!0)},children:"Generate test cases"})}),(0,n.jsxs)(L.Z,{open:t,onClose:a,children:[(0,n.jsx)(V.Z,{children:"Run on Command Line"}),(0,n.jsx)(D.Z,{children:(0,n.jsxs)(eC.Z,{children:[(0,n.jsx)("p",{children:"This feature is in beta. UI coming soon."}),(0,n.jsxs)("p",{children:["Run"," ",(0,n.jsx)(p.Z,{component:"code",sx:{backgroundColor:"dark"===e.palette.mode?"#424242":"#f0f0f0",padding:"2px 4px",borderRadius:"4px"},children:"promptfoo generate dataset"}),"to generate test cases on the command line."]})]})}),(0,n.jsx)(eo.Z,{children:(0,n.jsx)(h.Z,{onClick:a,color:"primary",children:"Close"})})]})]})},ek=s(2810);function eS(e){return null===e||0===e||1===e?"":"(".concat(e.toFixed(2),")")}function eN(e){return"string"==typeof e||"number"==typeof e?e.toString().length:Array.isArray(e)?e.reduce((e,t)=>e+eN(t),0):l.isValidElement(e)&&e.props.children?l.Children.toArray(e.props.children).reduce((e,t)=>e+eN(t),0):0}s(2604);let eR=l.memo(function(e){let t,{text:s,maxLength:a}=e,[i,r]=l.useState(!0),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("string"==typeof e||"number"==typeof e){let s=e.toString();return s.slice(0,a-t)}if(Array.isArray(e)){let s=[],n=t;for(let t of e){let e=eN(t);if(n+e>a){s.push(o(t,n));break}s.push(t),n+=e}return s}if(l.isValidElement(e)&&e.props.children){let s=eN(e.props.children);if(s>a-t)return l.cloneElement(e,{...e.props,children:o(e.props.children,t)})}return e};t=l.isValidElement(s)||"string"==typeof s?s:JSON.stringify(s);let c=i?o(t):t,d=eN(t)>a;return(0,n.jsxs)("div",{style:{cursor:d?"pointer":"normal"},onClick:()=>{r(!i)},children:[c,i&&eN(t)>a&&(0,n.jsx)("span",{children:"..."})]})}),eI=l.memo(function(e){var t,s,a,i,r,o,c,d,u,p,h;let m,x,j,g,f,{output:v,maxTextLength:b,rowIndex:y,promptIndex:Z,onRating:C,firstOutput:w,showDiffs:k,searchText:S,showStats:N}=e,{renderMarkdown:R,prettifyJson:I,showPrompts:E}=W(),[O,F]=l.useState(!1),[T,M]=l.useState(!1),L=()=>M(!T),[D,U]=l.useState(!1),[A,_]=l.useState((null===(t=v.gradingResult)||void 0===t?void 0:t.comment)||""),z=()=>{U(!0)},V="string"==typeof v.text?v.text:JSON.stringify(v.text),B=[];if(V.startsWith("[IMAGE]")){let e=V.slice(7).trim();m=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{loading:"lazy",src:e,alt:v.prompt,onClick:L}),T&&(0,n.jsx)("div",{className:"lightbox",onClick:L,children:(0,n.jsx)("img",{src:e,alt:v.prompt})})]})}else!v.pass&&V.includes("---")?V=(B=V.split("---")).slice(1).join("---"):B=[V];if(k&&w){let e,t="string"==typeof w.text?w.text:JSON.stringify(w.text);t.includes("---")&&(t=t.split("---").slice(1).join("---"));try{JSON.parse(t),JSON.parse(V),e=(0,ee.CT)(t,V)}catch(s){e=t.includes(". ")&&V.includes(". ")?(0,ee.SY)(t,V):(0,ee.NV)(t,V)}m=(0,n.jsx)(n.Fragment,{children:e.map((e,t)=>e.added?(0,n.jsx)("ins",{children:e.value},t):e.removed?(0,n.jsx)("del",{children:e.value},t):(0,n.jsx)("span",{children:e.value},t))})}if(S)try{let e;let t=RegExp(S,"gi"),s=[];for(;null!==(e=t.exec(V));)s.push({start:e.index,end:t.lastIndex});m=(0,n.jsx)(n.Fragment,{children:s.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:V.substring(0,s[0].start)},"text-before"),s.map((e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"search-highlight",children:V.substring(e.start,e.end)},"match-"+t),(0,n.jsx)("span",{children:V.substring(e.end,s[t+1]?s[t+1].start:V.length)},"text-after-"+t)]}))]}):(0,n.jsx)("span",{children:V},"no-match")})}catch(e){console.error("Invalid regular expression:",e.message)}else if(R)m=(0,n.jsx)(et.U,{children:V});else if(I)try{m=(0,n.jsx)("pre",{children:JSON.stringify(JSON.parse(V),null,2)})}catch(e){}let J=l.useCallback(e=>{var t;C(e,void 0,null===(t=v.gradingResult)||void 0===t?void 0:t.comment)},[C,null===(s=v.gradingResult)||void 0===s?void 0:s.comment]),H=l.useCallback(()=>{let e=prompt("Set test score (0.0 - 1.0):",String(v.score));if(null!==e){let s=parseFloat(e);if(!isNaN(s)&&s>=0&&s<=1){var t;C(void 0,s,null===(t=v.gradingResult)||void 0===t?void 0:t.comment)}else alert("Invalid score. Please enter a value between 0.0 and 1.0.")}},[C,v.score,null===(a=v.gradingResult)||void 0===a?void 0:a.comment]);if(null===(i=v.tokenUsage)||void 0===i?void 0:i.completion){j=(0,n.jsxs)("span",{children:[Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(v.latencyMs)," ms"]});let e=v.tokenUsage.completion/(v.latencyMs/1e3);g=(0,n.jsx)("span",{children:Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e)})}if(v.cost&&(f=(0,n.jsxs)("span",{children:["$",v.cost.toPrecision(2)]})),null===(r=v.tokenUsage)||void 0===r?void 0:r.cached)x=(0,n.jsxs)("span",{children:[Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(v.tokenUsage.cached)," ","(cached)"]});else if(null===(o=v.tokenUsage)||void 0===o?void 0:o.total){let e=Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(null!==(p=v.tokenUsage.prompt)&&void 0!==p?p:0),t=Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(null!==(h=v.tokenUsage.completion)&&void 0!==h?h:0),s=Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(v.tokenUsage.total);x=(0,n.jsx)(P.Z,{title:"".concat(e," prompt tokens + ").concat(t," completion tokens = ").concat(s," total"),children:(0,n.jsxs)("span",{children:[s,("0"!==e||"0"!==t)&&" (".concat(e,"+").concat(t,")")]})})}let G=(null===(c=v.gradingResult)||void 0===c?void 0:c.comment)?(0,n.jsx)("div",{className:"comment",onClick:z,children:v.gradingResult.comment}):null,X=N?(0,n.jsxs)("div",{className:"cell-detail",children:[x&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Tokens:"})," ",x]}),j&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Latency:"})," ",j]}),g&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Tokens/Sec:"})," ",g]}),f&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Cost:"})," ",f]})]}):null,Y=(0,n.jsxs)("div",{className:"cell-actions",children:[v.prompt&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"action",onClick:()=>{F(!0)},children:(0,n.jsx)(P.Z,{title:"View ouput and test details",children:(0,n.jsx)("span",{children:"\uD83D\uDD0E"})})}),(0,n.jsx)(ey,{open:O,onClose:()=>{F(!1)},prompt:v.prompt,provider:v.provider,gradingResults:null===(d=v.gradingResult)||void 0===d?void 0:d.componentResults,output:V})]}),(0,n.jsx)("span",{className:"action",onClick:()=>J(!0),children:(0,n.jsx)(P.Z,{title:"Mark test passed (score 1.0)",children:(0,n.jsx)("span",{children:"\uD83D\uDC4D"})})}),(0,n.jsx)("span",{className:"action",onClick:()=>J(!1),children:(0,n.jsx)(P.Z,{title:"Mark test failed (score 0.0)",children:(0,n.jsx)("span",{children:"\uD83D\uDC4E"})})}),(0,n.jsx)("span",{className:"action",onClick:H,children:(0,n.jsx)(P.Z,{title:"Set test score",children:(0,n.jsx)("span",{children:"\uD83D\uDD22"})})}),(0,n.jsx)("span",{className:"action",onClick:z,children:(0,n.jsx)(P.Z,{title:"Edit comment",children:(0,n.jsx)("span",{children:"✏️"})})})]});return(0,n.jsxs)("div",{className:"cell",children:[v.pass?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"status pass",children:[(0,n.jsxs)("div",{className:"pill",children:["PASS ",(0,n.jsx)("span",{className:"score",children:eS(v.score)})]}),(0,n.jsx)(ed,{lookup:v.namedScores})]})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"status fail",children:[(0,n.jsxs)("div",{className:"pill",children:["FAIL",v.score>0?" ":"",(0,n.jsx)("span",{className:"score",children:eS(v.score)})]}),(0,n.jsx)(ed,{lookup:v.namedScores}),(0,n.jsx)("span",{className:"fail-reason",children:null===(u=B[0])||void 0===u?void 0:u.trim().split("\n").map((e,t)=>(0,n.jsxs)(l.Fragment,{children:[e,(0,n.jsx)("br",{})]},t))})]})}),E&&w.prompt&&(0,n.jsxs)("div",{className:"prompt",children:[(0,n.jsx)("span",{className:"pill",children:"Prompt"}),v.prompt]}),(0,n.jsx)(eR,{text:m||V,maxLength:b}),G,X,Y,(0,n.jsx)(ec,{open:D,contextText:v.text,commentText:A,onClose:()=>{U(!1)},onSave:()=>{C(void 0,void 0,A),U(!1)},onChange:_})]})});function eP(e){let{text:t,maxLength:s,expandedText:a,resourceId:i,className:r}=e,[o,c]=l.useState(!1);return(0,n.jsxs)("div",{className:"".concat(r||""),children:[(0,n.jsx)(eR,{text:t,maxLength:s}),a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P.Z,{title:"View prompt",children:(0,n.jsx)("span",{className:"action",onClick:()=>{c(!0)},children:"\uD83D\uDD0E"})}),(0,n.jsx)(ey,{open:o,onClose:()=>{c(!1)},prompt:a}),i&&(0,n.jsx)(P.Z,{title:"View other evals and datasets for this prompt",children:(0,n.jsx)("span",{className:"action",children:(0,n.jsx)(er(),{href:"/prompts/?id=".concat(i),target:"_blank",children:(0,n.jsx)(ea.Z,{fontSize:"small"})})})})]})]})}var eE=l.memo(function(e){let{maxTextLength:t,columnVisibility:s,wordBreak:i,filterMode:r,failureFilter:o,searchText:c,showStats:d,onFailureFilterToggle:u}=e,{evalId:x,table:j,setTable:g}=W();(0,a.Z)(j,"Table should be defined");let{head:v,body:b}=j,y=l.useCallback(async(e,t,s,n,l)=>{var a;let i=[...b],r={...i[e]},o=[...r.outputs],c=null!=s?s:o[t].pass,d=void 0===n?s?1:0:n||0;o[t].pass=c,o[t].score=d;let u={...o[t].gradingResult||{},pass:c,score:d,reason:"Manual result (overrides all other grading results)",comment:l,assertion:(null===(a=o[t].gradingResult)||void 0===a?void 0:a.assertion)||null};o[t].gradingResult=u,r.outputs=o,i[e]=r;let p={head:v,body:i};g(p);try{let e=await fetch("".concat(await (0,ek.b)(),"/api/eval/").concat(x),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({table:p})});if(!e.ok)throw Error("Network response was not ok")}catch(e){console.error("Failed to update table:",e)}},[b,v,g,x]),Z=Object.keys(s).length>0,w=l.useMemo(()=>{try{let e=RegExp(c,"i");return b.map((e,t)=>({...e,outputs:e.outputs.map((e,s)=>({...e,originalRowIndex:t,originalPromptIndex:s}))})).filter(t=>{let n="failures"===r?t.outputs.some((e,t)=>{let n="Prompt ".concat(t+1);return o[n]&&!e.pass&&(!Z||s[n])}):"different"!==r||!t.outputs.every(e=>e.text===t.outputs[0].text),l=!c||t.outputs.some(t=>{var s,n;let l="".concat(t.text," ").concat(Object.keys(t.namedScores)," ").concat((null===(s=t.gradingResult)||void 0===s?void 0:s.reason)||""," ").concat((null===(n=t.gradingResult)||void 0===n?void 0:n.comment)||"");return e.test(l)});return n&&l})}catch(e){return console.error("Invalid regular expression:",e.message),b}},[b,o,r,c,s,Z]),S=l.useMemo(()=>v.prompts.map((e,t)=>b.reduce((e,s)=>e+(s.outputs[t].pass?1:0),0)),[v.prompts,b]),N=l.useMemo(()=>v.prompts.map((e,t)=>b.reduce((e,s)=>{var n,l;return e+((null===(l=s.outputs[t].gradingResult)||void 0===l?void 0:null===(n=l.componentResults)||void 0===n?void 0:n.length)||0)},0)),[v.prompts,b]),R=l.useMemo(()=>v.prompts.map((e,t)=>b.reduce((e,s)=>{var n;let l=null===(n=s.outputs[t].gradingResult)||void 0===n?void 0:n.componentResults;return e+(l?l.filter(e=>e.pass).length:0)},0)),[v.prompts,b]),P=l.useMemo(()=>S.reduce((e,t,s,n)=>t>n[e]?s:e,0),[S]),E=S[P],O=l.useMemo(()=>(0,es.Cl)(),[]),{renderMarkdown:F}=W(),T=l.useMemo(()=>v.vars.length>0?[O.group({id:"vars",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Variables"}),columns:v.vars.map((e,s)=>O.accessor(e=>e.vars[s],{id:"Variable ".concat(s+1),header:()=>(0,n.jsx)(eP,{text:e,maxLength:t,className:"font-bold"}),cell:e=>{let s=e.getValue();return F?(0,n.jsx)(et.U,{children:s}):(0,n.jsx)(eR,{text:s,maxLength:t})},size:50}))})]:[],[O,v.vars,t,F]),M=l.useCallback((e,t)=>w[e].outputs[t],[w]),L=l.useCallback(e=>w[e].outputs[0],[w]),D=l.useMemo(()=>[O.group({id:"prompts",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Outputs"}),columns:v.prompts.map((e,s)=>O.accessor(e=>(function(e){if("string"==typeof e){let t=e.startsWith("[PASS]"),s=e;return e.startsWith("[PASS]")?s=s.slice(6):e.startsWith("[FAIL]")&&(s=s.slice(6)),{text:s,pass:t,score:t?1:0}}return e})(e.outputs[s]),{id:"Prompt ".concat(s+1),header:()=>{var l,a,i,c,p,h,x,j;let g=S[s]&&b.length?(S[s]/b.length*100).toFixed(2):"0.00",f=S[s]===E&&0!==E,v="Prompt ".concat(s+1),y=o[v]||!1,Z=d?(0,n.jsxs)("div",{className:"prompt-detail",children:[N[s]?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Asserts:"})," ",R[s],"/",N[s]," passed"]}):null,(null===(l=e.metrics)||void 0===l?void 0:l.totalLatencyMs)?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Avg Latency:"})," ",Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e.metrics.totalLatencyMs/b.length)," ","ms"]}):null,(null===(i=e.metrics)||void 0===i?void 0:null===(a=i.tokenUsage)||void 0===a?void 0:a.total)?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Avg Tokens:"})," ",Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e.metrics.tokenUsage.total/b.length)]}):null,(null===(c=e.metrics)||void 0===c?void 0:c.totalLatencyMs)&&(null===(h=e.metrics)||void 0===h?void 0:null===(p=h.tokenUsage)||void 0===p?void 0:p.completion)?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Tokens/Sec:"})," ",Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e.metrics.tokenUsage.completion/(e.metrics.totalLatencyMs/1e3))]}):null,(null===(x=e.metrics)||void 0===x?void 0:x.cost)?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Cost:"})," $",e.metrics.cost.toPrecision(2)]}):null]}):null,C=e.provider?e.provider.split(":"):[],w=C.length>1?(0,n.jsxs)(n.Fragment,{children:[C[0],":",(0,n.jsx)("strong",{children:C.slice(1).join(":")})]}):(0,n.jsx)("strong",{children:e.provider});return(0,n.jsxs)("div",{className:"output-header",children:[(0,n.jsxs)("div",{className:"pills",children:[e.provider?(0,n.jsx)("div",{className:"provider",children:w}):null,(0,n.jsx)("div",{className:"summary",children:(0,n.jsxs)("div",{className:"highlight ".concat(f?"success":""),children:[(0,n.jsxs)("strong",{children:[g,"% passing"]})," (",S[s],"/",b.length," cases)"]})}),(null===(j=e.metrics)||void 0===j?void 0:j.namedScores)&&Object.keys(e.metrics.namedScores).length>0?(0,n.jsx)(ed,{lookup:e.metrics.namedScores}):null]}),(0,n.jsx)(eP,{className:"prompt-container",text:e.display,expandedText:e.raw,maxLength:t,resourceId:e.id}),Z,"failures"===r&&(0,n.jsx)(el.Z,{sx:{"& .MuiFormControlLabel-label":{fontSize:"0.75rem"}},control:(0,n.jsx)(m.Z,{checked:y,onChange:e=>u(v,e.target.checked)}),label:"Show failures"})]})},cell:e=>{var l,a;let i=M(e.row.index,s);return(0,n.jsx)(eI,{output:i,maxTextLength:t,rowIndex:e.row.index,promptIndex:s,onRating:y.bind(null,null!==(l=i.originalRowIndex)&&void 0!==l?l:e.row.index,null!==(a=i.originalPromptIndex)&&void 0!==a?a:s),firstOutput:L(e.row.index),showDiffs:"different"===r,searchText:c,showStats:d})}}))})],[O,v.prompts,S,b.length,E,o,d,N,R,t,u,r,c,M,L,y]),U=l.useMemo(()=>{let e=b.some(e=>e.description);return e?{accessorFn:e=>e.description||"",id:"description",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Description"}),cell:e=>(0,n.jsx)(eR,{text:String(e.getValue()),maxLength:t}),size:50}:null},[b,t]),A=l.useMemo(()=>{let e=[];return U&&e.push(U),e.push(...T,...D),e},[U,T,D]),[_,z]=l.useState({pageIndex:0,pageSize:50}),V=(0,en.b7)({data:w,columns:A,columnResizeMode:"onChange",getCoreRowModel:(0,es.sC)(),getPaginationRowModel:(0,es.G_)(),state:{columnVisibility:s,pagination:_}});return(0,n.jsxs)("div",{children:[(0,n.jsxs)("table",{className:"results-table firefox-fix ".concat(t<=25?"compact":""),style:{wordBreak:i},children:[(0,n.jsx)("thead",{children:V.getHeaderGroups().map(e=>(0,n.jsx)("tr",{className:"header",children:e.headers.map(e=>(0,n.jsxs)("th",{colSpan:e.colSpan,style:{width:e.getSize()},children:[e.isPlaceholder?null:(0,en.ie)(e.column.columnDef.header,e.getContext()),(0,n.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"resizer ".concat(e.column.getIsResizing()?"isResizing":"")})]},e.id))},e.id))}),(0,n.jsx)("tbody",{children:V.getRowModel().rows.map((e,t)=>{let s=!1;return(0,n.jsx)("tr",{children:e.getVisibleCells().map(e=>{let l=e.column.id.startsWith("Variable")||"description"===e.column.id,a=!l&&!s;return a&&(s=!0),(0,n.jsx)("td",{style:{width:e.column.getSize()},className:"".concat(l?"variable":""," ").concat(0!==t||l?"":"first-prompt-row"," ").concat(a?"first-prompt-col":""),children:(0,en.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)})})]}),V.getPageCount()>1&&(0,n.jsxs)(p.Z,{className:"pagination",sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(h.Z,{onClick:()=>{z(e=>({...e,pageIndex:Math.max(e.pageIndex-1,0)})),window.scrollTo(0,0)},disabled:0===V.getState().pagination.pageIndex,variant:"contained",children:"Previous"}),(0,n.jsxs)(f.Z,{component:"span",sx:{display:"flex",alignItems:"center",gap:1},children:["Page",(0,n.jsx)(I.Z,{size:"small",type:"number",value:V.getState().pagination.pageIndex+1,onChange:e=>{let t=e.target.value?Number(e.target.value)-1:0;z(e=>({...e,pageIndex:Math.min(Math.max(t,0),V.getPageCount()-1)}))},InputProps:{style:{width:"60px",textAlign:"center"}},variant:"outlined"}),(0,n.jsxs)("span",{children:["of ",V.getPageCount()]})]}),(0,n.jsx)(h.Z,{onClick:()=>{z(e=>({...e,pageIndex:Math.min(e.pageIndex+1,V.getPageCount()-1)})),window.scrollTo(0,0)},disabled:V.getState().pagination.pageIndex+1>=V.getPageCount(),variant:"contained",children:"Next"}),(0,n.jsxs)(f.Z,{component:"span",sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(k.Z,{value:_.pageSize,onChange:e=>{z({pageIndex:0,pageSize:Number(e.target.value)}),window.scrollTo(0,0)},displayEmpty:!0,inputProps:{"aria-label":"Results per page"},size:"small",sx:{m:1,minWidth:80},children:[(0,n.jsx)(C.Z,{value:10,children:"10"}),(0,n.jsx)(C.Z,{value:50,children:"50"}),(0,n.jsx)(C.Z,{value:100,children:"100"}),(0,n.jsx)(C.Z,{value:500,children:"500"}),(0,n.jsx)(C.Z,{value:1e3,children:"1000"})]}),(0,n.jsx)("span",{children:"results per page"})]})]}),(0,n.jsx)(ew,{})]})}),eO=s(7175);function eF(e){let{open:t,onClose:a}=e,{config:i}=W(),r=l.useRef(null),[o,c]=l.useState(!1),[d,u]=l.useState("");l.useEffect(()=>{t&&(async()=>{let{default:e}=await Promise.resolve().then(s.bind(s,8339));u(e.dump(i))})()},[t,i]);let m=()=>{c(!1),a()};return(0,n.jsxs)(L.Z,{open:t,onClose:m,"aria-labelledby":"config-dialog-title",maxWidth:"md",fullWidth:!0,children:[(0,n.jsx)(V.Z,{id:"config-dialog-title",children:(0,n.jsxs)(p.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,n.jsx)(f.Z,{variant:"h6",style:{flexGrow:1},children:"Config"}),(0,n.jsxs)(p.Z,{children:[(0,n.jsx)(P.Z,{title:"Copy to clipboard",children:(0,n.jsx)(H.Z,{onClick:()=>{r.current&&(r.current.select(),document.execCommand("copy"),c(!0))},children:o?(0,n.jsx)(eh.Z,{}):(0,n.jsx)(eO.Z,{})})}),(0,n.jsx)(P.Z,{title:"Download .yaml",children:(0,n.jsx)(H.Z,{onClick:()=>{let e=new Blob([d],{type:"text/yaml;charset=utf-8"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download="config.yaml",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(t)},children:(0,n.jsx)(M.Z,{})})})]})]})}),(0,n.jsx)(D.Z,{children:(0,n.jsx)(f.Z,{variant:"body1",component:"div",children:(0,n.jsx)("textarea",{ref:r,readOnly:!0,value:d,style:{width:"100%",minHeight:"400px",fontFamily:"monospace",border:"1px solid #ccc"}})})}),(0,n.jsx)(eo.Z,{children:(0,n.jsx)(h.Z,{onClick:m,color:"primary",children:"Close"})})]})}var eT=e=>{let{open:t,onClose:s,shareUrl:a}=e,i=(0,l.useRef)(null),[r,o]=(0,l.useState)(!1),c=()=>{s(),o(!1)};return(0,n.jsxs)(L.Z,{open:t,onClose:c,PaperProps:{style:{minWidth:"min(660px, 100%)"}},children:[(0,n.jsx)(V.Z,{children:"Your eval is ready to share"}),(0,n.jsxs)(D.Z,{children:[(0,n.jsx)(I.Z,{inputRef:i,value:a,fullWidth:!0,InputProps:{readOnly:!0,endAdornment:(0,n.jsx)(H.Z,{onClick:()=>{i.current&&(i.current.select(),document.execCommand("copy"),o(!0))},children:r?(0,n.jsx)(eh.Z,{}):(0,n.jsx)(eO.Z,{})})}}),(0,n.jsx)(eC.Z,{sx:{fontSize:"0.75rem"},children:"Shared URLs are deleted after 2 weeks."})]}),(0,n.jsx)(eo.Z,{children:(0,n.jsx)(h.Z,{onClick:c,color:"primary",children:"Close"})})]})},eM=s(33),eL=e=>{let{open:t,onClose:s}=e,{maxTextLength:l,setMaxTextLength:a,wordBreak:i,setWordBreak:r,showInferenceDetails:o,setShowInferenceDetails:c,renderMarkdown:d,setRenderMarkdown:u,prettifyJson:x,setPrettifyJson:j,showPrompts:g,setShowPrompts:v}=W();return(0,n.jsxs)(L.Z,{open:t,onClose:s,fullWidth:!0,maxWidth:"sm",children:[(0,n.jsx)(V.Z,{children:"Table View Settings"}),(0,n.jsxs)(D.Z,{children:[(0,n.jsx)(p.Z,{children:(0,n.jsx)(P.Z,{title:"Forcing line breaks makes it easier to adjust column widths to your liking",children:(0,n.jsx)(el.Z,{control:(0,n.jsx)(m.Z,{checked:"break-all"===i,onChange:e=>r(e.target.checked?"break-all":"break-word")}),label:"Force line breaks"})})}),(0,n.jsx)(p.Z,{children:(0,n.jsx)(el.Z,{control:(0,n.jsx)(m.Z,{checked:d,onChange:e=>u(e.target.checked)}),label:"Render model outputs as Markdown"})}),(0,n.jsx)(p.Z,{children:(0,n.jsx)(el.Z,{control:(0,n.jsx)(m.Z,{checked:x,onChange:e=>j(e.target.checked)}),label:"Prettify JSON outputs"})}),(0,n.jsx)(p.Z,{children:(0,n.jsx)(P.Z,{title:"Show the final prompt that produced the output in each cell.",children:(0,n.jsx)(el.Z,{control:(0,n.jsx)(m.Z,{checked:g,onChange:e=>v(e.target.checked)}),label:"Show full prompt in output cell"})})}),(0,n.jsx)(p.Z,{children:(0,n.jsx)(P.Z,{title:"Show detailed inference statistics such as latency, tokens used, cost, etc.",children:(0,n.jsx)(el.Z,{control:(0,n.jsx)(m.Z,{checked:o,onChange:e=>c(e.target.checked)}),label:"Show inference details"})})}),(0,n.jsxs)(p.Z,{maxWidth:"sm",children:[(0,n.jsxs)(f.Z,{mt:2,children:["Max text length: ",l]}),(0,n.jsx)(eM.ZP,{min:25,max:1e3,value:l,onChange:(e,t)=>a(t)})]})]}),(0,n.jsx)(eo.Z,{children:(0,n.jsx)(h.Z,{onClick:s,children:"Close"})})]})},eD=s(1938),eU=s(7580);let eA=eU.env.NEXT_PUBLIC_PROMPTFOO_REMOTE_API_BASE_URL||eU.env.NEXT_PUBLIC_PROMPTFOO_BASE_URL||eU.env.PROMPTFOO_REMOTE_API_BASE_URL||"https://api.promptfoo.dev",eW=eU.env.NEXT_PUBLIC_PROMPTFOO_BASE_URL||eU.env.PROMPTFOO_REMOTE_APP_BASE_URL||"https://app.promptfoo.dev";s(6911);let e_=(0,O.Z)(R.Z)(e=>{let{theme:t}=e;return{maxWidth:"100%",flexWrap:"wrap",[t.breakpoints.down("sm")]:{flexDirection:"column"}}});function ez(e){let{recentEvals:t,onRecentEvalSelected:s,defaultEvalId:r}=e,c=(0,o.useRouter)(),{table:R,config:O,setConfig:T,maxTextLength:M,wordBreak:L,showInferenceDetails:D,evalId:U}=W(),{setStateFromConfig:A}=(0,eD.o)(),[z,V]=l.useState({}),[B,J]=l.useState([]),[H,G]=l.useState(""),[X]=(0,F.Nr)(H,1e3),[Y,q]=l.useState({}),[$,K]=l.useState("all"),[ee,et]=l.useState(!1),[es,en]=l.useState(""),[el,ea]=l.useState(!1),ei=async()=>{ea(!0);try{let e=await fetch("".concat(eA,"/api/eval"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:{version:2,createdAt:new Date().toISOString(),results:{table:R},config:O}})}),{id:t}=await e.json(),s="".concat(eW,"/eval/").concat(t);en(s),et(!0)}catch(e){alert("Sorry, something went wrong.")}finally{ea(!1)}},[er,eo]=l.useState(!1),[ec,ed]=l.useState(!1);(0,a.Z)(R,"Table data must be loaded before rendering ResultsView");let{head:eu}=R,ep=async()=>{(0,a.Z)(O,"Config must be loaded before clicking its description");let e=window.prompt("Enter new description:",O.description);if(null!==e&&e!==O.description){let t={...O,description:e};try{let e=await fetch("".concat(await (0,ek.b)(),"/api/eval/").concat(U),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:t})});if(!e.ok)throw Error("Network response was not ok");T(t)}catch(e){console.error("Failed to update table:",e)}}},eh=async()=>{if(window.confirm("Are you sure you want to delete this evaluation?"))try{let e=await fetch("".concat(await (0,ek.b)(),"/api/eval/").concat(U),{method:"DELETE"});if(!e.ok)throw Error("Network response was not ok");c.push("/")}catch(e){console.error("Failed to delete evaluation:",e),alert("Failed to delete evaluation")}},em=[...eu.vars.map((e,t)=>({value:"Variable ".concat(t+1),label:"Var ".concat(t+1,": ").concat(eu.vars[t].length>100?eu.vars[t].slice(0,97)+"...":eu.vars[t]),group:"Variables"})),...eu.prompts.map((e,t)=>({value:"Prompt ".concat(t+1),label:"Prompt ".concat(t+1,": ").concat(eu.prompts[t].display.length>100?eu.prompts[t].display.slice(0,97)+"...":eu.prompts[t].display),group:"Prompts"}))];l.useEffect(()=>{J(em.map(e=>e.value))},[eu]);let[ex,ej]=l.useState(null);return(0,n.jsxs)("div",{style:{marginLeft:"1rem",marginRight:"1rem"},children:[(0,n.jsx)(p.Z,{mb:2,sx:{display:"flex",alignItems:"center"},children:(0,n.jsxs)(f.Z,{variant:"h5",sx:{flexGrow:1},children:[(0,n.jsx)("span",{className:"description",onClick:ep,children:(null==O?void 0:O.description)||U})," ",(null==O?void 0:O.description)&&(0,n.jsx)("span",{className:"description-filepath",children:U})]})}),(0,n.jsx)(p.Z,{py:"md",children:(0,n.jsxs)(e_,{direction:"row",spacing:4,alignItems:"center",children:[(0,n.jsx)(p.Z,{children:t&&t.length>0&&(0,n.jsx)(g.Z,{sx:{m:1,minWidth:200},size:"small",children:(0,n.jsx)(u.Z,{size:"small",options:t,renderOption:(e,t)=>(0,l.createElement)("li",{...e,key:t.id},t.label),style:{width:350},renderInput:e=>(0,n.jsx)(I.Z,{...e,label:"Eval run",variant:"outlined"}),defaultValue:t.find(e=>e.id===r)||t[0],onChange:(e,t)=>{t&&t.id&&s(t.id)},disableClearable:!0})})}),(0,n.jsx)(p.Z,{children:(0,n.jsxs)(g.Z,{sx:{m:1,minWidth:200,maxWidth:350},size:"small",children:[(0,n.jsx)(v.Z,{id:"visible-columns-label",children:"Columns"}),(0,n.jsx)(k.Z,{labelId:"visible-columns-label",id:"visible-columns",multiple:!0,value:B,onChange:e=>{let{target:{value:t}}=e;J("string"==typeof t?t.split(","):t);let s=[...eu.vars.map((e,t)=>"Variable ".concat(t+1)),...eu.prompts.map((e,t)=>"Prompt ".concat(t+1))],n={};s.forEach(e=>{n[e]=("string"==typeof t?t.split(","):t).includes(e)}),V(n)},input:(0,n.jsx)(w.Z,{label:"Visible columns"}),renderValue:e=>e.join(", "),children:em.map(e=>(0,n.jsxs)(C.Z,{dense:!0,value:e.value,children:[(0,n.jsx)(m.Z,{checked:B.indexOf(e.value)>-1}),(0,n.jsx)(b.Z,{primary:e.label})]},e.value))})]})}),(0,n.jsx)(p.Z,{children:(0,n.jsxs)(g.Z,{sx:{minWidth:180},size:"small",children:[(0,n.jsx)(v.Z,{id:"failure-filter-mode-label",children:"Display"}),(0,n.jsxs)(k.Z,{labelId:"filter-mode-label",id:"filter-mode",value:$,onChange:e=>{let t=e.target.value;K(t);let s={};eu.prompts.forEach((e,n)=>{s["Prompt ".concat(n+1)]="failures"===t}),q(s)},label:"Filter",children:[(0,n.jsx)(C.Z,{value:"all",children:"Show all results"}),(0,n.jsx)(C.Z,{value:"failures",children:"Show failures only"}),(0,n.jsx)(C.Z,{value:"different",children:"Show different only"})]})]})}),(0,n.jsx)(p.Z,{children:(0,n.jsx)(I.Z,{sx:{minWidth:180},size:"small",label:"Search",placeholder:"Text or regex",value:H,onChange:e=>{G(e.target.value)}})}),(0,n.jsx)(p.Z,{flexGrow:1}),(0,n.jsx)(p.Z,{display:"flex",justifyContent:"flex-end",children:(0,n.jsxs)(e_,{direction:"row",spacing:2,children:[(0,n.jsx)(h.Z,{color:"primary",onClick:e=>{ej(e.currentTarget)},startIcon:(0,n.jsx)(d.Z,{}),children:"Eval actions"}),O&&(0,n.jsxs)(Z.Z,{id:"eval-actions-menu",anchorEl:ex,keepMounted:!0,open:!!ex,onClose:()=>{ej(null)},children:[(0,n.jsx)(P.Z,{title:"View the configuration that defines this eval",placement:"left",children:(0,n.jsxs)(C.Z,{onClick:()=>eo(!0),children:[(0,n.jsx)(y.Z,{children:(0,n.jsx)(E.Z,{fontSize:"small"})}),"View YAML"]})}),(0,n.jsx)(P.Z,{title:"Edit this eval in the web UI",placement:"left",children:(0,n.jsxs)(C.Z,{onClick:()=>{A(O),c.push("/setup/")},children:[(0,n.jsx)(y.Z,{children:(0,n.jsx)(j.Z,{fontSize:"small"})}),"Edit Eval"]})}),(0,n.jsx)(_,{}),(null==O?void 0:O.sharing)&&(0,n.jsx)(P.Z,{title:"Generate a unique URL that others can access",placement:"left",children:(0,n.jsxs)(C.Z,{onClick:ei,disabled:el,children:[(0,n.jsx)(y.Z,{children:el?(0,n.jsx)(i.Z,{size:16}):(0,n.jsx)(N.Z,{fontSize:"small"})}),"Share"]})}),(0,n.jsx)(P.Z,{title:"Delete this eval",placement:"left",children:(0,n.jsxs)(C.Z,{onClick:eh,children:[(0,n.jsx)(y.Z,{children:(0,n.jsx)(x.Z,{fontSize:"small"})}),"Delete"]})})]}),(0,n.jsx)(P.Z,{title:"Edit table view settings",placement:"bottom",children:(0,n.jsx)(h.Z,{color:"primary",onClick:()=>ed(!0),startIcon:(0,n.jsx)(S.Z,{}),children:"Table Settings"})})]})})]})}),(0,n.jsx)(Q,{columnVisibility:z}),(0,n.jsx)(eE,{maxTextLength:M,columnVisibility:z,wordBreak:L,showStats:D,filterMode:$,failureFilter:Y,searchText:X,onFailureFilterToggle:(e,t)=>{q(s=>({...s,[e]:t}))}}),(0,n.jsx)(eF,{open:er,onClose:()=>eo(!1)}),(0,n.jsx)(eT,{open:ee,onClose:()=>et(!1),shareUrl:es}),(0,n.jsx)(eL,{open:ec,onClose:()=>ed(!1)})]})}var eV=s(279);async function eB(){let e=(0,c.createClientComponentClient)(),{data:{user:t}}=await e.auth.getUser();(0,a.Z)(t,"User not logged in");let{data:s,error:n}=await e.from("EvaluationResult").select("id, createdAt").eq("user_id",t.id).order("createdAt",{ascending:!1}).limit(100);return s||[]}async function eJ(e){let t=(0,c.createClientComponentClient)(),{data:s,error:n}=await t.from("EvaluationResult").select("*").eq("id",e).single();return s}function eH(e){var t;let{fetchId:s,preloadedData:c,recentEvals:d,defaultEvalId:u}=e,p=(0,o.useRouter)(),{table:h,setTable:m,setConfig:x,setEvalId:j}=W(),[g,f]=l.useState(!1),[v,b]=l.useState(!1),[y,Z]=l.useState(d||[]),C=async()=>{let e=await fetch("".concat(await (0,ek.b)(),"/api/results"),{cache:"no-store"}),t=await e.json();return Z(t.data),t.data},w=l.useCallback(async e=>{let t=await fetch("".concat(await (0,ek.b)(),"/api/results/").concat(e),{cache:"no-store"}),s=await t.json();m(s.data.results.table),x(s.data.config),j(e)},[m,x,j]),k=async e=>{eV.Ox?(f(!1),p.push("/eval/remote:".concat(encodeURIComponent(e)))):p.push("/eval/?evalId=".concat(encodeURIComponent(e)))},[S,N]=l.useState(u||(null===(t=y[0])||void 0===t?void 0:t.id)),R=(0,o.useSearchParams)(),I=R?R.get("evalId"):null;return(l.useEffect(()=>{if(I){let e=async()=>{await w(I),f(!0),N(I),C()};e()}else if(c){var e;m(null===(e=c.data.results)||void 0===e?void 0:e.table),x(c.data.config),f(!0)}else if(s){let e=async()=>{var e;let t="".concat(eA,"/api/eval/").concat(s);console.log("Fetching eval from remote server",t);let n=await fetch(t);if(!n.ok){b(!0);return}let l=await n.json();m(null===(e=l.data.results)||void 0===e?void 0:e.table),x(l.data.config),f(!0)};e()}else if(eV.T8)(0,ek.b)().then(e=>{let t=(0,r.io)(e);return t.on("init",e=>{console.log("Initialized socket connection",e),f(!0),m(null==e?void 0:e.results.table),x(null==e?void 0:e.config),C().then(e=>{var t,s;N(null===(t=e[0])||void 0===t?void 0:t.id),j(null===(s=e[0])||void 0===s?void 0:s.id)})}),t.on("update",e=>{console.log("Received data update",e),m(e.results.table),x(e.config),C().then(e=>{var t;let s=null===(t=e[0])||void 0===t?void 0:t.id;s&&(N(s),j(s))})}),()=>{t.disconnect()}});else if(eV.Ox)eB().then(e=>{Z(e.map(e=>({id:e.id,label:e.createdAt}))),e.length>0&&eJ(e[0].id).then(t=>{(0,a.Z)(t,"Eval not found");let s=t.results,n=t.config;N(e[0].id),m(s.table),x(n),f(!0)})});else{let e=async()=>{let e=await C();if(!(e.length>0))return(0,n.jsx)("div",{className:"notice",children:"No evals yet. Share some evals to this server and they will appear here."});{let t=await (0,ek.b)(),s=e[0].id,n=await fetch("".concat(t,"/api/results/").concat(s)),l=await n.json();m(l.data.results.table),x(l.data.config),f(!0),N(s),j(s)}};e()}},[s,m,x,j,w,c,N,I]),v)?(0,n.jsx)("div",{className:"notice",children:"404 Eval not found"}):g&&h?(0,n.jsx)(ez,{defaultEvalId:S,recentEvals:y,onRecentEvalSelected:k}):(0,n.jsxs)("div",{className:"notice",children:[(0,n.jsx)("div",{children:(0,n.jsx)(i.Z,{size:22})}),(0,n.jsx)("div",{children:"Loading eval data"})]})}s(5038)},279:function(e,t,s){"use strict";s.d(t,{Ox:function(){return a},T8:function(){return l},eA:function(){return i}});var n=s(7580);let l=!n.env.NEXT_PUBLIC_PROMPTFOO_BUILD_STANDALONE_SERVER,a=!!n.env.NEXT_PUBLIC_PROMPTFOO_USE_SUPABASE,i=""},1938:function(e,t,s){"use strict";s.d(t,{o:function(){return a}});var n=s(4660),l=s(4810);let a=(0,n.Ue)()((0,l.tJ)((e,t)=>({env:{},testCases:[],description:"",providers:[],prompts:[],defaultTest:{},evaluateOptions:{},setEnv:t=>e({env:t}),setTestCases:t=>e({testCases:t}),setDescription:t=>e({description:t}),setProviders:t=>e({providers:t}),setPrompts:t=>e({prompts:t}),setDefaultTest:t=>e({defaultTest:t}),setEvaluateOptions:t=>e({evaluateOptions:t}),setStateFromConfig:t=>{let s={};t.description&&(s.description=t.description||""),t.tests&&(s.testCases=t.tests),t.providers&&(s.providers=t.providers),t.prompts&&("string"==typeof t.prompts?s.prompts=[t.prompts]:Array.isArray(t.prompts)?s.prompts=t.prompts.filter(e=>!e.endsWith(".txt")&&!e.endsWith(".json")&&!e.endsWith(".yaml")):console.warn("Invalid prompts config",t.prompts)),e(s)},getTestSuite:()=>{let{description:e,testCases:s,providers:n,prompts:l,env:a}=t();return{env:a,description:e,providers:n,prompts:l,tests:s}}}),{name:"promptfoo",skipHydration:!0}))},8715:function(){},5038:function(){},2604:function(){},6911:function(){},5777:function(){}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[413],{3515:function(e,t,n){Promise.resolve().then(n.bind(n,2378))},2378:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ed}});var a=n(7437),i=n(2265),r=n(5551),l=n(8938),s=n(3226),o=n(6507),c=n(3457),d=n(9394),p=n(2834),u=n(6337),h=n(4173),x=n(1797),m=n(4740),f=n(4033),g=n(6882),j=n(1938),v=n(279),Z=()=>{let e=(0,f.useRouter)(),{env:t,description:n,providers:l,prompts:s,testCases:o}=(0,j.o)(),[c,d]=(0,i.useState)(!1),[p,u]=(0,i.useState)(0),h=async()=>{d(!0);try{let a=await fetch("".concat(v.eA,"/api/eval/job/"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:t,description:n,providers:l,prompts:s,tests:o})});if(!a.ok)throw Error("HTTP error! status: ".concat(a.status));let i=await a.json(),r=setInterval(async()=>{let t=await fetch("".concat(v.eA,"/api/eval/job/").concat(i.id,"/"));if(!t.ok)throw clearInterval(r),Error("HTTP error! status: ".concat(t.status));let n=await t.json();if("complete"===n.status)clearInterval(r),d(!1),v.Ox?e.push("/eval/remote:".concat(encodeURIComponent(i.id))):e.push("/eval");else if("failed"===n.status)throw clearInterval(r),d(!1),Error("Job failed");else{let e=0===n.total?0:Math.round(n.progress/n.total*100);u(e)}},1e3)}catch(e){console.error(e),d(!1),alert("An error occurred: ".concat(e.message))}};return(0,a.jsx)(r.Z,{variant:"contained",color:"primary",onClick:h,disabled:c,children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.Z,{size:24,sx:{marginRight:2}}),p.toFixed(0),"% complete"]}):"Run Evaluation"})},b=n(2057),y=n(8768),_=n(5873),C=n(1975),k=n(3295),A=()=>{let{env:e,setEnv:t}=(0,j.o)(),[n,l]=(0,i.useState)(!1),[s,o]=(0,i.useState)(e),c=()=>{l(!1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Z,{variant:"outlined",startIcon:(0,a.jsx)(k.Z,{}),onClick:()=>{l(!0)},children:"API keys"}),(0,a.jsxs)(d.Z,{open:n,onClose:c,fullWidth:!0,maxWidth:"md",children:[(0,a.jsx)(x.Z,{children:"Provider settings"}),(0,a.jsxs)(u.Z,{children:[(0,a.jsxs)(b.Z,{defaultExpanded:!0,children:[(0,a.jsx)(_.Z,{children:"OpenAI"}),(0,a.jsxs)(y.Z,{children:[(0,a.jsx)(C.Z,{label:"OpenAI API key",fullWidth:!0,margin:"normal",value:s.OPENAI_API_KEY,onChange:e=>o({...s,OPENAI_API_KEY:e.target.value})}),(0,a.jsx)(C.Z,{label:"OpenAI API host",fullWidth:!0,margin:"normal",value:s.OPENAI_API_HOST,onChange:e=>o({...s,OPENAI_API_HOST:e.target.value})}),(0,a.jsx)(C.Z,{label:"OpenAI organization",fullWidth:!0,margin:"normal",value:s.OPENAI_ORGANIZATION,onChange:e=>o({...s,OPENAI_ORGANIZATION:e.target.value})})]})]}),(0,a.jsxs)(b.Z,{children:[(0,a.jsx)(_.Z,{children:"Azure"}),(0,a.jsx)(y.Z,{children:(0,a.jsx)(C.Z,{label:"Azure API key",fullWidth:!0,margin:"normal",value:s.AZURE_OPENAI_API_KEY,onChange:e=>o({...s,AZURE_OPENAI_API_KEY:e.target.value})})})]}),(0,a.jsxs)(b.Z,{children:[(0,a.jsx)(_.Z,{children:"Amazon Bedrock"}),(0,a.jsx)(y.Z,{children:(0,a.jsx)(C.Z,{label:"Bedrock Region",fullWidth:!0,margin:"normal",value:s.AWS_BEDROCK_REGION,onChange:e=>o({...s,AWS_BEDROCK_REGION:e.target.value})})})]}),(0,a.jsxs)(b.Z,{children:[(0,a.jsx)(_.Z,{children:"Anthropic"}),(0,a.jsx)(y.Z,{children:(0,a.jsx)(C.Z,{label:"Anthropic API key",fullWidth:!0,margin:"normal",value:s.ANTHROPIC_API_KEY,onChange:e=>o({...s,ANTHROPIC_API_KEY:e.target.value})})})]}),(0,a.jsxs)(b.Z,{children:[(0,a.jsx)(_.Z,{children:"Google Vertex AI"}),(0,a.jsx)(y.Z,{children:(0,a.jsx)(C.Z,{label:"Vertex API Key",fullWidth:!0,margin:"normal",value:s.VERTEX_API_KEY,onChange:e=>o({...s,VERTEX_API_KEY:e.target.value})})}),(0,a.jsx)(y.Z,{children:(0,a.jsx)(C.Z,{label:"Vertex Project ID",fullWidth:!0,margin:"normal",value:s.VERTEX_PROJECT_ID,onChange:e=>o({...s,VERTEX_PROJECT_ID:e.target.value})})}),(0,a.jsx)(y.Z,{children:(0,a.jsx)(C.Z,{label:"Vertex Region",fullWidth:!0,margin:"normal",value:s.VERTEX_REGION,onChange:e=>o({...s,VERTEX_REGION:e.target.value})})})]}),(0,a.jsxs)(b.Z,{children:[(0,a.jsx)(_.Z,{children:"Replicate"}),(0,a.jsx)(y.Z,{children:(0,a.jsx)(C.Z,{label:"Replicate API key",fullWidth:!0,margin:"normal",value:s.REPLICATE_API_KEY,onChange:e=>o({...s,REPLICATE_API_KEY:e.target.value})})})]})]}),(0,a.jsxs)(p.Z,{children:[(0,a.jsx)(r.Z,{onClick:c,color:"primary",children:"Cancel"}),(0,a.jsx)(r.Z,{onClick:()=>{t(s),c()},color:"primary",variant:"contained",children:"Save"})]})]})]})},E=n(2653),I=n(3701),P=n(9279),S=n(666),O=n(5795),T=n(4147),w=n(8276),R=n(3391),W=n(6446),N=n(1280),z=n(9329),V=e=>{let{open:t,prompt:n,index:l,onAdd:s,onCancel:o}=e,[c,h]=i.useState(n),m=i.useRef(null);i.useEffect(()=>{h(n)},[n]);let f=e=>{s(c),h(""),e?o():m.current&&m.current.focus()};return(0,a.jsxs)(d.Z,{open:t,onClose:o,fullWidth:!0,maxWidth:"md",children:[(0,a.jsx)(x.Z,{children:"Edit Prompt ".concat(l+1)}),(0,a.jsx)(u.Z,{children:(0,a.jsx)(C.Z,{value:c,onChange:e=>h(e.target.value),fullWidth:!0,margin:"normal",multiline:!0,placeholder:"The quick brown {{animal1}} jumps over the lazy {{animal2}}.",helperText:"Tip: use the {{varname}} syntax to add variables to your prompt.",inputRef:m})}),(0,a.jsxs)(p.Z,{children:[(0,a.jsx)(r.Z,{onClick:f.bind(null,!0),color:"primary",variant:"contained",disabled:!c.length,children:"Add"}),(0,a.jsx)(r.Z,{onClick:f.bind(null,!1),color:"primary",variant:"contained",disabled:!c.length,children:"Add Another"}),(0,a.jsx)(r.Z,{onClick:o,color:"secondary",children:"Cancel"})]})]})};n(2280);var F=()=>{let[e,t]=(0,i.useState)(!1),[n,l]=(0,i.useState)(null),{prompts:o,setPrompts:d}=(0,j.o)(),p=(0,i.useRef)(null);(0,i.useEffect)(()=>{null!==n&&n>0&&p.current&&p.current.focus()},[n]);let u=e=>{l(e),t(!0)},h=(e,t)=>{e.stopPropagation();let n=o[t];d([...o,n])},x=(e,t)=>{d(o.map((n,a)=>a===e?t:n))},m=(e,t)=>{e.stopPropagation(),confirm("Are you sure you want to remove this prompt?")&&d(o.filter((e,n)=>n!==t))};return(0,a.jsxs)("div",{children:[(0,a.jsxs)(c.Z,{direction:"row",spacing:2,justifyContent:"space-between",children:[(0,a.jsx)(s.Z,{variant:"h5",children:"Prompts"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"file-input-add-prompt",children:(0,a.jsx)(w.Z,{title:"Upload prompt from file",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(E.Z,{component:"span",children:(0,a.jsx)(N.Z,{})}),(0,a.jsx)("input",{id:"file-input-add-prompt",type:"file",accept:".txt,.md",onChange:e=>{var t;e.stopPropagation(),e.preventDefault();let n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(n){let e=new FileReader;e.onload=e=>{var t,n;let a=null===(n=e.target)||void 0===n?void 0:null===(t=n.result)||void 0===t?void 0:t.toString();a&&d([...o,a])},e.readAsText(n)}},style:{display:"none"}})]})})}),(0,a.jsx)(r.Z,{color:"primary",onClick:()=>{t(!0)},variant:"contained",children:"Add Prompt"})]})]}),(0,a.jsx)(O.Z,{children:(0,a.jsx)(I.Z,{children:(0,a.jsx)(P.Z,{children:0===o.length?(0,a.jsx)(T.Z,{children:(0,a.jsx)(S.Z,{colSpan:2,align:"center",children:"No prompts added yet."})}):o.map((e,t)=>(0,a.jsxs)(T.Z,{sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)",cursor:"pointer"}},onClick:()=>u(t),children:[(0,a.jsx)(S.Z,{children:(0,a.jsxs)(s.Z,{variant:"body2",children:["Prompt #".concat(t+1,": "),(e.length>250?e.slice(0,250)+" ...":e).split(/({{\w+}})/g).map((e,t)=>/{{\w+}}/g.test(e)?(0,a.jsx)("span",{className:"prompt-var-highlight",children:e},t):e)]})}),(0,a.jsxs)(S.Z,{align:"right",sx:{minWidth:150},children:[(0,a.jsx)(E.Z,{onClick:()=>u(t),size:"small",children:(0,a.jsx)(R.Z,{})}),(0,a.jsx)(E.Z,{onClick:e=>h(e,t),size:"small",children:(0,a.jsx)(z.Z,{})}),(0,a.jsx)(E.Z,{onClick:e=>m(e,t),size:"small",children:(0,a.jsx)(W.Z,{})})]})]},t))})})}),(0,a.jsx)(V,{open:e,prompt:null!==n?o[n]:"",index:null!==n?n:0,onAdd:e=>{null!==n?x(n,e):d([...o,e]),l(null)},onCancel:()=>{l(null),t(!1)}})]})},L=n(6988),U=e=>{let{onAdd:t,varsList:n,initialValues:r}=e,[l,d]=i.useState(r||{});return(0,i.useEffect)(()=>{let e={};n.forEach(t=>{e[t]=(null==r?void 0:r[t])||""}),d(e)},[n,r]),(0,a.jsxs)(o.Z,{my:2,children:[(0,a.jsx)(s.Z,{variant:"h6",mb:2,children:"Vars"}),n.length>0?(0,a.jsx)(c.Z,{direction:"row",spacing:2,alignItems:"center",children:Object.keys(l).map((e,n)=>(0,a.jsx)(c.Z,{direction:"row",spacing:2,alignItems:"center",children:(0,a.jsx)(C.Z,{placeholder:e,label:e,value:l[e],fullWidth:!0,onChange:n=>{let a=n.target.value,i={...l,[e]:a};d(i),t(i)}})},n))}):(0,a.jsxs)(s.Z,{variant:"subtitle1",gutterBottom:!0,children:["Add variables to your prompt using the ","{{varname}}"," syntax."]})]})},B=n(8440);let K=["equals","contains","icontains","contains-all","contains-any","starts-with","regex","is-json","contains-json","similar","llm-rubric","model-graded-closedqa","factuality","webhook","rouge-n","rouge-s","rouge-l","not-equals","not-contains","not-icontains","not-contains-all","not-contains-any","not-starts-with","not-regex","not-is-json","not-contains-json","not-similar","not-webhook","not-rouge-n","not-rouge-s","not-rouge-l","is-valid-openai-function-call","is-valid-openai-tools-call","latency","perplexity","perplexity-score","cost","answer-relevance","context-faithfulness","context-recall","context-relevance","select-best"];var D=e=>{let{onAdd:t,initialValues:n}=e,[l,d]=(0,i.useState)(n||[]),p=e=>{let n=l.filter((t,n)=>n!==e);d(n),t(n)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Z,{variant:"h6",children:"Asserts"}),(0,a.jsx)(o.Z,{my:l.length>0?2:0,children:(0,a.jsx)(c.Z,{direction:"column",spacing:2,children:l.map((e,n)=>(0,a.jsxs)(c.Z,{direction:"row",spacing:2,alignItems:"center",children:[(0,a.jsx)(B.Z,{value:e.type,options:K,sx:{minWidth:200},onChange:(e,a)=>{let i=l.map((e,t)=>t===n?{...e,type:a}:e);d(i),t(i)},renderInput:e=>(0,a.jsx)(C.Z,{...e,label:"Type"})}),(0,a.jsx)(C.Z,{label:"Value",value:e.value,fullWidth:!0,onChange:e=>{let a=e.target.value,i=l.map((e,t)=>t===n?{...e,value:a}:e);d(i),t(i)}}),(0,a.jsx)(E.Z,{onClick:()=>p(n),size:"small",children:(0,a.jsx)(W.Z,{})})]},n))})}),(0,a.jsx)(r.Z,{color:"primary",onClick:()=>{let e=[...l,{type:"equals",value:""}];d(e),t(e)},children:"Add Assert"})]})},Y=e=>{let{open:t,onAdd:n,varsList:l,initialValues:s,onCancel:c}=e,[h,m]=(0,i.useState)((null==s?void 0:s.description)||""),[f,g]=(0,i.useState)((null==s?void 0:s.vars)||{}),[j,v]=(0,i.useState)((null==s?void 0:s.assert)||[]),[Z,b]=(0,i.useState)(0);i.useEffect(()=>{s?(m(s.description||""),g(s.vars||{}),v(s.assert||[])):(m(""),g({}),v([]))},[s]);let y=e=>{n({description:h,vars:f,assert:j},e),e&&c(),m(""),g({}),v([]),b(e=>e+1)};return(0,a.jsxs)(d.Z,{open:t,onClose:c,fullWidth:!0,maxWidth:"md",children:[(0,a.jsx)(x.Z,{children:s?"Edit Test Case":"Add Test Case"}),(0,a.jsx)(u.Z,{children:(0,a.jsxs)(o.Z,{children:[(0,a.jsx)(U,{onAdd:e=>g(e),varsList:l,initialValues:null==s?void 0:s.vars}),(0,a.jsx)(D,{onAdd:e=>v(e),initialValues:((null==s?void 0:s.assert)||[]).filter(e=>"assert-set"!==e.type)||[]},Z)]})}),(0,a.jsxs)(p.Z,{children:[(0,a.jsx)(r.Z,{onClick:y.bind(void 0,!0),color:"primary",variant:"contained",children:s?"Update Test Case":"Add Test Case"}),!s&&(0,a.jsx)(r.Z,{onClick:y.bind(void 0,!1),color:"primary",variant:"contained",children:"Add Another"}),(0,a.jsx)(r.Z,{onClick:c,color:"secondary",children:"Cancel"})]})]})},q=n(5320),J=e=>{let{varsList:t}=e,{testCases:l,setTestCases:o}=(0,j.o)(),[d,p]=i.useState(null),[u,h]=i.useState(!1),x=(e,t)=>{e.stopPropagation(),confirm("Are you sure you want to delete this test case?")&&o(l.filter((e,n)=>n!==t))},m=(e,t)=>{e.stopPropagation();let n=JSON.parse(JSON.stringify(l[t]));o([...l,n])};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(c.Z,{direction:"row",spacing:2,justifyContent:"space-between",children:[(0,a.jsx)(s.Z,{variant:"h5",children:"Test Cases"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"file-input-add-test-case",children:(0,a.jsx)(w.Z,{title:"Upload test cases from csv",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(E.Z,{component:"span",children:(0,a.jsx)(N.Z,{})}),(0,a.jsx)("input",{id:"file-input-add-test-case",type:"file",accept:".csv",onChange:e=>{var t;e.stopPropagation(),e.preventDefault();let a=null===(t=e.target.files)||void 0===t?void 0:t[0];if(a){let e=new FileReader;e.onload=async e=>{var t,a;let i=null===(a=e.target)||void 0===a?void 0:null===(t=a.result)||void 0===t?void 0:t.toString();if(i){let{parse:e}=await Promise.all([n.e(133),n.e(922)]).then(n.bind(n,8922)),t=e(i,{columns:!0});o([...l,...t.map(e=>(0,q.It)(e))])}},e.readAsText(a)}},style:{display:"none"}})]})})}),(0,a.jsx)(r.Z,{color:"primary",onClick:()=>h(!0),variant:"contained",children:"Add Test Case"})]})]}),(0,a.jsx)(O.Z,{children:(0,a.jsxs)(I.Z,{children:[(0,a.jsx)(L.Z,{children:(0,a.jsxs)(T.Z,{children:[(0,a.jsx)(S.Z,{children:"Description"}),(0,a.jsx)(S.Z,{children:"Assertions"}),(0,a.jsx)(S.Z,{children:"Variables"}),(0,a.jsx)(S.Z,{align:"right"})]})}),(0,a.jsx)(P.Z,{children:0===l.length?(0,a.jsx)(T.Z,{children:(0,a.jsx)(S.Z,{colSpan:4,align:"center",children:"No test cases added yet."})}):l.map((e,t)=>{var n;return(0,a.jsxs)(T.Z,{sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)",cursor:"pointer"}},onClick:()=>{p(t),h(!0)},children:[(0,a.jsx)(S.Z,{children:(0,a.jsx)(s.Z,{variant:"body2",children:e.description||"Test Case #".concat(t+1)})}),(0,a.jsxs)(S.Z,{children:[(null===(n=e.assert)||void 0===n?void 0:n.length)||0," assertions"]}),(0,a.jsx)(S.Z,{children:Object.entries(e.vars||{}).map(e=>{let[t,n]=e;return t+"="+n}).join(", ")}),(0,a.jsxs)(S.Z,{align:"right",sx:{minWidth:150},children:[(0,a.jsx)(E.Z,{onClick:()=>{p(t),h(!0)},size:"small",children:(0,a.jsx)(R.Z,{})}),(0,a.jsx)(E.Z,{onClick:e=>m(e,t),size:"small",children:(0,a.jsx)(z.Z,{})}),(0,a.jsx)(E.Z,{onClick:e=>x(e,t),size:"small",children:(0,a.jsx)(W.Z,{})})]})]},t)})})]})}),(0,a.jsx)(Y,{open:u,onAdd:(e,t)=>{if(null===d)o([...l,e]);else{let t=l.map((t,n)=>n===d?e:t);o(t),p(null)}t&&h(!1)},varsList:t,initialValues:null!==d?l[d]:void 0,onCancel:()=>{p(null),h(!1)}})]})},X=n(7827),G=e=>{let{onChange:t,...n}=e,[r,l]=i.useState(""),[s,o]=i.useState(!1);return(0,a.jsx)(C.Z,{...n,error:s,helperText:s?"Invalid JSON":"",value:r,onChange:e=>{let n=e.target.value;try{let e=JSON.parse(n);l(n),o(!1),t&&t(e)}catch(e){l(n),o(!0)}}})},H=e=>{let{open:t,providerId:n,config:l,onClose:s,onSave:c}=e,[h,m]=i.useState(l);return i.useEffect(()=>{m(l)},[l]),(0,a.jsxs)(d.Z,{open:t,onClose:s,fullWidth:!0,maxWidth:"md",children:[(0,a.jsxs)(x.Z,{children:["Edit ",n.length>50?n.slice(0,50)+"...":n]}),(0,a.jsx)(u.Z,{children:Object.keys(h).map(e=>{let t;let n=h[e];return"number"==typeof n||"boolean"==typeof n||"string"==typeof n?(t="number"==typeof n?t=>m({...h,[e]:parseFloat(t.target.value)}):"boolean"==typeof n?t=>m({...h,[e]:"true"===t.target.value}):t=>{let n=t.target.value.trim();if(n.startsWith("{")||n.startsWith("["))try{m({...h,[e]:JSON.parse(n)})}catch(t){m({...h,[e]:n})}else"null"===n?m({...h,[e]:null}):"undefined"===n?m({...h,[e]:void 0}):m({...h,[e]:n})},(0,a.jsx)(o.Z,{my:2,children:(0,a.jsx)(C.Z,{label:e,value:n,onChange:t,fullWidth:!0,InputLabelProps:{shrink:!0},type:"number"==typeof n?"number":"text"})},e)):(0,a.jsx)(o.Z,{my:2,children:(0,a.jsx)(G,{label:e,defaultValue:JSON.stringify(n),onChange:t=>{m({...h,[e]:t})},fullWidth:!0,multiline:!0,minRows:2,InputLabelProps:{shrink:!0}})},e)})}),(0,a.jsxs)(p.Z,{children:[(0,a.jsx)(r.Z,{onClick:s,children:"Cancel"}),(0,a.jsx)(r.Z,{onClick:()=>{c(h)},children:"Save"})]})]})};let M=[].concat(["replicate:replicate/flan-t5-small:69716ad8c34274043bf4a135b7315c7c569ec931d8f23d6826e249e1c142a264"].map(e=>({id:e,config:{temperature:.5,max_length:1024,repetition_penality:1}}))).concat(["replicate:replicate/codellama-7b-instruct:0103579e86fc75ba0d65912890fa19ef03c84a68554635319accf2e0ba93d3ae","replicate:replicate/codellama-13b-instruct:da5676342de1a5a335b848383af297f592b816b950a43d251a0a9edd0113604b","replicate:replicate/llama-2-70b-chat:2796ee9483c3fd7aa2e171d38f4ca12251a30609463dcfd4cd76703f22e96cdf"].map(e=>({id:e,config:{system_prompt:"",temperature:.75,top_p:.9,top_k:50,max_new_tokens:128,min_new_tokens:-1}}))).concat(["replicate:replicate/codellama-7b:6880b103613a9cd23950c5fd6c140197e519905bd0dd00e448c4858bdd06090a","replicate:replicate/codellama-13b-python:09b87c02dfa403e0c3289166dece62286b3bce49bae39a9c9204713cf94b8b7d","replicate:replicate/codellama-13b:1c914d844307b0588599b8393480a3ba917b660c7e9dfae681542b5325f228db","replicate:replicate/codellama-34b-python:9048743d22a7b19cd0abb018066809ea6af4f2b4717bef9aad3c5ae21ceac00d","replicate:replicate/codellama-34b:0666717e5ead8557dff55ee8f11924b5c0309f5f1ca52f64bb8eec405fdb38a7"].map(e=>({id:e,config:{temperature:.75,top_p:.9,top_k:50,max_new_tokens:128,min_new_tokens:-1}}))).concat(["replicate:a16z-infra/llama-2-7b-chat:7b0bfc9aff140d5b75bacbed23e91fd3c34b01a1e958d32132de6e0a19796e2c","replicate:a16z-infra/llama-2-13b-chat:2a7f981751ec7fdf87b5b91ad4db53683a98082e9ff7bfd12c8cd5ea85980a52"].map(e=>({id:e,config:{temperature:.95,top_p:.95,top_k:250,max_new_tokens:500,min_new_tokens:-1,repetition_penality:1,system_prompt:""}}))).concat(["replicate:mistralai/mistral-7b-v0.1","replicate:mistralai/mistral-7b-instruct-v0.2","replicate:mistralai/mixtral-8x7b-instruct-v0.1"].map(e=>({id:e,config:{temperature:.7,top_p:.9,top_k:-1,max_new_tokens:128,min_new_tokens:-1,repetition_penality:1.15,prompt_template:"{prompt}"}}))).concat(["anthropic:claude-1","anthropic:claude-1-100k","anthropic:claude-instant-1","anthropic:claude-instant-1-100k"].map(e=>({id:e,config:{max_tokens_to_sample:256,temperature:.5}}))).concat(["anthropic:messages:claude-instant-1.2","anthropic:messages:claude-2.0","anthropic:messages:claude-2.1","anthropic:messages:claude-3-haiku-20240307","anthropic:messages:claude-3-sonnet-20240229","anthropic:messages:claude-3-opus-20240229"].map(e=>({id:e,config:{max_tokens:1024,temperature:.5}}))).concat(["bedrock:anthropic.claude-instant-v1","bedrock:anthropic.claude-v1","bedrock:anthropic.claude-v2"].map(e=>({id:e,config:{max_tokens_to_sample:256,temperature:.5}}))).concat(["openai:gpt-3.5-turbo","openai:gpt-3.5-turbo-0301","openai:gpt-3.5-turbo-0613","openai:gpt-3.5-turbo-16k","openai:gpt-3.5-turbo-16k-0613","openai:gpt-4","openai:gpt-4-0314","openai:gpt-4-0613","openai:gpt-4-32k","openai:gpt-4-32k-0314"].map(e=>({id:e,config:{organization:"",temperature:.5,max_tokens:1024,top_p:1,frequency_penalty:0,presence_penalty:0,function_call:void 0,functions:void 0,stop:void 0}}))).concat(["azureopenai:gpt-3.5-turbo","azureopenai:gpt-3.5-turbo-0301","azureopenai:gpt-3.5-turbo-0613","azureopenai:gpt-3.5-turbo-16k","azureopenai:gpt-3.5-turbo-16k-0613","azureopenai:gpt-4","azureopenai:gpt-4-0314","azureopenai:gpt-4-0613","azureopenai:gpt-4-32k","azureopenai:gpt-4-32k-0314"].map(e=>({id:e,config:{temperature:.5,max_tokens:1024,top_p:1,frequency_penalty:0,presence_penalty:0,function_call:void 0,functions:void 0,stop:void 0}}))).concat(["vertex:chat-bison@001","vertex:chat-bison","vertex:chat-bison-32k","vertex:chat-bison-32k@001"].map(e=>({id:e,config:{context:void 0,examples:void 0,temperature:0,maxOutputTokens:1024,topP:.95,topK:40,safetySettings:void 0,stopSequence:void 0}}))).sort((e,t)=>e.id.localeCompare(t.id)),$={anthropic:"Anthropic",bedrock:"Amazon Web Services",azureopenai:"Azure",openai:"OpenAI",replicate:"Replicate"};var Q=e=>{let{providers:t,onChange:n}=e,[r,l]=i.useState(null),s=e=>"string"==typeof e?e:e.id||"Unknown provider",c=(e,t)=>"string"==typeof e?e:e.id||t,d=e=>{"string"==typeof e?alert("Cannot edit custom providers"):e.config?l(e):alert("There is no config for this provider")};return(0,a.jsxs)(o.Z,{mt:2,children:[(0,a.jsx)(B.Z,{multiple:!0,freeSolo:!0,options:M,value:t,groupBy:e=>(function(e){if(!e)return"Other";let t=e.split(":")[0];return $[t]||t})(e.id),onChange:(e,t)=>{n(t.map(e=>"string"==typeof e?{id:e}:e))},getOptionLabel:e=>{if(!e)return"";let t="";"string"==typeof e&&(t=e),e.id&&"string"==typeof e.id&&(t=e.id);let n=t.split(":");return n.length>1?n.length>2&&"anthropic"===n[0]?n[2]:n[1]:"Unknown provider"},renderTags:(e,t)=>e.map((e,n)=>{let a=s(e),r=c(e,n);return(0,i.createElement)(X.Z,{variant:"outlined",label:a,...t({index:n}),key:r,onClick:()=>d(e)})}),renderInput:e=>(0,a.jsx)(C.Z,{...e,variant:"outlined",placeholder:"Select LLM providers",helperText:t.length>0?"Click a provider to configure its settings.":null})}),r&&r.id&&(0,a.jsx)(H,{open:!!r,providerId:r.id,config:r.config,onClose:()=>l(null),onSave:e=>{if(r){let a=t.map(t=>t.id===r.id?{...t,config:e}:t);n(a),l(null)}}})]})},ee=n(2666),et=n.n(ee),en=n(4759);n(5341),n(7555);var ea=n(8339),ei=n(9963),er=n(1396),el=n.n(er);n(695);var es=()=>{let{env:e,setEnv:t,description:n,setDescription:l,providers:c,setProviders:d,prompts:p,setPrompts:u,testCases:h,setTestCases:x,defaultTest:m,setDefaultTest:f,evaluateOptions:g,setEvaluateOptions:v}=(0,j.o)(),[Z,b]=i.useState(""),[y,_]=i.useState(!0);i.useEffect(()=>{b(ea.default.dump({env:e,description:n,providers:c,prompts:p,tests:h,defaultTest:m,evaluateOptions:g}))},[e,n,c,p,h,m,g]);let C=e=>{t(e.env||{}),l(e.description||""),d(e.providers||[]),u(e.prompts||[]),x(e.tests||[]),f(e.defaultTest||{}),v(e.evaluateOptions||{})};return(0,a.jsxs)(o.Z,{mt:4,children:[(0,a.jsx)(s.Z,{variant:"h5",gutterBottom:!0,children:"Configuration"}),(0,a.jsxs)(s.Z,{variant:"body1",gutterBottom:!0,children:["This is the YAML config that defines the evaluation and is processed by promptfoo. See"," ",(0,a.jsx)(el(),{target:"_blank",href:"https://promptfoo.dev/docs/configuration/guide",children:"configuration docs"})," ","to learn more."]}),(0,a.jsx)(r.Z,{variant:"text",color:"primary",startIcon:y?(0,a.jsx)(R.Z,{}):(0,a.jsx)(ei.Z,{}),onClick:()=>{if(!y)try{let e=ea.default.load(Z,{json:!0});C(e)}catch(e){}_(!y)},children:y?"Edit YAML":"Save"}),(0,a.jsx)(et(),{autoCapitalize:"off",value:Z,onValueChange:e=>{y||b(e)},highlight:e=>(0,en.highlight)(e,en.languages.yaml),padding:10,style:{fontFamily:'"Fira code", "Fira Mono", monospace',fontSize:14},disabled:y,className:y?"":"glowing-border"})]})};n(284);var eo=n(7580);function ec(e){let{error:t,resetErrorBoundary:n}=e;return(0,a.jsxs)("div",{role:"alert",children:[(0,a.jsx)("p",{children:"Something went wrong:"}),(0,a.jsx)("pre",{children:t.message}),(0,a.jsx)("button",{onClick:n,children:"Try again"})]})}var ed=()=>{let[e,t]=(0,i.useState)(!1),{description:n,setDescription:f,providers:g,setProviders:v,prompts:b,setPrompts:y,testCases:_,setTestCases:C}=(0,j.o)();if((0,i.useEffect)(()=>{j.o.persist.rehydrate()},[]),eo.env.NEXT_PUBLIC_NO_BROWSING)return null;let k=(e=>{let t=/{{(\w+)}}/g,n=new Set;return e.forEach(e=>{let a;for(;null!==(a=t.exec(e));)n.add(a[1])}),Array.from(n)})(b);return(0,a.jsxs)(l.Z,{maxWidth:"lg",sx:{marginTop:"2rem"},children:[(0,a.jsxs)(c.Z,{direction:"row",spacing:2,justifyContent:"space-between",children:[(0,a.jsx)(s.Z,{variant:"h4",children:"Set up an evaluation"}),(0,a.jsxs)(c.Z,{direction:"row",spacing:2,children:[(0,a.jsx)(Z,{}),(0,a.jsx)(A,{}),(0,a.jsx)(r.Z,{variant:"outlined",color:"primary",onClick:()=>t(!0),children:"Reset"})]})]}),(0,a.jsx)(o.Z,{mt:4}),(0,a.jsx)(o.Z,{mt:2,children:(0,a.jsx)(m.SV,{FallbackComponent:ec,onReset:()=>{v([])},children:(0,a.jsxs)(c.Z,{direction:"column",spacing:2,justifyContent:"space-between",children:[(0,a.jsx)(s.Z,{variant:"h5",children:"Providers"}),(0,a.jsx)(Q,{providers:g,onChange:v})]})})}),(0,a.jsx)(o.Z,{mt:4}),(0,a.jsx)(m.SV,{FallbackComponent:ec,onReset:()=>{y([])},children:(0,a.jsx)(F,{})}),(0,a.jsx)(o.Z,{mt:6}),(0,a.jsx)(m.SV,{FallbackComponent:ec,onReset:()=>{C([])},children:(0,a.jsx)(J,{varsList:k})}),(0,a.jsx)(es,{}),(0,a.jsxs)(d.Z,{open:e,onClose:()=>t(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,a.jsx)(x.Z,{id:"alert-dialog-title",children:"Confirm Reset"}),(0,a.jsx)(u.Z,{children:(0,a.jsx)(h.Z,{id:"alert-dialog-description",children:"Are you sure you want to reset all the fields? This action cannot be undone."})}),(0,a.jsxs)(p.Z,{children:[(0,a.jsx)(r.Z,{onClick:()=>t(!1),children:"Cancel"}),(0,a.jsx)(r.Z,{onClick:()=>{f(""),v([]),y([]),C([]),t(!1)},autoFocus:!0,children:"Reset"})]})]})]})}},279:function(e,t,n){"use strict";n.d(t,{Ox:function(){return r},T8:function(){return i},eA:function(){return l}});var a=n(7580);let i=!a.env.NEXT_PUBLIC_PROMPTFOO_BUILD_STANDALONE_SERVER,r=!!a.env.NEXT_PUBLIC_PROMPTFOO_USE_SUPABASE,l=""},1938:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var a=n(4660),i=n(4810);let r=(0,a.Ue)()((0,i.tJ)((e,t)=>({env:{},testCases:[],description:"",providers:[],prompts:[],defaultTest:{},evaluateOptions:{},setEnv:t=>e({env:t}),setTestCases:t=>e({testCases:t}),setDescription:t=>e({description:t}),setProviders:t=>e({providers:t}),setPrompts:t=>e({prompts:t}),setDefaultTest:t=>e({defaultTest:t}),setEvaluateOptions:t=>e({evaluateOptions:t}),setStateFromConfig:t=>{let n={};t.description&&(n.description=t.description||""),t.tests&&(n.testCases=t.tests),t.providers&&(n.providers=t.providers),t.prompts&&("string"==typeof t.prompts?n.prompts=[t.prompts]:Array.isArray(t.prompts)?n.prompts=t.prompts.filter(e=>!e.endsWith(".txt")&&!e.endsWith(".json")&&!e.endsWith(".yaml")):console.warn("Invalid prompts config",t.prompts)),e(n)},getTestSuite:()=>{let{description:e,testCases:n,providers:a,prompts:i,env:r}=t();return{env:r,description:e,providers:a,prompts:i,tests:n}}}),{name:"promptfoo",skipHydration:!0}))},2280:function(){},695:function(){},284:function(){},5320:function(e,t){"use strict";t.It=void 0,t.It=function(e){let t,n;let a={},i=[],r={};for(let[l,s]of Object.entries(e))l.startsWith("__expected")?""!==s.trim()&&i.push(function(e){if(e.startsWith("javascript:")||e.startsWith("fn:")||e.startsWith("eval:")){let t;e.startsWith("javascript:")&&(t=11),e.startsWith("fn:")&&(t=3),e.startsWith("eval:")&&(t=5);let n=e.slice(t).trim();return{type:"javascript",value:n}}if(e.startsWith("grade:")||e.startsWith("llm-rubric:"))return{type:"llm-rubric",value:e.slice(6)};if(e.startsWith("python:")){let t=e.slice(7).trim();return{type:"python",value:t}}let t=e.match(/^(not-)?(equals|contains-any|contains-all|icontains-any|icontains-all|contains-json|is-json|regex|icontains|contains|webhook|rouge-n|similar|starts-with|levenshtein|classifier|model-graded-factuality|factuality|model-graded-closedqa|answer-relevance|context-recall|context-relevance|context-faithfulness|is-valid-openai-function-call|is-valid-openai-tools-call|latency|perplexity|perplexity-score|cost)(?:\((\d+(?:\.\d+)?)\))?(?::([\s\S]*))?$/);if(t){let[e,n,a,i,r]=t,l=n?`not-${a}`:a,s=parseFloat(i);return"contains-any"===a||"contains-all"===a||"icontains-any"===a||"icontains-all"===a?{type:l,value:r.split(",").map(e=>e.trim())}:"contains-json"===a||"is-json"===a?{type:l,value:r}:"rouge-n"===a||"similar"===a||"starts-with"===a||"levenshtein"===a||"classifier"===a||"answer-relevance"===a||"context-recall"===a||"context-relevance"===a||"context-faithfulness"===a||"latency"===a||"perplexity"===a||"perplexity-score"===a||"cost"===a?{type:l,value:r,threshold:s||("similar"===a?.8:.75)}:{type:l,value:r}}return{type:"equals",value:e}}(s)):"__prefix"===l?r.prefix=s:"__suffix"===l?r.suffix=s:"__description"===l?n=s:"__providerOutput"===l?t=s:a[l]=s;return{vars:a,...t?{providerOutput:t}:{},assert:i,options:r,...n?{description:n}:{}}}}},function(e){e.O(0,[547,602,72,975,414,113,261,339,921,946,971,596,744],function(){return e(e.s=3515)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- !function(){"use strict";var e,t,n,r,o,u,i,c,f,a={},l={};function s(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}},r=!0;try{a[e].call(n.exports,n,n.exports,s),r=!1}finally{r&&delete l[e]}return n.exports}s.m=a,e=[],s.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u<e.length;u++){for(var n=e[u][0],r=e[u][1],o=e[u][2],c=!0,f=0;f<n.length;f++)i>=o&&Object.keys(s.O).every(function(e){return s.O[e](n[f])})?n.splice(f--,1):(c=!1,o<i&&(i=o));if(c){e.splice(u--,1);var a=r();void 0!==a&&(t=a)}}return t},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},s.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);s.r(o);var u={};t=t||[null,n({}),n([]),n(n)];for(var i=2&r&&e;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach(function(t){u[t]=function(){return e[t]}});return u.default=function(){return e},s.d(o,u),o},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce(function(t,n){return s.f[n](e,t),t},[]))},s.u=function(e){return 133===e?"static/chunks/133-1318f46ed801a49d.js":"static/chunks/"+e+".b293c6bd1040dbd7.js"},s.miniCssF=function(e){return"static/css/"+({11:"635638c73d973eb7",185:"51a17e8edcdfdbb2",413:"16c1dd82fc87c9d7",421:"dded26353bff8496",466:"48d388184a2f4ce3",931:"8119d8bd13a8adab"})[e]+".css"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",s.l=function(e,t,n,u){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var i,c,f=document.getElementsByTagName("script"),a=0;a<f.length;a++){var l=f[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){i=l;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack",o+n),i.src=s.tu(e)),r[e]=[t];var d=function(t,n){i.onerror=i.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),c&&document.head.appendChild(i)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.tt=function(){return void 0===u&&(u={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(u=trustedTypes.createPolicy("nextjs#bundler",u))),u},s.tu=function(e){return s.tt().createScriptURL(e)},s.p="/_next/",i={272:0},s.f.j=function(e,t){var n=s.o(i,e)?i[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(272!=e){var r=new Promise(function(t,r){n=i[e]=[t,r]});t.push(n[2]=r);var o=s.p+s.u(e),u=Error();s.l(o,function(t){if(s.o(i,e)&&(0!==(n=i[e])&&(i[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",u.name="ChunkLoadError",u.type=r,u.request=o,n[1](u)}},"chunk-"+e,e)}else i[e]=0}},s.O.j=function(e){return 0===i[e]},c=function(e,t){var n,r,o=t[0],u=t[1],c=t[2],f=0;if(o.some(function(e){return 0!==i[e]})){for(n in u)s.o(u,n)&&(s.m[n]=u[n]);if(c)var a=c(s)}for(e&&e(t);f<o.length;f++)r=o[f],s.o(i,r)&&i[r]&&i[r][0](),i[r]=0;return s.O(a)},(f=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),f.push=c.bind(null,f.push.bind(f))}();
@@ -1 +0,0 @@
1
- .custom-metric-container{display:inline-flex;flex-wrap:wrap;gap:.25rem;font-weight:400}.custom-metric-container>span{padding:.25rem .5rem;border-radius:4px;color:var(--text-color);border:1px solid var(--border-color);margin-right:.25rem}pre{white-space:pre-wrap}.font-bold{font-weight:700}.divTable,table.results-table{border:1px solid var(--table-border-color);border-collapse:collapse;width:100%;margin:1rem 0;box-shadow:0 2px 4px rgba(0,0,0,.1)}.results-table ins{background-color:var(--insert-highlight-color);text-decoration:none}.results-table del{background-color:var(--delete-highlight-color);-webkit-text-decoration:strikethrough;text-decoration:strikethrough}.tr{display:flex}.results-table tr,.tr{width:-moz-fit-content;width:fit-content}.results-table tr:hover,.tr:hover{background-color:rgba(0,0,0,.02)}.results-table td,.results-table th,.td,.th{position:relative;box-shadow:inset 0 0 0 1px var(--border-color);vertical-align:top;padding:1rem}.compact .td,.compact .th,.compact.results-table td,.compact.results-table th{padding:.5rem}.results-table td.variable,.results-table th.variable,.td.variable,.th.variable{background-color:var(--variable-background-color)}.results-table tr.header{background-color:var(--header-background-color)}.results-table th,.th{padding:1rem;position:relative;vertical-align:bottom;text-align:left;white-space:pre-wrap;font-weight:400}.results-table th .action{cursor:pointer;margin-left:.5rem}.results-table th .action svg{vertical-align:middle}.results-table td,.results-table th{height:1px}@-moz-document url-prefix(){.results-table td,.results-table th{height:100%}}.firefox-fix{display:table;height:100%}.results-table tr .cell{display:flex;flex-direction:column;white-space:pre-wrap;height:100%}.results-table tr .cell img{max-width:256px;max-height:256px;cursor:pointer}.compact.results-table tr .cell>*,.results-table tr .variable>*{display:inline}.results-table tr .cell .prompt{background-color:var(--variable-background-color);padding:1rem;font-family:Courier New,Courier,monospace;font-size:.8rem}.results-table tr .cell .prompt,.results-table tr .cell .prompt .pill{border:1px solid var(--border-color);border-radius:4px;margin-bottom:.5rem}.results-table tr .cell .prompt .pill{display:block;background-color:var(--neutral-background-color);padding:.25rem;width:-moz-fit-content;width:fit-content}.results-table tr .cell-actions{display:flex;gap:.5rem;visibility:hidden;position:absolute;top:1.25rem;right:.75rem;line-height:0;font-size:1.25rem}.results-table tr:hover .cell-actions{visibility:visible}.results-table tr .cell-detail{display:flex;flex-wrap:wrap;column-gap:.5rem;row-gap:.25rem;padding-top:1rem;margin-top:auto}.results-table tr .stat-item{font-weight:400;font-size:.75rem;color:#888}.results-table tr .cell-actions .action{cursor:pointer}.results-table th .output-header{display:flex;flex-direction:column;height:100%;align-items:flex-start}.results-table th .output-header .pills{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;margin-bottom:.5rem}.results-table th .prompt-container{font-weight:700;margin-bottom:.5rem}.results-table th .prompt-container>*{display:inline}.results-table th .provider{display:inline-block;padding:.25rem .5rem;background-color:var(--neutral-background-color);border:1px solid var(--border-color);border-radius:4px;margin-right:.25rem}.results-table th .summary{font-weight:400}.results-table th .prompt-detail{display:flex;flex-wrap:wrap;column-gap:.5rem;row-gap:.25rem;font-size:.75rem;color:#888;margin-top:auto}.results-table th .summary .highlight{padding:.25rem .5rem;border-radius:4px;background-color:var(--fail-background-color);border:1px solid var(--border-color)}.results-table th .summary .highlight.success{background-color:var(--success-background-color);border:1px solid var(--pass-color)}.results-table .status{font-weight:700;margin-bottom:.5rem}.results-table .status .pill{display:inline-block;padding:.25rem .5rem;border-radius:4px;margin-right:.25rem}.results-table .pass .pill{background-color:var(--success-background-color);color:var(--pass-color);border:1px solid var(--pass-color)}.results-table .fail .pill{border:1px solid var(--fail-color)}.fail-reason,.results-table .fail{color:var(--fail-color)}.fail-reason{font-weight:700}.compact .fail-reason{display:inline}.results-table .fail .pill{background-color:var(--fail-background-color)}.results-table td .score{font-weight:400}.results-table .comment{margin-top:.5rem;padding:.25rem .5rem;border-radius:4px;background-color:var(--neutral-background-color);font-style:italic;cursor:pointer}.first-prompt-col{border-left:2px solid #888}.first-prompt-row{border-top:2px solid #888}.search-highlight{color:var(--search-text-color);background-color:var(--search-highlight-color)}.results-table tr .cell .lightbox{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;z-index:1000}.results-table tr .cell .lightbox img{max-width:90%;max-height:90%}.resizer{position:absolute;right:0;top:0;height:100%;width:5px;cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none;background:var(--text-color);opacity:.5}.resizer.isResizing{background:var(--text-color);opacity:1}@media (hover:hover){.resizer{opacity:0}:hover>.resizer{opacity:1}}.description{cursor:pointer;transition:background-color .3s ease}.description:hover{background-color:#f0f0f0}.description-filepath{color:#bbb;font-size:.75rem}body{background-color:var(--background-color);color:var(--text-color)}.notice{display:flex;flex-direction:column;gap:1.5rem;justify-content:center;align-items:center;height:9rem}
@@ -1 +0,0 @@
1
- .custom-metric-container{display:inline-flex;flex-wrap:wrap;gap:.25rem;font-weight:400}.custom-metric-container>span{padding:.25rem .5rem;border-radius:4px;color:var(--text-color);border:1px solid var(--border-color);margin-right:.25rem}pre{white-space:pre-wrap}.font-bold{font-weight:700}.divTable,table.results-table{border:1px solid var(--table-border-color);border-collapse:collapse;width:100%;margin:1rem 0;box-shadow:0 2px 4px rgba(0,0,0,.1)}.results-table ins{background-color:var(--insert-highlight-color);text-decoration:none}.results-table del{background-color:var(--delete-highlight-color);-webkit-text-decoration:strikethrough;text-decoration:strikethrough}.tr{display:flex}.results-table tr,.tr{width:-moz-fit-content;width:fit-content}.results-table tr:hover,.tr:hover{background-color:rgba(0,0,0,.02)}.results-table td,.results-table th,.td,.th{position:relative;box-shadow:inset 0 0 0 1px var(--border-color);vertical-align:top;padding:1rem}.compact .td,.compact .th,.compact.results-table td,.compact.results-table th{padding:.5rem}.results-table td.variable,.results-table th.variable,.td.variable,.th.variable{background-color:var(--variable-background-color)}.results-table tr.header{background-color:var(--header-background-color)}.results-table th,.th{padding:1rem;position:relative;vertical-align:bottom;text-align:left;white-space:pre-wrap;font-weight:400}.results-table th .action{cursor:pointer;margin-left:.5rem}.results-table th .action svg{vertical-align:middle}.results-table td,.results-table th{height:1px}@-moz-document url-prefix(){.results-table td,.results-table th{height:100%}}.firefox-fix{display:table;height:100%}.results-table tr .cell{display:flex;flex-direction:column;white-space:pre-wrap;height:100%}.results-table tr .cell img{max-width:256px;max-height:256px;cursor:pointer}.compact.results-table tr .cell>*,.results-table tr .variable>*{display:inline}.results-table tr .cell .prompt{background-color:var(--variable-background-color);padding:1rem;font-family:Courier New,Courier,monospace;font-size:.8rem}.results-table tr .cell .prompt,.results-table tr .cell .prompt .pill{border:1px solid var(--border-color);border-radius:4px;margin-bottom:.5rem}.results-table tr .cell .prompt .pill{display:block;background-color:var(--neutral-background-color);padding:.25rem;width:-moz-fit-content;width:fit-content}.results-table tr .cell-actions{display:flex;gap:.5rem;visibility:hidden;position:absolute;top:1.25rem;right:.75rem;line-height:0;font-size:1.25rem}.results-table tr:hover .cell-actions{visibility:visible}.results-table tr .cell-detail{display:flex;flex-wrap:wrap;column-gap:.5rem;row-gap:.25rem;padding-top:1rem;margin-top:auto}.results-table tr .stat-item{font-weight:400;font-size:.75rem;color:#888}.results-table tr .cell-actions .action{cursor:pointer}.results-table th .output-header{display:flex;flex-direction:column;height:100%;align-items:flex-start}.results-table th .output-header .pills{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center;margin-bottom:.5rem}.results-table th .prompt-container{font-weight:700;margin-bottom:.5rem}.results-table th .prompt-container>*{display:inline}.results-table th .provider{display:inline-block;padding:.25rem .5rem;background-color:var(--neutral-background-color);border:1px solid var(--border-color);border-radius:4px;margin-right:.25rem}.results-table th .summary{font-weight:400}.results-table th .prompt-detail{display:flex;flex-wrap:wrap;column-gap:.5rem;row-gap:.25rem;font-size:.75rem;color:#888;margin-top:auto}.results-table th .summary .highlight{padding:.25rem .5rem;border-radius:4px;background-color:var(--fail-background-color);border:1px solid var(--border-color)}.results-table th .summary .highlight.success{background-color:var(--success-background-color);border:1px solid var(--pass-color)}.results-table .status{font-weight:700;margin-bottom:.5rem}.results-table .status .pill{display:inline-block;padding:.25rem .5rem;border-radius:4px;margin-right:.25rem}.results-table .pass .pill{background-color:var(--success-background-color);color:var(--pass-color);border:1px solid var(--pass-color)}.results-table .fail .pill{border:1px solid var(--fail-color)}.fail-reason,.results-table .fail{color:var(--fail-color)}.fail-reason{font-weight:700}.compact .fail-reason{display:inline}.results-table .fail .pill{background-color:var(--fail-background-color)}.results-table td .score{font-weight:400}.results-table .comment{margin-top:.5rem;padding:.25rem .5rem;border-radius:4px;background-color:var(--neutral-background-color);font-style:italic;cursor:pointer}.first-prompt-col{border-left:2px solid #888}.first-prompt-row{border-top:2px solid #888}.search-highlight{color:var(--search-text-color);background-color:var(--search-highlight-color)}.results-table tr .cell .lightbox{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;z-index:1000}.results-table tr .cell .lightbox img{max-width:90%;max-height:90%}.resizer{position:absolute;right:0;top:0;height:100%;width:5px;cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none;background:var(--text-color);opacity:.5}.resizer.isResizing{background:var(--text-color);opacity:1}@media (hover:hover){.resizer{opacity:0}:hover>.resizer{opacity:1}}.description{cursor:pointer;transition:background-color .3s ease}.description:hover{background-color:#f0f0f0}.description-filepath{color:#bbb;font-size:.75rem}body{background-color:var(--background-color);color:var(--text-color)}.error,.notice{display:flex;flex-direction:column;gap:1.5rem;justify-content:center;align-items:center;height:9rem}.error{font-size:1.5rem}