judgeval 0.0.4__py3-none-any.whl → 0.0.5__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.
judgeval/clients.py CHANGED
@@ -2,18 +2,29 @@ import os
2
2
  from dotenv import load_dotenv
3
3
  from openai import OpenAI
4
4
  from langfuse import Langfuse
5
+ from typing import Optional
5
6
  from together import Together, AsyncTogether
6
7
 
7
8
  PATH_TO_DOTENV = os.path.join(os.path.dirname(__file__), ".env")
8
9
  load_dotenv(dotenv_path=PATH_TO_DOTENV)
9
10
 
10
- # Initialize clients
11
+ # Initialize required clients
11
12
  client = OpenAI()
12
13
  langfuse = Langfuse(
13
14
  secret_key=os.getenv("LANGFUSE_SECRET_KEY"),
14
15
  public_key=os.getenv("LANGFUSE_PUBLIC_KEY"),
15
16
  host=os.getenv("LANGFUSE_HOST"),
16
17
  )
17
- together_client = Together(api_key=os.getenv("TOGETHERAI_API_KEY"))
18
- async_together_client = AsyncTogether(api_key=os.getenv("TOGETHERAI_API_KEY"))
18
+
19
+ # Initialize optional Together clients
20
+ together_client: Optional['Together'] = None
21
+ async_together_client: Optional['AsyncTogether'] = None
22
+
23
+ # Only initialize Together clients if API key is available
24
+ if os.getenv("TOGETHERAI_API_KEY"):
25
+ try:
26
+ together_client = Together(api_key=os.getenv("TOGETHERAI_API_KEY"))
27
+ async_together_client = AsyncTogether(api_key=os.getenv("TOGETHERAI_API_KEY"))
28
+ except Exception:
29
+ pass
19
30
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: judgeval
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Judgeval Package
5
5
  Project-URL: Homepage, https://github.com/JudgmentLabs/judgeval
6
6
  Project-URL: Issues, https://github.com/JudgmentLabs/judgeval/issues
@@ -1,5 +1,5 @@
1
1
  judgeval/__init__.py,sha256=xiiG4CkeaOtey4fusCd9CBz0BVqzTIbV-K2EFIU0rUM,283
2
- judgeval/clients.py,sha256=boWW-nA7Yqt2zBflMxl2NpdUIFSSKebv3rJiG50K1s4,594
2
+ judgeval/clients.py,sha256=H318FyGXFnkdETeFnNSYls43uczpNyV0dSy90PbZ5cA,928
3
3
  judgeval/constants.py,sha256=5O1jWvxMCRyMSWhmkrvPqfBctx42c7kMtgTS7ORVcFw,1965
4
4
  judgeval/evaluation_run.py,sha256=KcIS7mDR_9XEdqYrJXFcrLz5IDMof34HcD5VtjZgV8w,5884
5
5
  judgeval/judgment_client.py,sha256=8Z4Woiv56qphYqlMI3bNy4rvQItZl_z9vNNd3UdrCes,11241
@@ -72,7 +72,7 @@ judgeval/scorers/judgeval_scorers/local_implementations/summarization/prompts.py
72
72
  judgeval/scorers/judgeval_scorers/local_implementations/summarization/summarization_scorer.py,sha256=3FMn7EhM5IxNwJLGTcpeHODaOPJefMHW6rRizmlA93U,20775
73
73
  judgeval/scorers/judgeval_scorers/local_implementations/tool_correctness/__init__.py,sha256=JUB3TMqS1OHr6PqpIGqkyiBNbyfUaw7lZuUATjU3_ek,168
74
74
  judgeval/scorers/judgeval_scorers/local_implementations/tool_correctness/tool_correctness_scorer.py,sha256=oxhVDR3Pb55Kxp9KsvmuvHWKtMiV1BQRG6yaXEr5Bp8,5309
75
- judgeval-0.0.4.dist-info/METADATA,sha256=bMQ_F0sODVmPSO-SQD7QeJnWwegJRGgvBO-etUVQN2E,1156
76
- judgeval-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
77
- judgeval-0.0.4.dist-info/licenses/LICENSE.md,sha256=tKmCg7k5QOmxPK19XMfzim04QiQJPmgIm0pAn55IJwk,11352
78
- judgeval-0.0.4.dist-info/RECORD,,
75
+ judgeval-0.0.5.dist-info/METADATA,sha256=1XE41hLtyH_OdSbvn9Na8Yg-pofX7D-AsWnb33bsOOk,1156
76
+ judgeval-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
77
+ judgeval-0.0.5.dist-info/licenses/LICENSE.md,sha256=tKmCg7k5QOmxPK19XMfzim04QiQJPmgIm0pAn55IJwk,11352
78
+ judgeval-0.0.5.dist-info/RECORD,,