promptfoo 0.121.1 → 0.121.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/src/{accounts-xrUGFA6n.js → accounts-B2XmGjty.js} +5 -5
- package/dist/src/{accounts-Bx-x3bmW.cjs → accounts-BPyfpSeU.cjs} +5 -5
- package/dist/src/{accounts-CMqkzrVf.js → accounts-CFLK3mnD.js} +6 -6
- package/dist/src/{accounts-BgNJDBE6.js → accounts-Xatc0RYb.js} +5 -5
- package/dist/src/{agentic-utils-BKIN5PKu.js → agentic-utils-36epdqwB.js} +3 -3
- package/dist/src/{cometapi-DkXrKi5z.js → agentic-utils-D8yXo5Lm.js} +4 -61
- package/dist/src/{cometapi-vY6aDZgo.cjs → agentic-utils-DAVsChuB.cjs} +24 -62
- package/dist/src/agentic-utils-DIYAAYE7.js +153 -0
- package/dist/src/{agents-C-dDThPK.js → agents-BBVJCIYr.js} +226 -13
- package/dist/src/{agents-CErsqg5U.cjs → agents-BBWxKSM0.cjs} +7 -7
- package/dist/src/{agents-Dy2YpZpa.js → agents-Bqgfdokm.js} +227 -14
- package/dist/src/{agents-B0f4HICh.cjs → agents-CAYbM7qD.cjs} +226 -13
- package/dist/src/{agents-CVIn-Utx.js → agents-CLQ-P15P.js} +7 -7
- package/dist/src/{agents-DeH4Gu94.js → agents-CgBniSlI.js} +8 -8
- package/dist/src/{agents-CXknwsFX.js → agents-DSSTV4bv.js} +226 -13
- package/dist/src/{agents-aF4-T121.js → agents-wg3ohknq.js} +7 -7
- package/dist/src/{aimlapi-tg0Gkcvr.cjs → aimlapi-Bv8Fmc-b.cjs} +14 -14
- package/dist/src/{aimlapi-BNfTBexL.js → aimlapi-BwGC1TtS.js} +13 -13
- package/dist/src/{aimlapi-BAGZDo5G.js → aimlapi-DaC3qZ-o.js} +14 -14
- package/dist/src/{aimlapi-DHRKlBEA.js → aimlapi-MgSLdvy7.js} +13 -13
- package/dist/src/app/assets/index-B6l9CVVb.js +439 -0
- package/dist/src/app/assets/index-DyZ0Ep37.css +1 -0
- package/dist/src/app/assets/sync-CStkzc6u.js +4 -0
- package/dist/src/app/assets/vendor-charts-BnDWwBlI.js +36 -0
- package/dist/src/app/assets/vendor-markdown-Bz7N-ca6.js +29 -0
- package/dist/src/app/index.html +4 -4
- package/dist/src/{audio-tf_NBjlC.js → audio-Bn44pQxv.js} +4 -4
- package/dist/src/{audio-CHQ4r-RV.js → audio-DDA5WHdx.js} +4 -4
- package/dist/src/{audio-BWeaWovU.cjs → audio-DVFjQ67_.cjs} +4 -4
- package/dist/src/{audio-BRODU0UK.js → audio-DjU9GswO.js} +5 -5
- package/dist/src/{base-DBtwl2FR.cjs → base-BboXIF_0.cjs} +3 -3
- package/dist/src/{base-B4QJRyFS.js → base-CKjwebIH.js} +3 -3
- package/dist/src/{base-B0tcrnq_.js → base-CqzQ4K8j.js} +3 -3
- package/dist/src/{base-fEDN28WM.js → base-Cz2ZC_iA.js} +3 -3
- package/dist/src/{blobs-BAU-dXan.js → blobs-B1JriOyi.js} +3 -3
- package/dist/src/{blobs-qTYm-1PY.js → blobs-BUWmKWzo.js} +3 -3
- package/dist/src/{blobs-DvS-O6be.cjs → blobs-C6j0bvFz.cjs} +3 -3
- package/dist/src/{blobs-Bpg5rH6i.js → blobs-DXTl6J3H.js} +3 -3
- package/dist/src/{cache-COish3-W.cjs → cache-C5yFZ4gC.cjs} +75 -58
- package/dist/src/{cache-8XhNqPKW.js → cache-CaT5tPgo.js} +75 -58
- package/dist/src/cache-CyCanoMu.js +6 -0
- package/dist/src/{cache-CG0SlR1d.js → cache-DSqR6ezl.js} +75 -58
- package/dist/src/cache-Df_QFDNu.cjs +5 -0
- package/dist/src/{cache-D3eqDYGU.js → cache-HP0NP4k3.js} +75 -58
- package/dist/src/{chat-DHMH-N64.js → chat-B-52XYI1.js} +12 -12
- package/dist/src/{chat-BKm79wib.js → chat-B0iaWhoh.js} +16 -14
- package/dist/src/{chat-DxysjBvt.js → chat-BE0qTA8e.js} +13 -13
- package/dist/src/{chat-CRWNNq73.js → chat-BEwdgGEg.js} +16 -14
- package/dist/src/{chat-2K608PeQ.cjs → chat-BtIKkLKx.cjs} +13 -13
- package/dist/src/{chat-DaqekjFr.cjs → chat-CM8qWR3_.cjs} +17 -15
- package/dist/src/{chat-CM_kyI8B.js → chat-DK1U-eZ-.js} +12 -12
- package/dist/src/{chat-CznLWr_D.js → chat-pxmiVpWe.js} +16 -14
- package/dist/src/{chatkit-65VXf5SR.js → chatkit-BYGQlHlV.js} +4 -4
- package/dist/src/{chatkit-DKyPi1Gs.cjs → chatkit-Cx174XI3.cjs} +4 -4
- package/dist/src/{chatkit-BxFvW8KY.js → chatkit-_8eJqKcD.js} +4 -4
- package/dist/src/{chatkit-Be-Q-a9F.js → chatkit-a2D6mY6s.js} +4 -4
- package/dist/src/{claude-agent-sdk-CJH22shf.cjs → claude-agent-sdk-8ddRp1L2.cjs} +35 -17
- package/dist/src/{claude-agent-sdk-Dy5lT-Tx.js → claude-agent-sdk-Bq5EArsX.js} +33 -15
- package/dist/src/{claude-agent-sdk-BLTu0WBO.js → claude-agent-sdk-CMjh4LFH.js} +33 -15
- package/dist/src/{claude-agent-sdk-D6_k9FKA.js → claude-agent-sdk-HgbFioFw.js} +33 -15
- package/dist/src/cloud-DE3t1-ZI.js +4 -0
- package/dist/src/{cloud-Bc9526yV.js → cloud-z8KZpUoa.js} +3 -3
- package/dist/src/{cloudflare-ai-CWWJCRim.js → cloudflare-ai-BGyXlpXJ.js} +13 -13
- package/dist/src/{cloudflare-ai-C9r2sRhw.js → cloudflare-ai-Bbp26N0L.js} +13 -13
- package/dist/src/{cloudflare-ai-ClWSdor4.cjs → cloudflare-ai-C62x6MQG.cjs} +14 -14
- package/dist/src/{cloudflare-ai-ICsOuD-z.js → cloudflare-ai-DdKP9TKT.js} +14 -14
- package/dist/src/{cloudflare-gateway-D6xFc5pa.js → cloudflare-gateway-BwAaUgeW.js} +14 -14
- package/dist/src/{cloudflare-gateway-D6O7AlYb.js → cloudflare-gateway-D-e9i1Sn.js} +15 -15
- package/dist/src/{cloudflare-gateway-pXGHxJ47.js → cloudflare-gateway-DXhtXDRb.js} +15 -163
- package/dist/src/{cloudflare-gateway-C2_-KG5o.cjs → cloudflare-gateway-Dx36ftqF.cjs} +15 -15
- package/dist/src/{codex-sdk-DUwKWezN.js → codex-sdk-BQEw16R_.js} +180 -11
- package/dist/src/{codex-sdk-C6UMlxwV.js → codex-sdk-C_07GuVS.js} +180 -11
- package/dist/src/{codex-sdk-GGAw0qbD.js → codex-sdk-DE5G18dx.js} +180 -11
- package/dist/src/{codex-sdk-fAO0c3yA.cjs → codex-sdk-ZLKfDjqP.cjs} +181 -12
- package/dist/src/cometapi-BDyV-NNm.js +62 -0
- package/dist/src/cometapi-C3hOlM7-.cjs +62 -0
- package/dist/src/{cometapi-Bbjp5V4x.js → cometapi-hhL4TAh3.js} +14 -14
- package/dist/src/{cometapi-BasUi7-_.js → cometapi-sp7sJpBD.js} +15 -15
- package/dist/src/{completion-C_P3ypkJ.js → completion-BCimtq-h.js} +6 -6
- package/dist/src/{completion-6Mx_iXxK.js → completion-DCjv7RZ3.js} +6 -6
- package/dist/src/{completion-CDOouNzq.cjs → completion-DlXUhj5c.cjs} +6 -6
- package/dist/src/{completion-C5rtR_9P.js → completion-DoYy49ti.js} +6 -6
- package/dist/src/{createHash-CfZSc0b4.cjs → createHash-BYwImsYv.cjs} +2 -2
- package/dist/src/{docker-BwsKwxFs.cjs → docker-Cqj2-QVi.cjs} +14 -14
- package/dist/src/{docker-CZnqU1XV.js → docker-CxCkwMzc.js} +13 -13
- package/dist/src/{docker-DzxyDPIj.js → docker-DpguQj-w.js} +14 -14
- package/dist/src/{docker-5KcG-_86.js → docker-FeBni2dw.js} +13 -13
- package/dist/src/{esm-C03C-mv3.js → esm-7UIl0pPM.js} +2 -2
- package/dist/src/{esm-Cd1AjG1D.js → esm-CKWP3u_P.js} +3 -3
- package/dist/src/{esm-CnNt7sI4.cjs → esm-CipptfDu.cjs} +2 -2
- package/dist/src/{esm-CaIwzWR5.js → esm-SUNIX1x3.js} +3 -3
- package/dist/src/eval-7aEqoMs3.js +15 -0
- package/dist/src/{eval-DmFyWU7i.js → eval-BTqTn7lb.js} +10 -10
- package/dist/src/{evalResult-CDQiuUuf.js → evalResult-BkIhRdTe.js} +7 -7
- package/dist/src/evalResult-CYNHkk5A.js +12 -0
- package/dist/src/evalResult-CuvJeNiM.js +10 -0
- package/dist/src/{evalResult-CTG2AHOS.js → evalResult-DUDShQrm.js} +7 -7
- package/dist/src/{evalResult-Dap2CekP.cjs → evalResult-DpARzUCb.cjs} +7 -7
- package/dist/src/evalResult-tGdilrWt.cjs +10 -0
- package/dist/src/evaluator-BBUqRhz1.js +36 -0
- package/dist/src/{evaluator-DPFRbFIL.js → evaluator-BcvOGaam.js} +833 -79
- package/dist/src/{extractor-YMU_Gvt8.js → extractor-C8XwivI9.js} +6 -6
- package/dist/src/{extractor-CFG6bcWJ.js → extractor-CAZ2G3Kh.js} +6 -6
- package/dist/src/{extractor-DX36oYEv.cjs → extractor-DG3sSfXE.cjs} +6 -6
- package/dist/src/{extractor-M67RUtg6.js → extractor-D_wd8jxt.js} +6 -6
- package/dist/src/{fetch-4M3YRaqL.js → fetch-BiYv2BZc.js} +3 -3
- package/dist/src/{fetch-BxUk8odA.cjs → fetch-BnR9wSnm.cjs} +3 -3
- package/dist/src/{fetch-60Gzydls.js → fetch-CVAtKnI3.js} +3 -3
- package/dist/src/{fetch-BMv0O527.js → fetch-DoVRJZhJ.js} +4 -4
- package/dist/src/fetch-UWU706qb.js +5 -0
- package/dist/src/{genaiTracer-DN4dQywX.cjs → genaiTracer-BfxrvSUb.cjs} +2 -2
- package/dist/src/{graders-DOXycdlG.cjs → graders-BElhu9ZY.cjs} +126 -55
- package/dist/src/{graders-R9rYUM0d.js → graders-BXAJ0sbS.js} +120 -55
- package/dist/src/graders-BxfEguVY.js +32 -0
- package/dist/src/graders-CzVMbEnv.js +34 -0
- package/dist/src/{graders-CpdqD9PI.js → graders-DG7mhg-b.js} +120 -55
- package/dist/src/graders-DjCXfj0l.cjs +32 -0
- package/dist/src/{graders-CHO8EPM4.js → graders-RjHF8VfG.js} +120 -55
- package/dist/src/graders-kHzIWOKu.js +32 -0
- package/dist/src/{image-DTedmQPg.cjs → image--F58eEIn.cjs} +6 -6
- package/dist/src/{image-DJEvKveK.js → image-6WQXK8m8.js} +4 -4
- package/dist/src/{image-pAX56tPG.js → image-B8b6f36E.js} +6 -6
- package/dist/src/{image-BmEZqVmk.js → image-CoxZp9PZ.js} +6 -6
- package/dist/src/{image-gvmivTEe.js → image-DO0RYnjH.js} +5 -5
- package/dist/src/{image-CBBVXWuT.js → image-PoF6DN3x.js} +6 -6
- package/dist/src/{image-CDLQOcqT.cjs → image-fza3zuKs.cjs} +4 -4
- package/dist/src/{image-tL5hIOFh.js → image-xNbw5ph2.js} +4 -4
- package/dist/src/index.cjs +863 -110
- package/dist/src/index.d.cts +833 -60
- package/dist/src/index.d.ts +833 -60
- package/dist/src/index.js +860 -108
- package/dist/src/{interactiveCheck-BgLZUIt3.js → interactiveCheck-BnMYOjMu.js} +2 -2
- package/dist/src/{knowledgeBase-CoU-UQBg.js → knowledgeBase-Bi7CmDbx.js} +7 -7
- package/dist/src/{knowledgeBase-CLJybhnF.js → knowledgeBase-Ce3ofVan.js} +8 -8
- package/dist/src/{knowledgeBase-DjWPVqSb.js → knowledgeBase-DFRXPZl_.js} +7 -7
- package/dist/src/{knowledgeBase-wkxuRFhA.cjs → knowledgeBase-DqrLX8fy.cjs} +7 -7
- package/dist/src/{litellm-B9Hysuri.js → litellm-Bo2gQXpo.js} +16 -15
- package/dist/src/{litellm-ePxtr9F1.js → litellm-CKiAxnoM.js} +15 -14
- package/dist/src/{litellm-NYpQ8RQu.cjs → litellm-CnHI69aj.cjs} +16 -15
- package/dist/src/{litellm-CTfa0hqi.js → litellm-Tc294Jhj.js} +15 -14
- package/dist/src/{logger-KkObSCzq.js → logger-BcJBzSSA.js} +10 -14
- package/dist/src/{logger-DLcq4dWf.js → logger-BnkjG2jt.js} +10 -14
- package/dist/src/{logger-Cp1GPUjj.cjs → logger-D5iKBpu_.cjs} +27 -13
- package/dist/src/{logger-CT3IKMKA.js → logger-DO8_zM18.js} +10 -14
- package/dist/src/{luma-ray-BW9IRGIc.js → luma-ray-0ehMPt5N.js} +10 -10
- package/dist/src/{luma-ray-BE2mOt6N.js → luma-ray-C9q8rdQe.js} +9 -9
- package/dist/src/{luma-ray-Cm1KZBhs.js → luma-ray-DP0QA9qn.js} +9 -9
- package/dist/src/{luma-ray-B0GGNRc1.cjs → luma-ray-m9Ku2meV.cjs} +9 -9
- package/dist/src/main.js +69 -71
- package/dist/src/{messages-1x9atZmP.js → messages-DJNo37Ko.js} +14 -9
- package/dist/src/{messages-BLbWdsyt.js → messages-Dy9QecMs.js} +14 -9
- package/dist/src/{messages-1JrJs91T.cjs → messages-HJsyEh4o.cjs} +15 -10
- package/dist/src/{messages-D8EA0oDc.js → messages-biC_ex-p.js} +14 -9
- package/dist/src/{modelslab-C1OLRmVX.js → modelslab-B5J-ZM5c.js} +9 -9
- package/dist/src/{modelslab-CqXBy3U8.js → modelslab-BI458moT.js} +10 -10
- package/dist/src/{modelslab-X5-4LroM.js → modelslab-BTOT8FUO.js} +9 -9
- package/dist/src/{modelslab-DcOSFwKh.cjs → modelslab-IQbNg-r7.cjs} +9 -9
- package/dist/src/{nova-reel-DihqLeol.js → nova-reel-BZ9y-Y5s.js} +9 -9
- package/dist/src/{nova-reel-D9xfaMBs.cjs → nova-reel-CE5etkv9.cjs} +9 -9
- package/dist/src/{nova-reel-D2ZkOSyr.js → nova-reel-DEeQlnOJ.js} +10 -10
- package/dist/src/{nova-reel-BgS1ZWuK.js → nova-reel-Xw1SXLpg.js} +9 -9
- package/dist/src/{nova-sonic-Q3BOJeig.js → nova-sonic-DWswpN1E.js} +7 -7
- package/dist/src/{nova-sonic-DezhVUYT.js → nova-sonic-DXTLpi-r.js} +6 -6
- package/dist/src/{nova-sonic-DVu3mMIy.cjs → nova-sonic-N0yCm0vb.cjs} +6 -6
- package/dist/src/{nova-sonic-P-CdUMlV.js → nova-sonic-Ogqf-csn.js} +6 -6
- package/dist/src/{openai-DhbB7eWK.js → openai-BMcwgD5C.js} +2 -2
- package/dist/src/{openai-j-sE2O7r.js → openai-BcB5KlTk.js} +2 -2
- package/dist/src/{openai-Cuif0GEt.cjs → openai-CoxGAQwn.cjs} +2 -2
- package/dist/src/{openai-DElQ-fPX.js → openai-D6wITiVn.js} +2 -2
- package/dist/src/{openclaw-Bv1DINsX.js → openclaw-0Sv7AK3O.js} +172 -109
- package/dist/src/{openclaw-DAfWQn-o.cjs → openclaw-CXxbKgDH.cjs} +174 -110
- package/dist/src/{openclaw-BiSZPL7J.js → openclaw-D1FSCps-.js} +172 -109
- package/dist/src/{openclaw-D1D_ej1z.js → openclaw-D2ENvu7a.js} +173 -110
- package/dist/src/{opencode-sdk-D95s6SnR.js → opencode-sdk-C71Z0ehR.js} +13 -13
- package/dist/src/{opencode-sdk-DxUPkLT7.js → opencode-sdk-CHCs7dEb.js} +12 -12
- package/dist/src/{opencode-sdk-C7m-wRfI.js → opencode-sdk-DDxj4QqH.js} +12 -12
- package/dist/src/{opencode-sdk-CfaLN8PY.cjs → opencode-sdk-WWJhnbKr.cjs} +16 -16
- package/dist/src/{otlpReceiver-g3ByGaXs.js → otlpReceiver-C9KlUtxh.js} +6 -6
- package/dist/src/{otlpReceiver--AIRW_S4.js → otlpReceiver-CZL48YfC.js} +6 -6
- package/dist/src/{otlpReceiver-Bn5wGB1v.js → otlpReceiver-CavGAA6k.js} +6 -6
- package/dist/src/{otlpReceiver-Diec4cln.cjs → otlpReceiver-DHKqJlsz.cjs} +6 -6
- package/dist/src/{providerRegistry-B0RUOLI_.js → providerRegistry-B9lh-_tx.js} +2 -2
- package/dist/src/{providerRegistry-Civky8Ar.cjs → providerRegistry-BTDgfV5h.cjs} +2 -2
- package/dist/src/{providerRegistry-CD8MEar9.js → providerRegistry-BkzVH5Ba.js} +2 -2
- package/dist/src/{providerRegistry-DM8rZYol.js → providerRegistry-CUWki5mQ.js} +2 -2
- package/dist/src/providers-BSLEaIQG.js +32 -0
- package/dist/src/{providers-CFu-TZl-.cjs → providers-CScd1wN6.cjs} +733 -464
- package/dist/src/{providers-CFLy1_ji.js → providers-Ch6Mr0gn.js} +795 -526
- package/dist/src/{providers-BKRJTjBz.js → providers-Cn73d5sr.js} +795 -526
- package/dist/src/providers-D-FnDg8k.cjs +31 -0
- package/dist/src/providers-DEYiFVAo.js +30 -0
- package/dist/src/{providers-B3HvufyI.js → providers-DvddrgxL.js} +795 -526
- package/dist/src/providers-sS2WI8YD.js +30 -0
- package/dist/src/{pythonUtils-D6fwaDSg.js → pythonUtils-Bzwbgpbg.js} +3 -3
- package/dist/src/{pythonUtils-D5nxkQ0P.js → pythonUtils-Cpo0Ez1p.js} +3 -3
- package/dist/src/{pythonUtils-CTU3Y3lw.cjs → pythonUtils-dAVigVK-.cjs} +3 -3
- package/dist/src/{pythonUtils-C3py6GC1.js → pythonUtils-wIqk7zAf.js} +3 -3
- package/dist/src/{quiverai-CI6gYJVI.js → quiverai-BeofbLVc.js} +4 -4
- package/dist/src/{quiverai-MHSxbmmZ.js → quiverai-CCQn73lq.js} +5 -5
- package/dist/src/{quiverai-CLkWkyZc.cjs → quiverai-CcUhPIBg.cjs} +4 -4
- package/dist/src/{quiverai-C2jVwbH1.js → quiverai-DVSEqJiq.js} +4 -4
- package/dist/src/{render-Drod8m7K.js → render-BHl6QVq9.js} +3 -3
- package/dist/src/{responses-CGw0DCzh.js → responses-BKP_WYis.js} +16 -12
- package/dist/src/{responses-BKqJmhhc.js → responses-CQb1Tj69.js} +16 -12
- package/dist/src/{responses-jxdehPkC.js → responses-CgNyTPsY.js} +16 -12
- package/dist/src/{responses-tD4Bd4dc.cjs → responses-mo0KQDbu.cjs} +16 -12
- package/dist/src/rubyUtils-B1HXG4ej.cjs +4 -0
- package/dist/src/{rubyUtils-DhCAlxZr.cjs → rubyUtils-CGeUtCfW.cjs} +3 -3
- package/dist/src/{rubyUtils-Boc4HZzX.js → rubyUtils-CiVfln3g.js} +3 -3
- package/dist/src/{rubyUtils-BcuGX77l.js → rubyUtils-DECSbsfY.js} +3 -3
- package/dist/src/{rubyUtils-BUVePouc.js → rubyUtils-PgU-gHmx.js} +3 -3
- package/dist/src/rubyUtils-Rt6pKA96.js +5 -0
- package/dist/src/{sagemaker-BK4Zb993.js → sagemaker-CVv8W7so.js} +17 -17
- package/dist/src/{sagemaker-D2Q1c-sD.js → sagemaker-CqeASYE5.js} +17 -17
- package/dist/src/{sagemaker-BfiWTmvn.js → sagemaker-MUbD5V3v.js} +18 -18
- package/dist/src/{sagemaker-CcQHM1jV.cjs → sagemaker-jiw1wQa-.cjs} +17 -17
- package/dist/src/{scanner-J8CA3LsV.js → scanner-DVDeUz1r.js} +10 -10
- package/dist/src/server/index.js +864 -112
- package/dist/src/server-B0Xh1Gx-.js +7 -0
- package/dist/src/{server-B0PPuDw-.cjs → server-BtoCXeXI.cjs} +4 -4
- package/dist/src/{server-BC7XJFgr.js → server-CP9qKM40.js} +4 -4
- package/dist/src/{server-OAs3nBRT.js → server-Cns05F1j.js} +5 -5
- package/dist/src/server-DJTKu9IR.cjs +5 -0
- package/dist/src/{server-DbFphssR.js → server-DZ9MtCn0.js} +6 -6
- package/dist/src/{signal-BOTbd53Z.js → signal-C3ZTsUgi.js} +3 -3
- package/dist/src/{slack-DXMKtA-f.js → slack-2sdpGzbt.js} +2 -2
- package/dist/src/{slack-BmVAVGaK.cjs → slack-94iG3T0s.cjs} +2 -2
- package/dist/src/{slack-DCUPTzS2.js → slack-BR0HtO3K.js} +2 -2
- package/dist/src/{slack-DOdy_kyv.js → slack-DCEV-vWP.js} +2 -2
- package/dist/src/store-C5u6MgC8.js +6 -0
- package/dist/src/{store-BSc-TF2w.cjs → store-CLyU7AtI.cjs} +17 -5
- package/dist/src/store-CNHk-De4.cjs +5 -0
- package/dist/src/{store-DQLEjuEO.js → store-Cj258DgL.js} +17 -5
- package/dist/src/{store-D1tv90v3.js → store-P8OKm19S.js} +17 -5
- package/dist/src/{store-Ub2vaGJ1.js → store-VB0GP46K.js} +17 -5
- package/dist/src/{tables-xKANLRBD.js → tables-BEIFz2tM.js} +3 -3
- package/dist/src/{tables-C7K-XKWp.cjs → tables-BdZQEpRz.cjs} +3 -3
- package/dist/src/{tables-D36WTqKX.js → tables-DmzvLbeZ.js} +3 -3
- package/dist/src/{tables-5EvT_Bwn.js → tables-kC7R5kiK.js} +3 -3
- package/dist/src/{telemetry-C2YDkUQH.js → telemetry-BnH5VJAU.js} +4 -4
- package/dist/src/{telemetry-C15ziL8u.js → telemetry-BugWqKiu.js} +4 -4
- package/dist/src/{telemetry-DMb2Mpfm.js → telemetry-DPXLd7UE.js} +4 -4
- package/dist/src/telemetry-Yig0Tino.js +7 -0
- package/dist/src/telemetry-p8Pwqm1i.cjs +5 -0
- package/dist/src/{telemetry-CbrnxHp_.cjs → telemetry-re627Lre.cjs} +4 -4
- package/dist/src/{transcription-CL78qbOU.cjs → transcription-BvtsrzRG.cjs} +13 -13
- package/dist/src/{transcription-DAtxHhAM.js → transcription-CaMivnjG.js} +13 -13
- package/dist/src/{transcription-QHh3AH6Z.js → transcription-DOMMTu01.js} +14 -14
- package/dist/src/{transcription-LNZTNUUL.js → transcription-Hb3VnC4M.js} +13 -13
- package/dist/src/{transform-DOcQeLld.cjs → transform-0BwoBsvO.cjs} +19 -5
- package/dist/src/{transform-DGxXocjk.js → transform-B2-jIv68.js} +8 -6
- package/dist/src/{transform-DECvGmzp.js → transform-BqPkNPYm.js} +4 -4
- package/dist/src/{transform-aa6tmVpZ.js → transform-BzK09Q_9.js} +4 -4
- package/dist/src/transform-ChNIpHz7.js +6 -0
- package/dist/src/{transform-Cgi24fJ7.js → transform-DrleutM3.js} +8 -6
- package/dist/src/{transform-DGLazrMm.js → transform-DyDAwEpE.js} +8 -6
- package/dist/src/transform-PtQ6rAE3.cjs +5 -0
- package/dist/src/{transform-CzK1Q0zl.cjs → transform-ZrG2dvlo.cjs} +4 -4
- package/dist/src/{transform-DilY9wbS.js → transform-ljLYHEPh.js} +4 -4
- package/dist/src/{transformersAvailability-CEVM2GNQ.js → transformersAvailability-BGkzavwb.js} +1 -1
- package/dist/src/{transformersAvailability-CwayUSlh.cjs → transformersAvailability-DKoRtQLy.cjs} +1 -1
- package/dist/src/{types-CH3Ge2sE.js → types-CIhFeUC4.js} +45 -11
- package/dist/src/{types-CN_TZ2GJ.js → types-Cd3ygw8W.js} +45 -11
- package/dist/src/{types-LJ0r3wbR.cjs → types-D8cGDZbL.cjs} +46 -12
- package/dist/src/{types-CLKiCBW3.js → types-q8GXGF65.js} +45 -11
- package/dist/src/{util-CchiqXh_.cjs → util--9u9UVCt.cjs} +3 -3
- package/dist/src/{util-5cB-L7U3.js → util-BLvy9qfE.js} +7 -11
- package/dist/src/{util-YT5HPZaS.js → util-Bm3E9jpK.js} +7 -11
- package/dist/src/{util-6-GqIvzS.js → util-BtoGs5Cb.js} +18 -4
- package/dist/src/{util-Db0a0AFH.cjs → util-CFj4YKIn.cjs} +18 -4
- package/dist/src/{util-Dlz_Wvgm.js → util-CMMkIxfU.js} +7 -11
- package/dist/src/{util-Betm42rL.js → util-CgDCK4KI.js} +18 -4
- package/dist/src/{util-Yz-1aEhW.cjs → util-CuLo2pMR.cjs} +7 -11
- package/dist/src/{util-C-PPYSMq.js → util-DM2rTn_6.js} +18 -4
- package/dist/src/{util-B7T3SiBS.js → util-DMFeUvLz.js} +3 -3
- package/dist/src/{util-ZZH-3QZz.js → util-DbVG-yZU.js} +3 -3
- package/dist/src/{util-DaWTWKBK.js → util-vNmDL5DT.js} +3 -3
- package/dist/src/{utils-XiOAgly5.js → utils-CFxO9KGo.js} +2 -2
- package/dist/src/{utils-f2-Moju7.js → utils-DEuL4VNB.js} +2 -2
- package/dist/src/{utils-Cz9qXqII.cjs → utils-DKw8mrgr.cjs} +3 -3
- package/dist/src/{utils-dLokC-eR.js → utils-DOjD4dTC.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -38
- package/dist/src/app/assets/index-BFCZg7hQ.js +0 -439
- package/dist/src/app/assets/index-NCn4eVBv.css +0 -1
- package/dist/src/app/assets/sync-9qqYcY-B.js +0 -4
- package/dist/src/app/assets/vendor-charts-CCl15Imd.js +0 -36
- package/dist/src/app/assets/vendor-markdown-0tekx3KX.js +0 -29
- package/dist/src/cache-Bbn1Nyrd.cjs +0 -5
- package/dist/src/cache-BwsMSda7.js +0 -6
- package/dist/src/cloud-DmE0EwsY.js +0 -4
- package/dist/src/eval-17JizQIv.js +0 -15
- package/dist/src/evalResult-Cqj8pldJ.js +0 -12
- package/dist/src/evalResult-DvcJAWJU.cjs +0 -10
- package/dist/src/evalResult-Hftn-S_i.js +0 -10
- package/dist/src/evaluator-B2CFNt-P.js +0 -36
- package/dist/src/fetch-KV5kNASw.js +0 -5
- package/dist/src/graders-Bu0H9nXi.js +0 -32
- package/dist/src/graders-Cfhkvx-e.js +0 -34
- package/dist/src/graders-DClJVpGP.cjs +0 -32
- package/dist/src/graders-DcnJsrMO.js +0 -32
- package/dist/src/providers-C1rOSHiR.js +0 -32
- package/dist/src/providers-CxmDwEFf.cjs +0 -31
- package/dist/src/providers-Dodakqr0.js +0 -30
- package/dist/src/providers-GIQ2TcsA.js +0 -30
- package/dist/src/rubyUtils-BUHu6PhO.js +0 -5
- package/dist/src/rubyUtils-CP42kMvq.cjs +0 -4
- package/dist/src/server-B1vi21hA.js +0 -7
- package/dist/src/server-Cm9Kai_h.cjs +0 -5
- package/dist/src/store-BNmZ1KAz.cjs +0 -5
- package/dist/src/store-BltJg2cd.js +0 -6
- package/dist/src/telemetry-5BCRNBbe.cjs +0 -5
- package/dist/src/telemetry-D4W5hboe.js +0 -7
- package/dist/src/transform-DTGDnAzW.js +0 -6
- package/dist/src/transform-m3qNw4KP.cjs +0 -5
package/dist/src/main.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { A as getShareApiBaseUrl, C as CLOUD_PROVIDER_PREFIX, D as TERMINAL_MAX_WIDTH, F as HUMAN_ASSERTION_TYPE, N as VERSION, O as getDefaultPort, f as REQUEST_TIMEOUT_MS, g as isPromptfooSampleTarget, i as fetchWithTimeout, j as getShareViewBaseUrl, k as getDefaultShareViewBaseUrl, l as sleep, n as fetchWithProxy, r as fetchWithRetries, t as clearAgentCache } from "./fetch-
|
|
2
|
+
import { A as isNonInteractive, C as getEnvBool, E as getEnvString, S as setConfigDirectoryPath, T as getEnvInt, a as isDebugEnabled, c as setLogCallback, f as sanitizeObject, h as extractJsonObjects, i as initializeRunLogging, j as state, k as isCI, l as setLogLevel, m as extractFirstJsonObject, n as getLogLevel, s as logger, t as closeLogger, v as orderKeys, w as getEnvFloat, x as getConfigDirectoryPath } from "./logger-BcJBzSSA.js";
|
|
3
|
+
import { A as getShareApiBaseUrl, C as CLOUD_PROVIDER_PREFIX, D as TERMINAL_MAX_WIDTH, F as HUMAN_ASSERTION_TYPE, N as VERSION, O as getDefaultPort, f as REQUEST_TIMEOUT_MS, g as isPromptfooSampleTarget, i as fetchWithTimeout, j as getShareViewBaseUrl, k as getDefaultShareViewBaseUrl, l as sleep, n as fetchWithProxy, r as fetchWithRetries, t as clearAgentCache } from "./fetch-DoVRJZhJ.js";
|
|
4
4
|
import { t as invariant } from "./invariant-BtWWVVhl.js";
|
|
5
|
-
import { a as getAuthor, c as isLoggedIntoCloud, l as promptForEmailUnverified, n as checkEmailStatusAndMaybeExit, o as getUserEmail, r as clearUserEmail, s as getUserId, t as checkEmailStatus, u as setUserEmail } from "./accounts-
|
|
6
|
-
import { a as cloudConfig, c as writeGlobalConfigPartial, o as readGlobalConfig, r as CloudConfig } from "./cloud-
|
|
7
|
-
import { n as TelemetryEventSchema, r as telemetry } from "./telemetry-
|
|
8
|
-
import { $ as INSURANCE_PLUGINS, B as categoryAliases, D as ADDITIONAL_STRATEGIES, E as isUuid, F as getDefaultNFanout, G as ADDITIONAL_PLUGINS, H as riskCategorySeverityMap, J as DATASET_EXEMPT_PLUGINS, K as ALL_PLUGINS, L as isFanoutStrategy, N as STRATEGY_COLLECTIONS, P as STRATEGY_COLLECTION_MAPPINGS, Q as HARM_PLUGINS, R as isMultiTurnStrategy, S as PluginConfigSchema, U as subCategoryDescriptions, W as ALIASED_PLUGIN_MAPPINGS, X as FINANCIAL_PLUGINS, Y as DEFAULT_PLUGINS, Z as FOUNDATION_PLUGINS, _ as PromptSchema, a as EvaluateOptionsSchema, at as PHARMACY_PLUGINS, b as ConversationMessageSchema, c as TestSuiteConfigSchema, ct as REDTEAM_MODEL, et as LLAMA_GUARD_ENABLED_CATEGORIES, ft as TELECOM_PLUGINS, g as RedteamGenerateOptionsSchema, h as RedteamConfigSchema, i as EvalResultsFilterMode, it as MULTI_INPUT_VAR, j as DEFAULT_STRATEGIES, k as ALL_STRATEGIES, l as TestSuiteSchema, lt as REDTEAM_PROVIDER_HARM_PLUGINS, n as BaseAssertionTypesSchema, nt as MEDICAL_PLUGINS, o as OutputFileExtension, ot as PII_PLUGINS, p as isApiProvider, pt as UNALIGNED_PROVIDER_HARM_PLUGINS, q as BIAS_PLUGINS, r as CommandLineOptionsSchema, rt as MULTI_INPUT_EXCLUDED_PLUGINS, s as ResultFailureReason, t as AssertionOrSetSchema, tt as LLAMA_GUARD_REPLICATE_PROVIDER, u as UnifiedConfigSchema, ut as REMOTE_ONLY_PLUGIN_IDS, v as ProviderOptionsSchema, w as StrategyConfigSchema, x as PartialGenerationError, y as ProvidersSchema, z as Severity } from "./types-
|
|
9
|
-
import { a as openAuthBrowser, d as getRemoteHealthUrl, f as neverGenerateRemote, i as checkServerRunning, l as getRemoteGenerationUrl, m as shouldGenerateRemote, n as BrowserBehaviorNames, o as openBrowser, s as promptUser, t as BrowserBehavior } from "./server-
|
|
10
|
-
import { A as renderPrompt, C as extractVariablesFromJson, F as TokenUsageTracker, P as redteamProviderManager, R as PromptfooHarmfulCompletionProvider, S as extractPromptFromTags, T as getShortPluginId, _ as pluginMatchesStrategyTargets, _t as resolveTeamId, a as resolveProviderConfigs, at as getCloudDatabaseId, b as extractGoalFromPrompt, c as createTransformRequest, ct as getEvalConfigFromCloud, d as Strategies, f as loadStrategy, ft as getProviderFromCloud, g as retrieveMedia, gt as resolveTeamFromIdentifier, h as mediaExists, ht as makeRequest$1, i as resolveProvider, it as checkCloudPermissions, l as createTransformResponse, lt as getOrgContext, m as getMediaStorage, mt as isCloudProvider, n as loadApiProvider, o as MCPProvider, ot as getConfigFromCloud, p as validateStrategies, pt as getUserTeams, r as loadApiProviders, rt as canCreateTargets, s as HttpProvider, st as getDefaultTeam, t as getProviderIds, ut as getPluginSeverityOverridesFromCloud } from "./providers-
|
|
11
|
-
import { a as fetchWithCache, n as clearCache, r as disableCache, t as cache_exports } from "./cache-
|
|
5
|
+
import { a as getAuthor, c as isLoggedIntoCloud, l as promptForEmailUnverified, n as checkEmailStatusAndMaybeExit, o as getUserEmail, r as clearUserEmail, s as getUserId, t as checkEmailStatus, u as setUserEmail } from "./accounts-CFLK3mnD.js";
|
|
6
|
+
import { a as cloudConfig, c as writeGlobalConfigPartial, o as readGlobalConfig, r as CloudConfig } from "./cloud-z8KZpUoa.js";
|
|
7
|
+
import { n as TelemetryEventSchema, r as telemetry } from "./telemetry-BnH5VJAU.js";
|
|
8
|
+
import { $ as INSURANCE_PLUGINS, B as categoryAliases, D as ADDITIONAL_STRATEGIES, E as isUuid, F as getDefaultNFanout, G as ADDITIONAL_PLUGINS, H as riskCategorySeverityMap, J as DATASET_EXEMPT_PLUGINS, K as ALL_PLUGINS, L as isFanoutStrategy, N as STRATEGY_COLLECTIONS, P as STRATEGY_COLLECTION_MAPPINGS, Q as HARM_PLUGINS, R as isMultiTurnStrategy, S as PluginConfigSchema, U as subCategoryDescriptions, W as ALIASED_PLUGIN_MAPPINGS, X as FINANCIAL_PLUGINS, Y as DEFAULT_PLUGINS, Z as FOUNDATION_PLUGINS, _ as PromptSchema, a as EvaluateOptionsSchema, at as PHARMACY_PLUGINS, b as ConversationMessageSchema, c as TestSuiteConfigSchema, ct as REDTEAM_MODEL, et as LLAMA_GUARD_ENABLED_CATEGORIES, ft as TELECOM_PLUGINS, g as RedteamGenerateOptionsSchema, h as RedteamConfigSchema, i as EvalResultsFilterMode, it as MULTI_INPUT_VAR, j as DEFAULT_STRATEGIES, k as ALL_STRATEGIES, l as TestSuiteSchema, lt as REDTEAM_PROVIDER_HARM_PLUGINS, n as BaseAssertionTypesSchema, nt as MEDICAL_PLUGINS, o as OutputFileExtension, ot as PII_PLUGINS, p as isApiProvider, pt as UNALIGNED_PROVIDER_HARM_PLUGINS, q as BIAS_PLUGINS, r as CommandLineOptionsSchema, rt as MULTI_INPUT_EXCLUDED_PLUGINS, s as ResultFailureReason, t as AssertionOrSetSchema, tt as LLAMA_GUARD_REPLICATE_PROVIDER, u as UnifiedConfigSchema, ut as REMOTE_ONLY_PLUGIN_IDS, v as ProviderOptionsSchema, w as StrategyConfigSchema, x as PartialGenerationError, y as ProvidersSchema, z as Severity } from "./types-CIhFeUC4.js";
|
|
9
|
+
import { a as openAuthBrowser, d as getRemoteHealthUrl, f as neverGenerateRemote, i as checkServerRunning, l as getRemoteGenerationUrl, m as shouldGenerateRemote, n as BrowserBehaviorNames, o as openBrowser, s as promptUser, t as BrowserBehavior } from "./server-DZ9MtCn0.js";
|
|
10
|
+
import { A as renderPrompt, C as extractVariablesFromJson, F as TokenUsageTracker, P as redteamProviderManager, R as PromptfooHarmfulCompletionProvider, S as extractPromptFromTags, T as getShortPluginId, _ as pluginMatchesStrategyTargets, _t as resolveTeamId, a as resolveProviderConfigs, at as getCloudDatabaseId, b as extractGoalFromPrompt, c as createTransformRequest, ct as getEvalConfigFromCloud, d as Strategies, f as loadStrategy, ft as getProviderFromCloud, g as retrieveMedia, gt as resolveTeamFromIdentifier, h as mediaExists, ht as makeRequest$1, i as resolveProvider, it as checkCloudPermissions, l as createTransformResponse, lt as getOrgContext, m as getMediaStorage, mt as isCloudProvider, n as loadApiProvider, o as MCPProvider, ot as getConfigFromCloud, p as validateStrategies, pt as getUserTeams, r as loadApiProviders, rt as canCreateTargets, s as HttpProvider, st as getDefaultTeam, t as getProviderIds, ut as getPluginSeverityOverridesFromCloud } from "./providers-Ch6Mr0gn.js";
|
|
11
|
+
import { a as fetchWithCache, n as clearCache, r as disableCache, t as cache_exports } from "./cache-DSqR6ezl.js";
|
|
12
12
|
import { i as isJavascriptFile } from "./fileExtensions-Ds-foDzt.js";
|
|
13
|
-
import { A as filterRuntimeVars, C as extractVariablesFromTemplates, D as setupEnv, F as getProviderDescription, M as resultIsForTestCase, N as checkProviderApiKeys, O as deduplicateTestCases, P as doesProviderRefMatch, S as extractVariablesFromTemplate, a as ComparisonEvalNotFoundError, b as renderEnvOnlyInObject, c as mergeComparisonTables, f as maybeLoadConfigFromExternalFile, i as writeOutput, j as getTestCaseDeduplicationKey, k as extractRuntimeVars, l as fetchCsvFromGoogleSheet, n as createOutputMetadata, o as evalTableToJson, p as maybeLoadFromExternalFile, r as writeMultipleOutputs, s as generateEvalCsv, t as printBorder, v as readFilters, w as getNunjucksEngine, y as readOutput } from "./util-
|
|
14
|
-
import { r as importModule, t as getDirectory } from "./esm-
|
|
15
|
-
import { r as runPython } from "./pythonUtils-
|
|
16
|
-
import "./transform-
|
|
17
|
-
import { A as BeavertailsPlugin, C as HarmbenchPlugin, D as DebugAccessPlugin, E as DivergentRepetitionPlugin, F as retryWithDeduplication, I as sampleArray, L as fetchHuggingFaceDataset, M as RedteamGraderBase, N as RedteamPluginBase, O as CrossSessionLeakPlugin, P as getCustomPolicies, S as ImitationPlugin, T as ExcessiveAgencyPlugin, _ as makeInlinePolicyIdSync, a as UnverifiableClaimsPlugin, b as OverreliancePlugin, c as ToolDiscoveryPlugin, ct as
|
|
18
|
-
import { i as generateIdFromPrompt } from "./utils-
|
|
13
|
+
import { A as filterRuntimeVars, C as extractVariablesFromTemplates, D as setupEnv, F as getProviderDescription, M as resultIsForTestCase, N as checkProviderApiKeys, O as deduplicateTestCases, P as doesProviderRefMatch, S as extractVariablesFromTemplate, a as ComparisonEvalNotFoundError, b as renderEnvOnlyInObject, c as mergeComparisonTables, f as maybeLoadConfigFromExternalFile, i as writeOutput, j as getTestCaseDeduplicationKey, k as extractRuntimeVars, l as fetchCsvFromGoogleSheet, n as createOutputMetadata, o as evalTableToJson, p as maybeLoadFromExternalFile, r as writeMultipleOutputs, s as generateEvalCsv, t as printBorder, v as readFilters, w as getNunjucksEngine, y as readOutput } from "./util-Bm3E9jpK.js";
|
|
14
|
+
import { r as importModule, t as getDirectory } from "./esm-7UIl0pPM.js";
|
|
15
|
+
import { r as runPython } from "./pythonUtils-wIqk7zAf.js";
|
|
16
|
+
import "./transform-ljLYHEPh.js";
|
|
17
|
+
import { A as BeavertailsPlugin, C as HarmbenchPlugin, D as DebugAccessPlugin, E as DivergentRepetitionPlugin, F as retryWithDeduplication, I as sampleArray, L as fetchHuggingFaceDataset, M as RedteamGraderBase, N as RedteamPluginBase, O as CrossSessionLeakPlugin, P as getCustomPolicies, S as ImitationPlugin, T as ExcessiveAgencyPlugin, _ as makeInlinePolicyIdSync, a as UnverifiableClaimsPlugin, at as getDefaultProviders, b as OverreliancePlugin, c as ToolDiscoveryPlugin, ct as readPrompts, d as RbacPlugin, f as PromptExtractionPlugin, g as isValidPolicyObject, h as determinePolicyTypeFromId, i as VLGuardPlugin, it as doRemoteGrading, j as AegisPlugin, k as ContractPlugin, l as SqlInjectionPlugin, lt as readProviderPromptMap, m as PolicyPlugin, o as UnsafeBenchPlugin, p as PoliticsPlugin, r as VLSUPlugin, s as ToxicChatPlugin, st as processPrompts, t as GRADERS, u as ShellInjectionPlugin, v as PlinyPlugin, w as HallucinationPlugin, x as IntentPlugin, y as getPiiLeakTestsForCategory } from "./graders-RjHF8VfG.js";
|
|
18
|
+
import { i as generateIdFromPrompt } from "./utils-DEuL4VNB.js";
|
|
19
19
|
import { n as sha256, t as randomSequence } from "./createHash-Da8fMwqB.js";
|
|
20
20
|
import "./genaiTracer-C1rxGO8Q.js";
|
|
21
|
-
import "./chat-
|
|
21
|
+
import "./chat-BEwdgGEg.js";
|
|
22
22
|
import { a as createEmptyTokenUsage, i as createEmptyAssertions, n as accumulateResponseTokenUsage, r as accumulateTokenUsage, t as accumulateAssertionTokenUsage } from "./tokenUsageUtils-DflFMjS0.js";
|
|
23
|
-
import "./transform-
|
|
24
|
-
import "./messages-
|
|
25
|
-
import "./util-
|
|
26
|
-
import "./responses-
|
|
27
|
-
import "./openai-
|
|
28
|
-
import "./util-
|
|
29
|
-
import "./completion-
|
|
30
|
-
import { n as getBlobUrl, t as getBlobByHash } from "./blobs-
|
|
31
|
-
import { a as evalResultsTable, c as evalsToPromptsTable, d as promptsTable, g as getDb, h as closeDbIfOpen, i as datasetsTable, l as evalsToTagsTable, n as blobReferencesTable, o as evalsTable, p as tagsTable, r as configsTable, s as evalsToDatasetsTable, t as blobAssetsTable, u as modelAuditsTable } from "./tables-
|
|
32
|
-
import { n as isBlobStorageEnabled } from "./extractor-
|
|
23
|
+
import "./transform-DrleutM3.js";
|
|
24
|
+
import "./messages-DJNo37Ko.js";
|
|
25
|
+
import "./util-DMFeUvLz.js";
|
|
26
|
+
import "./responses-BKP_WYis.js";
|
|
27
|
+
import "./openai-BMcwgD5C.js";
|
|
28
|
+
import "./util-DM2rTn_6.js";
|
|
29
|
+
import "./completion-DoYy49ti.js";
|
|
30
|
+
import { n as getBlobUrl, t as getBlobByHash } from "./blobs-B1JriOyi.js";
|
|
31
|
+
import { a as evalResultsTable, c as evalsToPromptsTable, d as promptsTable, g as getDb, h as closeDbIfOpen, i as datasetsTable, l as evalsToTagsTable, n as blobReferencesTable, o as evalsTable, p as tagsTable, r as configsTable, s as evalsToDatasetsTable, t as blobAssetsTable, u as modelAuditsTable } from "./tables-DmzvLbeZ.js";
|
|
32
|
+
import { n as isBlobStorageEnabled } from "./extractor-CAZ2G3Kh.js";
|
|
33
33
|
import { n as escapeRegExp, t as ellipsize } from "./text-Db-Wt2u2.js";
|
|
34
|
-
import { n as getTraceStore } from "./store-
|
|
35
|
-
import "./base-
|
|
36
|
-
import "./image-
|
|
37
|
-
import "./providerRegistry-
|
|
38
|
-
import "./rubyUtils-
|
|
39
|
-
import { c as
|
|
40
|
-
import { n as setupSignalWatcher, t as readSignalEvalId } from "./signal-
|
|
41
|
-
import { a as createEvalId, n as EvalQueries, s as getEvalSummaries, t as Eval } from "./eval-
|
|
42
|
-
import { t as EvalResult } from "./evalResult-
|
|
34
|
+
import { n as getTraceStore } from "./store-P8OKm19S.js";
|
|
35
|
+
import "./base-CKjwebIH.js";
|
|
36
|
+
import "./image-PoF6DN3x.js";
|
|
37
|
+
import "./providerRegistry-B9lh-_tx.js";
|
|
38
|
+
import "./rubyUtils-CiVfln3g.js";
|
|
39
|
+
import { c as assertions_default, d as runAssertions, l as readAssertions, n as evaluate$1, s as doesPromptRefMatch, u as renderMetricName } from "./evaluator-BcvOGaam.js";
|
|
40
|
+
import { n as setupSignalWatcher, t as readSignalEvalId } from "./signal-C3ZTsUgi.js";
|
|
41
|
+
import { a as createEvalId, n as EvalQueries, s as getEvalSummaries, t as Eval } from "./eval-BTqTn7lb.js";
|
|
42
|
+
import { t as EvalResult } from "./evalResult-DUDShQrm.js";
|
|
43
43
|
import { t as formatDuration } from "./formatDuration-DgBVMN65.js";
|
|
44
|
-
import { n as shouldUseInkUI } from "./interactiveCheck-
|
|
44
|
+
import { n as shouldUseInkUI } from "./interactiveCheck-BnMYOjMu.js";
|
|
45
45
|
import { fileURLToPath } from "node:url";
|
|
46
46
|
import fs, { realpathSync } from "node:fs";
|
|
47
47
|
import path, { resolve } from "node:path";
|
|
@@ -113,7 +113,7 @@ function runCommand(program) {
|
|
|
113
113
|
hasGithubPr: !!cmdObj.githubPr,
|
|
114
114
|
hasGuidance: !!(cmdObj.guidance || cmdObj.guidanceFile)
|
|
115
115
|
});
|
|
116
|
-
const { executeScan } = await import("./scanner-
|
|
116
|
+
const { executeScan } = await import("./scanner-DVDeUz1r.js");
|
|
117
117
|
await executeScan(repoPath, cmdObj);
|
|
118
118
|
});
|
|
119
119
|
}
|
|
@@ -1037,8 +1037,7 @@ function testCaseFromCsvRow(row) {
|
|
|
1037
1037
|
logger.warn("The \"__metadata\" column requires a key, e.g. \"__metadata:category\". This column will be ignored.");
|
|
1038
1038
|
} else if (key.startsWith("__config:")) {
|
|
1039
1039
|
const configParts = key.slice(9).split(":");
|
|
1040
|
-
if (configParts.length
|
|
1041
|
-
else {
|
|
1040
|
+
if (configParts.length === 2) {
|
|
1042
1041
|
const [expectedKey, configKey] = configParts;
|
|
1043
1042
|
let targetIndex;
|
|
1044
1043
|
if (expectedKey === "__expected") targetIndex = 0;
|
|
@@ -1064,7 +1063,7 @@ function testCaseFromCsvRow(row) {
|
|
|
1064
1063
|
}
|
|
1065
1064
|
}
|
|
1066
1065
|
assertionConfigs[targetIndex][configKey] = parsedValue;
|
|
1067
|
-
}
|
|
1066
|
+
} else logger.warn(`Invalid __config column format: "${key}". Expected format: __config:__expected:threshold or __config:__expected<N>:threshold`);
|
|
1068
1067
|
} else vars[key] = value;
|
|
1069
1068
|
}
|
|
1070
1069
|
for (let i = 0; i < asserts.length; i++) {
|
|
@@ -1202,14 +1201,14 @@ async function parseXlsxFile(filePath) {
|
|
|
1202
1201
|
const sheetName = typeof sheetOption === "number" ? sheetNames[sheetOption - 1] : sheetOption;
|
|
1203
1202
|
const rows = await readXlsxFile(actualFilePath, { sheet: sheetOption });
|
|
1204
1203
|
if (rows.length === 0) throw new Error(`Sheet "${sheetName}" is empty or contains no valid data rows`);
|
|
1205
|
-
const headers = rows[0].map((cell) => cell
|
|
1204
|
+
const headers = rows[0].map((cell) => cell == null ? "" : String(cell));
|
|
1206
1205
|
if (headers.length === 0 || headers.every((h) => h === "")) throw new Error(`Sheet "${sheetName}" has no valid column headers`);
|
|
1207
1206
|
if (rows.length === 1) throw new Error(`Sheet "${sheetName}" is empty or contains no valid data rows`);
|
|
1208
1207
|
const data = rows.slice(1).map((row) => {
|
|
1209
1208
|
const obj = {};
|
|
1210
1209
|
headers.forEach((header, index) => {
|
|
1211
1210
|
const cellValue = row[index];
|
|
1212
|
-
obj[header] = cellValue
|
|
1211
|
+
obj[header] = cellValue == null ? "" : String(cellValue);
|
|
1213
1212
|
});
|
|
1214
1213
|
return obj;
|
|
1215
1214
|
});
|
|
@@ -3340,20 +3339,19 @@ function generateEvalSummary(params) {
|
|
|
3340
3339
|
}
|
|
3341
3340
|
}
|
|
3342
3341
|
lines.push("");
|
|
3343
|
-
const
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
}
|
|
3351
|
-
const passedPart = successes > 0 ? `${chalk.green("✓")} ${chalk.green.bold(successes.toLocaleString())} passed` : `${chalk.gray.bold(successes.toLocaleString())} passed`;
|
|
3352
|
-
const failedPart = failures > 0 ? `${chalk.red("✗")} ${chalk.red.bold(failures.toLocaleString())} failed` : `${chalk.gray.bold(failures.toLocaleString())} failed`;
|
|
3342
|
+
const totalTests = successes + failures + errors;
|
|
3343
|
+
const formatResultPercentage = (count) => {
|
|
3344
|
+
const percentage = totalTests === 0 ? 0 : count / totalTests * 100;
|
|
3345
|
+
return percentage === 0 || percentage === 100 ? `${percentage.toFixed(0)}%` : `${percentage.toFixed(2)}%`;
|
|
3346
|
+
};
|
|
3347
|
+
const formatResultLine = (count, label, icon, iconColor) => {
|
|
3348
|
+
return ` ${icon ? `${iconColor(icon)} ` : ""}${chalk.white.bold(count.toLocaleString())} ${chalk.white(label)} ${chalk.gray(`(${formatResultPercentage(count)})`)}`;
|
|
3349
|
+
};
|
|
3353
3350
|
const errorLabel = errors === 1 ? "error" : "errors";
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3351
|
+
lines.push(chalk.bold("Results:"));
|
|
3352
|
+
lines.push(formatResultLine(successes, "passed", successes > 0 ? "✓" : void 0, chalk.green));
|
|
3353
|
+
lines.push(formatResultLine(failures, "failed", failures > 0 ? "✗" : void 0, chalk.red));
|
|
3354
|
+
lines.push(formatResultLine(errors, errorLabel, errors > 0 ? "✗" : void 0, chalk.red));
|
|
3357
3355
|
const durationDisplay = formatDuration(duration);
|
|
3358
3356
|
lines.push(chalk.gray(`Duration: ${durationDisplay} (concurrency: ${maxConcurrency})`));
|
|
3359
3357
|
lines.push("");
|
|
@@ -3617,8 +3615,8 @@ var ModelAudit = class ModelAudit {
|
|
|
3617
3615
|
this.issues = data.issues || data.results?.issues || null;
|
|
3618
3616
|
const issues = data.issues || data.results?.issues;
|
|
3619
3617
|
const resultsHasErrors = data.results?.has_errors ?? false;
|
|
3620
|
-
if (data.hasErrors
|
|
3621
|
-
else this.hasErrors =
|
|
3618
|
+
if (data.hasErrors === void 0) this.hasErrors = resultsHasErrors || issues && issues.some((issue) => issue.severity === "critical" || issue.severity === "error") || false;
|
|
3619
|
+
else this.hasErrors = data.hasErrors;
|
|
3622
3620
|
this.totalChecks = data.totalChecks;
|
|
3623
3621
|
this.passedChecks = data.passedChecks;
|
|
3624
3622
|
this.failedChecks = data.failedChecks;
|
|
@@ -4153,7 +4151,7 @@ async function doEval(cmdObj, defaultConfig, defaultConfigPath, evaluateOptions)
|
|
|
4153
4151
|
await checkCloudPermissions(config);
|
|
4154
4152
|
const options = {
|
|
4155
4153
|
...evaluateOptions,
|
|
4156
|
-
showProgressBar: getLogLevel() === "debug" ? false : cmdObj.progressBar
|
|
4154
|
+
showProgressBar: getLogLevel() === "debug" ? false : cmdObj.progressBar === void 0 ? evaluateOptions.showProgressBar === void 0 ? true : evaluateOptions.showProgressBar : cmdObj.progressBar !== false,
|
|
4157
4155
|
repeat,
|
|
4158
4156
|
delay: !Number.isNaN(delay) && delay > 0 ? delay : void 0,
|
|
4159
4157
|
maxConcurrency,
|
|
@@ -7855,7 +7853,7 @@ async function doRedteamRun(options) {
|
|
|
7855
7853
|
redteamConfig = await doGenerateRedteam({
|
|
7856
7854
|
...passThroughOptions,
|
|
7857
7855
|
...options.liveRedteamConfig?.commandLineOptions || {},
|
|
7858
|
-
...maxConcurrency
|
|
7856
|
+
...maxConcurrency === void 0 ? {} : { maxConcurrency },
|
|
7859
7857
|
config: configPath,
|
|
7860
7858
|
output: redteamPath,
|
|
7861
7859
|
force: options.force,
|
|
@@ -8677,7 +8675,7 @@ evalRouter.post("/", async (req, res) => {
|
|
|
8677
8675
|
logger.debug("[POST /api/eval] Saving eval results (v4) to database");
|
|
8678
8676
|
const eval_ = await Eval.create(incEval.config, incEval.prompts || [], {
|
|
8679
8677
|
author: incEval.author,
|
|
8680
|
-
createdAt: incEval.createdAt
|
|
8678
|
+
createdAt: incEval.createdAt === void 0 ? void 0 : new Date(incEval.createdAt),
|
|
8681
8679
|
results: incEval.results,
|
|
8682
8680
|
vars: incEval.vars
|
|
8683
8681
|
});
|
|
@@ -8907,7 +8905,7 @@ async function checkForUpdates() {
|
|
|
8907
8905
|
} catch {
|
|
8908
8906
|
return false;
|
|
8909
8907
|
}
|
|
8910
|
-
if (semverGt(latestVersion, "0.121.
|
|
8908
|
+
if (semverGt(latestVersion, "0.121.3")) {
|
|
8911
8909
|
const border = "=".repeat(TERMINAL_MAX_WIDTH);
|
|
8912
8910
|
logger.info(`\n${border}
|
|
8913
8911
|
${chalk.yellow("⚠️")} The current version of promptfoo ${chalk.yellow(VERSION)} is lower than the latest available version ${chalk.green(latestVersion)}.
|
|
@@ -12297,7 +12295,7 @@ router.get("/", async (_req, res) => {
|
|
|
12297
12295
|
};
|
|
12298
12296
|
} catch (error) {
|
|
12299
12297
|
logger.debug(`Failed to fetch latest version: ${error}`);
|
|
12300
|
-
latestVersion = versionCache.latestVersion ?? "0.121.
|
|
12298
|
+
latestVersion = versionCache.latestVersion ?? "0.121.3";
|
|
12301
12299
|
}
|
|
12302
12300
|
}
|
|
12303
12301
|
const selfHosted = getEnvBool("PROMPTFOO_SELF_HOSTED");
|
|
@@ -12306,7 +12304,7 @@ router.get("/", async (_req, res) => {
|
|
|
12306
12304
|
selfHosted,
|
|
12307
12305
|
isNpx
|
|
12308
12306
|
});
|
|
12309
|
-
const resolvedLatestVersion = latestVersion ?? "0.121.
|
|
12307
|
+
const resolvedLatestVersion = latestVersion ?? "0.121.3";
|
|
12310
12308
|
const response = {
|
|
12311
12309
|
currentVersion: VERSION,
|
|
12312
12310
|
latestVersion: resolvedLatestVersion,
|
|
@@ -15151,7 +15149,7 @@ function shouldUseInkList() {
|
|
|
15151
15149
|
async function runInkList(options) {
|
|
15152
15150
|
const [React, { renderInteractive }, { ListApp }] = await Promise.all([
|
|
15153
15151
|
import("react"),
|
|
15154
|
-
import("./render-
|
|
15152
|
+
import("./render-BHl6QVq9.js"),
|
|
15155
15153
|
import("./ListApp-Du7YVwj5.js")
|
|
15156
15154
|
]);
|
|
15157
15155
|
let result = { cancelled: false };
|
|
@@ -15276,16 +15274,16 @@ function listCommand(program) {
|
|
|
15276
15274
|
const passRate = Math.round((item.passCount ?? 0) / total * 100);
|
|
15277
15275
|
const color = passRate >= 80 ? chalk.green : passRate >= 50 ? chalk.yellow : chalk.red;
|
|
15278
15276
|
logger.info(`${chalk.white("Results:")} ${color.bold(`${passRate}%`)} passed ${chalk.gray(`(${item.passCount}/${total})`)}`);
|
|
15279
|
-
if (item.errorCount && item.errorCount > 0) logger.info(`${chalk.red("Errors:")} ${item.errorCount} test${item.errorCount
|
|
15277
|
+
if (item.errorCount && item.errorCount > 0) logger.info(`${chalk.red("Errors:")} ${item.errorCount} test${item.errorCount === 1 ? "" : "s"} failed to run`);
|
|
15280
15278
|
} else {
|
|
15281
15279
|
logger.info(`${chalk.yellow("Status:")} No results yet`);
|
|
15282
|
-
if (item.testCount) logger.info(`${chalk.gray("Configured:")} ${item.testCount} test${item.testCount
|
|
15280
|
+
if (item.testCount) logger.info(`${chalk.gray("Configured:")} ${item.testCount} test${item.testCount === 1 ? "" : "s"}`);
|
|
15283
15281
|
}
|
|
15284
15282
|
if (item.providers && item.providers.length > 0) {
|
|
15285
15283
|
const providerList = item.providers.length <= 3 ? item.providers.join(", ") : `${item.providers.slice(0, 3).join(", ")} +${item.providers.length - 3} more`;
|
|
15286
15284
|
logger.info(`${chalk.white("Providers:")} ${chalk.gray(providerList)}`);
|
|
15287
15285
|
}
|
|
15288
|
-
if (item.promptCount && item.promptCount > 0) logger.info(`${chalk.white("Prompts:")} ${item.promptCount}${item.vars.length > 0 ? chalk.gray(` × ${item.vars.length} var${item.vars.length
|
|
15286
|
+
if (item.promptCount && item.promptCount > 0) logger.info(`${chalk.white("Prompts:")} ${item.promptCount}${item.vars.length > 0 ? chalk.gray(` × ${item.vars.length} var${item.vars.length === 1 ? "" : "s"}`) : ""}`);
|
|
15289
15287
|
const timeStr = item.createdAt.toLocaleString();
|
|
15290
15288
|
logger.info(`${chalk.white("Created:")} ${chalk.gray(timeStr)}`);
|
|
15291
15289
|
logger.info("");
|
|
@@ -15341,7 +15339,7 @@ function listCommand(program) {
|
|
|
15341
15339
|
const item = result.selectedItem;
|
|
15342
15340
|
logger.info("");
|
|
15343
15341
|
logger.info(chalk.cyan.bold(`Prompt: ${item.id.slice(0, 8)}`));
|
|
15344
|
-
logger.info(`Used in: ${item.evalCount} evaluation${item.evalCount
|
|
15342
|
+
logger.info(`Used in: ${item.evalCount} evaluation${item.evalCount === 1 ? "" : "s"}`);
|
|
15345
15343
|
if (item.recentEvalId) logger.info(`Most recent eval: ${item.recentEvalId}`);
|
|
15346
15344
|
const preview = item.raw.length > 100 ? item.raw.slice(0, 100).replace(/\n/g, " ") + "..." : item.raw;
|
|
15347
15345
|
logger.info(`Preview: ${chalk.gray(preview)}`);
|
|
@@ -15389,7 +15387,7 @@ function listCommand(program) {
|
|
|
15389
15387
|
logger.info("");
|
|
15390
15388
|
logger.info(chalk.cyan.bold(`Dataset: ${item.id.slice(0, 8)}`));
|
|
15391
15389
|
logger.info(`Test cases: ${item.testCount}`);
|
|
15392
|
-
logger.info(`Used in: ${item.evalCount} evaluation${item.evalCount
|
|
15390
|
+
logger.info(`Used in: ${item.evalCount} evaluation${item.evalCount === 1 ? "" : "s"}`);
|
|
15393
15391
|
if (item.bestPromptId) logger.info(`Best performing prompt: ${item.bestPromptId.slice(0, 8)}`);
|
|
15394
15392
|
if (item.recentEvalId) logger.info(`Most recent eval: ${item.recentEvalId}`);
|
|
15395
15393
|
logger.info("");
|
|
@@ -17452,8 +17450,8 @@ function registerRunEvaluationTool(server) {
|
|
|
17452
17450
|
}
|
|
17453
17451
|
filteredTestSuite.tests = filteredTests;
|
|
17454
17452
|
}
|
|
17455
|
-
const { evaluate } = await import("./evaluator-
|
|
17456
|
-
const evalRecord = await (await import("./eval-
|
|
17453
|
+
const { evaluate } = await import("./evaluator-BBUqRhz1.js");
|
|
17454
|
+
const evalRecord = await (await import("./eval-7aEqoMs3.js")).default.create(config, filteredTestSuite.prompts, { id: `mcp-eval-${Date.now()}` });
|
|
17457
17455
|
logger.debug(`Running filtered eval with ${filteredTestSuite.tests?.length || 0} test cases, ${filteredTestSuite.prompts.length} prompts, ${filteredTestSuite.providers.length} providers`);
|
|
17458
17456
|
const startTime = Date.now();
|
|
17459
17457
|
const result = await evaluate(filteredTestSuite, evalRecord, {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { S as transformTools, x as transformToolChoice } from "./fetch-
|
|
4
|
-
import { o as getCache, s as isCacheEnabled } from "./cache-
|
|
5
|
-
import { g as maybeLoadToolsFromExternalFile, h as maybeLoadResponseFormatFromExternalFile } from "./util-
|
|
2
|
+
import { E as getEnvString, T as getEnvInt, s as logger, w as getEnvFloat } from "./logger-BcJBzSSA.js";
|
|
3
|
+
import { S as transformTools, x as transformToolChoice } from "./fetch-DoVRJZhJ.js";
|
|
4
|
+
import { o as getCache, s as isCacheEnabled } from "./cache-DSqR6ezl.js";
|
|
5
|
+
import { g as maybeLoadToolsFromExternalFile, h as maybeLoadResponseFormatFromExternalFile } from "./util-Bm3E9jpK.js";
|
|
6
6
|
import { n as withGenAISpan } from "./genaiTracer-C1rxGO8Q.js";
|
|
7
|
-
import { i as normalizeFinishReason, n as MCPClient } from "./chat-
|
|
7
|
+
import { i as normalizeFinishReason, n as MCPClient } from "./chat-BEwdgGEg.js";
|
|
8
8
|
import { a as createEmptyTokenUsage } from "./tokenUsageUtils-DflFMjS0.js";
|
|
9
|
-
import { n as transformMCPToolsToAnthropic } from "./transform-
|
|
10
|
-
import { a as parseMessages, i as outputFromMessage, n as calculateAnthropicCost, o as processAnthropicTools, r as getTokenUsage, t as ANTHROPIC_MODELS } from "./util-
|
|
9
|
+
import { n as transformMCPToolsToAnthropic } from "./transform-DrleutM3.js";
|
|
10
|
+
import { a as parseMessages, i as outputFromMessage, n as calculateAnthropicCost, o as processAnthropicTools, r as getTokenUsage, t as ANTHROPIC_MODELS } from "./util-DMFeUvLz.js";
|
|
11
11
|
import Anthropic, { APIError } from "@anthropic-ai/sdk";
|
|
12
12
|
//#region src/providers/anthropic/generic.ts
|
|
13
13
|
/**
|
|
@@ -56,6 +56,11 @@ var AnthropicGenericProvider = class {
|
|
|
56
56
|
};
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/providers/anthropic/messages.ts
|
|
59
|
+
function parseEnvFloat(value) {
|
|
60
|
+
if (value === void 0) return;
|
|
61
|
+
const parsed = Number.parseFloat(value);
|
|
62
|
+
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
63
|
+
}
|
|
59
64
|
var AnthropicMessagesProvider = class AnthropicMessagesProvider extends AnthropicGenericProvider {
|
|
60
65
|
mcpClient = null;
|
|
61
66
|
initializationPromise = null;
|
|
@@ -135,7 +140,7 @@ var AnthropicMessagesProvider = class AnthropicMessagesProvider extends Anthropi
|
|
|
135
140
|
max_tokens: config?.max_tokens || getEnvInt("ANTHROPIC_MAX_TOKENS", config.thinking || thinking ? 2048 : 1024),
|
|
136
141
|
messages: extractedMessages,
|
|
137
142
|
stream: shouldStream,
|
|
138
|
-
temperature: config.thinking || thinking ? config.temperature : config.temperature
|
|
143
|
+
temperature: config.thinking || thinking ? config.temperature : config.temperature ?? parseEnvFloat(this.env?.ANTHROPIC_TEMPERATURE) ?? getEnvFloat("ANTHROPIC_TEMPERATURE", 0),
|
|
139
144
|
...allTools.length > 0 ? { tools: allTools } : {},
|
|
140
145
|
...config.tool_choice ? { tool_choice: transformToolChoice(config.tool_choice, "anthropic") } : {},
|
|
141
146
|
...config.thinking || thinking ? { thinking: config.thinking || thinking } : {},
|
|
@@ -238,4 +243,4 @@ var AnthropicMessagesProvider = class AnthropicMessagesProvider extends Anthropi
|
|
|
238
243
|
//#endregion
|
|
239
244
|
export { AnthropicGenericProvider as n, AnthropicMessagesProvider as t };
|
|
240
245
|
|
|
241
|
-
//# sourceMappingURL=messages-
|
|
246
|
+
//# sourceMappingURL=messages-DJNo37Ko.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as maybeLoadToolsFromExternalFile, u as maybeLoadResponseFormatFromExternalFile } from "./util-
|
|
3
|
-
import { C as transformTools, S as transformToolChoice } from "./fetch-
|
|
4
|
-
import { a as isCacheEnabled, i as getCache } from "./cache-
|
|
1
|
+
import { C as getEnvString, S as getEnvInt, a as logger, x as getEnvFloat } from "./logger-DO8_zM18.js";
|
|
2
|
+
import { d as maybeLoadToolsFromExternalFile, u as maybeLoadResponseFormatFromExternalFile } from "./util-CMMkIxfU.js";
|
|
3
|
+
import { C as transformTools, S as transformToolChoice } from "./fetch-CVAtKnI3.js";
|
|
4
|
+
import { a as isCacheEnabled, i as getCache } from "./cache-CaT5tPgo.js";
|
|
5
5
|
import { n as withGenAISpan } from "./genaiTracer-D3fD9dNV.js";
|
|
6
|
-
import { i as normalizeFinishReason, n as MCPClient } from "./chat-
|
|
6
|
+
import { i as normalizeFinishReason, n as MCPClient } from "./chat-pxmiVpWe.js";
|
|
7
7
|
import { a as createEmptyTokenUsage } from "./tokenUsageUtils-NYT-WKS6.js";
|
|
8
|
-
import { n as transformMCPToolsToAnthropic } from "./transform-
|
|
9
|
-
import { a as parseMessages, i as outputFromMessage, n as calculateAnthropicCost, o as processAnthropicTools, r as getTokenUsage, t as ANTHROPIC_MODELS } from "./util-
|
|
8
|
+
import { n as transformMCPToolsToAnthropic } from "./transform-DyDAwEpE.js";
|
|
9
|
+
import { a as parseMessages, i as outputFromMessage, n as calculateAnthropicCost, o as processAnthropicTools, r as getTokenUsage, t as ANTHROPIC_MODELS } from "./util-vNmDL5DT.js";
|
|
10
10
|
import Anthropic, { APIError } from "@anthropic-ai/sdk";
|
|
11
11
|
//#region src/providers/anthropic/generic.ts
|
|
12
12
|
/**
|
|
@@ -55,6 +55,11 @@ var AnthropicGenericProvider = class {
|
|
|
55
55
|
};
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/providers/anthropic/messages.ts
|
|
58
|
+
function parseEnvFloat(value) {
|
|
59
|
+
if (value === void 0) return;
|
|
60
|
+
const parsed = Number.parseFloat(value);
|
|
61
|
+
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
62
|
+
}
|
|
58
63
|
var AnthropicMessagesProvider = class AnthropicMessagesProvider extends AnthropicGenericProvider {
|
|
59
64
|
mcpClient = null;
|
|
60
65
|
initializationPromise = null;
|
|
@@ -134,7 +139,7 @@ var AnthropicMessagesProvider = class AnthropicMessagesProvider extends Anthropi
|
|
|
134
139
|
max_tokens: config?.max_tokens || getEnvInt("ANTHROPIC_MAX_TOKENS", config.thinking || thinking ? 2048 : 1024),
|
|
135
140
|
messages: extractedMessages,
|
|
136
141
|
stream: shouldStream,
|
|
137
|
-
temperature: config.thinking || thinking ? config.temperature : config.temperature
|
|
142
|
+
temperature: config.thinking || thinking ? config.temperature : config.temperature ?? parseEnvFloat(this.env?.ANTHROPIC_TEMPERATURE) ?? getEnvFloat("ANTHROPIC_TEMPERATURE", 0),
|
|
138
143
|
...allTools.length > 0 ? { tools: allTools } : {},
|
|
139
144
|
...config.tool_choice ? { tool_choice: transformToolChoice(config.tool_choice, "anthropic") } : {},
|
|
140
145
|
...config.thinking || thinking ? { thinking: config.thinking || thinking } : {},
|
|
@@ -237,4 +242,4 @@ var AnthropicMessagesProvider = class AnthropicMessagesProvider extends Anthropi
|
|
|
237
242
|
//#endregion
|
|
238
243
|
export { AnthropicGenericProvider as n, AnthropicMessagesProvider as t };
|
|
239
244
|
|
|
240
|
-
//# sourceMappingURL=messages-
|
|
245
|
+
//# sourceMappingURL=messages-Dy9QecMs.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
const require_util = require("./util-
|
|
3
|
-
const require_fetch = require("./fetch-
|
|
4
|
-
const require_cache = require("./cache-
|
|
5
|
-
const require_genaiTracer = require("./genaiTracer-
|
|
6
|
-
const require_chat = require("./chat-
|
|
1
|
+
const require_logger = require("./logger-D5iKBpu_.cjs");
|
|
2
|
+
const require_util = require("./util-CuLo2pMR.cjs");
|
|
3
|
+
const require_fetch = require("./fetch-BnR9wSnm.cjs");
|
|
4
|
+
const require_cache = require("./cache-C5yFZ4gC.cjs");
|
|
5
|
+
const require_genaiTracer = require("./genaiTracer-BfxrvSUb.cjs");
|
|
6
|
+
const require_chat = require("./chat-CM8qWR3_.cjs");
|
|
7
7
|
const require_tokenUsageUtils = require("./tokenUsageUtils-bVa1ga6f.cjs");
|
|
8
|
-
const require_transform = require("./transform-
|
|
9
|
-
const require_util$1 = require("./util
|
|
8
|
+
const require_transform = require("./transform-0BwoBsvO.cjs");
|
|
9
|
+
const require_util$1 = require("./util--9u9UVCt.cjs");
|
|
10
10
|
let _anthropic_ai_sdk = require("@anthropic-ai/sdk");
|
|
11
11
|
_anthropic_ai_sdk = require_logger.__toESM(_anthropic_ai_sdk);
|
|
12
12
|
//#region src/providers/anthropic/generic.ts
|
|
@@ -56,6 +56,11 @@ var AnthropicGenericProvider = class {
|
|
|
56
56
|
};
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/providers/anthropic/messages.ts
|
|
59
|
+
function parseEnvFloat(value) {
|
|
60
|
+
if (value === void 0) return;
|
|
61
|
+
const parsed = Number.parseFloat(value);
|
|
62
|
+
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
63
|
+
}
|
|
59
64
|
var AnthropicMessagesProvider = class AnthropicMessagesProvider extends AnthropicGenericProvider {
|
|
60
65
|
mcpClient = null;
|
|
61
66
|
initializationPromise = null;
|
|
@@ -135,7 +140,7 @@ var AnthropicMessagesProvider = class AnthropicMessagesProvider extends Anthropi
|
|
|
135
140
|
max_tokens: config?.max_tokens || require_logger.getEnvInt("ANTHROPIC_MAX_TOKENS", config.thinking || thinking ? 2048 : 1024),
|
|
136
141
|
messages: extractedMessages,
|
|
137
142
|
stream: shouldStream,
|
|
138
|
-
temperature: config.thinking || thinking ? config.temperature : config.temperature
|
|
143
|
+
temperature: config.thinking || thinking ? config.temperature : config.temperature ?? parseEnvFloat(this.env?.ANTHROPIC_TEMPERATURE) ?? require_logger.getEnvFloat("ANTHROPIC_TEMPERATURE", 0),
|
|
139
144
|
...allTools.length > 0 ? { tools: allTools } : {},
|
|
140
145
|
...config.tool_choice ? { tool_choice: require_fetch.transformToolChoice(config.tool_choice, "anthropic") } : {},
|
|
141
146
|
...config.thinking || thinking ? { thinking: config.thinking || thinking } : {},
|
|
@@ -249,4 +254,4 @@ Object.defineProperty(exports, "AnthropicMessagesProvider", {
|
|
|
249
254
|
}
|
|
250
255
|
});
|
|
251
256
|
|
|
252
|
-
//# sourceMappingURL=messages-
|
|
257
|
+
//# sourceMappingURL=messages-HJsyEh4o.cjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as transformTools, S as transformToolChoice } from "./fetch-
|
|
3
|
-
import { a as isCacheEnabled, i as getCache } from "./cache-
|
|
1
|
+
import { C as getEnvString, S as getEnvInt, a as logger, x as getEnvFloat } from "./logger-BnkjG2jt.js";
|
|
2
|
+
import { C as transformTools, S as transformToolChoice } from "./fetch-BiYv2BZc.js";
|
|
3
|
+
import { a as isCacheEnabled, i as getCache } from "./cache-HP0NP4k3.js";
|
|
4
4
|
import { a as createEmptyTokenUsage } from "./tokenUsageUtils-BDGe-iyI.js";
|
|
5
5
|
import { n as withGenAISpan } from "./genaiTracer-70Z8BIuV.js";
|
|
6
|
-
import { D as maybeLoadResponseFormatFromExternalFile, O as maybeLoadToolsFromExternalFile } from "./util-
|
|
7
|
-
import { i as normalizeFinishReason, n as MCPClient } from "./chat-
|
|
8
|
-
import { n as transformMCPToolsToAnthropic } from "./transform-
|
|
9
|
-
import { a as parseMessages, i as outputFromMessage, n as calculateAnthropicCost, o as processAnthropicTools, r as getTokenUsage, t as ANTHROPIC_MODELS } from "./util-
|
|
6
|
+
import { D as maybeLoadResponseFormatFromExternalFile, O as maybeLoadToolsFromExternalFile } from "./util-BLvy9qfE.js";
|
|
7
|
+
import { i as normalizeFinishReason, n as MCPClient } from "./chat-B0iaWhoh.js";
|
|
8
|
+
import { n as transformMCPToolsToAnthropic } from "./transform-B2-jIv68.js";
|
|
9
|
+
import { a as parseMessages, i as outputFromMessage, n as calculateAnthropicCost, o as processAnthropicTools, r as getTokenUsage, t as ANTHROPIC_MODELS } from "./util-DbVG-yZU.js";
|
|
10
10
|
import Anthropic, { APIError } from "@anthropic-ai/sdk";
|
|
11
11
|
//#region src/providers/anthropic/generic.ts
|
|
12
12
|
/**
|
|
@@ -55,6 +55,11 @@ var AnthropicGenericProvider = class {
|
|
|
55
55
|
};
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/providers/anthropic/messages.ts
|
|
58
|
+
function parseEnvFloat(value) {
|
|
59
|
+
if (value === void 0) return;
|
|
60
|
+
const parsed = Number.parseFloat(value);
|
|
61
|
+
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
62
|
+
}
|
|
58
63
|
var AnthropicMessagesProvider = class AnthropicMessagesProvider extends AnthropicGenericProvider {
|
|
59
64
|
mcpClient = null;
|
|
60
65
|
initializationPromise = null;
|
|
@@ -134,7 +139,7 @@ var AnthropicMessagesProvider = class AnthropicMessagesProvider extends Anthropi
|
|
|
134
139
|
max_tokens: config?.max_tokens || getEnvInt("ANTHROPIC_MAX_TOKENS", config.thinking || thinking ? 2048 : 1024),
|
|
135
140
|
messages: extractedMessages,
|
|
136
141
|
stream: shouldStream,
|
|
137
|
-
temperature: config.thinking || thinking ? config.temperature : config.temperature
|
|
142
|
+
temperature: config.thinking || thinking ? config.temperature : config.temperature ?? parseEnvFloat(this.env?.ANTHROPIC_TEMPERATURE) ?? getEnvFloat("ANTHROPIC_TEMPERATURE", 0),
|
|
138
143
|
...allTools.length > 0 ? { tools: allTools } : {},
|
|
139
144
|
...config.tool_choice ? { tool_choice: transformToolChoice(config.tool_choice, "anthropic") } : {},
|
|
140
145
|
...config.thinking || thinking ? { thinking: config.thinking || thinking } : {},
|
|
@@ -237,4 +242,4 @@ var AnthropicMessagesProvider = class AnthropicMessagesProvider extends Anthropi
|
|
|
237
242
|
//#endregion
|
|
238
243
|
export { AnthropicGenericProvider as n, AnthropicMessagesProvider as t };
|
|
239
244
|
|
|
240
|
-
//# sourceMappingURL=messages-
|
|
245
|
+
//# sourceMappingURL=messages-biC_ex-p.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./types-
|
|
3
|
-
import { p as REQUEST_TIMEOUT_MS, t as fetchWithProxy } from "./fetch-
|
|
4
|
-
import { r as fetchWithCache } from "./cache-
|
|
5
|
-
import "./accounts-
|
|
6
|
-
import { r as storeBlob } from "./blobs-
|
|
7
|
-
import "./tables-
|
|
8
|
-
import { n as isBlobStorageEnabled } from "./extractor-
|
|
1
|
+
import { C as getEnvString, a as logger } from "./logger-DO8_zM18.js";
|
|
2
|
+
import "./types-q8GXGF65.js";
|
|
3
|
+
import { p as REQUEST_TIMEOUT_MS, t as fetchWithProxy } from "./fetch-CVAtKnI3.js";
|
|
4
|
+
import { r as fetchWithCache } from "./cache-CaT5tPgo.js";
|
|
5
|
+
import "./accounts-B2XmGjty.js";
|
|
6
|
+
import { r as storeBlob } from "./blobs-DXTl6J3H.js";
|
|
7
|
+
import "./tables-kC7R5kiK.js";
|
|
8
|
+
import { n as isBlobStorageEnabled } from "./extractor-D_wd8jxt.js";
|
|
9
9
|
import { t as ellipsize } from "./text-B_UCRPp2.js";
|
|
10
10
|
//#region src/providers/modelslab.ts
|
|
11
11
|
/**
|
|
@@ -163,4 +163,4 @@ var ModelsLabImageProvider = class {
|
|
|
163
163
|
//#endregion
|
|
164
164
|
export { ModelsLabImageProvider };
|
|
165
165
|
|
|
166
|
-
//# sourceMappingURL=modelslab-
|
|
166
|
+
//# sourceMappingURL=modelslab-B5J-ZM5c.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { f as REQUEST_TIMEOUT_MS, n as fetchWithProxy } from "./fetch-
|
|
4
|
-
import "./accounts-
|
|
5
|
-
import "./cloud-
|
|
6
|
-
import "./types-
|
|
7
|
-
import { a as fetchWithCache } from "./cache-
|
|
8
|
-
import { i as storeBlob } from "./blobs-
|
|
9
|
-
import "./tables-
|
|
10
|
-
import { n as isBlobStorageEnabled } from "./extractor-
|
|
2
|
+
import { E as getEnvString, s as logger } from "./logger-BcJBzSSA.js";
|
|
3
|
+
import { f as REQUEST_TIMEOUT_MS, n as fetchWithProxy } from "./fetch-DoVRJZhJ.js";
|
|
4
|
+
import "./accounts-CFLK3mnD.js";
|
|
5
|
+
import "./cloud-z8KZpUoa.js";
|
|
6
|
+
import "./types-CIhFeUC4.js";
|
|
7
|
+
import { a as fetchWithCache } from "./cache-DSqR6ezl.js";
|
|
8
|
+
import { i as storeBlob } from "./blobs-B1JriOyi.js";
|
|
9
|
+
import "./tables-DmzvLbeZ.js";
|
|
10
|
+
import { n as isBlobStorageEnabled } from "./extractor-CAZ2G3Kh.js";
|
|
11
11
|
import { t as ellipsize } from "./text-Db-Wt2u2.js";
|
|
12
12
|
//#region src/providers/modelslab.ts
|
|
13
13
|
/**
|
|
@@ -165,4 +165,4 @@ var ModelsLabImageProvider = class {
|
|
|
165
165
|
//#endregion
|
|
166
166
|
export { ModelsLabImageProvider };
|
|
167
167
|
|
|
168
|
-
//# sourceMappingURL=modelslab-
|
|
168
|
+
//# sourceMappingURL=modelslab-BI458moT.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as REQUEST_TIMEOUT_MS, t as fetchWithProxy } from "./fetch-
|
|
3
|
-
import "./accounts-
|
|
4
|
-
import "./tables-
|
|
5
|
-
import "./types-
|
|
6
|
-
import { r as fetchWithCache } from "./cache-
|
|
7
|
-
import { i as storeBlob } from "./blobs-
|
|
8
|
-
import { n as isBlobStorageEnabled } from "./extractor-
|
|
1
|
+
import { C as getEnvString, a as logger } from "./logger-BnkjG2jt.js";
|
|
2
|
+
import { p as REQUEST_TIMEOUT_MS, t as fetchWithProxy } from "./fetch-BiYv2BZc.js";
|
|
3
|
+
import "./accounts-Xatc0RYb.js";
|
|
4
|
+
import "./tables-BEIFz2tM.js";
|
|
5
|
+
import "./types-Cd3ygw8W.js";
|
|
6
|
+
import { r as fetchWithCache } from "./cache-HP0NP4k3.js";
|
|
7
|
+
import { i as storeBlob } from "./blobs-BUWmKWzo.js";
|
|
8
|
+
import { n as isBlobStorageEnabled } from "./extractor-C8XwivI9.js";
|
|
9
9
|
import { t as ellipsize } from "./text-TIv0QYnd.js";
|
|
10
10
|
//#region src/providers/modelslab.ts
|
|
11
11
|
/**
|
|
@@ -163,4 +163,4 @@ var ModelsLabImageProvider = class {
|
|
|
163
163
|
//#endregion
|
|
164
164
|
export { ModelsLabImageProvider };
|
|
165
165
|
|
|
166
|
-
//# sourceMappingURL=modelslab-
|
|
166
|
+
//# sourceMappingURL=modelslab-BTOT8FUO.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
require("./types-
|
|
3
|
-
const require_fetch = require("./fetch-
|
|
4
|
-
const require_cache = require("./cache-
|
|
5
|
-
require("./accounts-
|
|
6
|
-
const require_blobs = require("./blobs-
|
|
7
|
-
require("./tables-
|
|
8
|
-
const require_extractor = require("./extractor-
|
|
1
|
+
const require_logger = require("./logger-D5iKBpu_.cjs");
|
|
2
|
+
require("./types-D8cGDZbL.cjs");
|
|
3
|
+
const require_fetch = require("./fetch-BnR9wSnm.cjs");
|
|
4
|
+
const require_cache = require("./cache-C5yFZ4gC.cjs");
|
|
5
|
+
require("./accounts-BPyfpSeU.cjs");
|
|
6
|
+
const require_blobs = require("./blobs-C6j0bvFz.cjs");
|
|
7
|
+
require("./tables-BdZQEpRz.cjs");
|
|
8
|
+
const require_extractor = require("./extractor-DG3sSfXE.cjs");
|
|
9
9
|
const require_text = require("./text-CW1cyrwj.cjs");
|
|
10
10
|
//#region src/providers/modelslab.ts
|
|
11
11
|
/**
|
|
@@ -163,4 +163,4 @@ var ModelsLabImageProvider = class {
|
|
|
163
163
|
//#endregion
|
|
164
164
|
exports.ModelsLabImageProvider = ModelsLabImageProvider;
|
|
165
165
|
|
|
166
|
-
//# sourceMappingURL=modelslab-
|
|
166
|
+
//# sourceMappingURL=modelslab-IQbNg-r7.cjs.map
|