promptfoo 0.55.0 → 0.56.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 (67) hide show
  1. package/dist/package.json +4 -2
  2. package/dist/src/cache.d.ts.map +1 -1
  3. package/dist/src/cache.js +9 -6
  4. package/dist/src/cache.js.map +1 -1
  5. package/dist/src/evaluator.d.ts.map +1 -1
  6. package/dist/src/evaluator.js +16 -5
  7. package/dist/src/evaluator.js.map +1 -1
  8. package/dist/src/index.d.ts +2 -0
  9. package/dist/src/index.d.ts.map +1 -1
  10. package/dist/src/integrations/langfuse.d.ts +2 -0
  11. package/dist/src/integrations/langfuse.d.ts.map +1 -0
  12. package/dist/src/integrations/langfuse.js +16 -0
  13. package/dist/src/integrations/langfuse.js.map +1 -0
  14. package/dist/src/prompts.d.ts.map +1 -1
  15. package/dist/src/prompts.js +2 -0
  16. package/dist/src/prompts.js.map +1 -1
  17. package/dist/src/providers/azureopenai.d.ts.map +1 -1
  18. package/dist/src/providers/azureopenai.js +10 -2
  19. package/dist/src/providers/azureopenai.js.map +1 -1
  20. package/dist/src/providers/bam.d.ts +76 -0
  21. package/dist/src/providers/bam.d.ts.map +1 -0
  22. package/dist/src/providers/bam.js +126 -0
  23. package/dist/src/providers/bam.js.map +1 -0
  24. package/dist/src/providers/openai.d.ts.map +1 -1
  25. package/dist/src/providers/openai.js +2 -0
  26. package/dist/src/providers/openai.js.map +1 -1
  27. package/dist/src/providers/pythonCompletion.js +1 -1
  28. package/dist/src/providers/pythonCompletion.js.map +1 -1
  29. package/dist/src/providers/vertex.d.ts +12 -0
  30. package/dist/src/providers/vertex.d.ts.map +1 -1
  31. package/dist/src/providers/vertex.js +2 -1
  32. package/dist/src/providers/vertex.js.map +1 -1
  33. package/dist/src/providers.d.ts +3 -0
  34. package/dist/src/providers.d.ts.map +1 -1
  35. package/dist/src/providers.js +24 -10
  36. package/dist/src/providers.js.map +1 -1
  37. package/dist/src/python/wrapper.d.ts.map +1 -1
  38. package/dist/src/python/wrapper.js +5 -3
  39. package/dist/src/python/wrapper.js.map +1 -1
  40. package/dist/src/types.d.ts +4 -0
  41. package/dist/src/types.d.ts.map +1 -1
  42. package/dist/src/web/nextui/404/index.html +1 -1
  43. package/dist/src/web/nextui/404.html +1 -1
  44. package/dist/src/web/nextui/_next/static/chunks/712-7503e1478b0fffc6.js +1 -0
  45. package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/{page-fd17c94175203b8b.js → page-220f1e1ba1ae2ad9.js} +1 -1
  46. package/dist/src/web/nextui/_next/static/chunks/app/eval/page-b242a9f90d8df411.js +1 -0
  47. package/dist/src/web/nextui/auth/login/index.html +1 -1
  48. package/dist/src/web/nextui/auth/login/index.txt +1 -1
  49. package/dist/src/web/nextui/auth/signup/index.html +1 -1
  50. package/dist/src/web/nextui/auth/signup/index.txt +1 -1
  51. package/dist/src/web/nextui/datasets/index.html +1 -1
  52. package/dist/src/web/nextui/datasets/index.txt +1 -1
  53. package/dist/src/web/nextui/eval/index.html +1 -1
  54. package/dist/src/web/nextui/eval/index.txt +2 -2
  55. package/dist/src/web/nextui/index.html +1 -1
  56. package/dist/src/web/nextui/index.txt +1 -1
  57. package/dist/src/web/nextui/progress/index.html +1 -1
  58. package/dist/src/web/nextui/progress/index.txt +1 -1
  59. package/dist/src/web/nextui/prompts/index.html +1 -1
  60. package/dist/src/web/nextui/prompts/index.txt +1 -1
  61. package/dist/src/web/nextui/setup/index.html +1 -1
  62. package/dist/src/web/nextui/setup/index.txt +1 -1
  63. package/package.json +4 -2
  64. package/dist/src/web/nextui/_next/static/chunks/670-c0bbfb378b86dbd6.js +0 -1
  65. package/dist/src/web/nextui/_next/static/chunks/app/eval/page-f7288a403368b113.js +0 -1
  66. /package/dist/src/web/nextui/_next/static/{3HpbHMqtYmi39VCixO04u → b8cFpzVETN9xFhpI4el8O}/_buildManifest.js +0 -0
  67. /package/dist/src/web/nextui/_next/static/{3HpbHMqtYmi39VCixO04u → b8cFpzVETN9xFhpI4el8O}/_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/51a17e8edcdfdbb2.css"/><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><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: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}\nb: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}\nc: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}\nd: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}\ne: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}\n10:I{\"id\":176,\"chunks\":[\"547:static/chunks/547-00556ed98de9671b.js\",\"602:static/chunks/602-fce79bd3bd7891e9.js\",\"414:static/chunks/414-51e6cdc7aba4bb24.js\",\"113:static/chunks/113-1056b5f87446395e.js\",\"21:static/chunks/21-b6c126c8ac7d9c5e.js\",\"794:static/chunks/app/prompts/page-eb6647787729eb01.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\"}]],[\"$\",\"$L9\",null,{\"buildId\":\"3HpbHMqtYmi39VCixO04u\",\"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_c5054f\",\"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/51a17e8edcdfdbb2.css"/><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><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: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}\nb: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}\nc: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}\nd: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}\ne: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}\n10:I{\"id\":176,\"chunks\":[\"547:static/chunks/547-00556ed98de9671b.js\",\"602:static/chunks/602-fce79bd3bd7891e9.js\",\"414:static/chunks/414-51e6cdc7aba4bb24.js\",\"113:static/chunks/113-1056b5f87446395e.js\",\"21:static/chunks/21-b6c126c8ac7d9c5e.js\",\"794:static/chunks/app/prompts/page-eb6647787729eb01.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\"}]],[\"$\",\"$L9\",null,{\"buildId\":\"b8cFpzVETN9xFhpI4el8O\",\"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_c5054f\",\"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/51a17e8edcdfdbb2.css",{"as":"style"}]
8
- 0:["3HpbHMqtYmi39VCixO04u",[[["",{"children":["prompts",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/51a17e8edcdfdbb2.css","precedence":"next"}]],"$L9"]]]]
8
+ 0:["b8cFpzVETN9xFhpI4el8O",[[["",{"children":["prompts",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/51a17e8edcdfdbb2.css","precedence":"next"}]],"$L9"]]]]
9
9
  a: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}
10
10
  b: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}
11
11
  c: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}
@@ -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-1d8e707bf06b6d74.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\":\"3HpbHMqtYmi39VCixO04u\",\"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-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-1d8e707bf06b6d74.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\":\"b8cFpzVETN9xFhpI4el8O\",\"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,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/51a17e8edcdfdbb2.css",{"as":"style"}]
8
- 0:["3HpbHMqtYmi39VCixO04u",[[["",{"children":["setup",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L8",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/51a17e8edcdfdbb2.css","precedence":"next"}]],"$L9"]]]]
8
+ 0:["b8cFpzVETN9xFhpI4el8O",[[["",{"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
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}
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.55.0",
5
+ "version": "0.56.0",
6
6
  "license": "MIT",
7
7
  "type": "commonjs",
8
8
  "repository": "promptfoo/promptfoo",
@@ -46,7 +46,9 @@
46
46
  "@azure/identity": "^4.0.0",
47
47
  "@azure/openai-assistants": "^1.0.0-beta.5",
48
48
  "google-auth-library": "^9.7.0",
49
- "googleapis": "^134.0.0"
49
+ "googleapis": "^134.0.0",
50
+ "langfuse": "^3.7.0",
51
+ "@ibm-generative-ai/node-sdk": "^2.0.6"
50
52
  },
51
53
  "devDependencies": {
52
54
  "@aws-sdk/client-bedrock-runtime": "^3.458.0",
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[670],{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}})},9670:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eJ}});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),x=s(7760),m=s(6446),j=s(3391),g=s(4081),f=s(3226),v=s(819),y=s(8212),b=s(8864),Z=s(3375),C=s(9114),w=s(923),S=s(654),k=s(3295),N=s(2467),R=s(3457),P=s(1975),E=s(8276),I=s(9605),O=s(9190),F=s(2053),T=s(8339),L=s(2481),M=s(9394),D=s(6337),U=s(4660),A=s(4810);let _=(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 W=function(){let{table:e,config:t,evalId:s}=_(),[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)(b.Z,{children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(y.Z,{children:"Download"})]}),(0,n.jsx)(M.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)(L.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)(L.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)(L.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:"Prompt ".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"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 $(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:"Prompt ".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)(M.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)(S.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)(S.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)})]})}function Q(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}=_();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})})]})]})})}z.kL.register(z.vn,z.ST,z.ho,z.uw,z.f$,z.ZL,z.jn,z.od,z.u,z.wL);var 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);s(8715);var eo=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},ec=s(2834),ed=s(5446),eu=s(9329),ep=s(4719),eh=s(3701),ex=s(9279),em=s(666),ej=s(5795),eg=s(6988),ef=s(4147);function ev(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)(ej.Z,{children:(0,n.jsxs)(eh.Z,{children:[(0,n.jsx)(eg.Z,{children:(0,n.jsxs)(ef.Z,{children:[(0,n.jsx)(em.Z,{style:{fontWeight:"bold"},children:"Pass"}),(0,n.jsx)(em.Z,{style:{fontWeight:"bold"},children:"Score"}),(0,n.jsx)(em.Z,{style:{fontWeight:"bold"},children:"Type"}),(0,n.jsx)(em.Z,{style:{fontWeight:"bold"},children:"Value"}),(0,n.jsx)(em.Z,{style:{fontWeight:"bold"},children:"Reason"})]})}),(0,n.jsx)(ex.Z,{children:t.map((e,t)=>{var s,l;return(0,n.jsxs)(ef.Z,{children:[(0,n.jsx)(em.Z,{children:e.pass?"✅":"❌"}),(0,n.jsx)(em.Z,{children:e.score.toFixed(2)}),(0,n.jsx)(em.Z,{children:(null===(s=e.assertion)||void 0===s?void 0:s.type)||""}),(0,n.jsx)(em.Z,{style:{whiteSpace:"pre-wrap"},children:(null===(l=e.assertion)||void 0===l?void 0:l.value)?String(e.assertion.value):"-"}),(0,n.jsx)(em.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)(M.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)(ed.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)(ep.Z,{}):(0,n.jsx)(eu.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)(ed.u,{readOnly:!0,maxRows:20,value:r,style:{width:"100%",padding:"0.75rem"}})]}),(0,n.jsx)(ev,{gradingResults:o})]}),(0,n.jsx)(ec.Z,{children:(0,n.jsx)(h.Z,{onClick:s,children:"Close"})})]})}var eb=s(9396),eZ=s(4173),eC=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)(eb.Z,{}),onClick:()=>{s(!0)},children:"Generate test cases"})}),(0,n.jsxs)(M.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)(eZ.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)(ec.Z,{children:(0,n.jsx)(h.Z,{onClick:a,color:"primary",children:"Close"})})]})]})},ew=s(2810);function eS(e){return null===e||0===e||1===e?"":"(".concat(e.toFixed(2),")")}function ek(e){return"string"==typeof e||"number"==typeof e?e.toString().length:Array.isArray(e)?e.reduce((e,t)=>e+ek(t),0):l.isValidElement(e)&&e.props.children?l.Children.toArray(e.props.children).reduce((e,t)=>e+ek(t),0):0}function eN(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=ek(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=ek(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=ek(t)>a;return(0,n.jsxs)("div",{style:{cursor:d?"pointer":"normal"},onClick:()=>{r(!i)},children:[c,i&&ek(t)>a&&(0,n.jsx)("span",{children:"..."})]})}function eR(e){var t,s,a,i,r,o;let c,d,u,p,h,{output:x,maxTextLength:m,rowIndex:j,promptIndex:g,onRating:f,firstOutput:v,filterMode:y,searchText:b,showStats:Z}=e,{renderMarkdown:C,prettifyJson:w,showPrompts:S}=_(),[k,N]=l.useState(!1),[R,P]=l.useState(!1),I=()=>P(!R),O="string"==typeof x.text?x.text:JSON.stringify(x.text),F=[];if(O.startsWith("[IMAGE]")){let e=O.slice(7).trim();c=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{loading:"lazy",src:e,alt:x.prompt,onClick:I}),R&&(0,n.jsx)("div",{className:"lightbox",onClick:I,children:(0,n.jsx)("img",{src:e,alt:x.prompt})})]})}else!x.pass&&O.includes("---")?O=(F=O.split("---")).slice(1).join("---"):F=[O];if("different"===y&&v){let e,t="string"==typeof v.text?v.text:JSON.stringify(v.text);t.includes("---")&&(t=t.split("---").slice(1).join("---"));try{JSON.parse(t),JSON.parse(O),e=(0,ee.CT)(t,O)}catch(s){e=t.includes(". ")&&O.includes(". ")?(0,ee.SY)(t,O):(0,ee.NV)(t,O)}c=(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)try{let e;let t=RegExp(b,"gi"),s=[];for(;null!==(e=t.exec(O));)s.push({start:e.index,end:t.lastIndex});c=(0,n.jsx)(n.Fragment,{children:s.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:O.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:O.substring(e.start,e.end)},"match-"+t),(0,n.jsx)("span",{children:O.substring(e.end,s[t+1]?s[t+1].start:O.length)},"text-after-"+t)]}))]}):(0,n.jsx)("span",{children:O},"no-match")})}catch(e){console.error("Invalid regular expression:",e.message)}else if(C)c=(0,n.jsx)(et.U,{children:O});else if(w)try{c=(0,n.jsx)("pre",{children:JSON.stringify(JSON.parse(O),null,2)})}catch(e){}let T=e=>{var t;f(j,g,e,void 0,null===(t=x.gradingResult)||void 0===t?void 0:t.comment)},L=()=>{var e;let t=prompt("Comment:",(null===(e=x.gradingResult)||void 0===e?void 0:e.comment)||"");null!=t&&f(j,g,void 0,void 0,t)};if(null===(t=x.tokenUsage)||void 0===t?void 0:t.completion){u=(0,n.jsxs)("span",{children:[Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(x.latencyMs)," ms"]});let e=x.tokenUsage.completion/(x.latencyMs/1e3);p=(0,n.jsx)("span",{children:Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e)})}x.cost&&(h=(0,n.jsxs)("span",{children:["$",x.cost.toPrecision(2)]})),(null===(s=x.tokenUsage)||void 0===s?void 0:s.cached)?d=(0,n.jsxs)("span",{children:[Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(x.tokenUsage.cached)," ","(cached)"]}):(null===(a=x.tokenUsage)||void 0===a?void 0:a.total)&&(d=(0,n.jsx)("span",{children:Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(x.tokenUsage.total)}));let M=(null===(i=x.gradingResult)||void 0===i?void 0:i.comment)?(0,n.jsx)("div",{className:"comment",onClick:L,children:x.gradingResult.comment}):null,D=Z?(0,n.jsxs)("div",{className:"cell-detail",children:[d&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Tokens:"})," ",d]}),u&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Latency:"})," ",u]}),p&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Tokens/Sec:"})," ",p]}),h&&(0,n.jsxs)("div",{className:"stat-item",children:[(0,n.jsx)("strong",{children:"Cost:"})," ",h]})]}):null,U=(0,n.jsxs)("div",{className:"cell-actions",children:[x.prompt&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"action",onClick:()=>{N(!0)},children:(0,n.jsx)(E.Z,{title:"View ouput and test details",children:(0,n.jsx)("span",{children:"\uD83D\uDD0E"})})}),(0,n.jsx)(ey,{open:k,onClose:()=>{N(!1)},prompt:x.prompt,provider:x.provider,gradingResults:null===(r=x.gradingResult)||void 0===r?void 0:r.componentResults,output:O})]}),(0,n.jsx)("span",{className:"action",onClick:()=>T(!0),children:(0,n.jsx)(E.Z,{title:"Mark test passed (score 1.0)",children:(0,n.jsx)("span",{children:"\uD83D\uDC4D"})})}),(0,n.jsx)("span",{className:"action",onClick:()=>T(!1),children:(0,n.jsx)(E.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(x.score));if(null!==e){let s=parseFloat(e);if(!isNaN(s)&&s>=0&&s<=1){var t;f(j,g,void 0,s,null===(t=x.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)(E.Z,{title:"Set test score",children:(0,n.jsx)("span",{children:"\uD83D\uDD22"})})}),(0,n.jsx)("span",{className:"action",onClick:L,children:(0,n.jsx)(E.Z,{title:"Edit comment",children:(0,n.jsx)("span",{children:"✏️"})})})]});return(0,n.jsxs)("div",{className:"cell",children:[x.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(x.score)})]}),(0,n.jsx)(eo,{lookup:x.namedScores})]})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"status fail",children:[(0,n.jsxs)("div",{className:"pill",children:["FAIL",x.score>0?" ":"",(0,n.jsx)("span",{className:"score",children:eS(x.score)})]}),(0,n.jsx)(eo,{lookup:x.namedScores}),(0,n.jsx)("span",{className:"fail-reason",children:null===(o=F[0])||void 0===o?void 0:o.trim().split("\n").map((e,t)=>(0,n.jsxs)(l.Fragment,{children:[e,(0,n.jsx)("br",{})]},t))})]})}),S&&v.prompt&&(0,n.jsxs)("div",{className:"prompt",children:[(0,n.jsx)("span",{className:"pill",children:"Prompt"}),x.prompt]}),(0,n.jsx)(eN,{text:c||O,maxLength:m}),M,D,U]})}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)(eN,{text:t,maxLength:s}),a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(E.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)(E.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"})})})})]})]})}function eE(e){let{maxTextLength:t,columnVisibility:s,wordBreak:i,filterMode:r,failureFilter:o,searchText:c,showStats:d,onFailureFilterToggle:u}=e,{evalId:m,table:j,setTable:g}=_();(0,a.Z)(j,"Table should be defined");let{head:v,body:y}=j,b=v.prompts.map((e,t)=>y.reduce((e,s)=>e+(s.outputs[t].pass?1:0),0)),Z=v.prompts.map((e,t)=>y.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)),w=v.prompts.map((e,t)=>y.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)),k=async(e,t,s,n,l)=>{let a=[...y],i={...a[e]},r=[...i.outputs],o=null!=s?s:r[t].pass,c=void 0===n?s?1:0:n||0;r[t].pass=o,r[t].score=c;let d={...r[t].gradingResult||{},pass:o,score:c,reason:"Manual result (overrides all other grading results)",comment:l,assertion:null};r[t].gradingResult=d,i.outputs=r,a[e]=i;let u={head:v,body:a};g(u);try{let e=await fetch("".concat(await (0,ew.b)(),"/api/eval/").concat(m),{method:"PATCH",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)}},N=b.reduce((e,t,s,n)=>t>n[e]?s:e,0),R=b[N],E=(0,es.Cl)(),I=[];v.vars.length>0&&I.push(E.group({id:"vars",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Variables"}),columns:v.vars.map((e,s)=>E.accessor(e=>e.vars[s],{id:"Variable ".concat(s+1),header:()=>(0,n.jsx)(eP,{text:e,maxLength:t,className:"font-bold"}),cell:e=>(0,n.jsx)(eN,{text:e.getValue(),maxLength:t}),size:50}))})),I.push(E.group({id:"prompts",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Outputs"}),columns:v.prompts.map((e,s)=>E.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,m,j;let g=b[s]&&y.length?(b[s]/y.length*100).toFixed(2):"0.00",f=b[s]===R&&0!==R,C="Prompt ".concat(s+1),S=o[C]||!1,k=d?(0,n.jsxs)("div",{className:"prompt-detail",children:[Z[s]?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Asserts:"})," ",w[s],"/",Z[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/y.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/y.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===(m=e.metrics)||void 0===m?void 0:m.cost)?(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Cost:"})," $",e.metrics.cost.toPrecision(2)]}):null]}):null,N=v.prompts.every(e=>e.provider===v.prompts[0].provider),P=e.provider?e.provider.split(":"):[],E=P.length>1?(0,n.jsxs)(n.Fragment,{children:[P[0],":",(0,n.jsx)("strong",{children:P.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:[!N&&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(f?"success":""),children:[(0,n.jsxs)("strong",{children:[g,"% passing"]})," (",b[s],"/",y.length," cases)"]})}),(null===(j=e.metrics)||void 0===j?void 0:j.namedScores)&&Object.keys(e.metrics.namedScores).length>0?(0,n.jsx)(eo,{lookup:e.metrics.namedScores}):null]}),(0,n.jsx)(eP,{className:"prompt-container",text:e.display,expandedText:e.raw,maxLength:t,resourceId:e.id}),k,"failures"===r&&(0,n.jsx)(el.Z,{sx:{"& .MuiFormControlLabel-label":{fontSize:"0.75rem"}},control:(0,n.jsx)(x.Z,{checked:S,onChange:e=>u(C,e.target.checked)}),label:"Show failures"})]})},cell:e=>(0,n.jsx)(eR,{output:e.getValue(),maxTextLength:t,rowIndex:e.row.index,promptIndex:s,onRating:k,firstOutput:T[e.row.index].outputs[0],filterMode:r,searchText:c,showStats:d})}))}));let O=y.some(e=>e.description);O&&I.splice(0,0,{accessorFn:e=>e.description||"",id:"description",header:()=>(0,n.jsx)("span",{className:"font-bold",children:"Description"}),cell:e=>(0,n.jsx)(eN,{text:String(e.getValue()),maxLength:t}),size:50});let F=Object.keys(s).length>0,T=l.useMemo(()=>{try{let e=RegExp(c,"i");return y.filter(t=>{let n="failures"===r?t.outputs.some((e,t)=>{let n="Prompt ".concat(t+1);return o[n]&&!e.pass&&(!F||s[n])}):"different"!==r||!t.outputs.every(e=>e.text===t.outputs[0].text),l=!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 n&&l})}catch(e){return console.error("Invalid regular expression:",e.message),y}},[y,o,r,c,s,F]),[L,M]=l.useState({pageIndex:0,pageSize:50}),D=(0,en.b7)({data:T,columns:I,columnResizeMode:"onChange",getCoreRowModel:(0,es.sC)(),getPaginationRowModel:(0,es.G_)(),state:{columnVisibility:s,pagination:L}});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:D.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:D.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)})})]}),D.getPageCount()>1&&(0,n.jsxs)(p.Z,{className:"pagination",sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(h.Z,{onClick:()=>M(e=>({...e,pageIndex:Math.max(e.pageIndex-1,0)})),disabled:0===D.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)(P.Z,{size:"small",type:"number",value:D.getState().pagination.pageIndex+1,onChange:e=>{let t=e.target.value?Number(e.target.value)-1:0;M(e=>({...e,pageIndex:Math.min(Math.max(t,0),D.getPageCount()-1)}))},InputProps:{style:{width:"60px",textAlign:"center"}},variant:"outlined"}),(0,n.jsxs)("span",{children:["of ",D.getPageCount()]})]}),(0,n.jsx)(h.Z,{onClick:()=>M(e=>({...e,pageIndex:Math.min(e.pageIndex+1,D.getPageCount()-1)})),disabled:D.getState().pagination.pageIndex+1>=D.getPageCount(),variant:"contained",children:"Next"}),(0,n.jsxs)(f.Z,{component:"span",sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(S.Z,{value:L.pageSize,onChange:e=>M({pageIndex:0,pageSize:Number(e.target.value)}),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)(eC,{})]})}s(2604);var eI=s(7175);function eO(e){let{open:t,onClose:a}=e,{config:i}=_(),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 x=()=>{c(!1),a()};return(0,n.jsxs)(M.Z,{open:t,onClose:x,"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)(E.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)(ep.Z,{}):(0,n.jsx)(eI.Z,{})})}),(0,n.jsx)(E.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)(L.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)(ec.Z,{children:(0,n.jsx)(h.Z,{onClick:x,color:"primary",children:"Close"})})]})}var eF=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)(M.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)(P.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)(ep.Z,{}):(0,n.jsx)(eI.Z,{})})}}),(0,n.jsx)(eZ.Z,{sx:{fontSize:"0.75rem"},children:"Shared URLs are deleted after 2 weeks."})]}),(0,n.jsx)(ec.Z,{children:(0,n.jsx)(h.Z,{onClick:c,color:"primary",children:"Close"})})]})},eT=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:m,setPrettifyJson:j,showPrompts:g,setShowPrompts:v}=_();return(0,n.jsxs)(M.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)(E.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)(x.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)(x.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)(x.Z,{checked:m,onChange:e=>j(e.target.checked)}),label:"Prettify JSON outputs"})}),(0,n.jsx)(p.Z,{children:(0,n.jsx)(E.Z,{title:"Show the final prompt that produced the output in each cell.",children:(0,n.jsx)(el.Z,{control:(0,n.jsx)(x.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)(E.Z,{title:"Show detailed inference statistics such as latency, tokens used, cost, etc.",children:(0,n.jsx)(el.Z,{control:(0,n.jsx)(x.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)(eT.ZP,{min:25,max:1e3,value:l,onChange:(e,t)=>a(t)})]})]}),(0,n.jsx)(ec.Z,{children:(0,n.jsx)(h.Z,{onClick:s,children:"Close"})})]})},eM=s(1938),eD=s(7580);let eU=eD.env.NEXT_PUBLIC_PROMPTFOO_REMOTE_API_BASE_URL||eD.env.NEXT_PUBLIC_PROMPTFOO_BASE_URL||eD.env.PROMPTFOO_REMOTE_API_BASE_URL||"https://api.promptfoo.dev",eA=eD.env.NEXT_PUBLIC_PROMPTFOO_BASE_URL||eD.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 eW(e){let{recentEvals:t,onRecentEvalSelected:s,defaultEvalId:r}=e,c=(0,o.useRouter)(),{table:R,config:O,setConfig:T,maxTextLength:L,wordBreak:M,showInferenceDetails:D,evalId:U}=_(),{setStateFromConfig:A}=(0,eM.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(eU,"/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(eA,"/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,ew.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,ew.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")}},ex=[...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(ex.map(e=>e.value))},[eu]);let[em,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)(P.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)(S.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:ex.map(e=>(0,n.jsxs)(C.Z,{dense:!0,value:e.value,children:[(0,n.jsx)(x.Z,{checked:B.indexOf(e.value)>-1}),(0,n.jsx)(y.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)(S.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)(P.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:em,keepMounted:!0,open:!!em,onClose:()=>{ej(null)},children:[(0,n.jsx)(E.Z,{title:"View the configuration that defines this eval",placement:"left",children:(0,n.jsxs)(C.Z,{onClick:()=>eo(!0),children:[(0,n.jsx)(b.Z,{children:(0,n.jsx)(I.Z,{fontSize:"small"})}),"View YAML"]})}),(0,n.jsx)(E.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)(b.Z,{children:(0,n.jsx)(j.Z,{fontSize:"small"})}),"Edit Eval"]})}),(0,n.jsx)(W,{}),(null==O?void 0:O.sharing)&&(0,n.jsx)(E.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)(b.Z,{children:el?(0,n.jsx)(i.Z,{size:16}):(0,n.jsx)(N.Z,{fontSize:"small"})}),"Share"]})}),(0,n.jsx)(E.Z,{title:"Delete this eval",placement:"left",children:(0,n.jsxs)(C.Z,{onClick:eh,children:[(0,n.jsx)(b.Z,{children:(0,n.jsx)(m.Z,{fontSize:"small"})}),"Delete"]})})]}),(0,n.jsx)(E.Z,{title:"Edit table view settings",placement:"left",children:(0,n.jsx)(h.Z,{color:"primary",onClick:()=>ed(!0),startIcon:(0,n.jsx)(k.Z,{}),children:"Table Settings"})})]})})]})}),(0,n.jsx)(Q,{columnVisibility:z}),(0,n.jsx)(eE,{maxTextLength:L,columnVisibility:z,wordBreak:M,showStats:D,filterMode:$,failureFilter:Y,searchText:X,onFailureFilterToggle:(e,t)=>{q(s=>({...s,[e]:t}))}}),(0,n.jsx)(eO,{open:er,onClose:()=>eo(!1)}),(0,n.jsx)(eF,{open:ee,onClose:()=>et(!1),shareUrl:es}),(0,n.jsx)(eL,{open:ec,onClose:()=>ed(!1)})]})}var ez=s(279);async function eV(){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 eB(e){let t=(0,c.createClientComponentClient)(),{data:s,error:n}=await t.from("EvaluationResult").select("*").eq("id",e).single();return s}function eJ(e){var t;let{fetchId:s,preloadedData:c,recentEvals:d,defaultEvalId:u}=e,p=(0,o.useRouter)(),{table:h,setTable:x,setConfig:m,setEvalId:j}=_(),[g,f]=l.useState(!1),[v,y]=l.useState(!1),[b,Z]=l.useState(d||[]),C=async()=>{let e=await fetch("".concat(await (0,ew.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,ew.b)(),"/api/results/").concat(e),{cache:"no-store"}),s=await t.json();x(s.data.results.table),m(s.data.config),j(e)},[x,m,j]),S=async e=>{ez.Ox?(f(!1),p.push("/eval/remote:".concat(encodeURIComponent(e)))):p.push("/eval/?evalId=".concat(encodeURIComponent(e)))},[k,N]=l.useState(u||(null===(t=b[0])||void 0===t?void 0:t.id)),R=(0,o.useSearchParams)(),P=R?R.get("evalId"):null;return(l.useEffect(()=>{if(P){let e=async()=>{await w(P),f(!0),N(P),C()};e()}else if(c){var e;x(null===(e=c.data.results)||void 0===e?void 0:e.table),m(c.data.config),f(!0)}else if(s){let e=async()=>{var e;let t="".concat(eU,"/api/eval/").concat(s);console.log("Fetching eval from remote server",t);let n=await fetch(t);if(!n.ok){y(!0);return}let l=await n.json();x(null===(e=l.data.results)||void 0===e?void 0:e.table),m(l.data.config),f(!0)};e()}else if(ez.T8)(0,ew.b)().then(e=>{let t=(0,r.io)(e);return t.on("init",e=>{console.log("Initialized socket connection",e),f(!0),x(null==e?void 0:e.results.table),m(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),x(e.results.table),m(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(ez.Ox)eV().then(e=>{Z(e.map(e=>({id:e.id,label:e.createdAt}))),e.length>0&&eB(e[0].id).then(t=>{(0,a.Z)(t,"Eval not found");let s=t.results,n=t.config;N(e[0].id),x(s.table),m(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,ew.b)(),s=e[0].id,n=await fetch("".concat(t,"/api/results/").concat(s)),l=await n.json();x(l.data.results.table),m(l.data.config),f(!0),N(s),j(s)}};e()}},[s,x,m,j,w,c,N,P]),v)?(0,n.jsx)("div",{className:"notice",children:"404 Eval not found"}):g&&h?(0,n.jsx)(eW,{defaultEvalId:k,recentEvals:b,onRecentEvalSelected:S}):(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([[11],{7304:function(e,n,s){Promise.resolve().then(s.t.bind(s,6685,23)),Promise.resolve().then(s.bind(s,9670))}},function(e){e.O(0,[674,547,602,72,975,414,680,113,261,339,921,133,772,670,971,596,744],function(){return e(e.s=7304)}),_N_E=e.O()}]);