olca 0.2.19__py3-none-any.whl → 0.2.21__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 +22 -8
- {olca-0.2.19.dist-info → olca-0.2.21.dist-info}/METADATA +1 -1
- olca-0.2.21.dist-info/RECORD +10 -0
- olca-0.2.19.dist-info/RECORD +0 -10
- {olca-0.2.19.dist-info → olca-0.2.21.dist-info}/LICENSE +0 -0
- {olca-0.2.19.dist-info → olca-0.2.21.dist-info}/WHEEL +0 -0
- {olca-0.2.19.dist-info → olca-0.2.21.dist-info}/entry_points.txt +0 -0
- {olca-0.2.19.dist-info → olca-0.2.21.dist-info}/top_level.txt +0 -0
olca/fusewill_utils.py
CHANGED
@@ -1,20 +1,34 @@
|
|
1
|
-
from langfuse import Langfuse
|
2
1
|
import os
|
3
2
|
import sys
|
4
|
-
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
5
3
|
import json
|
6
|
-
|
7
4
|
import dotenv
|
8
|
-
dotenv.load_dotenv()
|
9
5
|
|
10
|
-
|
11
|
-
|
6
|
+
# Load .env from the current working directory
|
7
|
+
dotenv.load_dotenv(dotenv_path=os.path.join(os.getcwd(), ".env"))
|
8
|
+
|
9
|
+
# Try loading from home directory if variables are still not set
|
10
|
+
if not os.environ.get("LANGFUSE_PUBLIC_KEY") or not os.environ.get("LANGFUSE_SECRET_KEY"):
|
12
11
|
dotenv.load_dotenv(dotenv_path=os.path.expanduser("~/.env"))
|
13
12
|
|
14
|
-
|
15
|
-
|
13
|
+
# Final check before exiting
|
14
|
+
missing_vars = []
|
15
|
+
if not os.environ.get("LANGFUSE_PUBLIC_KEY"):
|
16
|
+
missing_vars.append("LANGFUSE_PUBLIC_KEY")
|
17
|
+
if not os.environ.get("LANGFUSE_SECRET_KEY"):
|
18
|
+
missing_vars.append("LANGFUSE_SECRET_KEY")
|
19
|
+
|
20
|
+
if missing_vars:
|
21
|
+
print(f"Error: {', '.join(missing_vars)} not found.")
|
16
22
|
sys.exit(1)
|
17
23
|
|
24
|
+
from langfuse import Langfuse
|
25
|
+
import os
|
26
|
+
import sys
|
27
|
+
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
28
|
+
import json
|
29
|
+
|
30
|
+
import dotenv
|
31
|
+
|
18
32
|
langfuse = Langfuse()
|
19
33
|
|
20
34
|
def list_traces(limit=100, output_dir="../output/traces"):
|
@@ -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=XMqL4C4S2vUfPqyGqzl7-Se84-0p2TXFqSB9V23idt0,2596
|
4
|
+
olca/olcacli.py,sha256=B3uZcl_873zBy4vmXmcyN6Z8ofQA-anzX2aLuvUTSpk,12281
|
5
|
+
olca-0.2.21.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
6
|
+
olca-0.2.21.dist-info/METADATA,sha256=IxWbbuiPj85J629ck-UWqBhawS6PZ_yMvFsyrL3xDew,25311
|
7
|
+
olca-0.2.21.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
8
|
+
olca-0.2.21.dist-info/entry_points.txt,sha256=njL8YpuSEjiYR2mXIholt03mVAfN8ai12UyH-_uUDho,78
|
9
|
+
olca-0.2.21.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
|
10
|
+
olca-0.2.21.dist-info/RECORD,,
|
olca-0.2.19.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=_XCqkGaGpqudPVSYTuD1Lk7LoBKeuH7GCmJQGZJMVmY,2269
|
4
|
-
olca/olcacli.py,sha256=B3uZcl_873zBy4vmXmcyN6Z8ofQA-anzX2aLuvUTSpk,12281
|
5
|
-
olca-0.2.19.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
6
|
-
olca-0.2.19.dist-info/METADATA,sha256=WFqptpxOwmTyKdWDs54pp9frfeuMAfHHQFBU3LXpUJg,25311
|
7
|
-
olca-0.2.19.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
8
|
-
olca-0.2.19.dist-info/entry_points.txt,sha256=njL8YpuSEjiYR2mXIholt03mVAfN8ai12UyH-_uUDho,78
|
9
|
-
olca-0.2.19.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
|
10
|
-
olca-0.2.19.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|