promptfoo 0.121.3 → 0.121.4
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 +1 -1
- package/dist/src/{ListApp-Du7YVwj5.js → ListApp-DQkFNqE9.js} +1 -1
- package/dist/src/{accounts-Xatc0RYb.js → accounts-DdJ2pHMI.js} +5 -5
- package/dist/src/{accounts-B2XmGjty.js → accounts-DhMYUUbu.js} +5 -5
- package/dist/src/{accounts-BPyfpSeU.cjs → accounts-Dy17bs4D.cjs} +5 -5
- package/dist/src/{accounts-CFLK3mnD.js → accounts-F9d_5sMC.js} +6 -6
- package/dist/src/{agentic-utils-DAVsChuB.cjs → agentic-utils-BpX5b23w.cjs} +3 -3
- package/dist/src/{agentic-utils-DIYAAYE7.js → agentic-utils-P172hM8B.js} +3 -3
- package/dist/src/{agentic-utils-D8yXo5Lm.js → agentic-utils-qFlm6zes.js} +4 -4
- package/dist/src/{agentic-utils-36epdqwB.js → agentic-utils-w68v6_Dz.js} +3 -3
- package/dist/src/{agents-CLQ-P15P.js → agents-8FDnTriG.js} +6 -7
- package/dist/src/{agents-CAYbM7qD.cjs → agents-BahDpe5G.cjs} +34 -12
- package/dist/src/{agents-DSSTV4bv.js → agents-C-R_jfzI.js} +35 -13
- package/dist/src/{agents-wg3ohknq.js → agents-CgaMXvLM.js} +5 -7
- package/dist/src/{agents-BBWxKSM0.cjs → agents-D7-HGxUj.cjs} +5 -7
- package/dist/src/{agents-BBVJCIYr.js → agents-DJ35I3Nt.js} +35 -13
- package/dist/src/{agents-CgBniSlI.js → agents-aYPQLf8W.js} +5 -9
- package/dist/src/{agents-Bqgfdokm.js → agents-pQeBEXMm.js} +35 -14
- package/dist/src/{aimlapi-BwGC1TtS.js → aimlapi-BCq3MHeL.js} +8 -14
- package/dist/src/{aimlapi-MgSLdvy7.js → aimlapi-BD6J9oKt.js} +7 -14
- package/dist/src/{aimlapi-Bv8Fmc-b.cjs → aimlapi-qcK4OT55.cjs} +8 -15
- package/dist/src/{aimlapi-DaC3qZ-o.js → aimlapi-sgYnkE54.js} +7 -16
- package/dist/src/app/app/tsconfig.app.tsbuildinfo +1 -0
- package/dist/src/app/assets/Report-CQYFezYu.js +1 -0
- package/dist/src/app/assets/index-BXGkeMwh.css +1 -0
- package/dist/src/app/assets/index-BzJt18Jz.js +385 -0
- package/dist/src/app/assets/rolldown-runtime-COnpUsM8.js +1 -0
- package/dist/src/app/assets/scroll-timeline-D9IT_e8Z.js +1 -0
- package/dist/src/app/assets/sync-IjzpWrOE.js +4 -0
- package/dist/src/app/assets/vendor-charts-BNdH8TCw.js +36 -0
- package/dist/src/app/assets/vendor-markdown-Ch00wnNI.js +29 -0
- package/dist/src/app/assets/vendor-react-CVvmk1UB.js +9 -0
- package/dist/src/app/assets/vendor-utils-BnEYbx2Q.js +37 -0
- package/dist/src/app/index.html +7 -7
- package/dist/src/{audio-DjU9GswO.js → audio-B7izf48x.js} +4 -5
- package/dist/src/{audio-DVFjQ67_.cjs → audio-BQtNuYBj.cjs} +4 -4
- package/dist/src/{audio-Bn44pQxv.js → audio-COrn8rM6.js} +4 -4
- package/dist/src/{audio-DDA5WHdx.js → audio-DcVKoInv.js} +4 -4
- package/dist/src/{base-BboXIF_0.cjs → base-D-670DX8.cjs} +3 -3
- package/dist/src/{base-CqzQ4K8j.js → base-PYJvBE1i.js} +3 -3
- package/dist/src/{base-CKjwebIH.js → base-fZ9wgg50.js} +3 -3
- package/dist/src/{base-Cz2ZC_iA.js → base-yrI1Yal4.js} +3 -3
- package/dist/src/{blobs-BUWmKWzo.js → blobs-BCZavS8s.js} +4 -4
- package/dist/src/{blobs-B1JriOyi.js → blobs-BQWqnnvL.js} +4 -4
- package/dist/src/{blobs-DXTl6J3H.js → blobs-C-F78Kfn.js} +3 -3
- package/dist/src/{blobs-C6j0bvFz.cjs → blobs-D2FAd1Q5.cjs} +3 -3
- package/dist/src/cache-BIyPcp5v.cjs +376 -0
- package/dist/src/cache-C4Xb-hNb.js +310 -0
- package/dist/src/cache-Cr9oLMUa.js +3 -0
- package/dist/src/cache-D5NZmMiT.js +310 -0
- package/dist/src/cache-DbLsVWB2.cjs +3 -0
- package/dist/src/cache-mb7c8hbp.js +280 -0
- package/dist/src/{chat-DK1U-eZ-.js → chat-0bwXjVP0.js} +3 -13
- package/dist/src/{chat-BtIKkLKx.cjs → chat-BPXSW8Bv.cjs} +3 -13
- package/dist/src/{chat-B0iaWhoh.js → chat-BfPaS15_.js} +63 -37
- package/dist/src/{chat-CM8qWR3_.cjs → chat-CclRbxGf.cjs} +63 -37
- package/dist/src/{chat-BEwdgGEg.js → chat-Dr3DUQ0D.js} +63 -37
- package/dist/src/{chat-pxmiVpWe.js → chat-I9izLm49.js} +62 -36
- package/dist/src/{chat-B-52XYI1.js → chat-MKxMnZJZ.js} +3 -13
- package/dist/src/{chat-BE0qTA8e.js → chat-mW0ORo8G.js} +3 -14
- package/dist/src/{chatkit-Cx174XI3.cjs → chatkit-BoWoSgXl.cjs} +4 -4
- package/dist/src/{chatkit-BYGQlHlV.js → chatkit-CJnHRRMM.js} +4 -4
- package/dist/src/{chatkit-a2D6mY6s.js → chatkit-Cv6AhukM.js} +4 -4
- package/dist/src/{chatkit-_8eJqKcD.js → chatkit-zUIVoDos.js} +4 -4
- package/dist/src/{claude-agent-sdk-CMjh4LFH.js → claude-agent-sdk-BQNuLaAK.js} +19 -14
- package/dist/src/{claude-agent-sdk-8ddRp1L2.cjs → claude-agent-sdk-CPJo3dBQ.cjs} +21 -16
- package/dist/src/{claude-agent-sdk-HgbFioFw.js → claude-agent-sdk-Dtq_L-Sc.js} +20 -15
- package/dist/src/{claude-agent-sdk-Bq5EArsX.js → claude-agent-sdk-nfAIcxNf.js} +21 -17
- package/dist/src/{cloud-z8KZpUoa.js → cloud-DQZ5sVjW.js} +25 -13
- package/dist/src/cloud-Hphvo8kr.js +3 -0
- package/dist/src/{cloudflare-ai-Bbp26N0L.js → cloudflare-ai-BIB567w6.js} +5 -14
- package/dist/src/{cloudflare-ai-BGyXlpXJ.js → cloudflare-ai-DGLte7Py.js} +5 -14
- package/dist/src/{cloudflare-ai-C62x6MQG.cjs → cloudflare-ai-Dl3N9OVD.cjs} +6 -15
- package/dist/src/{cloudflare-ai-DdKP9TKT.js → cloudflare-ai-DlKr0rY7.js} +5 -15
- package/dist/src/{cloudflare-gateway-D-e9i1Sn.js → cloudflare-gateway-BDZrYydE.js} +4 -16
- package/dist/src/{cloudflare-gateway-Dx36ftqF.cjs → cloudflare-gateway-BYDp495F.cjs} +4 -15
- package/dist/src/{cloudflare-gateway-DXhtXDRb.js → cloudflare-gateway-CiIZHU0Q.js} +4 -15
- package/dist/src/{cloudflare-gateway-BwAaUgeW.js → cloudflare-gateway-DI1HNP5F.js} +4 -15
- package/dist/src/codex-sdk-BAmYE7qy.js +3 -0
- package/dist/src/codex-sdk-C2_M2pl_.cjs +1172 -0
- package/dist/src/codex-sdk-CErXn7qh.js +1165 -0
- package/dist/src/codex-sdk-CWEnH70W.cjs +2 -0
- package/dist/src/codex-sdk-CpqiOqDO.js +1164 -0
- package/dist/src/codex-sdk-Rtky3M4I.js +1165 -0
- package/dist/src/{cometapi-BDyV-NNm.js → cometapi-BUlt_ELa.js} +8 -15
- package/dist/src/{cometapi-hhL4TAh3.js → cometapi-CtJ-mS8R.js} +9 -15
- package/dist/src/{cometapi-sp7sJpBD.js → cometapi-DT-jlVCB.js} +8 -17
- package/dist/src/{cometapi-C3hOlM7-.cjs → cometapi-UVOryo4W.cjs} +9 -16
- package/dist/src/{completion-DlXUhj5c.cjs → completion-BozdoXba.cjs} +7 -62
- package/dist/src/{completion-BCimtq-h.js → completion-Dnxn7E-j.js} +8 -57
- package/dist/src/{completion-DCjv7RZ3.js → completion-HUe8wDhZ.js} +8 -57
- package/dist/src/{completion-DoYy49ti.js → completion-x0a_c2y1.js} +8 -57
- package/dist/src/{createHash-CTQmL3G2.js → createHash-4gFQpDDv.js} +3 -3
- package/dist/src/{createHash-BYwImsYv.cjs → createHash-B7KvgoOD.cjs} +4 -4
- package/dist/src/{createHash-Da8fMwqB.js → createHash-ChI45QR1.js} +3 -3
- package/dist/src/{createHash-DmPQkvBh.js → createHash-CwDVU5xr.js} +3 -3
- package/dist/src/{docker-FeBni2dw.js → docker-CQmlA2NU.js} +7 -14
- package/dist/src/{docker-CxCkwMzc.js → docker-ClnmCf1Z.js} +6 -14
- package/dist/src/{docker-DpguQj-w.js → docker-DCgsveLD.js} +6 -16
- package/dist/src/{docker-Cqj2-QVi.cjs → docker-DS4_Osau.cjs} +7 -15
- package/dist/src/embedding-D3xTseo7.js +59 -0
- package/dist/src/embedding-DD9wa3ae.js +58 -0
- package/dist/src/embedding-I45KG3o7.cjs +63 -0
- package/dist/src/embedding-nFbumxcv.js +58 -0
- package/dist/src/entrypoint.js +69 -6
- package/dist/src/{errors-P6ll7XSJ.js → errors-Cw810C93.js} +1 -1
- package/dist/src/{esm-SUNIX1x3.js → esm-C7PnfdF8.js} +15 -6
- package/dist/src/{esm-CipptfDu.cjs → esm-CtEPLdAj.cjs} +15 -6
- package/dist/src/{esm-CKWP3u_P.js → esm-Dh4dOLlt.js} +16 -7
- package/dist/src/{esm-7UIl0pPM.js → esm-tVgYPY-f.js} +27 -18
- package/dist/src/eval-CzJFfFO9.js +3 -0
- package/dist/src/{eval-BTqTn7lb.js → eval-u4UVafl6.js} +49 -20
- package/dist/src/{evalResult-BkIhRdTe.js → evalResult-Bgm9ZH31.js} +7 -7
- package/dist/src/{evalResult-DUDShQrm.js → evalResult-D3hVYFis.js} +7 -7
- package/dist/src/evalResult-D8MT9p0s.js +3 -0
- package/dist/src/evalResult-DElBuddX.js +2 -0
- package/dist/src/evalResult-Dvc-iucu.cjs +2 -0
- package/dist/src/{evalResult-DpARzUCb.cjs → evalResult-KZqXl4XP.cjs} +7 -7
- package/dist/src/evaluator-CVessDWe.js +3 -0
- package/dist/src/{evaluator-BcvOGaam.js → evaluator-IvuDYSvQ.js} +3178 -2102
- package/dist/src/{extractor-C8XwivI9.js → extractor-CAfTSraf.js} +6 -6
- package/dist/src/{extractor-CAZ2G3Kh.js → extractor-DNSeBVOJ.js} +6 -6
- package/dist/src/{extractor-D_wd8jxt.js → extractor-Dk6bRWkv.js} +6 -6
- package/dist/src/{extractor-DG3sSfXE.cjs → extractor-WVPOrH43.cjs} +6 -6
- package/dist/src/{fetch-BiYv2BZc.js → fetch-B0Z3Oe4k.js} +218 -55
- package/dist/src/{fetch-DoVRJZhJ.js → fetch-BEWnXrrG.js} +195 -45
- package/dist/src/fetch-C7bGKDlQ.js +3 -0
- package/dist/src/{fetch-BnR9wSnm.cjs → fetch-CJU5ELPa.cjs} +223 -48
- package/dist/src/{fetch-CVAtKnI3.js → fetch-Di00EQrc.js} +218 -55
- package/dist/src/{fileExtensions-Ds-foDzt.js → fileExtensions-AWa2ZML4.js} +1 -1
- package/dist/src/{fileExtensions-LcDYkU4v.js → fileExtensions-BArZuxsI.js} +1 -1
- package/dist/src/{formatDuration-DgBVMN65.js → formatDuration-DZzPsexs.js} +1 -1
- package/dist/src/{genaiTracer-70Z8BIuV.js → genaiTracer-COYDi-tC.js} +6 -2
- package/dist/src/{genaiTracer-C1rxGO8Q.js → genaiTracer-DWdZ28hY.js} +6 -2
- package/dist/src/{genaiTracer-D3fD9dNV.js → genaiTracer-XnrcgDCe.js} +6 -2
- package/dist/src/{genaiTracer-BfxrvSUb.cjs → genaiTracer-yRuxj9-L.cjs} +7 -3
- package/dist/src/golang/wrapper.go +1 -1
- package/dist/src/{graders-BElhu9ZY.cjs → graders--zknU_uk.cjs} +3772 -1302
- package/dist/src/graders-BOAzQEUe.cjs +2 -0
- package/dist/src/graders-D4BTsZdG2.js +3 -0
- package/dist/src/graders-DOJK1XpV.js +2 -0
- package/dist/src/graders-NAv9LcBn.js +2 -0
- package/dist/src/{graders-DG7mhg-b.js → graders-Zy3x0zqX.js} +5691 -3247
- package/dist/src/{graders-RjHF8VfG.js → graders-eIHhRqoC.js} +5683 -3239
- package/dist/src/{graders-BXAJ0sbS.js → graders-pvbReLLn.js} +5692 -3248
- package/dist/src/{image-6WQXK8m8.js → image-9302QVqR.js} +4 -4
- package/dist/src/{image-B8b6f36E.js → image-B5Mv-Z3h.js} +8 -8
- package/dist/src/{image-PoF6DN3x.js → image-DVz2RiMF.js} +8 -8
- package/dist/src/{image-fza3zuKs.cjs → image-De2FBmYV.cjs} +4 -4
- package/dist/src/{image-DO0RYnjH.js → image-dnoUgPrC.js} +4 -5
- package/dist/src/{image-CoxZp9PZ.js → image-qUpPvmNZ.js} +8 -8
- package/dist/src/{image-xNbw5ph2.js → image-u7-rKnYU.js} +4 -4
- package/dist/src/{image--F58eEIn.cjs → image-x6KqLQl4.cjs} +8 -8
- package/dist/src/index.cjs +3641 -2144
- package/dist/src/index.d.cts +2660 -20
- package/dist/src/index.d.ts +2660 -20
- package/dist/src/index.js +3649 -2152
- package/dist/src/{interactiveCheck-BnMYOjMu.js → interactiveCheck-CLERUB0c.js} +2 -2
- package/dist/src/{knowledgeBase-DqrLX8fy.cjs → knowledgeBase-Bpoe_nLu.cjs} +6 -8
- package/dist/src/{knowledgeBase-Bi7CmDbx.js → knowledgeBase-Dgc7CBWF.js} +6 -8
- package/dist/src/{knowledgeBase-DFRXPZl_.js → knowledgeBase-RhFPGWDc.js} +6 -8
- package/dist/src/{knowledgeBase-Ce3ofVan.js → knowledgeBase-lm9RXSAm.js} +6 -9
- package/dist/src/{litellm-CKiAxnoM.js → litellm-C2kqjxqp.js} +6 -14
- package/dist/src/{litellm-CnHI69aj.cjs → litellm-CoyI4IAl.cjs} +6 -15
- package/dist/src/{litellm-Tc294Jhj.js → litellm-DRjpcSa7.js} +5 -14
- package/dist/src/{litellm-Bo2gQXpo.js → litellm-p37R1dzQ.js} +5 -16
- package/dist/src/{logger-BnkjG2jt.js → logger-B88EkIn6.js} +40 -11
- package/dist/src/{logger-D5iKBpu_.cjs → logger-COuQb2xB.cjs} +51 -10
- package/dist/src/{logger-DO8_zM18.js → logger-Ct2S6Yx-.js} +40 -11
- package/dist/src/{logger-BcJBzSSA.js → logger-DksKw1Qc.js} +40 -11
- package/dist/src/{luma-ray-C9q8rdQe.js → luma-ray-B863CmuZ.js} +6 -10
- package/dist/src/{luma-ray-DP0QA9qn.js → luma-ray-BTTLtqQ8.js} +7 -10
- package/dist/src/{luma-ray-m9Ku2meV.cjs → luma-ray-BxVKaW2a.cjs} +6 -10
- package/dist/src/{luma-ray-0ehMPt5N.js → luma-ray-KgTCXrZC.js} +6 -12
- package/dist/src/main.d.ts +1 -26
- package/dist/src/main.js +985 -520
- package/dist/src/{messages-HJsyEh4o.cjs → messages-811uVVW5.cjs} +69 -19
- package/dist/src/{messages-Dy9QecMs.js → messages-BTQz42fn.js} +69 -19
- package/dist/src/{messages-biC_ex-p.js → messages-MYTQ2TWp.js} +69 -19
- package/dist/src/{messages-DJNo37Ko.js → messages-zWbkLLHz.js} +69 -19
- package/dist/src/{meteor-D-SotUw9.js → meteor-CU5UAE-H.js} +1 -1
- package/dist/src/{meteor-DLZZ3osF.cjs → meteor-Co1VQ1u5.cjs} +1 -1
- package/dist/src/{meteor-44VjEACX.js → meteor-DHdzY1Ss.js} +1 -1
- package/dist/src/{meteor-DUiCJRC-.js → meteor-DuAFv6gF.js} +1 -1
- package/dist/src/{modelslab-B5J-ZM5c.js → modelslab-D0erNWKe.js} +7 -10
- package/dist/src/{modelslab-BTOT8FUO.js → modelslab-DIq-6y7x.js} +7 -10
- package/dist/src/{modelslab-IQbNg-r7.cjs → modelslab-Dk1JAtVo.cjs} +7 -10
- package/dist/src/{modelslab-BI458moT.js → modelslab-wu9yi5GE.js} +7 -11
- package/dist/src/{nova-reel-BZ9y-Y5s.js → nova-reel-CCFRfeRb.js} +7 -10
- package/dist/src/{nova-reel-CE5etkv9.cjs → nova-reel-CrLXVKQf.cjs} +6 -10
- package/dist/src/{nova-reel-Xw1SXLpg.js → nova-reel-DQrm74ng.js} +6 -10
- package/dist/src/{nova-reel-DEeQlnOJ.js → nova-reel-gr11WG7f.js} +6 -12
- package/dist/src/{nova-sonic-Ogqf-csn.js → nova-sonic-BYdp-QLs.js} +5 -7
- package/dist/src/{nova-sonic-DXTLpi-r.js → nova-sonic-B_ZXcUJB.js} +4 -7
- package/dist/src/{nova-sonic-DWswpN1E.js → nova-sonic-TDgrlTk7.js} +4 -9
- package/dist/src/{nova-sonic-N0yCm0vb.cjs → nova-sonic-i5tUvXKn.cjs} +4 -7
- package/dist/src/{openai-BcB5KlTk.js → openai-DhVEmgeZ.js} +6 -3
- package/dist/src/{openai-BMcwgD5C.js → openai-Qsvz25mV.js} +6 -3
- package/dist/src/{openai-CoxGAQwn.cjs → openai-URNyItar.cjs} +6 -3
- package/dist/src/{openai-D6wITiVn.js → openai-iYtrXzOX.js} +6 -3
- package/dist/src/openclaw-CLWrW03k.js +1200 -0
- package/dist/src/openclaw-CnQ363Wi.js +1199 -0
- package/dist/src/openclaw-CwzlQSQX.js +1199 -0
- package/dist/src/openclaw-wX9rtfke.cjs +1205 -0
- package/dist/src/{opencode-sdk-CHCs7dEb.js → opencode-sdk-BUu5Nevv.js} +6 -8
- package/dist/src/{opencode-sdk-WWJhnbKr.cjs → opencode-sdk-BZ2idgYA.cjs} +6 -8
- package/dist/src/{opencode-sdk-DDxj4QqH.js → opencode-sdk-BxD8vXp_.js} +7 -8
- package/dist/src/{opencode-sdk-C71Z0ehR.js → opencode-sdk-GI2KaAXq.js} +6 -10
- package/dist/src/{otlpReceiver-CZL48YfC.js → otlpReceiver-B2z58l4e.js} +154 -98
- package/dist/src/{otlpReceiver-DHKqJlsz.cjs → otlpReceiver-BfcVq2Nq.cjs} +154 -98
- package/dist/src/{otlpReceiver-CavGAA6k.js → otlpReceiver-BntK801g.js} +154 -98
- package/dist/src/{otlpReceiver-C9KlUtxh.js → otlpReceiver-DmVulbhC.js} +154 -98
- package/dist/src/{providerRegistry-BkzVH5Ba.js → providerRegistry-Bvh8mv85.js} +2 -2
- package/dist/src/{providerRegistry-CUWki5mQ.js → providerRegistry-CPQ_CmVO.js} +2 -2
- package/dist/src/{providerRegistry-BTDgfV5h.cjs → providerRegistry-CQMdTmHP.cjs} +2 -2
- package/dist/src/{providerRegistry-B9lh-_tx.js → providerRegistry-CWoPjKFZ.js} +2 -2
- package/dist/src/{providers-CScd1wN6.cjs → providers-1eKkXBKp.cjs} +792 -556
- package/dist/src/{providers-Ch6Mr0gn.js → providers-BV_KMZje.js} +699 -493
- package/dist/src/providers-Bp4S-FvO.js +2 -0
- package/dist/src/providers-DV3ax9e_.cjs +3 -0
- package/dist/src/{providers-DvddrgxL.js → providers-Domz_llv.js} +707 -501
- package/dist/src/{providers-Cn73d5sr.js → providers-DruaQfwu.js} +704 -498
- package/dist/src/providers-iUt5fbAN.js +3 -0
- package/dist/src/providers-u9Enmfok.js +2 -0
- package/dist/src/python/persistent_wrapper.py +0 -5
- package/dist/src/{pythonUtils-Cpo0Ez1p.js → pythonUtils-C2UQ30Rz.js} +3 -3
- package/dist/src/{pythonUtils-Bzwbgpbg.js → pythonUtils-Cldx7huE.js} +3 -3
- package/dist/src/{pythonUtils-wIqk7zAf.js → pythonUtils-CnndUbW-.js} +3 -3
- package/dist/src/{pythonUtils-dAVigVK-.cjs → pythonUtils-tAJvvpS-.cjs} +3 -3
- package/dist/src/{quiverai-BeofbLVc.js → quiverai-CtWi6x_g.js} +4 -4
- package/dist/src/{quiverai-CcUhPIBg.cjs → quiverai-DFotyafY.cjs} +4 -4
- package/dist/src/{quiverai-DVSEqJiq.js → quiverai-DR0SnIQV.js} +4 -4
- package/dist/src/{quiverai-CCQn73lq.js → quiverai-aPPvXOgn.js} +4 -5
- package/dist/src/render-CH-62LbA.js +135 -0
- package/dist/src/render-CMEpfLaO.js +136 -0
- package/dist/src/{render-BHl6QVq9.js → render-CgVDrJmM.js} +2 -3
- package/dist/src/render-DHIZ6_k8.js +135 -0
- package/dist/src/render-DfQSFxGE.cjs +165 -0
- package/dist/src/{responses-CQb1Tj69.js → responses--OsX2aYW.js} +17 -12
- package/dist/src/{responses-mo0KQDbu.cjs → responses-Bi9vBuW_.cjs} +18 -13
- package/dist/src/{responses-CgNyTPsY.js → responses-C-flexAY.js} +18 -13
- package/dist/src/{responses-BKP_WYis.js → responses-DL9m8CyY.js} +18 -13
- package/dist/src/{rubyUtils-CGeUtCfW.cjs → rubyUtils-B6eljPuh.cjs} +3 -3
- package/dist/src/{rubyUtils-DECSbsfY.js → rubyUtils-CYSQEG4a.js} +3 -3
- package/dist/src/rubyUtils-D1L2d3jb.js +3 -0
- package/dist/src/rubyUtils-DUbq4tff.cjs +2 -0
- package/dist/src/{rubyUtils-PgU-gHmx.js → rubyUtils-DVLeA2jg.js} +3 -3
- package/dist/src/{rubyUtils-CiVfln3g.js → rubyUtils-DsGrTx8R.js} +3 -3
- package/dist/src/{sagemaker-CqeASYE5.js → sagemaker-BVkaG2-l.js} +14 -18
- package/dist/src/{sagemaker-CVv8W7so.js → sagemaker-BveBvuxm.js} +14 -18
- package/dist/src/{sagemaker-MUbD5V3v.js → sagemaker-D67yzMzs.js} +14 -19
- package/dist/src/{sagemaker-jiw1wQa-.cjs → sagemaker-XnfhheQv.cjs} +14 -18
- package/dist/src/{scanner-DVDeUz1r.js → scanner-1DqWi1Ej.js} +130 -35
- package/dist/src/server/golang/wrapper.go +1 -1
- package/dist/src/server/index.js +3596 -2098
- package/dist/src/server/python/persistent_wrapper.py +0 -5
- package/dist/src/{server-DZ9MtCn0.js → server-BNYztJkh.js} +128 -9
- package/dist/src/{server-Cns05F1j.js → server-BSB45Nt9.js} +127 -8
- package/dist/src/{server-CP9qKM40.js → server-D6Il2Sob.js} +126 -7
- package/dist/src/server-DCtHUqlp.js +3 -0
- package/dist/src/server-DaA2eR26.cjs +2 -0
- package/dist/src/{server-BtoCXeXI.cjs → server-Dx2TyCH2.cjs} +140 -6
- package/dist/src/{signal-C3ZTsUgi.js → signal-CE5G3a7x.js} +3 -3
- package/dist/src/{slack-94iG3T0s.cjs → slack-1Rhq0EoV.cjs} +2 -2
- package/dist/src/{slack-BR0HtO3K.js → slack-D5Wpy8LM.js} +2 -2
- package/dist/src/{slack-DCEV-vWP.js → slack-DDUe-5MC.js} +2 -2
- package/dist/src/{slack-2sdpGzbt.js → slack-acRb0IqQ.js} +2 -2
- package/dist/src/store-CWOSz6D_.cjs +2 -0
- package/dist/src/{store-P8OKm19S.js → store-CYEy5J2D.js} +3 -3
- package/dist/src/{store-CLyU7AtI.cjs → store-DAAyxcy6.cjs} +3 -3
- package/dist/src/store-DCDBhv7B.js +3 -0
- package/dist/src/{store-VB0GP46K.js → store-Dn9HUkdW.js} +3 -3
- package/dist/src/{store-Cj258DgL.js → store-M0b1WfYb.js} +3 -3
- package/dist/src/{tables-DmzvLbeZ.js → tables-C4CH3zRr.js} +3 -3
- package/dist/src/{tables-BEIFz2tM.js → tables-CsWou1Bx.js} +3 -3
- package/dist/src/{tables-kC7R5kiK.js → tables-DQ4WU5tX.js} +3 -3
- package/dist/src/{tables-BdZQEpRz.cjs → tables-DUfh1F7Z.cjs} +3 -3
- package/dist/src/telemetry-C1IqxcdW.js +3 -0
- package/dist/src/telemetry-C4ZEa_es.cjs +2 -0
- package/dist/src/{telemetry-BnH5VJAU.js → telemetry-CQPez_Jp.js} +4 -4
- package/dist/src/{telemetry-re627Lre.cjs → telemetry-Dsw_faFj.cjs} +4 -4
- package/dist/src/{telemetry-BugWqKiu.js → telemetry-Dvqxv3YC.js} +4 -4
- package/dist/src/{telemetry-DPXLd7UE.js → telemetry-dbaJ0E98.js} +4 -4
- package/dist/src/{text-CW1cyrwj.cjs → text-BVi-cLPJ.cjs} +1 -1
- package/dist/src/{text-B_UCRPp2.js → text-CZr46tp_.js} +1 -1
- package/dist/src/{text-TIv0QYnd.js → text-DHxdyQqT.js} +1 -1
- package/dist/src/{text-Db-Wt2u2.js → text-KvuD2Iko.js} +1 -1
- package/dist/src/{tokenUsageUtils-bVa1ga6f.cjs → tokenUsageUtils-Bb7DkZPz.cjs} +7 -3
- package/dist/src/{tokenUsageUtils-BDGe-iyI.js → tokenUsageUtils-C-bmyHoE.js} +7 -3
- package/dist/src/{tokenUsageUtils-DflFMjS0.js → tokenUsageUtils-CXrvO-wA.js} +7 -3
- package/dist/src/{transcription-BvtsrzRG.cjs → transcription-BvjmiYB1.cjs} +9 -13
- package/dist/src/{transcription-Hb3VnC4M.js → transcription-CJspiD2c.js} +8 -11
- package/dist/src/{transcription-CaMivnjG.js → transcription-DuWDupG7.js} +7 -11
- package/dist/src/{transcription-DOMMTu01.js → transcription-V2HaAmy2.js} +7 -13
- package/dist/src/{transform-BqPkNPYm.js → transform-Bbg6A8Jk.js} +4 -4
- package/dist/src/{transform-DrleutM3.js → transform-CG0ehZNG.js} +9 -8
- package/dist/src/{transform-0BwoBsvO.cjs → transform-CTeuTR3S.cjs} +16 -8
- package/dist/src/{transform-ZrG2dvlo.cjs → transform-CUnzlsbn.cjs} +4 -4
- package/dist/src/{transform-BzK09Q_9.js → transform-DYX1_Xnh.js} +5 -5
- package/dist/src/transform-DgKlRr73.cjs +2 -0
- package/dist/src/transform-M6ITAESf.js +3 -0
- package/dist/src/{transform-ljLYHEPh.js → transform-UN5UGu8U.js} +5 -5
- package/dist/src/{transform-B2-jIv68.js → transform-lQrDE1BQ.js} +8 -6
- package/dist/src/{transform-DyDAwEpE.js → transform-zDhMmzwX.js} +10 -7
- package/dist/src/{transformersAvailability-BGkzavwb.js → transformersAvailability-CcHusyhw.js} +1 -1
- package/dist/src/{transformersAvailability-DKoRtQLy.cjs → transformersAvailability-Cju9mHgR.cjs} +1 -1
- package/dist/src/{transformersAvailability-D6c6ROpT.js → transformersAvailability-DLlROWhg.js} +1 -1
- package/dist/src/{types-q8GXGF65.js → types-BGQDAP8i.js} +351 -22
- package/dist/src/{types-Cd3ygw8W.js → types-Bgh5SOn6.js} +352 -24
- package/dist/src/{types-D8cGDZbL.cjs → types-CeaeaZdP.cjs} +387 -22
- package/dist/src/{types-CIhFeUC4.js → types-Dm9JM6Vb.js} +362 -23
- package/dist/src/{util-vNmDL5DT.js → util-BYvQUPp7.js} +138 -36
- package/dist/src/{util-CuLo2pMR.cjs → util-Bxn8emtE.cjs} +14 -167
- package/dist/src/{util-BLvy9qfE.js → util-C8e5uydV.js} +18 -141
- package/dist/src/{util-DM2rTn_6.js → util-C9J8ahRn.js} +4 -4
- package/dist/src/{util-CFj4YKIn.cjs → util-CN3SrLT4.cjs} +4 -4
- package/dist/src/{util-BtoGs5Cb.js → util-D3q0WQ-0.js} +4 -4
- package/dist/src/{util-CgDCK4KI.js → util-D9TisOyk.js} +4 -4
- package/dist/src/{util-DMFeUvLz.js → util-DDs-7g6-.js} +138 -36
- package/dist/src/{util-DbVG-yZU.js → util-DvU2Pw8c.js} +138 -36
- package/dist/src/{util-Bm3E9jpK.js → util-DxWpWjhc.js} +12 -135
- package/dist/src/{util-CMMkIxfU.js → util-oGMLA7vc.js} +16 -139
- package/dist/src/{util--9u9UVCt.cjs → util-olYL5C6N.cjs} +143 -35
- package/dist/src/{utils-DKw8mrgr.cjs → utils-B05gLxER.cjs} +6 -4
- package/dist/src/{utils-DEuL4VNB.js → utils-BLJKfv0y.js} +6 -4
- package/dist/src/{utils-DOjD4dTC.js → utils-DJfvjyMj.js} +6 -4
- package/dist/src/{utils-CFxO9KGo.js → utils-hXtCYanr.js} +6 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +51 -42
- package/dist/src/app/assets/index-B6l9CVVb.js +0 -439
- package/dist/src/app/assets/index-DyZ0Ep37.css +0 -1
- package/dist/src/app/assets/scroll-timeline-BdJZVXlz.js +0 -1
- package/dist/src/app/assets/sync-CStkzc6u.js +0 -4
- package/dist/src/app/assets/vendor-charts-BnDWwBlI.js +0 -36
- package/dist/src/app/assets/vendor-markdown-Bz7N-ca6.js +0 -29
- package/dist/src/app/assets/vendor-react-AtKqiNEf.js +0 -4
- package/dist/src/app/assets/vendor-syntax-D06x6TQF.js +0 -2
- package/dist/src/app/assets/vendor-utils-BvMHZmO7.js +0 -37
- package/dist/src/cache-C5yFZ4gC.cjs +0 -816
- package/dist/src/cache-CaT5tPgo.js +0 -756
- package/dist/src/cache-CyCanoMu.js +0 -6
- package/dist/src/cache-DSqR6ezl.js +0 -726
- package/dist/src/cache-Df_QFDNu.cjs +0 -5
- package/dist/src/cache-HP0NP4k3.js +0 -756
- package/dist/src/cloud-DE3t1-ZI.js +0 -4
- package/dist/src/codex-sdk-BQEw16R_.js +0 -834
- package/dist/src/codex-sdk-C_07GuVS.js +0 -834
- package/dist/src/codex-sdk-DE5G18dx.js +0 -835
- package/dist/src/codex-sdk-ZLKfDjqP.cjs +0 -838
- package/dist/src/eval-7aEqoMs3.js +0 -15
- package/dist/src/evalResult-CYNHkk5A.js +0 -12
- package/dist/src/evalResult-CuvJeNiM.js +0 -10
- package/dist/src/evalResult-tGdilrWt.cjs +0 -10
- package/dist/src/evaluator-BBUqRhz1.js +0 -36
- package/dist/src/fetch-UWU706qb.js +0 -5
- package/dist/src/graders-BxfEguVY.js +0 -32
- package/dist/src/graders-CzVMbEnv.js +0 -34
- package/dist/src/graders-DjCXfj0l.cjs +0 -32
- package/dist/src/graders-kHzIWOKu.js +0 -32
- package/dist/src/openclaw-0Sv7AK3O.js +0 -580
- package/dist/src/openclaw-CXxbKgDH.cjs +0 -586
- package/dist/src/openclaw-D1FSCps-.js +0 -580
- package/dist/src/openclaw-D2ENvu7a.js +0 -582
- package/dist/src/providers-BSLEaIQG.js +0 -32
- package/dist/src/providers-D-FnDg8k.cjs +0 -31
- package/dist/src/providers-DEYiFVAo.js +0 -30
- package/dist/src/providers-sS2WI8YD.js +0 -30
- package/dist/src/rubyUtils-B1HXG4ej.cjs +0 -4
- package/dist/src/rubyUtils-Rt6pKA96.js +0 -5
- package/dist/src/server-B0Xh1Gx-.js +0 -7
- package/dist/src/server-DJTKu9IR.cjs +0 -5
- package/dist/src/store-C5u6MgC8.js +0 -6
- package/dist/src/store-CNHk-De4.cjs +0 -5
- package/dist/src/telemetry-Yig0Tino.js +0 -7
- package/dist/src/telemetry-p8Pwqm1i.cjs +0 -5
- package/dist/src/tokenUsageUtils-NYT-WKS6.js +0 -138
- package/dist/src/transform-ChNIpHz7.js +0 -6
- package/dist/src/transform-PtQ6rAE3.cjs +0 -5
|
@@ -1,11 +1,133 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
1
|
+
const require_logger = require("./logger-COuQb2xB.cjs");
|
|
2
|
+
const require_esm = require("./esm-CtEPLdAj.cjs");
|
|
3
|
+
const require_fetch = require("./fetch-CJU5ELPa.cjs");
|
|
4
|
+
const require_codex_sdk = require("./codex-sdk-C2_M2pl_.cjs");
|
|
5
|
+
const require_accounts = require("./accounts-Dy17bs4D.cjs");
|
|
6
|
+
let fs = require("fs");
|
|
7
|
+
fs = require_logger.__toESM(fs);
|
|
8
|
+
let path = require("path");
|
|
9
|
+
path = require_logger.__toESM(path);
|
|
4
10
|
let chalk = require("chalk");
|
|
5
11
|
chalk = require_logger.__toESM(chalk);
|
|
12
|
+
let os = require("os");
|
|
13
|
+
os = require_logger.__toESM(os);
|
|
6
14
|
require("opener");
|
|
7
15
|
let readline = require("readline");
|
|
8
16
|
readline = require_logger.__toESM(readline);
|
|
17
|
+
//#region src/providers/openai/codexDefaults.ts
|
|
18
|
+
const CODEX_AUTH_FILENAME = "auth.json";
|
|
19
|
+
const CODEX_SDK_PACKAGE_NAME = "@openai/codex-sdk";
|
|
20
|
+
let codexDefaultWorkingDir;
|
|
21
|
+
const CODEX_GRADING_OUTPUT_SCHEMA = {
|
|
22
|
+
type: "object",
|
|
23
|
+
properties: {
|
|
24
|
+
pass: { type: "boolean" },
|
|
25
|
+
score: { type: "number" },
|
|
26
|
+
reason: { type: "string" }
|
|
27
|
+
},
|
|
28
|
+
required: [
|
|
29
|
+
"pass",
|
|
30
|
+
"score",
|
|
31
|
+
"reason"
|
|
32
|
+
],
|
|
33
|
+
additionalProperties: false
|
|
34
|
+
};
|
|
35
|
+
const codexDefaultProvidersByCacheKey = /* @__PURE__ */ new Map();
|
|
36
|
+
const codexSdkAvailabilityByBaseDir = /* @__PURE__ */ new Map();
|
|
37
|
+
function getCodexEnvString(env, key) {
|
|
38
|
+
return env?.[key] || require_logger.getEnvString(key);
|
|
39
|
+
}
|
|
40
|
+
function getCodexHome(env) {
|
|
41
|
+
const homeDir = os.default.homedir?.();
|
|
42
|
+
const defaultHome = typeof homeDir === "string" && homeDir ? path.default.join(homeDir, ".codex") : void 0;
|
|
43
|
+
const codexHome = getCodexEnvString(env, "CODEX_HOME") || defaultHome || ".codex";
|
|
44
|
+
return path.default.resolve(codexHome);
|
|
45
|
+
}
|
|
46
|
+
function getTempDirectory() {
|
|
47
|
+
const tempDir = os.default.tmpdir?.();
|
|
48
|
+
return typeof tempDir === "string" && tempDir ? tempDir : process.cwd();
|
|
49
|
+
}
|
|
50
|
+
function getCodexDefaultWorkingDir() {
|
|
51
|
+
if (!codexDefaultWorkingDir) codexDefaultWorkingDir = fs.default.mkdtempSync(path.default.join(getTempDirectory(), "promptfoo-codex-default-"));
|
|
52
|
+
return codexDefaultWorkingDir;
|
|
53
|
+
}
|
|
54
|
+
function hasCodexAuthFile(env) {
|
|
55
|
+
try {
|
|
56
|
+
const stats = fs.default.statSync(path.default.join(getCodexHome(env), CODEX_AUTH_FILENAME));
|
|
57
|
+
return stats.isFile() && stats.size > 0;
|
|
58
|
+
} catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function hasCodexSdkPackage(baseDir) {
|
|
63
|
+
const cached = codexSdkAvailabilityByBaseDir.get(baseDir);
|
|
64
|
+
if (cached !== void 0) return cached;
|
|
65
|
+
const hasPackage = require_esm.resolvePackageEntryPoint(CODEX_SDK_PACKAGE_NAME, baseDir) !== null;
|
|
66
|
+
codexSdkAvailabilityByBaseDir.set(baseDir, hasPackage);
|
|
67
|
+
return hasPackage;
|
|
68
|
+
}
|
|
69
|
+
function canLoadCodexSdkPackage() {
|
|
70
|
+
return [process.cwd(), require_esm.getDirectory()].some((baseDir) => hasCodexSdkPackage(baseDir));
|
|
71
|
+
}
|
|
72
|
+
function hasCodexDefaultCredentials(env) {
|
|
73
|
+
return (Boolean(getCodexEnvString(env, "CODEX_API_KEY")) || hasCodexAuthFile(env)) && canLoadCodexSdkPackage();
|
|
74
|
+
}
|
|
75
|
+
function getCodexDefaultProviderConfig(env, config, defaultWorkingDir = getCodexDefaultWorkingDir()) {
|
|
76
|
+
const codexHome = getCodexEnvString(env, "CODEX_HOME");
|
|
77
|
+
const workingDir = config?.working_dir || defaultWorkingDir;
|
|
78
|
+
fs.default.mkdirSync(workingDir, { recursive: true });
|
|
79
|
+
const cliEnv = {
|
|
80
|
+
...codexHome ? { CODEX_HOME: path.default.resolve(codexHome) } : {},
|
|
81
|
+
...config?.cli_env
|
|
82
|
+
};
|
|
83
|
+
return {
|
|
84
|
+
approval_policy: "never",
|
|
85
|
+
sandbox_mode: "read-only",
|
|
86
|
+
skip_git_repo_check: true,
|
|
87
|
+
working_dir: workingDir,
|
|
88
|
+
...config,
|
|
89
|
+
...Object.keys(cliEnv).length > 0 ? { cli_env: cliEnv } : {}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function getCodexDefaultProvidersCacheKey(env) {
|
|
93
|
+
return JSON.stringify({
|
|
94
|
+
CODEX_HOME: getCodexEnvString(env, "CODEX_HOME"),
|
|
95
|
+
hasCodexApiKey: Boolean(getCodexEnvString(env, "CODEX_API_KEY")),
|
|
96
|
+
hasOpenAiApiKey: Boolean(getCodexEnvString(env, "OPENAI_API_KEY"))
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function getCodexDefaultProviders(env) {
|
|
100
|
+
const cacheKey = getCodexDefaultProvidersCacheKey(env);
|
|
101
|
+
const cachedProviders = codexDefaultProvidersByCacheKey.get(cacheKey);
|
|
102
|
+
if (cachedProviders) return cachedProviders;
|
|
103
|
+
const defaultWorkingDir = getCodexDefaultWorkingDir();
|
|
104
|
+
const gradingProvider = new require_codex_sdk.OpenAICodexSDKProvider({
|
|
105
|
+
config: getCodexDefaultProviderConfig(env, void 0, defaultWorkingDir),
|
|
106
|
+
env
|
|
107
|
+
});
|
|
108
|
+
const gradingJsonProvider = new require_codex_sdk.OpenAICodexSDKProvider({
|
|
109
|
+
config: getCodexDefaultProviderConfig(env, { output_schema: CODEX_GRADING_OUTPUT_SCHEMA }, defaultWorkingDir),
|
|
110
|
+
env
|
|
111
|
+
});
|
|
112
|
+
const providers = {
|
|
113
|
+
gradingJsonProvider,
|
|
114
|
+
gradingProvider,
|
|
115
|
+
llmRubricProvider: gradingJsonProvider,
|
|
116
|
+
suggestionsProvider: gradingProvider,
|
|
117
|
+
synthesizeProvider: gradingProvider,
|
|
118
|
+
webSearchProvider: new require_codex_sdk.OpenAICodexSDKProvider({
|
|
119
|
+
config: getCodexDefaultProviderConfig(env, {
|
|
120
|
+
network_access_enabled: true,
|
|
121
|
+
output_schema: CODEX_GRADING_OUTPUT_SCHEMA,
|
|
122
|
+
web_search_mode: "live"
|
|
123
|
+
}, defaultWorkingDir),
|
|
124
|
+
env
|
|
125
|
+
})
|
|
126
|
+
};
|
|
127
|
+
codexDefaultProvidersByCacheKey.set(cacheKey, providers);
|
|
128
|
+
return providers;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
9
131
|
//#region src/redteam/remoteGeneration.ts
|
|
10
132
|
/**
|
|
11
133
|
* Gets the remote generation API endpoint URL.
|
|
@@ -72,10 +194,10 @@ function getRemoteVersionUrl() {
|
|
|
72
194
|
* Determines if remote generation should be used based on configuration.
|
|
73
195
|
* @returns true if remote generation should be used
|
|
74
196
|
*/
|
|
75
|
-
function shouldGenerateRemote() {
|
|
197
|
+
function shouldGenerateRemote(options) {
|
|
76
198
|
if (neverGenerateRemote()) return false;
|
|
77
199
|
if (require_accounts.isLoggedIntoCloud()) return true;
|
|
78
|
-
return !require_logger.getEnvString("OPENAI_API_KEY") || (require_logger.state.remote ?? false);
|
|
200
|
+
return !(Boolean(require_logger.getEnvString("OPENAI_API_KEY")) || options?.canUseCodexDefaultProvider && !options?.requireEmbeddingProvider && hasCodexDefaultCredentials()) || (require_logger.state.remote ?? false);
|
|
79
201
|
}
|
|
80
202
|
/**
|
|
81
203
|
* Gets the URL for unaligned model inference (harmful content generation).
|
|
@@ -195,6 +317,12 @@ Object.defineProperty(exports, "checkServerFeatureSupport", {
|
|
|
195
317
|
return checkServerFeatureSupport;
|
|
196
318
|
}
|
|
197
319
|
});
|
|
320
|
+
Object.defineProperty(exports, "getCodexDefaultProviders", {
|
|
321
|
+
enumerable: true,
|
|
322
|
+
get: function() {
|
|
323
|
+
return getCodexDefaultProviders;
|
|
324
|
+
}
|
|
325
|
+
});
|
|
198
326
|
Object.defineProperty(exports, "getRemoteGenerationUrl", {
|
|
199
327
|
enumerable: true,
|
|
200
328
|
get: function() {
|
|
@@ -213,6 +341,12 @@ Object.defineProperty(exports, "getRemoteHealthUrl", {
|
|
|
213
341
|
return getRemoteHealthUrl;
|
|
214
342
|
}
|
|
215
343
|
});
|
|
344
|
+
Object.defineProperty(exports, "hasCodexDefaultCredentials", {
|
|
345
|
+
enumerable: true,
|
|
346
|
+
get: function() {
|
|
347
|
+
return hasCodexDefaultCredentials;
|
|
348
|
+
}
|
|
349
|
+
});
|
|
216
350
|
Object.defineProperty(exports, "neverGenerateRemote", {
|
|
217
351
|
enumerable: true,
|
|
218
352
|
get: function() {
|
|
@@ -238,4 +372,4 @@ Object.defineProperty(exports, "shouldGenerateRemote", {
|
|
|
238
372
|
}
|
|
239
373
|
});
|
|
240
374
|
|
|
241
|
-
//# sourceMappingURL=server-
|
|
375
|
+
//# sourceMappingURL=server-Dx2TyCH2.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { s as logger } from "./logger-
|
|
3
|
-
import { _ as getDbSignalPath } from "./tables-
|
|
2
|
+
import { s as logger } from "./logger-DksKw1Qc.js";
|
|
3
|
+
import { _ as getDbSignalPath } from "./tables-C4CH3zRr.js";
|
|
4
4
|
import fs from "fs";
|
|
5
5
|
import debounce from "debounce";
|
|
6
6
|
//#region src/util/providerResponse.ts
|
|
@@ -113,4 +113,4 @@ function setupSignalWatcher(onChange) {
|
|
|
113
113
|
//#endregion
|
|
114
114
|
export { getActualPromptWithFallback as a, getActualPrompt as i, setupSignalWatcher as n, updateSignalFile as r, readSignalEvalId as t };
|
|
115
115
|
|
|
116
|
-
//# sourceMappingURL=signal-
|
|
116
|
+
//# sourceMappingURL=signal-CE5G3a7x.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
1
|
+
const require_logger = require("./logger-COuQb2xB.cjs");
|
|
2
2
|
let _slack_web_api = require("@slack/web-api");
|
|
3
3
|
//#region src/providers/slack.ts
|
|
4
4
|
var SlackProvider = class {
|
|
@@ -132,4 +132,4 @@ var SlackProvider = class {
|
|
|
132
132
|
//#endregion
|
|
133
133
|
exports.SlackProvider = SlackProvider;
|
|
134
134
|
|
|
135
|
-
//# sourceMappingURL=slack-
|
|
135
|
+
//# sourceMappingURL=slack-1Rhq0EoV.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { s as logger } from "./logger-
|
|
2
|
+
import { s as logger } from "./logger-DksKw1Qc.js";
|
|
3
3
|
import { WebClient } from "@slack/web-api";
|
|
4
4
|
//#region src/providers/slack.ts
|
|
5
5
|
var SlackProvider = class {
|
|
@@ -133,4 +133,4 @@ var SlackProvider = class {
|
|
|
133
133
|
//#endregion
|
|
134
134
|
export { SlackProvider };
|
|
135
135
|
|
|
136
|
-
//# sourceMappingURL=slack-
|
|
136
|
+
//# sourceMappingURL=slack-D5Wpy8LM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as logger } from "./logger-
|
|
1
|
+
import { a as logger } from "./logger-B88EkIn6.js";
|
|
2
2
|
import { WebClient } from "@slack/web-api";
|
|
3
3
|
//#region src/providers/slack.ts
|
|
4
4
|
var SlackProvider = class {
|
|
@@ -132,4 +132,4 @@ var SlackProvider = class {
|
|
|
132
132
|
//#endregion
|
|
133
133
|
export { SlackProvider };
|
|
134
134
|
|
|
135
|
-
//# sourceMappingURL=slack-
|
|
135
|
+
//# sourceMappingURL=slack-DDUe-5MC.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as logger } from "./logger-
|
|
1
|
+
import { a as logger } from "./logger-Ct2S6Yx-.js";
|
|
2
2
|
import { WebClient } from "@slack/web-api";
|
|
3
3
|
//#region src/providers/slack.ts
|
|
4
4
|
var SlackProvider = class {
|
|
@@ -132,4 +132,4 @@ var SlackProvider = class {
|
|
|
132
132
|
//#endregion
|
|
133
133
|
export { SlackProvider };
|
|
134
134
|
|
|
135
|
-
//# sourceMappingURL=slack-
|
|
135
|
+
//# sourceMappingURL=slack-acRb0IqQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { s as logger } from "./logger-
|
|
3
|
-
import { f as spansTable, g as getDb, m as tracesTable } from "./tables-
|
|
2
|
+
import { s as logger } from "./logger-DksKw1Qc.js";
|
|
3
|
+
import { f as spansTable, g as getDb, m as tracesTable } from "./tables-C4CH3zRr.js";
|
|
4
4
|
import { asc, eq, lt } from "drizzle-orm";
|
|
5
5
|
//#region src/tracing/store.ts
|
|
6
6
|
const SENSITIVE_ATTRIBUTE_KEYS = [
|
|
@@ -233,4 +233,4 @@ function getTraceStore() {
|
|
|
233
233
|
//#endregion
|
|
234
234
|
export { getTraceStore as n, TraceStore as t };
|
|
235
235
|
|
|
236
|
-
//# sourceMappingURL=store-
|
|
236
|
+
//# sourceMappingURL=store-CYEy5J2D.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
const require_tables = require("./tables-
|
|
1
|
+
const require_logger = require("./logger-COuQb2xB.cjs");
|
|
2
|
+
const require_tables = require("./tables-DUfh1F7Z.cjs");
|
|
3
3
|
let drizzle_orm = require("drizzle-orm");
|
|
4
4
|
//#region src/tracing/store.ts
|
|
5
5
|
const SENSITIVE_ATTRIBUTE_KEYS = [
|
|
@@ -243,4 +243,4 @@ Object.defineProperty(exports, "getTraceStore", {
|
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
245
|
|
|
246
|
-
//# sourceMappingURL=store-
|
|
246
|
+
//# sourceMappingURL=store-DAAyxcy6.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-DEq-mXcV.js";
|
|
2
|
-
import { a as logger } from "./logger-
|
|
3
|
-
import { f as spansTable, h as getDb, m as tracesTable } from "./tables-
|
|
2
|
+
import { a as logger } from "./logger-B88EkIn6.js";
|
|
3
|
+
import { f as spansTable, h as getDb, m as tracesTable } from "./tables-CsWou1Bx.js";
|
|
4
4
|
import { asc, eq, lt } from "drizzle-orm";
|
|
5
5
|
//#region src/tracing/store.ts
|
|
6
6
|
var store_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -237,4 +237,4 @@ function getTraceStore() {
|
|
|
237
237
|
//#endregion
|
|
238
238
|
export { store_exports as n, getTraceStore as t };
|
|
239
239
|
|
|
240
|
-
//# sourceMappingURL=store-
|
|
240
|
+
//# sourceMappingURL=store-Dn9HUkdW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-DEq-mXcV.js";
|
|
2
|
-
import { a as logger } from "./logger-
|
|
3
|
-
import { f as tracesTable, p as getDb, u as spansTable } from "./tables-
|
|
2
|
+
import { a as logger } from "./logger-Ct2S6Yx-.js";
|
|
3
|
+
import { f as tracesTable, p as getDb, u as spansTable } from "./tables-DQ4WU5tX.js";
|
|
4
4
|
import { asc, eq, lt } from "drizzle-orm";
|
|
5
5
|
//#region src/tracing/store.ts
|
|
6
6
|
var store_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -237,4 +237,4 @@ function getTraceStore() {
|
|
|
237
237
|
//#endregion
|
|
238
238
|
export { store_exports as n, getTraceStore as t };
|
|
239
239
|
|
|
240
|
-
//# sourceMappingURL=store-
|
|
240
|
+
//# sourceMappingURL=store-M0b1WfYb.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as
|
|
3
|
-
import { s as ResultFailureReason } from "./types-
|
|
2
|
+
import { C as getConfigDirectoryPath, T as getEnvBool, s as logger } from "./logger-DksKw1Qc.js";
|
|
3
|
+
import { s as ResultFailureReason } from "./types-Dm9JM6Vb.js";
|
|
4
4
|
import * as path$1 from "path";
|
|
5
5
|
import { relations, sql } from "drizzle-orm";
|
|
6
6
|
import Database from "better-sqlite3";
|
|
@@ -311,4 +311,4 @@ relations(spansTable, ({ one }) => ({ trace: one(tracesTable, {
|
|
|
311
311
|
//#endregion
|
|
312
312
|
export { getDbSignalPath as _, evalResultsTable as a, evalsToPromptsTable as c, promptsTable as d, spansTable as f, getDb as g, closeDbIfOpen as h, datasetsTable as i, evalsToTagsTable as l, tracesTable as m, blobReferencesTable as n, evalsTable as o, tagsTable as p, configsTable as r, evalsToDatasetsTable as s, blobAssetsTable as t, modelAuditsTable as u };
|
|
313
313
|
|
|
314
|
-
//# sourceMappingURL=tables-
|
|
314
|
+
//# sourceMappingURL=tables-C4CH3zRr.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as ResultFailureReason } from "./types-
|
|
1
|
+
import { S as getEnvBool, a as logger, x as getConfigDirectoryPath } from "./logger-B88EkIn6.js";
|
|
2
|
+
import { s as ResultFailureReason } from "./types-Bgh5SOn6.js";
|
|
3
3
|
import * as path$1 from "path";
|
|
4
4
|
import Database from "better-sqlite3";
|
|
5
5
|
import { drizzle } from "drizzle-orm/better-sqlite3";
|
|
@@ -285,4 +285,4 @@ relations(spansTable, ({ one }) => ({ trace: one(tracesTable, {
|
|
|
285
285
|
//#endregion
|
|
286
286
|
export { evalResultsTable as a, evalsToPromptsTable as c, promptsTable as d, spansTable as f, getDbSignalPath as g, getDb as h, datasetsTable as i, evalsToTagsTable as l, tracesTable as m, blobReferencesTable as n, evalsTable as o, tagsTable as p, configsTable as r, evalsToDatasetsTable as s, blobAssetsTable as t, modelAuditsTable as u };
|
|
287
287
|
|
|
288
|
-
//# sourceMappingURL=tables-
|
|
288
|
+
//# sourceMappingURL=tables-CsWou1Bx.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as ResultFailureReason } from "./types-
|
|
1
|
+
import { S as getEnvBool, a as logger, x as getConfigDirectoryPath } from "./logger-Ct2S6Yx-.js";
|
|
2
|
+
import { g as ResultFailureReason } from "./types-BGQDAP8i.js";
|
|
3
3
|
import * as path$1 from "path";
|
|
4
4
|
import { relations, sql } from "drizzle-orm";
|
|
5
5
|
import Database from "better-sqlite3";
|
|
@@ -285,4 +285,4 @@ relations(spansTable, ({ one }) => ({ trace: one(tracesTable, {
|
|
|
285
285
|
//#endregion
|
|
286
286
|
export { evalsTable as a, evalsToTagsTable as c, tagsTable as d, tracesTable as f, evalResultsTable as i, promptsTable as l, getDbSignalPath as m, blobReferencesTable as n, evalsToDatasetsTable as o, getDb as p, datasetsTable as r, evalsToPromptsTable as s, blobAssetsTable as t, spansTable as u };
|
|
287
287
|
|
|
288
|
-
//# sourceMappingURL=tables-
|
|
288
|
+
//# sourceMappingURL=tables-DQ4WU5tX.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
const require_types = require("./types-
|
|
1
|
+
const require_logger = require("./logger-COuQb2xB.cjs");
|
|
2
|
+
const require_types = require("./types-CeaeaZdP.cjs");
|
|
3
3
|
let path = require("path");
|
|
4
4
|
path = require_logger.__toESM(path);
|
|
5
5
|
let drizzle_orm = require("drizzle-orm");
|
|
@@ -370,4 +370,4 @@ Object.defineProperty(exports, "tracesTable", {
|
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
372
|
|
|
373
|
-
//# sourceMappingURL=tables-
|
|
373
|
+
//# sourceMappingURL=tables-DUfh1F7Z.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as isLoggedIntoCloud, i as getAuthMethod, o as getUserEmail, s as getUserId } from "./accounts-
|
|
2
|
+
import { O as getEnvString, T as getEnvBool, j as isCI, s as logger } from "./logger-DksKw1Qc.js";
|
|
3
|
+
import { D as EVENTS_ENDPOINT, E as CONSENT_ENDPOINT, F as VERSION, O as R_ENDPOINT, P as POSTHOG_KEY, i as fetchWithTimeout, n as fetchWithProxy } from "./fetch-BEWnXrrG.js";
|
|
4
|
+
import { c as isLoggedIntoCloud, i as getAuthMethod, o as getUserEmail, s as getUserId } from "./accounts-F9d_5sMC.js";
|
|
5
5
|
import { PostHog } from "posthog-node";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/telemetry.ts
|
|
@@ -163,4 +163,4 @@ if (!process[SHUTDOWN_HANDLER_KEY]) {
|
|
|
163
163
|
//#endregion
|
|
164
164
|
export { TelemetryEventSchema as n, telemetry as r, Telemetry as t };
|
|
165
165
|
|
|
166
|
-
//# sourceMappingURL=telemetry-
|
|
166
|
+
//# sourceMappingURL=telemetry-CQPez_Jp.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
const require_fetch = require("./fetch-
|
|
3
|
-
const require_accounts = require("./accounts-
|
|
1
|
+
const require_logger = require("./logger-COuQb2xB.cjs");
|
|
2
|
+
const require_fetch = require("./fetch-CJU5ELPa.cjs");
|
|
3
|
+
const require_accounts = require("./accounts-Dy17bs4D.cjs");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
let posthog_node = require("posthog-node");
|
|
6
6
|
zod.z.object({
|
|
@@ -172,4 +172,4 @@ Object.defineProperty(exports, "telemetry", {
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
-
//# sourceMappingURL=telemetry-
|
|
175
|
+
//# sourceMappingURL=telemetry-Dsw_faFj.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-DEq-mXcV.js";
|
|
2
|
-
import {
|
|
3
|
-
import { D as
|
|
4
|
-
import { a as getUserId, i as getUserEmail, n as getAuthMethod, o as isLoggedIntoCloud } from "./accounts-
|
|
2
|
+
import { O as isCI, S as getEnvBool, T as getEnvString, a as logger } from "./logger-Ct2S6Yx-.js";
|
|
3
|
+
import { D as CONSENT_ENDPOINT, F as VERSION, O as EVENTS_ENDPOINT, P as POSTHOG_KEY, k as R_ENDPOINT, r as fetchWithTimeout, t as fetchWithProxy } from "./fetch-Di00EQrc.js";
|
|
4
|
+
import { a as getUserId, i as getUserEmail, n as getAuthMethod, o as isLoggedIntoCloud } from "./accounts-DhMYUUbu.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { PostHog } from "posthog-node";
|
|
7
7
|
//#region src/telemetry.ts
|
|
@@ -167,4 +167,4 @@ if (!process[SHUTDOWN_HANDLER_KEY]) {
|
|
|
167
167
|
//#endregion
|
|
168
168
|
export { telemetry_exports as n, telemetry as t };
|
|
169
169
|
|
|
170
|
-
//# sourceMappingURL=telemetry-
|
|
170
|
+
//# sourceMappingURL=telemetry-Dvqxv3YC.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-DEq-mXcV.js";
|
|
2
|
-
import {
|
|
3
|
-
import { D as
|
|
4
|
-
import { c as isLoggedIntoCloud, i as getAuthMethod, o as getUserEmail, s as getUserId } from "./accounts-
|
|
2
|
+
import { O as isCI, S as getEnvBool, T as getEnvString, a as logger } from "./logger-B88EkIn6.js";
|
|
3
|
+
import { D as CONSENT_ENDPOINT, F as POSTHOG_KEY, I as VERSION, O as EVENTS_ENDPOINT, k as R_ENDPOINT, r as fetchWithTimeout, t as fetchWithProxy } from "./fetch-B0Z3Oe4k.js";
|
|
4
|
+
import { c as isLoggedIntoCloud, i as getAuthMethod, o as getUserEmail, s as getUserId } from "./accounts-DdJ2pHMI.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { PostHog } from "posthog-node";
|
|
7
7
|
//#region src/telemetry.ts
|
|
@@ -168,4 +168,4 @@ if (!process[SHUTDOWN_HANDLER_KEY]) {
|
|
|
168
168
|
//#endregion
|
|
169
169
|
export { telemetry as n, telemetry_exports as r, TelemetryEventSchema as t };
|
|
170
170
|
|
|
171
|
-
//# sourceMappingURL=telemetry-
|
|
171
|
+
//# sourceMappingURL=telemetry-dbaJ0E98.js.map
|
|
@@ -6,7 +6,9 @@ function createEmptyCompletionDetails() {
|
|
|
6
6
|
return {
|
|
7
7
|
reasoning: 0,
|
|
8
8
|
acceptedPrediction: 0,
|
|
9
|
-
rejectedPrediction: 0
|
|
9
|
+
rejectedPrediction: 0,
|
|
10
|
+
cacheReadInputTokens: 0,
|
|
11
|
+
cacheCreationInputTokens: 0
|
|
10
12
|
};
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
@@ -50,7 +52,9 @@ function accumulateCompletionDetails(target, update) {
|
|
|
50
52
|
return {
|
|
51
53
|
reasoning: addNumbers(target?.reasoning, update.reasoning),
|
|
52
54
|
acceptedPrediction: addNumbers(target?.acceptedPrediction, update.acceptedPrediction),
|
|
53
|
-
rejectedPrediction: addNumbers(target?.rejectedPrediction, update.rejectedPrediction)
|
|
55
|
+
rejectedPrediction: addNumbers(target?.rejectedPrediction, update.rejectedPrediction),
|
|
56
|
+
cacheReadInputTokens: addNumbers(target?.cacheReadInputTokens, update.cacheReadInputTokens),
|
|
57
|
+
cacheCreationInputTokens: addNumbers(target?.cacheCreationInputTokens, update.cacheCreationInputTokens)
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
@@ -170,4 +174,4 @@ Object.defineProperty(exports, "normalizeTokenUsage", {
|
|
|
170
174
|
}
|
|
171
175
|
});
|
|
172
176
|
|
|
173
|
-
//# sourceMappingURL=tokenUsageUtils-
|
|
177
|
+
//# sourceMappingURL=tokenUsageUtils-Bb7DkZPz.cjs.map
|
|
@@ -6,7 +6,9 @@ function createEmptyCompletionDetails() {
|
|
|
6
6
|
return {
|
|
7
7
|
reasoning: 0,
|
|
8
8
|
acceptedPrediction: 0,
|
|
9
|
-
rejectedPrediction: 0
|
|
9
|
+
rejectedPrediction: 0,
|
|
10
|
+
cacheReadInputTokens: 0,
|
|
11
|
+
cacheCreationInputTokens: 0
|
|
10
12
|
};
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
@@ -50,7 +52,9 @@ function accumulateCompletionDetails(target, update) {
|
|
|
50
52
|
return {
|
|
51
53
|
reasoning: addNumbers(target?.reasoning, update.reasoning),
|
|
52
54
|
acceptedPrediction: addNumbers(target?.acceptedPrediction, update.acceptedPrediction),
|
|
53
|
-
rejectedPrediction: addNumbers(target?.rejectedPrediction, update.rejectedPrediction)
|
|
55
|
+
rejectedPrediction: addNumbers(target?.rejectedPrediction, update.rejectedPrediction),
|
|
56
|
+
cacheReadInputTokens: addNumbers(target?.cacheReadInputTokens, update.cacheReadInputTokens),
|
|
57
|
+
cacheCreationInputTokens: addNumbers(target?.cacheCreationInputTokens, update.cacheCreationInputTokens)
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
@@ -135,4 +139,4 @@ function normalizeTokenUsage(tokenUsage) {
|
|
|
135
139
|
//#endregion
|
|
136
140
|
export { createEmptyTokenUsage as a, createEmptyAssertions as i, accumulateResponseTokenUsage as n, normalizeTokenUsage as o, accumulateTokenUsage as r, accumulateAssertionTokenUsage as t };
|
|
137
141
|
|
|
138
|
-
//# sourceMappingURL=tokenUsageUtils-
|
|
142
|
+
//# sourceMappingURL=tokenUsageUtils-C-bmyHoE.js.map
|
|
@@ -7,7 +7,9 @@ function createEmptyCompletionDetails() {
|
|
|
7
7
|
return {
|
|
8
8
|
reasoning: 0,
|
|
9
9
|
acceptedPrediction: 0,
|
|
10
|
-
rejectedPrediction: 0
|
|
10
|
+
rejectedPrediction: 0,
|
|
11
|
+
cacheReadInputTokens: 0,
|
|
12
|
+
cacheCreationInputTokens: 0
|
|
11
13
|
};
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
@@ -51,7 +53,9 @@ function accumulateCompletionDetails(target, update) {
|
|
|
51
53
|
return {
|
|
52
54
|
reasoning: addNumbers(target?.reasoning, update.reasoning),
|
|
53
55
|
acceptedPrediction: addNumbers(target?.acceptedPrediction, update.acceptedPrediction),
|
|
54
|
-
rejectedPrediction: addNumbers(target?.rejectedPrediction, update.rejectedPrediction)
|
|
56
|
+
rejectedPrediction: addNumbers(target?.rejectedPrediction, update.rejectedPrediction),
|
|
57
|
+
cacheReadInputTokens: addNumbers(target?.cacheReadInputTokens, update.cacheReadInputTokens),
|
|
58
|
+
cacheCreationInputTokens: addNumbers(target?.cacheCreationInputTokens, update.cacheCreationInputTokens)
|
|
55
59
|
};
|
|
56
60
|
}
|
|
57
61
|
/**
|
|
@@ -136,4 +140,4 @@ function normalizeTokenUsage(tokenUsage) {
|
|
|
136
140
|
//#endregion
|
|
137
141
|
export { createEmptyTokenUsage as a, createEmptyAssertions as i, accumulateResponseTokenUsage as n, normalizeTokenUsage as o, accumulateTokenUsage as r, accumulateAssertionTokenUsage as t };
|
|
138
142
|
|
|
139
|
-
//# sourceMappingURL=tokenUsageUtils-
|
|
143
|
+
//# sourceMappingURL=tokenUsageUtils-CXrvO-wA.js.map
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
require("./
|
|
3
|
-
require("./
|
|
4
|
-
require("./
|
|
5
|
-
require("./util-
|
|
6
|
-
const require_fetch = require("./fetch-BnR9wSnm.cjs");
|
|
7
|
-
const require_cache = require("./cache-C5yFZ4gC.cjs");
|
|
8
|
-
const require_openai = require("./openai-CoxGAQwn.cjs");
|
|
9
|
-
const require_util$1 = require("./util-CFj4YKIn.cjs");
|
|
1
|
+
const require_logger = require("./logger-COuQb2xB.cjs");
|
|
2
|
+
const require_fetch = require("./fetch-CJU5ELPa.cjs");
|
|
3
|
+
const require_cache = require("./cache-BIyPcp5v.cjs");
|
|
4
|
+
const require_openai = require("./openai-URNyItar.cjs");
|
|
5
|
+
const require_util = require("./util-CN3SrLT4.cjs");
|
|
10
6
|
let fs = require("fs");
|
|
11
7
|
fs = require_logger.__toESM(fs);
|
|
12
8
|
let path = require("path");
|
|
13
9
|
path = require_logger.__toESM(path);
|
|
14
10
|
//#region src/providers/openai/transcription.ts
|
|
15
11
|
var OpenAiTranscriptionProvider = class OpenAiTranscriptionProvider extends require_openai.OpenAiGenericProvider {
|
|
16
|
-
static OPENAI_TRANSCRIPTION_MODEL_NAMES = require_util
|
|
12
|
+
static OPENAI_TRANSCRIPTION_MODEL_NAMES = require_util.OPENAI_TRANSCRIPTION_MODELS.map((model) => model.id);
|
|
17
13
|
config;
|
|
18
14
|
constructor(modelName, options = {}) {
|
|
19
15
|
if (!OpenAiTranscriptionProvider.OPENAI_TRANSCRIPTION_MODEL_NAMES.includes(modelName)) require_logger.logger.debug(`Using unknown transcription model: ${modelName}`);
|
|
@@ -27,12 +23,12 @@ var OpenAiTranscriptionProvider = class OpenAiTranscriptionProvider extends requ
|
|
|
27
23
|
return `[OpenAI Transcription Provider ${this.modelName}]`;
|
|
28
24
|
}
|
|
29
25
|
calculateTranscriptionCost(durationSeconds) {
|
|
30
|
-
const model = require_util
|
|
26
|
+
const model = require_util.OPENAI_TRANSCRIPTION_MODELS.find((m) => m.id === this.modelName);
|
|
31
27
|
if (!model || !model.cost) return 0;
|
|
32
28
|
return durationSeconds / 60 * model.cost.perMinute;
|
|
33
29
|
}
|
|
34
30
|
async callApi(prompt, context, _callApiOptions) {
|
|
35
|
-
if (!this.getApiKey()) throw new Error(
|
|
31
|
+
if (!this.getApiKey()) throw new Error(this.getMissingApiKeyErrorMessage());
|
|
36
32
|
const config = {
|
|
37
33
|
...this.config,
|
|
38
34
|
...context?.prompt?.config
|
|
@@ -125,4 +121,4 @@ var OpenAiTranscriptionProvider = class OpenAiTranscriptionProvider extends requ
|
|
|
125
121
|
//#endregion
|
|
126
122
|
exports.OpenAiTranscriptionProvider = OpenAiTranscriptionProvider;
|
|
127
123
|
|
|
128
|
-
//# sourceMappingURL=transcription-
|
|
124
|
+
//# sourceMappingURL=transcription-BvjmiYB1.cjs.map
|