judgeval 0.0.5__py3-none-any.whl → 0.0.6__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
@@ -9,13 +9,22 @@ PATH_TO_DOTENV = os.path.join(os.path.dirname(__file__), ".env")
9
9
  load_dotenv(dotenv_path=PATH_TO_DOTENV)
10
10
 
11
11
  # Initialize required clients
12
- client = OpenAI()
13
12
  langfuse = Langfuse(
14
13
  secret_key=os.getenv("LANGFUSE_SECRET_KEY"),
15
14
  public_key=os.getenv("LANGFUSE_PUBLIC_KEY"),
16
15
  host=os.getenv("LANGFUSE_HOST"),
17
16
  )
18
17
 
18
+ # Initialize optional OpenAI client
19
+ client: Optional['OpenAI'] = None
20
+ if os.getenv("OPENAI_API_KEY"):
21
+ try:
22
+ from openai import OpenAI
23
+ client = OpenAI()
24
+ except ImportError:
25
+ # openai package not installed
26
+ pass
27
+
19
28
  # Initialize optional Together clients
20
29
  together_client: Optional['Together'] = None
21
30
  async_together_client: Optional['AsyncTogether'] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: judgeval
3
- Version: 0.0.5
3
+ Version: 0.0.6
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=H318FyGXFnkdETeFnNSYls43uczpNyV0dSy90PbZ5cA,928
2
+ judgeval/clients.py,sha256=Ns5ljrgPPXUMo7fSPJxO12H64lcPyKeQPIVG_RMi2cM,1162
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.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,,
75
+ judgeval-0.0.6.dist-info/METADATA,sha256=2FbgDSASPozNG1ENnqljY9sptDu2omTYhRkCeVD3lQQ,1156
76
+ judgeval-0.0.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
77
+ judgeval-0.0.6.dist-info/licenses/LICENSE.md,sha256=tKmCg7k5QOmxPK19XMfzim04QiQJPmgIm0pAn55IJwk,11352
78
+ judgeval-0.0.6.dist-info/RECORD,,