olca 0.2.18__py3-none-any.whl → 0.2.20__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.
- olca/fusewill_utils.py +14 -11
- {olca-0.2.18.dist-info → olca-0.2.20.dist-info}/METADATA +1 -1
- olca-0.2.20.dist-info/RECORD +10 -0
- olca-0.2.18.dist-info/RECORD +0 -10
- {olca-0.2.18.dist-info → olca-0.2.20.dist-info}/LICENSE +0 -0
- {olca-0.2.18.dist-info → olca-0.2.20.dist-info}/WHEEL +0 -0
- {olca-0.2.18.dist-info → olca-0.2.20.dist-info}/entry_points.txt +0 -0
- {olca-0.2.18.dist-info → olca-0.2.20.dist-info}/top_level.txt +0 -0
olca/fusewill_utils.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
from langfuse import Langfuse
|
3
2
|
import os
|
4
3
|
import sys
|
@@ -6,17 +5,21 @@ sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
|
6
5
|
import json
|
7
6
|
|
8
7
|
import dotenv
|
9
|
-
dotenv.load_dotenv()
|
10
|
-
#if no LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY in .env, then it will try to read them from current directory
|
11
|
-
if not os.getenv("LANGFUSE_PUBLIC_KEY") or not os.getenv("LANGFUSE_SECRET_KEY"):
|
12
|
-
dotenv.load_dotenv(dotenv_path=".")
|
13
|
-
#load home dotenv
|
14
8
|
|
15
|
-
if
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
# Check if the variables are already set in the environment
|
10
|
+
if not os.environ.get("LANGFUSE_PUBLIC_KEY") or not os.environ.get("LANGFUSE_SECRET_KEY"):
|
11
|
+
# Load from .env in current directory
|
12
|
+
dotenv.load_dotenv()
|
13
|
+
|
14
|
+
# Check again
|
15
|
+
if not os.environ.get("LANGFUSE_PUBLIC_KEY") or not os.environ.get("LANGFUSE_SECRET_KEY"):
|
16
|
+
# Load from .env in home directory
|
17
|
+
dotenv.load_dotenv(dotenv_path=os.path.expanduser("~/.env"))
|
18
|
+
|
19
|
+
# Final check
|
20
|
+
if not os.environ.get("LANGFUSE_PUBLIC_KEY") or not os.environ.get("LANGFUSE_SECRET_KEY"):
|
21
|
+
print("Error: LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY not found.")
|
22
|
+
sys.exit(1)
|
20
23
|
|
21
24
|
langfuse = Langfuse()
|
22
25
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
olca/__init__.py,sha256=3QyLLAys_KiiDIe-cfO_7QyY7di_qCaCS-sVziW2BOw,23
|
2
|
+
olca/fusewill_cli.py,sha256=TGItRWPGTzhzX587zuep-HKO-L3plifY4jYxHd5gvdo,3592
|
3
|
+
olca/fusewill_utils.py,sha256=13c8kFDp5OK8-S1K9vLVX1HD3ip2uCvmW8LytDHva3k,2528
|
4
|
+
olca/olcacli.py,sha256=B3uZcl_873zBy4vmXmcyN6Z8ofQA-anzX2aLuvUTSpk,12281
|
5
|
+
olca-0.2.20.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
6
|
+
olca-0.2.20.dist-info/METADATA,sha256=irk6iWGcDxUjoxi_eN9ViLzDKQU29i2yCxtFnyiZEDQ,25311
|
7
|
+
olca-0.2.20.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
8
|
+
olca-0.2.20.dist-info/entry_points.txt,sha256=njL8YpuSEjiYR2mXIholt03mVAfN8ai12UyH-_uUDho,78
|
9
|
+
olca-0.2.20.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
|
10
|
+
olca-0.2.20.dist-info/RECORD,,
|
olca-0.2.18.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
olca/__init__.py,sha256=3QyLLAys_KiiDIe-cfO_7QyY7di_qCaCS-sVziW2BOw,23
|
2
|
-
olca/fusewill_cli.py,sha256=TGItRWPGTzhzX587zuep-HKO-L3plifY4jYxHd5gvdo,3592
|
3
|
-
olca/fusewill_utils.py,sha256=GZ0R4VjJ8SEblD6NBgRFvG-ehWB4rB_1QJT6R0-N4ZI,2481
|
4
|
-
olca/olcacli.py,sha256=B3uZcl_873zBy4vmXmcyN6Z8ofQA-anzX2aLuvUTSpk,12281
|
5
|
-
olca-0.2.18.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
6
|
-
olca-0.2.18.dist-info/METADATA,sha256=gi2FT6AHIifEcZUgEUUIYDTXPve0-ilR_jIPATV1nLU,25311
|
7
|
-
olca-0.2.18.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
8
|
-
olca-0.2.18.dist-info/entry_points.txt,sha256=njL8YpuSEjiYR2mXIholt03mVAfN8ai12UyH-_uUDho,78
|
9
|
-
olca-0.2.18.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
|
10
|
-
olca-0.2.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|