promptfoo 0.36.0 → 0.37.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 (53) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/constants.d.ts +3 -0
  3. package/dist/src/constants.d.ts.map +1 -0
  4. package/dist/src/constants.js +12 -0
  5. package/dist/src/constants.js.map +1 -0
  6. package/dist/src/feedback.d.ts.map +1 -1
  7. package/dist/src/feedback.js +2 -1
  8. package/dist/src/feedback.js.map +1 -1
  9. package/dist/src/index.js +1 -1
  10. package/dist/src/index.js.map +1 -1
  11. package/dist/src/main.js +3 -0
  12. package/dist/src/main.js.map +1 -1
  13. package/dist/src/share.d.ts.map +1 -1
  14. package/dist/src/share.js +5 -2
  15. package/dist/src/share.js.map +1 -1
  16. package/dist/src/types.d.ts +4 -1
  17. package/dist/src/types.d.ts.map +1 -1
  18. package/dist/src/util.d.ts +3 -1
  19. package/dist/src/util.d.ts.map +1 -1
  20. package/dist/src/util.js +5 -0
  21. package/dist/src/util.js.map +1 -1
  22. package/dist/src/web/nextui/404/index.html +1 -1
  23. package/dist/src/web/nextui/404.html +1 -1
  24. package/dist/src/web/nextui/_next/static/chunks/{376-a39927cc33e4fa4c.js → 376-1c0d6e6983c73fe2.js} +1 -1
  25. package/dist/src/web/nextui/_next/static/chunks/782-04f667f750859e43.js +37 -0
  26. package/dist/src/web/nextui/_next/static/chunks/952-41ca99945f156cbf.js +1 -0
  27. package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/{page-31f37cd3cd40fad2.js → page-8875bf3354bef591.js} +1 -1
  28. package/dist/src/web/nextui/_next/static/chunks/app/eval/page-5a7e2b8bc8f37780.js +1 -0
  29. package/dist/src/web/nextui/_next/static/chunks/app/setup/page-6b4f7c854be99fc9.js +1 -0
  30. package/dist/src/web/nextui/_next/static/chunks/{main-b81070c77c77982d.js → main-8674b1b080b54762.js} +1 -1
  31. package/dist/src/web/nextui/auth/login/index.html +1 -1
  32. package/dist/src/web/nextui/auth/login/index.txt +1 -1
  33. package/dist/src/web/nextui/auth/signup/index.html +1 -1
  34. package/dist/src/web/nextui/auth/signup/index.txt +1 -1
  35. package/dist/src/web/nextui/datasets/index.html +1 -1
  36. package/dist/src/web/nextui/datasets/index.txt +1 -1
  37. package/dist/src/web/nextui/eval/index.html +1 -1
  38. package/dist/src/web/nextui/eval/index.txt +2 -2
  39. package/dist/src/web/nextui/index.html +1 -1
  40. package/dist/src/web/nextui/index.txt +1 -1
  41. package/dist/src/web/nextui/prompts/index.html +1 -1
  42. package/dist/src/web/nextui/prompts/index.txt +1 -1
  43. package/dist/src/web/nextui/setup/index.html +1 -1
  44. package/dist/src/web/nextui/setup/index.txt +2 -2
  45. package/dist/src/web/server.js +3 -3
  46. package/dist/src/web/server.js.map +1 -1
  47. package/package.json +1 -1
  48. package/dist/src/web/nextui/_next/static/chunks/594-fae8e0fd93fa0735.js +0 -1
  49. package/dist/src/web/nextui/_next/static/chunks/925-d1c3b2630b82f931.js +0 -37
  50. package/dist/src/web/nextui/_next/static/chunks/app/eval/page-686f14777c76b6ea.js +0 -1
  51. package/dist/src/web/nextui/_next/static/chunks/app/setup/page-af09a6c20748a4ee.js +0 -1
  52. /package/dist/src/web/nextui/_next/static/{ud4HTHmQmUNqsq4ojHyoU → mxkRaSA6iUTYeSCbLQn--}/_buildManifest.js +0 -0
  53. /package/dist/src/web/nextui/_next/static/{ud4HTHmQmUNqsq4ojHyoU → mxkRaSA6iUTYeSCbLQn--}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><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="preload" as="style" href="/_next/static/css/83c296e124c7293a.css"/><link rel="preload" href="/_next/static/chunks/webpack-e7aa396ee7944e48.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><script src="/_next/static/chunks/webpack-e7aa396ee7944e48.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/83c296e124c7293a.css\",{\"as\":\"style\"}]\n0:\"$L8\"\n"])</script><script>self.__next_f.push([1,"9:I{\"id\":7948,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\nb:I{\"id\":6628,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"\",\"async\":false}\nc:I{\"id\":2112,\"chunks\":[\"293:static/chunks/293-fa7b9b02f62ab5d8.js\",\"548:static/chunks/548-ffb8dd99ad3940cb.js\",\"82:static/"])</script><script>self.__next_f.push([1,"chunks/82-ca0360e473d81167.js\",\"756:static/chunks/756-93541769f62c0652.js\",\"445:static/chunks/445-3ef592231331d9ed.js\",\"185:static/chunks/app/layout-492760d669ed6dd7.js\"],\"name\":\"PageShell\",\"async\":false}\nd:I{\"id\":7767,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\ne:I{\"id\":7920,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c9"])</script><script>self.__next_f.push([1,"4c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\n10:I{\"id\":176,\"chunks\":[\"293:static/chunks/293-fa7b9b02f62ab5d8.js\",\"808:static/chunks/808-b64f39fb5aa81c36.js\",\"420:static/chunks/420-c4133cd89d8c5e4b.js\",\"21:static/chunks/21-b6c126c8ac7d9c5e.js\",\"794:static/chunks/app/prompts/page-0bf3409d6a6bfa22.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"8:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/83c296e124c7293a.css\",\"precedence\":\"next\"}]],[\"$\",\"$L9\",null,{\"buildId\":\"ud4HTHmQmUNqsq4ojHyoU\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/prompts/\",\"initialTree\":[\"\",{\"children\":[\"prompts\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialHead\":\"$La\",\"globalErrorComponent\":\"$b\",\"children\":[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_1a3fe4\",\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$Le\",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\":[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"prompts\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$Lf\",[\"$\",\"div\",null,{\"children\":[\"$\",\"$L10\",null,{}]}],null],\"segment\":\"__PAGE__\"},\"styles\":[]}],\"segment\":\"prompts\"},\"styles\":[]}]}]}]}],null]}]]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"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,"f:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><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="preload" as="style" href="/_next/static/css/83c296e124c7293a.css"/><link rel="preload" href="/_next/static/chunks/webpack-e7aa396ee7944e48.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><script src="/_next/static/chunks/webpack-e7aa396ee7944e48.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/83c296e124c7293a.css\",{\"as\":\"style\"}]\n0:\"$L8\"\n"])</script><script>self.__next_f.push([1,"9:I{\"id\":7948,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\nb:I{\"id\":6628,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"\",\"async\":false}\nc:I{\"id\":2112,\"chunks\":[\"293:static/chunks/293-fa7b9b02f62ab5d8.js\",\"548:static/chunks/548-ffb8dd99ad3940cb.js\",\"82:static/"])</script><script>self.__next_f.push([1,"chunks/82-ca0360e473d81167.js\",\"756:static/chunks/756-93541769f62c0652.js\",\"445:static/chunks/445-3ef592231331d9ed.js\",\"185:static/chunks/app/layout-492760d669ed6dd7.js\"],\"name\":\"PageShell\",\"async\":false}\nd:I{\"id\":7767,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\ne:I{\"id\":7920,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c9"])</script><script>self.__next_f.push([1,"4c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\n10:I{\"id\":176,\"chunks\":[\"293:static/chunks/293-fa7b9b02f62ab5d8.js\",\"808:static/chunks/808-b64f39fb5aa81c36.js\",\"420:static/chunks/420-c4133cd89d8c5e4b.js\",\"21:static/chunks/21-b6c126c8ac7d9c5e.js\",\"794:static/chunks/app/prompts/page-0bf3409d6a6bfa22.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"8:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/83c296e124c7293a.css\",\"precedence\":\"next\"}]],[\"$\",\"$L9\",null,{\"buildId\":\"mxkRaSA6iUTYeSCbLQn--\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/prompts/\",\"initialTree\":[\"\",{\"children\":[\"prompts\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialHead\":\"$La\",\"globalErrorComponent\":\"$b\",\"children\":[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_1a3fe4\",\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$Le\",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\":[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"prompts\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$Lf\",[\"$\",\"div\",null,{\"children\":[\"$\",\"$L10\",null,{}]}],null],\"segment\":\"__PAGE__\"},\"styles\":[]}],\"segment\":\"prompts\"},\"styles\":[]}]}]}]}],null]}]]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"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,"f:null\n"])</script></body></html>
@@ -5,7 +5,7 @@
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/83c296e124c7293a.css",{"as":"style"}]
8
- 0:["ud4HTHmQmUNqsq4ojHyoU",[[["",{"children":["prompts",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/83c296e124c7293a.css","precedence":"next"}]],"$L9"]]]]
8
+ 0:["mxkRaSA6iUTYeSCbLQn--",[[["",{"children":["prompts",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/83c296e124c7293a.css","precedence":"next"}]],"$L9"]]]]
9
9
  a:I{"id":2112,"chunks":["293:static/chunks/293-fa7b9b02f62ab5d8.js","548:static/chunks/548-ffb8dd99ad3940cb.js","82:static/chunks/82-ca0360e473d81167.js","756:static/chunks/756-93541769f62c0652.js","445:static/chunks/445-3ef592231331d9ed.js","185:static/chunks/app/layout-492760d669ed6dd7.js"],"name":"PageShell","async":false}
10
10
  b:I{"id":7767,"chunks":["272:static/chunks/webpack-e7aa396ee7944e48.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
11
11
  c:I{"id":7920,"chunks":["272:static/chunks/webpack-e7aa396ee7944e48.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
@@ -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-e7aa396ee7944e48.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/83c296e124c7293a.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-e7aa396ee7944e48.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-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"\",\"async\":false}\nd:I{\"id\":2112,\"chunks\":[\"293:static/chunks/293-fa7b9b02f62ab5d8.js\",\"548:static/chunks/548-ffb8dd99ad3940cb.js\",\"82:static/"])</script><script>self.__next_f.push([1,"chunks/82-ca0360e473d81167.js\",\"756:static/chunks/756-93541769f62c0652.js\",\"445:static/chunks/445-3ef592231331d9ed.js\",\"185:static/chunks/app/layout-492760d669ed6dd7.js\"],\"name\":\"PageShell\",\"async\":false}\ne:I{\"id\":7767,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.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-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c9"])</script><script>self.__next_f.push([1,"4c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\n11:I{\"id\":4839,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\n12:I{\"id\":2378,\"chunks\":[\"293:static/chunks/293-fa7b9b02f62ab5d8.js\",\"808:static/chunks/808-b64f39fb5aa81c36.js\",\"548:static/chunks/548-ffb8dd99ad3940cb.js\",\"420:static/chunks/420-c4133cd89d8c5e4b.js\",\"975:static/chunks/975-"])</script><script>self.__next_f.push([1,"41f6ad20b4031b30.js\",\"756:static/chunks/756-93541769f62c0652.js\",\"683:static/chunks/683-31836dfcc9c45e50.js\",\"339:static/chunks/339-501c32916b785ef1.js\",\"376:static/chunks/376-a39927cc33e4fa4c.js\",\"413:static/chunks/app/setup/page-af09a6c20748a4ee.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"8:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/83c296e124c7293a.css\",\"precedence\":\"next\"}]],[\"$\",\"$La\",null,{\"buildId\":\"ud4HTHmQmUNqsq4ojHyoU\",\"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_1a3fe4\",\"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-e7aa396ee7944e48.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/83c296e124c7293a.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-e7aa396ee7944e48.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-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"\",\"async\":false}\nd:I{\"id\":2112,\"chunks\":[\"293:static/chunks/293-fa7b9b02f62ab5d8.js\",\"548:static/chunks/548-ffb8dd99ad3940cb.js\",\"82:static/"])</script><script>self.__next_f.push([1,"chunks/82-ca0360e473d81167.js\",\"756:static/chunks/756-93541769f62c0652.js\",\"445:static/chunks/445-3ef592231331d9ed.js\",\"185:static/chunks/app/layout-492760d669ed6dd7.js\"],\"name\":\"PageShell\",\"async\":false}\ne:I{\"id\":7767,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.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-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c9"])</script><script>self.__next_f.push([1,"4c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\n11:I{\"id\":4839,\"chunks\":[\"272:static/chunks/webpack-e7aa396ee7944e48.js\",\"971:static/chunks/fd9d1056-a95b789c94c05ff6.js\",\"596:static/chunks/596-f3a131b7c336dd5d.js\"],\"name\":\"default\",\"async\":false}\n12:I{\"id\":2378,\"chunks\":[\"293:static/chunks/293-fa7b9b02f62ab5d8.js\",\"808:static/chunks/808-b64f39fb5aa81c36.js\",\"548:static/chunks/548-ffb8dd99ad3940cb.js\",\"420:static/chunks/420-c4133cd89d8c5e4b.js\",\"975:static/chunks/975-"])</script><script>self.__next_f.push([1,"41f6ad20b4031b30.js\",\"756:static/chunks/756-93541769f62c0652.js\",\"683:static/chunks/683-31836dfcc9c45e50.js\",\"339:static/chunks/339-501c32916b785ef1.js\",\"376:static/chunks/376-1c0d6e6983c73fe2.js\",\"413:static/chunks/app/setup/page-6b4f7c854be99fc9.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"8:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/83c296e124c7293a.css\",\"precedence\":\"next\"}]],[\"$\",\"$La\",null,{\"buildId\":\"mxkRaSA6iUTYeSCbLQn--\",\"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_1a3fe4\",\"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/83c296e124c7293a.css",{"as":"style"}]
8
- 0:["ud4HTHmQmUNqsq4ojHyoU",[[["",{"children":["setup",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/83c296e124c7293a.css","precedence":"next"}]],"$L9"]]]]
8
+ 0:["mxkRaSA6iUTYeSCbLQn--",[[["",{"children":["setup",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/83c296e124c7293a.css","precedence":"next"}]],"$L9"]]]]
9
9
  a:HL["/_next/static/css/16c1dd82fc87c9d7.css",{"as":"style"}]
10
10
  b:I{"id":2112,"chunks":["293:static/chunks/293-fa7b9b02f62ab5d8.js","548:static/chunks/548-ffb8dd99ad3940cb.js","82:static/chunks/82-ca0360e473d81167.js","756:static/chunks/756-93541769f62c0652.js","445:static/chunks/445-3ef592231331d9ed.js","185:static/chunks/app/layout-492760d669ed6dd7.js"],"name":"PageShell","async":false}
11
11
  c:I{"id":7767,"chunks":["272:static/chunks/webpack-e7aa396ee7944e48.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
12
12
  d:I{"id":7920,"chunks":["272:static/chunks/webpack-e7aa396ee7944e48.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
13
13
  f:I{"id":4839,"chunks":["272:static/chunks/webpack-e7aa396ee7944e48.js","971:static/chunks/fd9d1056-a95b789c94c05ff6.js","596:static/chunks/596-f3a131b7c336dd5d.js"],"name":"default","async":false}
14
- 10:I{"id":2378,"chunks":["293:static/chunks/293-fa7b9b02f62ab5d8.js","808:static/chunks/808-b64f39fb5aa81c36.js","548:static/chunks/548-ffb8dd99ad3940cb.js","420:static/chunks/420-c4133cd89d8c5e4b.js","975:static/chunks/975-41f6ad20b4031b30.js","756:static/chunks/756-93541769f62c0652.js","683:static/chunks/683-31836dfcc9c45e50.js","339:static/chunks/339-501c32916b785ef1.js","376:static/chunks/376-a39927cc33e4fa4c.js","413:static/chunks/app/setup/page-af09a6c20748a4ee.js"],"name":"","async":false}
14
+ 10:I{"id":2378,"chunks":["293:static/chunks/293-fa7b9b02f62ab5d8.js","808:static/chunks/808-b64f39fb5aa81c36.js","548:static/chunks/548-ffb8dd99ad3940cb.js","420:static/chunks/420-c4133cd89d8c5e4b.js","975:static/chunks/975-41f6ad20b4031b30.js","756:static/chunks/756-93541769f62c0652.js","683:static/chunks/683-31836dfcc9c45e50.js","339:static/chunks/339-501c32916b785ef1.js","376:static/chunks/376-1c0d6e6983c73fe2.js","413:static/chunks/app/setup/page-6b4f7c854be99fc9.js"],"name":"","async":false}
15
15
  8:[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1a3fe4","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
@@ -72,7 +72,7 @@ function startServer(port = 15500, apiBaseUrl = '', skipConfirmation = false) {
72
72
  }),
73
73
  });
74
74
  });
75
- app.post('/api/eval', (req, res) => {
75
+ app.post('/api/eval/job', (req, res) => {
76
76
  const testSuite = req.body;
77
77
  const id = (0, uuid_1.v4)();
78
78
  evalJobs.set(id, { status: 'in-progress', progress: 0, total: 0, result: null });
@@ -99,7 +99,7 @@ function startServer(port = 15500, apiBaseUrl = '', skipConfirmation = false) {
99
99
  });
100
100
  res.json({ id });
101
101
  });
102
- app.get('/api/eval/:id', (req, res) => {
102
+ app.get('/api/eval/job/:id', (req, res) => {
103
103
  const id = req.params.id;
104
104
  const job = evalJobs.get(id);
105
105
  if (!job) {
@@ -113,7 +113,7 @@ function startServer(port = 15500, apiBaseUrl = '', skipConfirmation = false) {
113
113
  res.json({ status: 'in-progress', progress: job.progress, total: job.total });
114
114
  }
115
115
  });
116
- app.post('/api/eval/:id', (req, res) => {
116
+ app.patch('/api/eval/:id', (req, res) => {
117
117
  const id = req.params.id;
118
118
  const evalTable = req.body.table;
119
119
  if (!id) {
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/web/server.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA+B;AAC/B,0DAA6B;AAC7B,kEAAqC;AACrC,0DAA6B;AAC7B,oEAAuC;AACvC,+BAAoC;AAEpC,wDAAgC;AAChC,sDAA8B;AAC9B,gDAAwB;AACxB,8DAAsC;AACtC,oDAA4B;AAC5B,yCAAqD;AACrD,qDAOkB;AAElB,uDAA+B;AAC/B,gCAAsC;AACtC,kCASiB;AACjB,4CAAuD;AASvD,eAAe;AACf,MAAM,QAAQ,GAAG,IAAI,GAAG,EA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AC,qBAAqB,GAAG,gCAAgC,CAAC,CAAC;QAEtE,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;YACzB,IAAI;gBACF,gBAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;gBAC/C,MAAM,IAAA,gBAAM,EAAC,GAAG,CAAC,CAAC;aACnB;YAAC,OAAO,GAAG,EAAE;gBACZ,gBAAM,CAAC,KAAK,CAAC,2BAA2B,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;aACxD;QACH,CAAC,CAAC;QAEF,IAAI,gBAAgB,EAAE;YACpB,OAAO,EAAE,CAAC;SACX;aAAM;YACL,MAAM,EAAE,GAAG,uBAAQ,CAAC,eAAe,CAAC;gBAClC,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;aACvB,CAAC,CAAC;YACH,EAAE,CAAC,QAAQ,CAAC,8BAA8B,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC3D,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;oBACxC,OAAO,EAAE,CAAC;iBACX;gBACD,EAAE,CAAC,KAAK,EAAE,CAAC;gBACX,gBAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAjND,kCAiNC"}
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.36.0",
5
+ "version": "0.37.0",
6
6
  "license": "MIT",
7
7
  "type": "commonjs",
8
8
  "repository": "promptfoo/promptfoo",
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[594],{2810:function(e,t,s){"use strict";let n;async function l(){if(!n){let e=await fetch("/api/config"),t=await e.json();n=t.apiBaseUrl}return n}s.d(t,{b:function(){return l}})},8594:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eL}});var n=s(7437),l=s(2265),r=s(2130),i=s(6882),a=s(3388),o=s(4033),c=s(3082),d=s(8440),u=s(6507),p=s(5551),h=s(7760),m=s(3391),x=s(4081),j=s(819),g=s(8212),f=s(5507),v=s(923),b=s(654),y=s(3295),Z=s(2467),C=s(3457),k=s(1975),w=s(8276),S=s(9605),N=s(9190),R=s(2053),F=s(6704),E=s(9394),D=s(1797),I=s(6337),P=s(1101),L=s(9872),T=s(2653),M=s(3533),W=s(4740),O=s(4660);let V=(0,O.Ue)(e=>({filePath:null,setFilePath:t=>e(()=>({filePath: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}))})),A=["#fd7f6f","#7eb0d5","#b2e061","#bd7ebe","#ffb55a","#ffee65","#beb9db","#fdcce5","#8bd3c7"];function U(e){let{table:t}=e,s=(0,l.useRef)(null),r=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(!s.current)return;r.current&&r.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))),a=t.head.prompts.map((e,s)=>{let n=t.body.flatMap(e=>e.outputs[s].score),r=i.map(e=>n.filter(t=>t>=e&&t<e+l).length);return{label:"Prompt ".concat(s+1),data:r,backgroundColor:A[s%A.length]}});r.current=new F.kL(s.current,{type:"bar",data:{labels:i,datasets:a},options:{animation:!1,plugins:{title:{display:!0,text:"Score Distribution"},legend:{display:!1},tooltip:{callbacks:{title:function(e){let t=e[0].datasetIndex;return"Prompt ".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 z(e){let{table:t}=e,s=(0,l.useRef)(null),r=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(!s.current)return;r.current&&r.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,r=l/n.length*100;return{label:"Prompt ".concat(s+1),data:[r],backgroundColor:A[s%A.length]}});r.current=new F.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 _(e){let{table:t}=e,s=(0,l.useRef)(null),r=(0,l.useRef)(null),[i,a]=(0,l.useState)(0),[o,c]=(0,l.useState)(1),[d,u]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(!s.current)return;r.current&&r.current.destroy();let e=t.body.flatMap(e=>e.outputs.map(e=>e.score)),n=Math.min(...e),l=Math.max(...e),a=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"}});r.current=new F.kL(s.current,{type:"scatter",data:{datasets:[{data:a,backgroundColor:a.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)(E.Z,{open:d,onClose:()=>u(!1),children:[(0,n.jsx)(D.Z,{children:"Compare prompt outputs"}),(0,n.jsxs)(I.Z,{children:[(0,n.jsx)(x.Z,{sx:{m:1,minWidth:120},children:(0,n.jsx)(b.Z,{value:i,onChange:e=>a(Number(e.target.value)),children:t.head.prompts.map((e,t)=>(0,n.jsxs)(f.Z,{value:t,children:["Prompt ",t+1]},t))})}),(0,n.jsx)(x.Z,{sx:{m:1,minWidth:120},children:(0,n.jsx)(b.Z,{value:o,onChange:e=>c(Number(e.target.value)),children:t.head.prompts.map((e,t)=>(0,n.jsxs)(f.Z,{value:t,children:["Prompt ",t+1]},t))})})]})]}),(0,n.jsx)("canvas",{ref:s,style:{maxHeight:"300px",cursor:"pointer"},onClick:()=>u(!0)})]})}function B(e){let{columnVisibility:t}=e,s=(0,P.Z)();F.kL.defaults.color="dark"===s.palette.mode?"#aaa":"#666";let[r,i]=(0,l.useState)(!0),{table:a}=V();if(!a||!r||a.head.prompts.length<2)return null;let o=a.body.flatMap(e=>e.outputs.map(e=>e.score));return 1===new Set(o).size?null:(0,n.jsx)(W.SV,{fallback:null,children:(0,n.jsxs)(L.Z,{style:{position:"relative",padding:s.spacing(3)},children:[(0,n.jsx)(T.Z,{style:{position:"absolute",right:0,top:0},onClick:()=>i(!1),children:(0,n.jsx)(M.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)(z,{table:a})}),(0,n.jsx)("div",{style:{width:"33%"},children:(0,n.jsx)(U,{table:a})}),(0,n.jsx)("div",{style:{width:"33%"},children:(0,n.jsx)(_,{table:a})})]})]})})}F.kL.register(F.vn,F.ST,F.ho,F.uw,F.f$,F.ZL,F.jn,F.od,F.u,F.wL);var H=s(9116);s(5777);var J=s(7660),G=s(3216),q=s(182),Y=s(5391),$=s(1396),X=s.n($);s(8715);var K=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&&s?(0,n.jsxs)("span",{children:[t,": ",s.toFixed(2)]},t):null})}):null},Q=s(2834),ee=s(5446),et=s(9329),es=s(4719),en=s(3701),el=s(9279),er=s(666),ei=s(5795),ea=s(6988),eo=s(4147),ec=s(3226);function ed(e){let{gradingResults:t}=e;return t?(0,n.jsxs)(u.Z,{mt:2,children:[(0,n.jsx)(ec.Z,{variant:"subtitle1",children:"Assertions"}),(0,n.jsx)(ei.Z,{children:(0,n.jsxs)(en.Z,{children:[(0,n.jsx)(ea.Z,{children:(0,n.jsxs)(eo.Z,{children:[(0,n.jsx)(er.Z,{style:{fontWeight:"bold"},children:"Pass"}),(0,n.jsx)(er.Z,{style:{fontWeight:"bold"},children:"Score"}),(0,n.jsx)(er.Z,{style:{fontWeight:"bold"},children:"Type"}),(0,n.jsx)(er.Z,{style:{fontWeight:"bold"},children:"Value"}),(0,n.jsx)(er.Z,{style:{fontWeight:"bold"},children:"Reason"})]})}),(0,n.jsx)(el.Z,{children:t.map((e,t)=>{var s,l;return(0,n.jsxs)(eo.Z,{children:[(0,n.jsx)(er.Z,{children:e.pass?"✅":"❌"}),(0,n.jsx)(er.Z,{children:e.score.toFixed(2)}),(0,n.jsx)(er.Z,{children:(null===(s=e.assertion)||void 0===s?void 0:s.type)||""}),(0,n.jsx)(er.Z,{style:{whiteSpace:"pre-wrap"},children:(null===(l=e.assertion)||void 0===l?void 0:l.value)?String(e.assertion.value):"-"}),(0,n.jsx)(er.Z,{style:{whiteSpace:"pre-wrap"},children:e.reason})]},t)})})]})})]}):null}function eu(e){let{open:t,onClose:s,prompt:r,provider:i,output:a,gradingResults:o}=e,[c,d]=(0,l.useState)(!1);(0,l.useEffect)(()=>{d(!1)},[r]);let h=async e=>{await navigator.clipboard.writeText(e),d(!0)};return(0,n.jsxs)(E.Z,{open:t,onClose:s,fullWidth:!0,maxWidth:"lg",children:[(0,n.jsxs)(D.Z,{children:["Details",i&&": ".concat(i)]}),(0,n.jsxs)(I.Z,{children:[(0,n.jsxs)(u.Z,{mb:2,children:[(0,n.jsx)(ec.Z,{variant:"subtitle1",style:{marginBottom:"1rem"},children:"Prompt"}),(0,n.jsx)(ee.u,{readOnly:!0,value:r,style:{width:"100%",padding:"0.75rem"},maxRows:20}),(0,n.jsx)(T.Z,{onClick:()=>h(r),style:{position:"absolute",right:"10px",top:"10px"},children:c?(0,n.jsx)(es.Z,{}):(0,n.jsx)(et.Z,{})})]}),a&&(0,n.jsxs)(u.Z,{my:2,children:[(0,n.jsx)(ec.Z,{variant:"subtitle1",style:{marginBottom:"1rem",marginTop:"1rem"},children:"Output"}),(0,n.jsx)(ee.u,{readOnly:!0,maxRows:20,value:a,style:{width:"100%",padding:"0.75rem"}})]}),(0,n.jsx)(ed,{gradingResults:o})]}),(0,n.jsx)(Q.Z,{children:(0,n.jsx)(p.Z,{onClick:s,children:"Close"})})]})}var ep=s(9396),eh=s(4173),em=function(){let e=(0,P.Z)(),[t,s]=l.useState(!1),r=()=>{s(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{textAlign:"center",marginTop:20,marginBottom:40},children:(0,n.jsx)(p.Z,{variant:"text",color:"primary",startIcon:(0,n.jsx)(ep.Z,{}),onClick:()=>{s(!0)},children:"Generate test cases"})}),(0,n.jsxs)(E.Z,{open:t,onClose:r,children:[(0,n.jsx)(D.Z,{children:"Run on Command Line"}),(0,n.jsx)(I.Z,{children:(0,n.jsxs)(eh.Z,{children:[(0,n.jsx)("p",{children:"This feature is in beta. UI coming soon."}),(0,n.jsxs)("p",{children:["Run"," ",(0,n.jsx)(u.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)(Q.Z,{children:(0,n.jsx)(p.Z,{onClick:r,color:"primary",children:"Close"})})]})]})},ex=s(2810);function ej(e){return null===e||0===e||1===e?"":"(".concat(e.toFixed(2),")")}function eg(e){return"string"==typeof e||"number"==typeof e?e.toString().length:Array.isArray(e)?e.reduce((e,t)=>e+eg(t),0):l.isValidElement(e)&&e.props.children?l.Children.toArray(e.props.children).reduce((e,t)=>e+eg(t),0):0}function ef(e){let t,{text:s,maxLength:r}=e,[i,a]=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,r-t)}if(Array.isArray(e)){let s=[],n=t;for(let t of e){let e=eg(t);if(n+e>r){s.push(o(t,n));break}s.push(t),n+=e}return s}if(l.isValidElement(e)&&e.props.children){let s=eg(e.props.children);if(s>r-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=eg(t)>r;return(0,n.jsxs)("div",{style:{cursor:d?"pointer":"normal"},onClick:()=>{a(!i)},children:[c,i&&eg(t)>r&&(0,n.jsx)("span",{children:"..."})]})}function ev(e){var t,s,r,i,a;let o,c,d,u,p,{output:h,maxTextLength:m,rowIndex:x,promptIndex:j,onRating:g,firstOutput:f,filterMode:v,searchText:b,showStats:y}=e,[Z,C]=l.useState(!1),k="string"==typeof h.text?h.text:JSON.stringify(h.text),S=[];if(!h.pass&&k.includes("---")?k=(S=k.split("---")).slice(1).join("---"):S=[k],"different"===v&&f){let e,t="string"==typeof f.text?f.text:JSON.stringify(f.text);t.includes("---")&&(t=t.split("---").slice(1).join("---"));try{JSON.parse(t),JSON.parse(k),e=(0,H.CT)(t,k)}catch(s){e=t.includes(". ")&&k.includes(". ")?(0,H.SY)(t,k):(0,H.NV)(t,k)}o=(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(b){let e;let t=RegExp(b,"gi"),s=[];for(;null!==(e=t.exec(k));)s.push({start:e.index,end:t.lastIndex}),t.lastIndex;o=(0,n.jsx)(n.Fragment,{children:s.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:k.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:k.substring(e.start,e.end)},"match-"+t),(0,n.jsx)("span",{children:k.substring(e.end,s[t+1]?s[t+1].start:k.length)},"text-after-"+t)]}))]}):(0,n.jsx)("span",{children:k},"no-match")})}let N=e=>{var t;g(x,j,e,void 0,null===(t=h.gradingResult)||void 0===t?void 0:t.comment)},R=()=>{var e;let t=prompt("Comment:",(null===(e=h.gradingResult)||void 0===e?void 0:e.comment)||"");null!=t&&g(x,j,void 0,void 0,t)};if(null===(t=h.tokenUsage)||void 0===t?void 0:t.completion){d=(0,n.jsxs)("span",{children:[Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(h.latencyMs)," ms"]});let e=h.tokenUsage.completion/(h.latencyMs/1e3);u=(0,n.jsx)("span",{children:Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e)})}h.cost&&(p=(0,n.jsxs)("span",{children:["$",h.cost.toPrecision(2)]})),(null===(s=h.tokenUsage)||void 0===s?void 0:s.cached)?c=(0,n.jsxs)("span",{children:[Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(h.tokenUsage.cached)," ","(cached)"]}):(null===(r=h.tokenUsage)||void 0===r?void 0:r.total)&&(c=(0,n.jsx)("span",{children:Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(h.tokenUsage.total)}));let F=(null===(i=h.gradingResult)||void 0===i?void 0:i.comment)?(0,n.jsx)("div",{className:"comment",onClick:R,children:h.gradingResult.comment}):null,E=y?(0,n.jsxs)("div",{className:"cell-detail",children:[c&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Tokens:"})," ",c]}),d&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Latency:"})," ",d]}),u&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Tokens/Sec:"})," ",u]}),p&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Cost:"})," ",p]})]}):null,D=(0,n.jsxs)("div",{className:"cell-actions",children:[h.prompt&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"action",onClick:()=>{C(!0)},children:(0,n.jsx)(w.Z,{title:"View ouput and test details",children:(0,n.jsx)("span",{children:"\uD83D\uDD0E"})})}),(0,n.jsx)(eu,{open:Z,onClose:()=>{C(!1)},prompt:h.prompt,provider:h.provider,gradingResults:null===(a=h.gradingResult)||void 0===a?void 0:a.componentResults,output:k})]}),(0,n.jsx)("span",{className:"action",onClick:()=>N(!0),children:(0,n.jsx)(w.Z,{title:"Mark test passed (score 1.0)",children:(0,n.jsx)("span",{children:"\uD83D\uDC4D"})})}),(0,n.jsx)("span",{className:"action",onClick:()=>N(!1),children:(0,n.jsx)(w.Z,{title:"Mark test failed (score 0.0)",children:(0,n.jsx)("span",{children:"\uD83D\uDC4E"})})}),(0,n.jsx)("span",{className:"action",onClick:()=>{let e=prompt("Set test score (0.0 - 1.0):",String(h.score));if(null!==e){let s=parseFloat(e);if(!isNaN(s)&&s>=0&&s<=1){var t;g(x,j,void 0,s,null===(t=h.gradingResult)||void 0===t?void 0:t.comment)}else alert("Invalid score. Please enter a value between 0.0 and 1.0.")}},children:(0,n.jsx)(w.Z,{title:"Set test score",children:(0,n.jsx)("span",{children:"\uD83D\uDD22"})})}),(0,n.jsx)("span",{className:"action",onClick:R,children:(0,n.jsx)(w.Z,{title:"Edit comment",children:(0,n.jsx)("span",{children:"✏️"})})})]});return(0,n.jsxs)("div",{className:"cell",children:[h.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:ej(h.score)})]}),(0,n.jsx)(K,{lookup:h.namedScores})]})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"status fail",children:[(0,n.jsxs)("div",{className:"pill",children:["FAIL",h.score>0?" ":"",(0,n.jsx)("span",{className:"score",children:ej(h.score)})]}),(0,n.jsx)(K,{lookup:h.namedScores}),(0,n.jsx)("span",{className:"fail-reason",children:S[0].trim().split("\n").map((e,t)=>(0,n.jsxs)(l.Fragment,{children:[e,(0,n.jsx)("br",{})]},t))})]})}),(0,n.jsx)(ef,{text:o||k,maxLength:m}),F,E,D]})}function eb(e){let{text:t,maxLength:s,expandedText:r,resourceId:i,className:a}=e,[o,c]=l.useState(!1);return(0,n.jsxs)("div",{className:"".concat(a||""),children:[(0,n.jsx)(ef,{text:t,maxLength:s}),r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.Z,{title:"View prompt",children:(0,n.jsx)("span",{className:"action",onClick:()=>{c(!0)},children:"\uD83D\uDD0E"})}),(0,n.jsx)(eu,{open:o,onClose:()=>{c(!1)},prompt:r}),i&&(0,n.jsx)(w.Z,{title:"View other evals and datasets for this prompt",children:(0,n.jsx)("span",{className:"action",children:(0,n.jsx)(X(),{href:"/prompts/?id=".concat(i),target:"_blank",children:(0,n.jsx)(Y.Z,{fontSize:"small"})})})})]})]})}function ey(e){let{maxTextLength:t,columnVisibility:s,wordBreak:i,filterMode:a,failureFilter:o,searchText:c,showStats:d,onFailureFilterToggle:u}=e,{filePath:p,table:m,setTable:x}=V();(0,r.Z)(m,"Table should be defined");let{head:j,body:g}=m,f=j.prompts.map((e,t)=>g.reduce((e,s)=>e+(s.outputs[t].pass?1:0),0)),v=j.prompts.map((e,t)=>g.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)),b=j.prompts.map((e,t)=>g.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)),y=async(e,t,s,n,l)=>{let r=[...g],i={...r[e]},a=[...i.outputs],o=null!=s?s:a[t].pass,c=void 0===n?s?1:0:n||0;a[t].pass=o,a[t].score=c;let d={...a[t].gradingResult||{},pass:o,score:c,reason:"Manual result (overrides all other grading results)",comment:l,assertion:null};a[t].gradingResult=d,i.outputs=a,r[e]=i;let u={head:j,body:r};x(u);try{let e=await fetch("".concat(await (0,ex.b)(),"/api/eval/").concat(p),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({table:u})});if(!e.ok)throw Error("Network response was not ok")}catch(e){console.error("Failed to update table:",e)}},Z=f.reduce((e,t,s,n)=>t>n[e]?s:e,0),C=f[Z],k=(0,J.Cl)(),w=[];j.vars.length>0&&w.push(k.group({id:"vars",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Variables"}),columns:j.vars.map((e,s)=>k.accessor(e=>e.vars[s],{id:"Variable ".concat(s+1),header:()=>(0,n.jsx)(eb,{text:e,maxLength:t,className:"font-bold"}),cell:e=>(0,n.jsx)(ef,{text:e.getValue(),maxLength:t}),size:50}))})),w.push(k.group({id:"prompts",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Outputs"}),columns:j.prompts.map((e,s)=>k.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,r,i,c,p,m,x,y;let Z=f[s]&&g.length?(f[s]/g.length*100).toFixed(2):"0.00",k=f[s]===C&&0!==C,w="Prompt ".concat(s+1),S=o[w]||!1,N=d?(0,n.jsxs)("div",{className:"prompt-detail",children:[v[s]?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Asserts:"})," ",b[s],"/",v[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/g.length)," ","ms"]}):null,(null===(i=e.metrics)||void 0===i?void 0:null===(r=i.tokenUsage)||void 0===r?void 0:r.total)?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Avg Tokens:"})," ",Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e.metrics.tokenUsage.total/g.length)]}):null,(null===(c=e.metrics)||void 0===c?void 0:c.totalLatencyMs)&&(null===(m=e.metrics)||void 0===m?void 0:null===(p=m.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,R=j.prompts.every(e=>e.provider===j.prompts[0].provider),F=e.provider?e.provider.split(":"):[],E=F.length>1?(0,n.jsxs)(n.Fragment,{children:[F[0],":",(0,n.jsx)("strong",{children:F.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:[!R&&e.provider?(0,n.jsx)("div",{className:"provider",children:E}):null,(0,n.jsx)("div",{className:"summary",children:(0,n.jsxs)("div",{className:"highlight ".concat(k?"success":""),children:[(0,n.jsxs)("strong",{children:[Z,"% passing"]})," (",f[s],"/",g.length," cases)"]})}),(null===(y=e.metrics)||void 0===y?void 0:y.namedScores)&&Object.keys(e.metrics.namedScores).length>0?(0,n.jsx)(K,{lookup:e.metrics.namedScores}):null]}),(0,n.jsx)(eb,{className:"prompt-container",text:e.display,expandedText:e.raw,maxLength:t,resourceId:e.id}),N,"failures"===a&&(0,n.jsx)(q.Z,{sx:{"& .MuiFormControlLabel-label":{fontSize:"0.75rem"}},control:(0,n.jsx)(h.Z,{checked:S,onChange:e=>u(w,e.target.checked)}),label:"Show failures"})]})},cell:e=>(0,n.jsx)(ev,{output:e.getValue(),maxTextLength:t,rowIndex:e.row.index,promptIndex:s,onRating:y,firstOutput:N[e.row.index].outputs[0],filterMode:a,searchText:c,showStats:d})}))}));let S=g.some(e=>e.description);S&&w.splice(0,0,{accessorFn:e=>e.description||"",id:"description",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Description"}),cell:e=>(0,n.jsx)(ef,{text:String(e.getValue()),maxLength:t}),size:50});let N=l.useMemo(()=>{let e=RegExp(c,"i");return g.filter(t=>{let s="failures"===a?t.outputs.some((e,t)=>o["Prompt ".concat(t+1)]&&!e.pass):"different"!==a||!t.outputs.every(e=>e.text===t.outputs[0].text),n=!c||t.outputs.some(t=>{var s;let n="".concat(t.text," ").concat(Object.keys(t.namedScores)," ").concat(null===(s=t.gradingResult)||void 0===s?void 0:s.reason);return e.test(n)});return s&&n})},[g,o,a,c]),R=(0,G.b7)({data:N,columns:w,columnResizeMode:"onChange",getCoreRowModel:(0,J.sC)(),state:{columnVisibility:s}});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:R.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,G.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:R.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,r=!l&&!s;return r&&(s=!0),(0,n.jsx)("td",{style:{width:e.column.getSize()},className:"".concat(l?"variable":""," ").concat(0!==t||l?"":"first-prompt-row"," ").concat(r?"first-prompt-col":""),children:(0,G.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)})})]}),(0,n.jsx)(em,{})]})}s(2604);var eZ=s(2481),eC=s(7175);function ek(e){let{open:t,onClose:r}=e,{config:i}=V(),a=l.useRef(null),[o,c]=l.useState(!1),[d,h]=l.useState("");l.useEffect(()=>{t&&(async()=>{let{default:e}=await s.e(339).then(s.bind(s,8339));h(e.dump(i))})()},[t,i]);let m=()=>{c(!1),r()};return(0,n.jsxs)(E.Z,{open:t,onClose:m,"aria-labelledby":"config-dialog-title",maxWidth:"md",fullWidth:!0,children:[(0,n.jsx)(D.Z,{id:"config-dialog-title",children:(0,n.jsxs)(u.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,n.jsx)(ec.Z,{variant:"h6",style:{flexGrow:1},children:"Config"}),(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(w.Z,{title:"Copy to clipboard",children:(0,n.jsx)(T.Z,{onClick:()=>{a.current&&(a.current.select(),document.execCommand("copy"),c(!0))},children:o?(0,n.jsx)(es.Z,{}):(0,n.jsx)(eC.Z,{})})}),(0,n.jsx)(w.Z,{title:"Download .yaml",children:(0,n.jsx)(T.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)(eZ.Z,{})})})]})]})}),(0,n.jsx)(I.Z,{children:(0,n.jsx)(ec.Z,{variant:"body1",component:"div",children:(0,n.jsx)("textarea",{ref:a,readOnly:!0,value:d,style:{width:"100%",minHeight:"400px",fontFamily:"monospace",border:"1px solid #ccc"}})})}),(0,n.jsx)(Q.Z,{children:(0,n.jsx)(p.Z,{onClick:m,color:"primary",children:"Close"})})]})}var ew=e=>{let{open:t,onClose:s,shareUrl:r}=e,i=(0,l.useRef)(null),[a,o]=(0,l.useState)(!1),c=()=>{s(),o(!1)};return(0,n.jsxs)(E.Z,{open:t,onClose:c,PaperProps:{style:{minWidth:"min(660px, 100%)"}},children:[(0,n.jsx)(D.Z,{children:"Your eval is ready to share"}),(0,n.jsxs)(I.Z,{children:[(0,n.jsx)(k.Z,{inputRef:i,value:r,fullWidth:!0,InputProps:{readOnly:!0,endAdornment:(0,n.jsx)(T.Z,{onClick:()=>{i.current&&(i.current.select(),document.execCommand("copy"),o(!0))},children:a?(0,n.jsx)(es.Z,{}):(0,n.jsx)(eC.Z,{})})}}),(0,n.jsx)(eh.Z,{sx:{fontSize:"0.75rem"},children:"Shared URLs are deleted after 1 week."})]}),(0,n.jsx)(Q.Z,{children:(0,n.jsx)(p.Z,{onClick:c,color:"primary",children:"Close"})})]})},eS=s(33),eN=e=>{let{open:t,onClose:s}=e,{maxTextLength:l,setMaxTextLength:r,wordBreak:i,setWordBreak:a,showInferenceDetails:o,setShowInferenceDetails:c}=V();return(0,n.jsxs)(E.Z,{open:t,onClose:s,fullWidth:!0,maxWidth:"sm",children:[(0,n.jsx)(D.Z,{children:"Table View Settings"}),(0,n.jsxs)(I.Z,{children:[(0,n.jsx)(u.Z,{children:(0,n.jsx)(w.Z,{title:"Forcing line breaks makes it easier to adjust column widths to your liking",children:(0,n.jsx)(q.Z,{control:(0,n.jsx)(h.Z,{checked:"break-all"===i,onChange:e=>a(e.target.checked?"break-all":"break-word")}),label:"Force line breaks"})})}),(0,n.jsx)(u.Z,{children:(0,n.jsx)(w.Z,{title:"Show detailed inference statistics such as latency, tokens used, cost, etc.",children:(0,n.jsx)(q.Z,{control:(0,n.jsx)(h.Z,{checked:o,onChange:e=>c(e.target.checked)}),label:"Show inference details"})})}),(0,n.jsxs)(u.Z,{maxWidth:"sm",children:[(0,n.jsxs)(ec.Z,{mt:2,children:["Max text length: ",l]}),(0,n.jsx)(eS.ZP,{min:25,max:1e3,value:l,onChange:(e,t)=>r(t)})]})]}),(0,n.jsx)(Q.Z,{children:(0,n.jsx)(p.Z,{onClick:s,children:"Close"})})]})},eR=s(1938);let eF=(0,N.Z)(C.Z)(e=>{let{theme:t}=e;return{maxWidth:"100%",flexWrap:"wrap",[t.breakpoints.down("sm")]:{flexDirection:"column"}}});function eE(e){let{recentEvals:t,onRecentEvalSelected:s,defaultEvalId:a}=e,c=(0,o.useRouter)(),{table:C,config:N,maxTextLength:F,wordBreak:E,showInferenceDetails:D}=V(),{setStateFromConfig:I}=(0,eR.o)(),[P,L]=l.useState({}),[T,M]=l.useState([]),[W,O]=l.useState(""),[A]=(0,R.Nr)(W,1e3),[U,z]=l.useState({}),[_,H]=l.useState("all"),[J,G]=l.useState(!1),[q,Y]=l.useState(""),[$,X]=l.useState(!1),K=async()=>{X(!0);try{let e=await fetch("https://api.promptfoo.dev/eval",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:{version:2,createdAt:new Date().toISOString(),results:{table:C},config:N}})}),{id:t}=await e.json(),s="https://app.promptfoo.dev/eval/".concat(t);Y(s),G(!0)}catch(e){alert("Sorry, something went wrong.")}finally{X(!1)}},[Q,ee]=l.useState(!1),[et,es]=l.useState(!1);(0,r.Z)(C,"Table data must be loaded before rendering ResultsView");let{head:en}=C,el=[...en.vars.map((e,t)=>({value:"Variable ".concat(t+1),label:"Var ".concat(t+1,": ").concat(en.vars[t].length>100?en.vars[t].slice(0,97)+"...":en.vars[t]),group:"Variables"})),...en.prompts.map((e,t)=>({value:"Prompt ".concat(t+1),label:"Prompt ".concat(t+1,": ").concat(en.prompts[t].display.length>100?en.prompts[t].display.slice(0,97)+"...":en.prompts[t].display),group:"Prompts"}))];return l.useEffect(()=>{M(el.map(e=>e.value))},[en]),(0,n.jsxs)("div",{style:{marginLeft:"1rem",marginRight:"1rem"},children:[(0,n.jsx)(u.Z,{py:"md",children:(0,n.jsxs)(eF,{direction:"row",spacing:4,alignItems:"center",children:[(0,n.jsx)(u.Z,{children:t&&t.length>0&&(0,n.jsx)(x.Z,{sx:{m:1,minWidth:200},size:"small",children:(0,n.jsx)(d.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)(k.Z,{...e,label:"Eval run",variant:"outlined"}),defaultValue:t[0],onChange:(e,t)=>{t&&t.id&&s(t.id)},disableClearable:!0})})}),(0,n.jsx)(u.Z,{children:(0,n.jsxs)(x.Z,{sx:{m:1,minWidth:200,maxWidth:350},size:"small",children:[(0,n.jsx)(j.Z,{id:"visible-columns-label",children:"Columns"}),(0,n.jsx)(b.Z,{labelId:"visible-columns-label",id:"visible-columns",multiple:!0,value:T,onChange:e=>{let{target:{value:t}}=e;M("string"==typeof t?t.split(","):t);let s=[...en.vars.map((e,t)=>"Variable ".concat(t+1)),...en.prompts.map((e,t)=>"Prompt ".concat(t+1))],n={};s.forEach(e=>{n[e]=("string"==typeof t?t.split(","):t).includes(e)}),L(n)},input:(0,n.jsx)(v.Z,{label:"Visible columns"}),renderValue:e=>e.join(", "),children:el.map(e=>(0,n.jsxs)(f.Z,{dense:!0,value:e.value,children:[(0,n.jsx)(h.Z,{checked:T.indexOf(e.value)>-1}),(0,n.jsx)(g.Z,{primary:e.label})]},e.value))})]})}),(0,n.jsx)(u.Z,{children:(0,n.jsxs)(x.Z,{sx:{minWidth:180},size:"small",children:[(0,n.jsx)(j.Z,{id:"failure-filter-mode-label",children:"Display"}),(0,n.jsxs)(b.Z,{labelId:"filter-mode-label",id:"filter-mode",value:_,onChange:e=>{let t=e.target.value;H(t);let s={};en.prompts.forEach((e,n)=>{s["Prompt ".concat(n+1)]="failures"===t}),z(s)},label:"Filter",children:[(0,n.jsx)(f.Z,{value:"all",children:"Show all results"}),(0,n.jsx)(f.Z,{value:"failures",children:"Show failures only"}),(0,n.jsx)(f.Z,{value:"different",children:"Show different only"})]})]})}),(0,n.jsx)(u.Z,{children:(0,n.jsx)(k.Z,{sx:{minWidth:180},size:"small",label:"Search",placeholder:"Text or regex",value:W,onChange:e=>{O(e.target.value)}})}),(0,n.jsx)(u.Z,{flexGrow:1}),(0,n.jsx)(u.Z,{display:"flex",justifyContent:"flex-end",children:(0,n.jsxs)(eF,{direction:"row",spacing:2,children:[(0,n.jsx)(w.Z,{title:"Edit table view settings",children:(0,n.jsx)(p.Z,{color:"primary",onClick:()=>es(!0),startIcon:(0,n.jsx)(y.Z,{}),children:"Table Settings"})}),N&&(0,n.jsx)(w.Z,{title:"View the configuration that defines this eval",children:(0,n.jsx)(p.Z,{color:"primary",onClick:()=>ee(!0),startIcon:(0,n.jsx)(S.Z,{}),children:"View YAML"})}),N&&(0,n.jsx)(w.Z,{title:"Edit eval",children:(0,n.jsx)(p.Z,{color:"primary",onClick:()=>{I(N),c.push("/setup/")},startIcon:(0,n.jsx)(m.Z,{}),children:"Edit Eval"})}),(null==N?void 0:N.sharing)&&(0,n.jsx)(w.Z,{title:"Generate a unique URL that others can access",children:(0,n.jsx)(p.Z,{color:"primary",onClick:K,disabled:$,startIcon:$?(0,n.jsx)(i.Z,{size:16}):(0,n.jsx)(Z.Z,{}),children:"Share"})})]})})]})}),(0,n.jsx)(B,{columnVisibility:P}),(0,n.jsx)(ey,{maxTextLength:F,columnVisibility:P,wordBreak:E,showStats:D,filterMode:_,failureFilter:U,searchText:A,onFailureFilterToggle:(e,t)=>{z(s=>({...s,[e]:t}))}}),(0,n.jsx)(ek,{open:Q,onClose:()=>ee(!1)}),(0,n.jsx)(ew,{open:J,onClose:()=>G(!1),shareUrl:q}),(0,n.jsx)(eN,{open:et,onClose:()=>es(!1)})]})}var eD=s(279);async function eI(){let e=(0,c.createClientComponentClient)(),{data:{user:t}}=await e.auth.getUser();(0,r.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 eP(e){let t=(0,c.createClientComponentClient)(),{data:s,error:n}=await t.from("EvaluationResult").select("*").eq("id",e).single();return s}function eL(e){var t;let{fetchId:s,preloadedData:c,recentEvals:d,defaultEvalId:u}=e,p=(0,o.useRouter)(),{table:h,setTable:m,setConfig:x,setFilePath:j}=V(),[g,f]=l.useState(!1),[v,b]=l.useState(!1),[y,Z]=l.useState(d||[]),C=async()=>{(0,r.Z)(eD.T,"Cannot fetch recent files when not running locally");let e=await fetch("".concat(await (0,ex.b)(),"/results"),{cache:"no-store"}),t=await e.json();return Z(t.data),t.data},k=l.useCallback(async e=>{let t=await fetch("".concat(await (0,ex.b)(),"/results/").concat(e),{cache:"no-store"}),s=await t.json();m(s.data.results.table),x(s.data.config),j(e)},[m,x,j]),w=async e=>{eD.T?k(e):(f(!1),p.push("/eval/remote:".concat(encodeURIComponent(e))))},[S,N]=l.useState(u||(null===(t=y[0])||void 0===t?void 0:t.id)),R=(0,o.useSearchParams)(),F=R?R.get("file"):null;return(l.useEffect(()=>{if(F){let e=async()=>{await k(F),f(!0)};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=await fetch("https://api.promptfoo.dev/eval/".concat(s));if(!t.ok){b(!0);return}let n=await t.json();m(null===(e=n.data.results)||void 0===e?void 0:e.table),x(n.data.config),f(!0)};e()}else eD.T?(0,ex.b)().then(e=>{let t=(0,a.io)(e);return t.on("init",e=>{console.log("Initialized socket connection",e),f(!0),m(e.results.table),x(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;N(null===(t=e[0])||void 0===t?void 0:t.id)})}),()=>{t.disconnect()}}):eI().then(e=>{Z(e.map(e=>({id:e.id,label:e.createdAt}))),e.length>0&&eP(e[0].id).then(t=>{(0,r.Z)(t,"Eval not found");let s=t.results,n=t.config;N(e[0].id),m(s.table),x(n),f(!0)})})},[s,m,x,j,k,c,N,F]),v)?(0,n.jsx)("div",{className:"loading",children:"404 Eval not found"}):g&&h?(0,n.jsx)(eE,{defaultEvalId:S,recentEvals:y,onRecentEvalSelected:w}):(0,n.jsxs)("div",{className:"loading",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,{T:function(){return l},e:function(){return r}});var n=s(2601);let l=!n.env.NEXT_PUBLIC_PROMPTFOO_BUILD_STANDALONE_SERVER,r=""},1938:function(e,t,s){"use strict";s.d(t,{o:function(){return r}});var n=s(4660),l=s(4810);let r=(0,n.Ue)()((0,l.tJ)((e,t)=>({env:{},testCases:[],description:"",providers:[],prompts:[],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}),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:r}=t();return{env:r,description:e,providers:n,prompts:l,tests:s}}}),{name:"promptfoo",skipHydration:!0}))},8715:function(){},5038:function(){},2604:function(){},5777:function(){}}]);