deepeval 3.4.9__py3-none-any.whl → 3.5.1__py3-none-any.whl
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.
- deepeval/_version.py +1 -1
- deepeval/benchmarks/drop/drop.py +2 -3
- deepeval/benchmarks/hellaswag/hellaswag.py +2 -2
- deepeval/benchmarks/logi_qa/logi_qa.py +2 -2
- deepeval/benchmarks/math_qa/math_qa.py +2 -2
- deepeval/benchmarks/mmlu/mmlu.py +2 -2
- deepeval/benchmarks/truthful_qa/truthful_qa.py +2 -2
- deepeval/confident/api.py +3 -0
- deepeval/integrations/langchain/callback.py +21 -0
- deepeval/integrations/pydantic_ai/__init__.py +2 -4
- deepeval/integrations/pydantic_ai/{setup.py → otel.py} +0 -8
- deepeval/integrations/pydantic_ai/patcher.py +376 -0
- deepeval/metrics/__init__.py +1 -1
- deepeval/metrics/answer_relevancy/template.py +13 -38
- deepeval/metrics/faithfulness/template.py +17 -27
- deepeval/models/llms/grok_model.py +1 -1
- deepeval/models/llms/kimi_model.py +1 -1
- deepeval/prompt/api.py +22 -4
- deepeval/prompt/prompt.py +131 -17
- deepeval/synthesizer/synthesizer.py +17 -9
- deepeval/tracing/api.py +3 -0
- deepeval/tracing/context.py +3 -1
- deepeval/tracing/perf_epoch_bridge.py +4 -4
- deepeval/tracing/tracing.py +12 -2
- deepeval/tracing/types.py +3 -0
- deepeval/tracing/utils.py +6 -2
- deepeval/utils.py +2 -2
- {deepeval-3.4.9.dist-info → deepeval-3.5.1.dist-info}/METADATA +14 -13
- {deepeval-3.4.9.dist-info → deepeval-3.5.1.dist-info}/RECORD +32 -32
- deepeval/integrations/pydantic_ai/agent.py +0 -364
- {deepeval-3.4.9.dist-info → deepeval-3.5.1.dist-info}/LICENSE.md +0 -0
- {deepeval-3.4.9.dist-info → deepeval-3.5.1.dist-info}/WHEEL +0 -0
- {deepeval-3.4.9.dist-info → deepeval-3.5.1.dist-info}/entry_points.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
deepeval/__init__.py,sha256=6fsb813LD_jNhqR-xZnSdE5E-KsBbC3tc4oIg5ZMgTw,2115
|
|
2
|
-
deepeval/_version.py,sha256=
|
|
2
|
+
deepeval/_version.py,sha256=4-DIaf0_guINnwTWGKRHVcep723FM_T7p_K6jccjok0,27
|
|
3
3
|
deepeval/annotation/__init__.py,sha256=ZFhUVNNuH_YgQSZJ-m5E9iUb9TkAkEV33a6ouMDZ8EI,111
|
|
4
4
|
deepeval/annotation/annotation.py,sha256=3j3-syeJepAcEj3u3e4T_BeRDzNr7yXGDIoNQGMKpwQ,2298
|
|
5
5
|
deepeval/annotation/api.py,sha256=EYN33ACVzVxsFleRYm60KB4Exvff3rPJKt1VBuuX970,2147
|
|
@@ -77,7 +77,7 @@ deepeval/benchmarks/bool_q/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
77
77
|
deepeval/benchmarks/bool_q/bool_q.py,sha256=wJM4-wSybT8EwgDJVB4p3QYXGNzLD3tdrpGE1cNEz_E,5507
|
|
78
78
|
deepeval/benchmarks/bool_q/template.py,sha256=pgNj4RR6-4VJDDySwnKt-MpghBCjVlZ7fPKY6PltllQ,4055
|
|
79
79
|
deepeval/benchmarks/drop/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
|
-
deepeval/benchmarks/drop/drop.py,sha256=
|
|
80
|
+
deepeval/benchmarks/drop/drop.py,sha256=rGcqd79-IfQ2tvPuAL6wrON4R0hBiVGBy1OtDRmertE,12042
|
|
81
81
|
deepeval/benchmarks/drop/task.py,sha256=RV7DEXF192IOsY-yIVdlGb_y-A_sS5APPn8PGOPn5yU,17950
|
|
82
82
|
deepeval/benchmarks/drop/template.py,sha256=1P0mx_71Bxr9juIA8nGpVRIrP8NSoDILkIicjWvqE94,1376
|
|
83
83
|
deepeval/benchmarks/equity_med_qa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -88,7 +88,7 @@ deepeval/benchmarks/gsm8k/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
88
88
|
deepeval/benchmarks/gsm8k/gsm8k.py,sha256=LyJQBskKuqp013LLO3539RJiRXqCmlGl12BPXvQ8P88,6974
|
|
89
89
|
deepeval/benchmarks/gsm8k/template.py,sha256=3F7DwQwhJwKxtlbaO6TNvBBRaDEUBEp58JwirSjxtR0,1626
|
|
90
90
|
deepeval/benchmarks/hellaswag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
|
-
deepeval/benchmarks/hellaswag/hellaswag.py,sha256=
|
|
91
|
+
deepeval/benchmarks/hellaswag/hellaswag.py,sha256=_3felzBwQUhhRXk4D9NbcY8dme_qUQcwUjKGw9OtDJg,11972
|
|
92
92
|
deepeval/benchmarks/hellaswag/task.py,sha256=LfO8T6bpNiwdM8VdubKrup7qje3-rHgu69iB6Sdsc6I,7323
|
|
93
93
|
deepeval/benchmarks/hellaswag/template.py,sha256=TcCu25hkl89qbRwcEyRVGTGp7DU_5Eph754W2znk5QY,1279
|
|
94
94
|
deepeval/benchmarks/human_eval/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -102,15 +102,15 @@ deepeval/benchmarks/lambada/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
|
102
102
|
deepeval/benchmarks/lambada/lambada.py,sha256=FExZLpDBgQfYe9o-MBS0LEy0-i4jHGeFHo8XCbMW_io,5556
|
|
103
103
|
deepeval/benchmarks/lambada/template.py,sha256=mSn0Elvp34wTnvaAm3IENz0mfGSNM_iRx50hIouk4t0,3776
|
|
104
104
|
deepeval/benchmarks/logi_qa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
105
|
-
deepeval/benchmarks/logi_qa/logi_qa.py,sha256=
|
|
105
|
+
deepeval/benchmarks/logi_qa/logi_qa.py,sha256=VNZGASigEDlJjzwGZtWG3OUs3v3P733GD84-h3TaxjU,11143
|
|
106
106
|
deepeval/benchmarks/logi_qa/task.py,sha256=pVMLVHPyDFSyoIsnckBNRDt8FK0J317PiGT-0dpr7rs,350
|
|
107
107
|
deepeval/benchmarks/logi_qa/template.py,sha256=EddGd2s3u2bPejogTcM50SDS7ynHnMhHaKuqQjjZoLk,4354
|
|
108
108
|
deepeval/benchmarks/math_qa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
|
-
deepeval/benchmarks/math_qa/math_qa.py,sha256=
|
|
109
|
+
deepeval/benchmarks/math_qa/math_qa.py,sha256=_eP-yocJom9r91qmAUBbIH4hrWazEHLV2lDKu0yMfEI,10651
|
|
110
110
|
deepeval/benchmarks/math_qa/task.py,sha256=3q_jlK5kIl5Zs0mQwuzxyvmPP6ncLZwszn7gtl1GfZs,192
|
|
111
111
|
deepeval/benchmarks/math_qa/template.py,sha256=pC3PB2GGU5TQ81I7E76RJh0xlu7xiF6d4SK3T_Nksh8,4468
|
|
112
112
|
deepeval/benchmarks/mmlu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
113
|
-
deepeval/benchmarks/mmlu/mmlu.py,sha256=
|
|
113
|
+
deepeval/benchmarks/mmlu/mmlu.py,sha256=flg3tb052DVo7wnfAHkW9n07tEEhHrkT2C0d5-UMBoQ,11431
|
|
114
114
|
deepeval/benchmarks/mmlu/task.py,sha256=HnhnuD4Xjur9GlrBtswaR7ZPouGx4NTgbcFZu_oIzXw,2580
|
|
115
115
|
deepeval/benchmarks/mmlu/template.py,sha256=MsdcrZWVkyZpEw--Kj6W7vjOJgig-ABiz9B3WtZz1MQ,1303
|
|
116
116
|
deepeval/benchmarks/modes/__init__.py,sha256=IGhZp0-nmvVsZWBnTuBvKhdGiy4TJZShFSjYAeBZdbo,135
|
|
@@ -125,7 +125,7 @@ deepeval/benchmarks/truthful_qa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
|
|
|
125
125
|
deepeval/benchmarks/truthful_qa/mode.py,sha256=66aXCTXGTbAprA33M3TT15OhpJAqxLPDzJuShKxiFwY,84
|
|
126
126
|
deepeval/benchmarks/truthful_qa/task.py,sha256=PmfPbqINd9wizq8Tpk8pwms9TersoGlMGBqxpTmZhcc,1360
|
|
127
127
|
deepeval/benchmarks/truthful_qa/template.py,sha256=5y6mfJm9AXnQL7xwrfsZjH080GwO1kd_1GdTzDCoYgo,4465
|
|
128
|
-
deepeval/benchmarks/truthful_qa/truthful_qa.py,sha256=
|
|
128
|
+
deepeval/benchmarks/truthful_qa/truthful_qa.py,sha256=2r-xcFnzSSJds3ZGxYogBzjFFrCfJxYpXzKrpE8cC_c,13781
|
|
129
129
|
deepeval/benchmarks/utils.py,sha256=NHImqH22mv108_CKM7ajTpu4hOeUhr5xPicbf0i2qGk,287
|
|
130
130
|
deepeval/benchmarks/winogrande/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
131
131
|
deepeval/benchmarks/winogrande/template.py,sha256=tDwH8NpNF9x7FbDmQw45XaW1LNqGBV6zP5pwV1uOlwM,2089
|
|
@@ -138,7 +138,7 @@ deepeval/cli/test.py,sha256=kSIFMRTAfVzBJ4OitwvT829-ylV7UzPMP57P2DePS-Q,5482
|
|
|
138
138
|
deepeval/cli/types.py,sha256=_7KdthstHNc-JKCWrfpDQCf_j8h9PMxh0qJCHmVXJr0,310
|
|
139
139
|
deepeval/cli/utils.py,sha256=F4-yuONzk4ojDoSLjI9RYERB7HOD412iZ2lNlSCq4wk,5601
|
|
140
140
|
deepeval/confident/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
141
|
-
deepeval/confident/api.py,sha256=
|
|
141
|
+
deepeval/confident/api.py,sha256=bOC71TaVAEgoXFtJ9yMo0-atmUUdBuvaclMGczMcR6o,8455
|
|
142
142
|
deepeval/confident/types.py,sha256=-slFhDof_1maMgpLxqDRZv6kz6ZVY2hP_0uj_aveJKU,533
|
|
143
143
|
deepeval/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
144
144
|
deepeval/config/settings.py,sha256=e7sk6_3I14hG457e75DoJd9Ojo3rOkpBZzsMYlj4gKQ,18139
|
|
@@ -172,22 +172,22 @@ deepeval/integrations/hugging_face/rich_manager.py,sha256=WvFtPGpPmGeg2Ftsnojga6
|
|
|
172
172
|
deepeval/integrations/hugging_face/tests/test_callbacks.py,sha256=88Wyg-aDaXujj9jHeGdFF3ITSl2-y7eaJGWgSyvvDi8,4607
|
|
173
173
|
deepeval/integrations/hugging_face/utils.py,sha256=HUKdQcTIb76Ct69AS737oPxmlVxk5fw2UbT2pLn-o8k,1817
|
|
174
174
|
deepeval/integrations/langchain/__init__.py,sha256=EJz0UvoLjBG5cftOJNJQ5qLawwHHRnSQLgBu_SaqZ1Q,94
|
|
175
|
-
deepeval/integrations/langchain/callback.py,sha256=
|
|
175
|
+
deepeval/integrations/langchain/callback.py,sha256=hps3eq8rYZIvxbGtCyAxmb0VTTgAX1HqDBxQLGxZYho,16450
|
|
176
176
|
deepeval/integrations/langchain/patch.py,sha256=yWkdGMzRVggBcPFx__HRlUoYtASLh7Vef6mqOIZ9LDY,992
|
|
177
177
|
deepeval/integrations/langchain/utils.py,sha256=gSs4VOIzftVS9VLbQSs94R-Pi7D6CGFt84SzccwOsWg,3209
|
|
178
178
|
deepeval/integrations/llama_index/__init__.py,sha256=zBwUFQXDp6QFtp1cfANy8ucV08rjc93nyxM9o9hWjT0,216
|
|
179
179
|
deepeval/integrations/llama_index/agent/patched.py,sha256=4JbH0WQmt4lct7xxIH0phj8_Y-V35dgVv7DEDXK0jZI,2149
|
|
180
180
|
deepeval/integrations/llama_index/handler.py,sha256=eqI1n8E4MsvfKoFs5Zrm9IdCR7g9eBgNedISs7UkU_I,8947
|
|
181
181
|
deepeval/integrations/llama_index/utils.py,sha256=mxW71-3PjvBvJpLIU0kNWuTzCidy5l_-roLt8ZyWYA0,2599
|
|
182
|
-
deepeval/integrations/pydantic_ai/__init__.py,sha256=
|
|
183
|
-
deepeval/integrations/pydantic_ai/
|
|
184
|
-
deepeval/integrations/pydantic_ai/
|
|
182
|
+
deepeval/integrations/pydantic_ai/__init__.py,sha256=36fBKBLRo1y5jFlj0Y4xhDJsiq4ZnqtmFO32R90Azo4,96
|
|
183
|
+
deepeval/integrations/pydantic_ai/otel.py,sha256=2DpO3RapdztXPlT9BWhQfF4dJDMyp2X7YvuplJ0SwC8,1661
|
|
184
|
+
deepeval/integrations/pydantic_ai/patcher.py,sha256=wszU2YROZAQovyz1ZNRvTtsuJ5By_x4SF6yjtmItcNk,12210
|
|
185
185
|
deepeval/key_handler.py,sha256=damdQEBLGy4IVk5DR5-E3blIZdLbcMtyeGAFn_4_SG4,6505
|
|
186
|
-
deepeval/metrics/__init__.py,sha256=
|
|
186
|
+
deepeval/metrics/__init__.py,sha256=nvO0Wv2JROjK1I9MDNIFUJlrRAZI2C0xbGYSBZK5q4g,4013
|
|
187
187
|
deepeval/metrics/answer_relevancy/__init__.py,sha256=WbZUpoSg2GQoqJ4VIRirVVQ1JDx5xwT-RskwqNKfWGM,46
|
|
188
188
|
deepeval/metrics/answer_relevancy/answer_relevancy.py,sha256=vlc7BzUAtYVW62d5Qa-fIHSLOX239KFwCE7fCGP8jGE,10935
|
|
189
189
|
deepeval/metrics/answer_relevancy/schema.py,sha256=N8wIBh4qwk4-BZOEyPJM-MB2_0dbkqXHv0aCfsIkROo,405
|
|
190
|
-
deepeval/metrics/answer_relevancy/template.py,sha256=
|
|
190
|
+
deepeval/metrics/answer_relevancy/template.py,sha256=InlbD3nufOFmohX3c7tnBwxDbcXwYbc57nPjIiW0Gmc,4030
|
|
191
191
|
deepeval/metrics/arena_g_eval/__init__.py,sha256=pVDIsWD_DLumOLegJrVSozcWwzsaxJXE5cIN7KxCzws,37
|
|
192
192
|
deepeval/metrics/arena_g_eval/arena_g_eval.py,sha256=B4Gjct3w5VGPxmumBblFVajdUIdWJTNR0hvMuhgIFg0,11661
|
|
193
193
|
deepeval/metrics/arena_g_eval/schema.py,sha256=3wipvUpZNO0O4QuWFy1LaLenfTYxLKldCERmP3sVtYI,288
|
|
@@ -236,7 +236,7 @@ deepeval/metrics/dag/utils.py,sha256=66D88fpjIUdVwZvYV8a1L9TlX1wvbCVuE6Y8BFTbpkE
|
|
|
236
236
|
deepeval/metrics/faithfulness/__init__.py,sha256=RffAtTOSdtWO1gHVMnPI-imJahf3JENOoJRiNw-Xv4g,43
|
|
237
237
|
deepeval/metrics/faithfulness/faithfulness.py,sha256=bYVhHI7Tr7xH0x-7F2LijxRuCCEtLOnXLzncvJLVv60,12887
|
|
238
238
|
deepeval/metrics/faithfulness/schema.py,sha256=2dU9dwwmqpGJcWvY2webERWIfH_tn02xgLghHkAY_eM,437
|
|
239
|
-
deepeval/metrics/faithfulness/template.py,sha256=
|
|
239
|
+
deepeval/metrics/faithfulness/template.py,sha256=RuZ0LFm4BjZ8lhVrKPgU3ecHszwkF0fe5-BxAkaP5AA,5839
|
|
240
240
|
deepeval/metrics/g_eval/__init__.py,sha256=HAhsQFVq9LIpZXPN00Jc_WrMXrh47NIT86VnUpWM4_4,102
|
|
241
241
|
deepeval/metrics/g_eval/g_eval.py,sha256=JI3rTaEClYgiL9oLaVFh7sunqGoXI7qBeBgi9RkSwDs,14327
|
|
242
242
|
deepeval/metrics/g_eval/schema.py,sha256=V629txuDrr_2IEKEsgJVYYZb_pkdfcltQV9ZjvxK5co,287
|
|
@@ -373,8 +373,8 @@ deepeval/models/llms/anthropic_model.py,sha256=T55-jKRbM3_B3Db9M3ruklm2cVVU1JDGA
|
|
|
373
373
|
deepeval/models/llms/azure_model.py,sha256=MG6sVGUgIy2RURwFWvRP7O_RF6QAg2dpqXIJhIsgY60,10994
|
|
374
374
|
deepeval/models/llms/deepseek_model.py,sha256=mz0U0uqazAVr8vv8SF74GRTr4ZEVc3Q1v9o5TVbmz_8,5440
|
|
375
375
|
deepeval/models/llms/gemini_model.py,sha256=QXf9mjopfWwJxpm0gbkXo6op_Wtu1GaIt1BfzS3OU8Q,8174
|
|
376
|
-
deepeval/models/llms/grok_model.py,sha256=
|
|
377
|
-
deepeval/models/llms/kimi_model.py,sha256=
|
|
376
|
+
deepeval/models/llms/grok_model.py,sha256=zPBmPnNCRGrtg_709gFv5A4iz7WilTmDpAyOpjXTa_M,5986
|
|
377
|
+
deepeval/models/llms/kimi_model.py,sha256=ZcvEwWgnv1dtmbq7LgMQJAjpkjxZr-l5eBi9KGqRbb0,6726
|
|
378
378
|
deepeval/models/llms/litellm_model.py,sha256=iu4-_JCpd9LdEa-eCWseD2iLTA-r7OSgYGWQ0IxB4eA,11527
|
|
379
379
|
deepeval/models/llms/local_model.py,sha256=PeF6ofMR8jBMTLzkCkgmkBJix9kHbWV5vTKGx8nehFs,3605
|
|
380
380
|
deepeval/models/llms/ollama_model.py,sha256=foL6sMza37Z0HH8qPStyIr1g-xEaD6Ce53L2C8Er-P8,3055
|
|
@@ -402,8 +402,8 @@ deepeval/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
402
402
|
deepeval/plugins/plugin.py,sha256=_dwsdx4Dg9DbXxK3f7zJY4QWTJQWc7QE1HmIg2Zjjag,1515
|
|
403
403
|
deepeval/progress_context.py,sha256=ZSKpxrE9sdgt9G3REKnVeXAv7GJXHHVGgLynpG1Pudw,3557
|
|
404
404
|
deepeval/prompt/__init__.py,sha256=M99QTWdxOfiNeySGCSqN873Q80PPxqRvjLq4_Mw-X1w,49
|
|
405
|
-
deepeval/prompt/api.py,sha256=
|
|
406
|
-
deepeval/prompt/prompt.py,sha256=
|
|
405
|
+
deepeval/prompt/api.py,sha256=q0CU57eGZkCL3CYIFS6HG-JLyptRhqJRLU9Al8roCRk,1705
|
|
406
|
+
deepeval/prompt/prompt.py,sha256=XVGFOK4eQfjWKm-N1GtRilWqtjLM3JNmIqeuYxQx6Xk,15170
|
|
407
407
|
deepeval/prompt/utils.py,sha256=Gk0zj_9BK8MQccs8GmiC8o-YVtkou6ZJEz8kWgW5Mog,1678
|
|
408
408
|
deepeval/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
409
409
|
deepeval/red_teaming/README.md,sha256=BY5rAdpp3-sMMToEKwq0Nsd9ivkGDzPE16DeDb8GY7U,154
|
|
@@ -421,7 +421,7 @@ deepeval/synthesizer/chunking/context_generator.py,sha256=0c--WxTiGLMF0l5sgjeWQF
|
|
|
421
421
|
deepeval/synthesizer/chunking/doc_chunker.py,sha256=5PZnxNDuNCngz3wZWG5QeCINec6cIq1ko1bwaDNhxAI,9416
|
|
422
422
|
deepeval/synthesizer/config.py,sha256=vcSi6upnmd667dAGANTTdPmY0z5sQ8Ctal7Xr4-tbhA,1934
|
|
423
423
|
deepeval/synthesizer/schema.py,sha256=PIv3012VMg_v-Ylwn08-4tNjf4QShBSg-kaCkgtdA88,879
|
|
424
|
-
deepeval/synthesizer/synthesizer.py,sha256=
|
|
424
|
+
deepeval/synthesizer/synthesizer.py,sha256=yyJQgdoDK4-bc92N7fY1-I5DrnUjQEUTQP0UMmwJoJ0,60045
|
|
425
425
|
deepeval/synthesizer/templates/__init__.py,sha256=C-wSGQeMRxTdSBJbgeyAM5Iu6mkHVSYbNfz0AY9K5Yc,209
|
|
426
426
|
deepeval/synthesizer/templates/template.py,sha256=nTH-k8XbvZQD_lagsaf6kmT6oylFjQ7gEseHYB1Zyso,39807
|
|
427
427
|
deepeval/synthesizer/templates/template_extraction.py,sha256=NkpzP-MkoefokVJBZn9s1ErDvI3o9ocY5_ZY85zj4KE,1972
|
|
@@ -443,8 +443,8 @@ deepeval/test_run/hooks.py,sha256=Qnd06bk9RJN4WmFUzJrBAi3Xj261hzyzI2iRmG8wbKw,37
|
|
|
443
443
|
deepeval/test_run/hyperparameters.py,sha256=f7M07w1EfT8YPtiD9xVIVYa3ZewkxewSkK7knwv0YlY,2289
|
|
444
444
|
deepeval/test_run/test_run.py,sha256=eCo_NESZruIAtSu2feSbz9AtOcu9v92TNiS0OON_i-I,33611
|
|
445
445
|
deepeval/tracing/__init__.py,sha256=OPsA_VmYNLC1M-WYJ37R6SxGyLnoXIkuyMBTcAneeao,530
|
|
446
|
-
deepeval/tracing/api.py,sha256=
|
|
447
|
-
deepeval/tracing/context.py,sha256=
|
|
446
|
+
deepeval/tracing/api.py,sha256=rq4rB5f3tfrv6l4mRJmDrwRj5CH4dyatwxhG7p8xbVk,4867
|
|
447
|
+
deepeval/tracing/context.py,sha256=mA82v7nXVLdM6tQrul8zt7H_sap-8Nfrm2uCpbT5ffM,5337
|
|
448
448
|
deepeval/tracing/offline_evals/__init__.py,sha256=bEniJAl7PmS9u2ksiOTfHtlCPJ9_CJV5R6umrUOX5MM,102
|
|
449
449
|
deepeval/tracing/offline_evals/api.py,sha256=eBfqh2uWyeRkIeGhjrN1bTQzAEow-XPubs-42WEZ2QQ,510
|
|
450
450
|
deepeval/tracing/offline_evals/span.py,sha256=pXqTVXs-WnjRVpCYYEbNe0zSM6Wz9GsKHsM5ZcWxrmM,1802
|
|
@@ -454,13 +454,13 @@ deepeval/tracing/otel/__init__.py,sha256=HQsaF5yLPwyW5qg8AOV81_nG_7pFHnatOTHi9Wx
|
|
|
454
454
|
deepeval/tracing/otel/exporter.py,sha256=dXQd834zm5rm1ss9pWkBBlk-JSdtiw7aFLso2hM53XY,26372
|
|
455
455
|
deepeval/tracing/otel/utils.py,sha256=g8yAzhqbPh1fOKCWkfNekC6AVotLfu1SUcfNMo6zii8,9786
|
|
456
456
|
deepeval/tracing/patchers.py,sha256=DAPNkhrDtoeyJIVeQDUMhTz-xGcXu00eqjQZmov8FiU,3096
|
|
457
|
-
deepeval/tracing/perf_epoch_bridge.py,sha256=
|
|
458
|
-
deepeval/tracing/tracing.py,sha256=
|
|
459
|
-
deepeval/tracing/types.py,sha256=
|
|
460
|
-
deepeval/tracing/utils.py,sha256=
|
|
461
|
-
deepeval/utils.py,sha256=
|
|
462
|
-
deepeval-3.
|
|
463
|
-
deepeval-3.
|
|
464
|
-
deepeval-3.
|
|
465
|
-
deepeval-3.
|
|
466
|
-
deepeval-3.
|
|
457
|
+
deepeval/tracing/perf_epoch_bridge.py,sha256=iyAPddB6Op7NpMtPHJ29lDm53Btz9yLaN6xSCfTRQm4,1825
|
|
458
|
+
deepeval/tracing/tracing.py,sha256=Ot0wzUHxhaK4wZov8cgai-i6kiyZUvNzj9MyRhbjZUg,39191
|
|
459
|
+
deepeval/tracing/types.py,sha256=l_utWKerNlE5H3mOKpeUJLsvpP3cMyjH7HRANNgTmSQ,5306
|
|
460
|
+
deepeval/tracing/utils.py,sha256=w_kdhuyBCygllnbqLpDdKJqpJo42t3ZMlGhNicV2A8c,6467
|
|
461
|
+
deepeval/utils.py,sha256=EimWDwI1pKCE8vl6kuTnGbGT6ep9zHL5sZ0o-gj49XI,16857
|
|
462
|
+
deepeval-3.5.1.dist-info/LICENSE.md,sha256=0ATkuLv6QgsJTBODUHC5Rak_PArA6gv2t7inJzNTP38,11352
|
|
463
|
+
deepeval-3.5.1.dist-info/METADATA,sha256=KDVwTo18ZlKNfIb_f8oomBUiceMMj7NqvVSKNvN1wbk,18682
|
|
464
|
+
deepeval-3.5.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
465
|
+
deepeval-3.5.1.dist-info/entry_points.txt,sha256=fVr8UphXTfJe9I2rObmUtfU3gkSrYeM0pLy-NbJYg10,94
|
|
466
|
+
deepeval-3.5.1.dist-info/RECORD,,
|
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
from deepeval.telemetry import capture_tracing_integration
|
|
2
|
-
from deepeval.metrics import BaseMetric
|
|
3
|
-
from typing import List, Optional
|
|
4
|
-
import functools
|
|
5
|
-
import inspect
|
|
6
|
-
import json
|
|
7
|
-
from deepeval.test_case import LLMTestCase
|
|
8
|
-
from deepeval.tracing.types import TestCaseMetricPair
|
|
9
|
-
from deepeval.tracing.tracing import trace_manager
|
|
10
|
-
from deepeval.tracing.otel.utils import parse_string, parse_list_of_strings
|
|
11
|
-
from opentelemetry import trace
|
|
12
|
-
|
|
13
|
-
try:
|
|
14
|
-
from opentelemetry.trace import NoOpTracer
|
|
15
|
-
|
|
16
|
-
opentelemetry_installed = True
|
|
17
|
-
except:
|
|
18
|
-
opentelemetry_installed = False
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def is_opentelemetry_available():
|
|
22
|
-
if not opentelemetry_installed:
|
|
23
|
-
raise ImportError(
|
|
24
|
-
"OpenTelemetry SDK is not available. Please install it with `pip install opentelemetry-sdk`."
|
|
25
|
-
)
|
|
26
|
-
return True
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
try:
|
|
30
|
-
from pydantic_ai.agent import Agent
|
|
31
|
-
from pydantic_ai.models.instrumented import InstrumentedModel
|
|
32
|
-
|
|
33
|
-
pydantic_ai_installed = True
|
|
34
|
-
except:
|
|
35
|
-
pydantic_ai_installed = False
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def is_pydantic_ai_installed():
|
|
39
|
-
if not pydantic_ai_installed:
|
|
40
|
-
raise ImportError(
|
|
41
|
-
"Pydantic AI is not installed. Please install it with `pip install pydantic-ai`."
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class PydanticAIAgent(Agent):
|
|
46
|
-
def __init__(self, *args, **kwargs):
|
|
47
|
-
with capture_tracing_integration("pydantic_ai.agent.PydanticAIAgent"):
|
|
48
|
-
is_pydantic_ai_installed()
|
|
49
|
-
is_opentelemetry_available()
|
|
50
|
-
|
|
51
|
-
super().__init__(*args, **kwargs)
|
|
52
|
-
|
|
53
|
-
# attributes to be set if ran synchronously
|
|
54
|
-
self.metric_collection: str = None
|
|
55
|
-
self.metrics: list[BaseMetric] = None
|
|
56
|
-
|
|
57
|
-
# trace attributes to be set if ran synchronously
|
|
58
|
-
self._trace_name: str = None
|
|
59
|
-
self._trace_tags: list[str] = None
|
|
60
|
-
self._trace_metadata: dict = None
|
|
61
|
-
self._trace_thread_id: str = None
|
|
62
|
-
self._trace_user_id: str = None
|
|
63
|
-
|
|
64
|
-
# Patch the run method only for this instance
|
|
65
|
-
self._patch_run_method()
|
|
66
|
-
self._patch_run_method_sync()
|
|
67
|
-
self._patch_tool_decorator()
|
|
68
|
-
|
|
69
|
-
def _patch_tool_decorator(self):
|
|
70
|
-
"""Patch the tool decorator to print input and output"""
|
|
71
|
-
original_tool = self.tool
|
|
72
|
-
|
|
73
|
-
@functools.wraps(original_tool)
|
|
74
|
-
def patched_tool(
|
|
75
|
-
*args,
|
|
76
|
-
metric_collection: Optional[str] = None,
|
|
77
|
-
metrics: Optional[List[BaseMetric]] = None,
|
|
78
|
-
**kwargs
|
|
79
|
-
):
|
|
80
|
-
|
|
81
|
-
# Check if function is in args (direct decoration: @agent.tool)
|
|
82
|
-
if args and callable(args[0]):
|
|
83
|
-
original_func = args[0]
|
|
84
|
-
patched_func = self._create_patched_function(
|
|
85
|
-
original_func, metric_collection, metrics
|
|
86
|
-
)
|
|
87
|
-
new_args = (patched_func,) + args[1:]
|
|
88
|
-
result = original_tool(*new_args, **kwargs)
|
|
89
|
-
return result
|
|
90
|
-
else:
|
|
91
|
-
# Decorator called with parameters: @agent.tool(metric_collection="...")
|
|
92
|
-
# Return a decorator that will receive the function
|
|
93
|
-
def decorator_with_params(func):
|
|
94
|
-
patched_func = self._create_patched_function(
|
|
95
|
-
func, metric_collection, metrics
|
|
96
|
-
)
|
|
97
|
-
return original_tool(patched_func, **kwargs)
|
|
98
|
-
|
|
99
|
-
return decorator_with_params
|
|
100
|
-
|
|
101
|
-
# Replace the tool method for this instance
|
|
102
|
-
self.tool = patched_tool
|
|
103
|
-
|
|
104
|
-
def _create_patched_function(
|
|
105
|
-
self, original_func, metric_collection, metrics
|
|
106
|
-
):
|
|
107
|
-
"""Create a patched version of the function that adds tracing"""
|
|
108
|
-
if inspect.iscoroutinefunction(original_func):
|
|
109
|
-
|
|
110
|
-
@functools.wraps(original_func)
|
|
111
|
-
async def patched_async_func(*func_args, **func_kwargs):
|
|
112
|
-
result = await original_func(*func_args, **func_kwargs)
|
|
113
|
-
|
|
114
|
-
current_span = trace.get_current_span()
|
|
115
|
-
if current_span.is_recording():
|
|
116
|
-
try:
|
|
117
|
-
result_str = str(result)
|
|
118
|
-
except Exception:
|
|
119
|
-
result_str = ""
|
|
120
|
-
current_span.set_attribute(
|
|
121
|
-
"confident.span.output", result_str
|
|
122
|
-
)
|
|
123
|
-
if metric_collection:
|
|
124
|
-
current_span.set_attribute(
|
|
125
|
-
"confident.span.metric_collection",
|
|
126
|
-
metric_collection,
|
|
127
|
-
)
|
|
128
|
-
# TODO: add metrics in component level evals
|
|
129
|
-
return result
|
|
130
|
-
|
|
131
|
-
return patched_async_func
|
|
132
|
-
else:
|
|
133
|
-
|
|
134
|
-
@functools.wraps(original_func)
|
|
135
|
-
def patched_sync_func(*func_args, **func_kwargs):
|
|
136
|
-
result = original_func(*func_args, **func_kwargs)
|
|
137
|
-
|
|
138
|
-
current_span = trace.get_current_span()
|
|
139
|
-
if current_span.is_recording():
|
|
140
|
-
try:
|
|
141
|
-
result_str = str(result)
|
|
142
|
-
except Exception:
|
|
143
|
-
result_str = ""
|
|
144
|
-
current_span.set_attribute(
|
|
145
|
-
"confident.span.output", result_str
|
|
146
|
-
)
|
|
147
|
-
if metric_collection:
|
|
148
|
-
current_span.set_attribute(
|
|
149
|
-
"confident.span.metric_collection",
|
|
150
|
-
metric_collection,
|
|
151
|
-
)
|
|
152
|
-
# TODO: add metrics in component level evals
|
|
153
|
-
return result
|
|
154
|
-
|
|
155
|
-
return patched_sync_func
|
|
156
|
-
|
|
157
|
-
def _patch_run_method(self):
|
|
158
|
-
"""Patch the Agent.run method only for this PydanticAIAgent instance"""
|
|
159
|
-
original_run = self.run
|
|
160
|
-
|
|
161
|
-
@functools.wraps(original_run)
|
|
162
|
-
async def patched_run(
|
|
163
|
-
*args,
|
|
164
|
-
metric_collection=None,
|
|
165
|
-
metrics=None,
|
|
166
|
-
trace_name=None,
|
|
167
|
-
trace_tags=None,
|
|
168
|
-
trace_metadata=None,
|
|
169
|
-
trace_thread_id=None,
|
|
170
|
-
trace_user_id=None,
|
|
171
|
-
**kwargs
|
|
172
|
-
):
|
|
173
|
-
# extract and validate flattened arguments - use safe pop with defaults
|
|
174
|
-
metric_collection = parse_string(metric_collection)
|
|
175
|
-
trace_name = parse_string(trace_name)
|
|
176
|
-
trace_tags = parse_list_of_strings(trace_tags)
|
|
177
|
-
trace_thread_id = parse_string(trace_thread_id)
|
|
178
|
-
trace_user_id = parse_string(trace_user_id)
|
|
179
|
-
|
|
180
|
-
if metrics is not None and not (
|
|
181
|
-
isinstance(metrics, list)
|
|
182
|
-
and all(isinstance(m, BaseMetric) for m in metrics)
|
|
183
|
-
):
|
|
184
|
-
raise TypeError(
|
|
185
|
-
"metrics must be a list of BaseMetric instances"
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
if trace_metadata is not None and not isinstance(
|
|
189
|
-
trace_metadata, dict
|
|
190
|
-
):
|
|
191
|
-
raise TypeError("trace_metadata must be a dictionary")
|
|
192
|
-
|
|
193
|
-
model = kwargs.get("model", None)
|
|
194
|
-
infer_name = kwargs.get("infer_name", True)
|
|
195
|
-
|
|
196
|
-
if infer_name and self.name is None:
|
|
197
|
-
self._infer_name(inspect.currentframe())
|
|
198
|
-
model_used = self._get_model(model)
|
|
199
|
-
del model
|
|
200
|
-
|
|
201
|
-
if isinstance(model_used, InstrumentedModel):
|
|
202
|
-
tracer = model_used.instrumentation_settings.tracer
|
|
203
|
-
else:
|
|
204
|
-
tracer = NoOpTracer()
|
|
205
|
-
|
|
206
|
-
with tracer.start_as_current_span("agent") as run_span:
|
|
207
|
-
result = await original_run(*args, **kwargs)
|
|
208
|
-
|
|
209
|
-
name = "agent"
|
|
210
|
-
if self.name:
|
|
211
|
-
name = str(self.name)
|
|
212
|
-
|
|
213
|
-
input = ""
|
|
214
|
-
if isinstance(args[0], str):
|
|
215
|
-
input = args[0]
|
|
216
|
-
elif isinstance(args[0], list) and all(
|
|
217
|
-
isinstance(i, str) for i in args[0]
|
|
218
|
-
):
|
|
219
|
-
input = args[0]
|
|
220
|
-
|
|
221
|
-
output = ""
|
|
222
|
-
try:
|
|
223
|
-
output = str(result.output)
|
|
224
|
-
except Exception:
|
|
225
|
-
pass
|
|
226
|
-
|
|
227
|
-
# set agent span attributes
|
|
228
|
-
run_span.set_attribute("confident.span.type", "agent")
|
|
229
|
-
run_span.set_attribute("confident.agent.name", name)
|
|
230
|
-
run_span.set_attribute("confident.agent.input", input)
|
|
231
|
-
run_span.set_attribute("confident.agent.output", output)
|
|
232
|
-
|
|
233
|
-
# fallback for input and output not being set
|
|
234
|
-
run_span.set_attribute("confident.span.input", input)
|
|
235
|
-
run_span.set_attribute("confident.span.output", output)
|
|
236
|
-
|
|
237
|
-
if metric_collection: # flattened argument to be replaced
|
|
238
|
-
run_span.set_attribute(
|
|
239
|
-
"confident.span.metric_collection", metric_collection
|
|
240
|
-
)
|
|
241
|
-
elif self.metric_collection: # for run_sync
|
|
242
|
-
run_span.set_attribute(
|
|
243
|
-
"confident.span.metric_collection",
|
|
244
|
-
self.metric_collection,
|
|
245
|
-
)
|
|
246
|
-
|
|
247
|
-
# set the flattened trace attributes
|
|
248
|
-
if trace_name:
|
|
249
|
-
run_span.set_attribute("confident.trace.name", trace_name)
|
|
250
|
-
if trace_tags:
|
|
251
|
-
run_span.set_attribute("confident.trace.tags", trace_tags)
|
|
252
|
-
if trace_metadata:
|
|
253
|
-
run_span.set_attribute(
|
|
254
|
-
"confident.trace.metadata", json.dumps(trace_metadata)
|
|
255
|
-
)
|
|
256
|
-
if trace_thread_id:
|
|
257
|
-
run_span.set_attribute(
|
|
258
|
-
"confident.trace.thread_id", trace_thread_id
|
|
259
|
-
)
|
|
260
|
-
if trace_user_id:
|
|
261
|
-
run_span.set_attribute(
|
|
262
|
-
"confident.trace.user_id", trace_user_id
|
|
263
|
-
)
|
|
264
|
-
|
|
265
|
-
# for run_sync
|
|
266
|
-
if self._trace_name:
|
|
267
|
-
run_span.set_attribute(
|
|
268
|
-
"confident.trace.name", self._trace_name
|
|
269
|
-
)
|
|
270
|
-
if self._trace_tags:
|
|
271
|
-
run_span.set_attribute(
|
|
272
|
-
"confident.trace.tags", self._trace_tags
|
|
273
|
-
)
|
|
274
|
-
if self._trace_metadata:
|
|
275
|
-
run_span.set_attribute(
|
|
276
|
-
"confident.trace.metadata",
|
|
277
|
-
json.dumps(self._trace_metadata),
|
|
278
|
-
)
|
|
279
|
-
if self._trace_thread_id:
|
|
280
|
-
run_span.set_attribute(
|
|
281
|
-
"confident.trace.thread_id", self._trace_thread_id
|
|
282
|
-
)
|
|
283
|
-
if self._trace_user_id:
|
|
284
|
-
run_span.set_attribute(
|
|
285
|
-
"confident.trace.user_id", self._trace_user_id
|
|
286
|
-
)
|
|
287
|
-
|
|
288
|
-
if metrics: # flattened argument to be replaced
|
|
289
|
-
trace_manager.test_case_metrics.append(
|
|
290
|
-
TestCaseMetricPair(
|
|
291
|
-
test_case=LLMTestCase(
|
|
292
|
-
input=input, actual_output=output
|
|
293
|
-
),
|
|
294
|
-
metrics=metrics,
|
|
295
|
-
)
|
|
296
|
-
)
|
|
297
|
-
elif self.metrics: # for run_sync
|
|
298
|
-
trace_manager.test_case_metrics.append(
|
|
299
|
-
TestCaseMetricPair(
|
|
300
|
-
test_case=LLMTestCase(
|
|
301
|
-
input=input, actual_output=output
|
|
302
|
-
),
|
|
303
|
-
metrics=self.metrics,
|
|
304
|
-
)
|
|
305
|
-
)
|
|
306
|
-
|
|
307
|
-
return result
|
|
308
|
-
|
|
309
|
-
# Replace the method only for this instance
|
|
310
|
-
self.run = patched_run
|
|
311
|
-
|
|
312
|
-
def _patch_run_method_sync(self):
|
|
313
|
-
"""Patch the Agent.run method only for this PydanticAIAgent instance"""
|
|
314
|
-
original_run = self.run_sync
|
|
315
|
-
|
|
316
|
-
@functools.wraps(original_run)
|
|
317
|
-
def patched_run(
|
|
318
|
-
*args,
|
|
319
|
-
metric_collection=None,
|
|
320
|
-
metrics=None,
|
|
321
|
-
trace_name=None,
|
|
322
|
-
trace_tags=None,
|
|
323
|
-
trace_metadata=None,
|
|
324
|
-
trace_thread_id=None,
|
|
325
|
-
trace_user_id=None,
|
|
326
|
-
**kwargs
|
|
327
|
-
):
|
|
328
|
-
metric_collection = parse_string(metric_collection)
|
|
329
|
-
trace_name = parse_string(trace_name)
|
|
330
|
-
trace_tags = parse_list_of_strings(trace_tags)
|
|
331
|
-
trace_thread_id = parse_string(trace_thread_id)
|
|
332
|
-
trace_user_id = parse_string(trace_user_id)
|
|
333
|
-
|
|
334
|
-
if metrics is not None and not (
|
|
335
|
-
isinstance(metrics, list)
|
|
336
|
-
and all(isinstance(m, BaseMetric) for m in metrics)
|
|
337
|
-
):
|
|
338
|
-
raise TypeError(
|
|
339
|
-
"metrics must be a list of BaseMetric instances"
|
|
340
|
-
)
|
|
341
|
-
|
|
342
|
-
if trace_metadata is not None and not isinstance(
|
|
343
|
-
trace_metadata, dict
|
|
344
|
-
):
|
|
345
|
-
raise TypeError("trace_metadata must be a dictionary")
|
|
346
|
-
|
|
347
|
-
# attributes to be set if ran synchronously
|
|
348
|
-
if metric_collection:
|
|
349
|
-
self.metric_collection = metric_collection
|
|
350
|
-
if metrics:
|
|
351
|
-
self.metrics = metrics
|
|
352
|
-
|
|
353
|
-
self._trace_name = trace_name
|
|
354
|
-
self._trace_tags = trace_tags
|
|
355
|
-
self._trace_metadata = trace_metadata
|
|
356
|
-
self._trace_thread_id = trace_thread_id
|
|
357
|
-
self._trace_user_id = trace_user_id
|
|
358
|
-
|
|
359
|
-
result = original_run(*args, **kwargs)
|
|
360
|
-
|
|
361
|
-
return result
|
|
362
|
-
|
|
363
|
-
# Replace the method only for this instance
|
|
364
|
-
self.run_sync = patched_run
|
|
File without changes
|
|
File without changes
|
|
File without changes
|