olca 0.2.19__tar.gz → 0.2.21__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: olca
3
- Version: 0.2.19
3
+ Version: 0.2.21
4
4
  Summary: A Python package for experimental usage of Langchain and Human-in-the-Loop
5
5
  Home-page: https://github.com/jgwill/olca
6
6
  Author: Jean GUillaume ISabelle
@@ -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
- if not os.getenv("LANGFUSE_PUBLIC_KEY") or not os.getenv("LANGFUSE_SECRET_KEY"):
11
- # Try loading from the home directory
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
- if not os.getenv("LANGFUSE_PUBLIC_KEY") or not os.getenv("LANGFUSE_SECRET_KEY"):
15
- print("Error: LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY not found.")
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"):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: olca
3
- Version: 0.2.19
3
+ Version: 0.2.21
4
4
  Summary: A Python package for experimental usage of Langchain and Human-in-the-Loop
5
5
  Home-page: https://github.com/jgwill/olca
6
6
  Author: Jean GUillaume ISabelle
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
 
8
8
  [project]
9
9
  name = "olca"
10
- version = "0.2.19"
10
+ version = "0.2.21"
11
11
 
12
12
  description = "A Python package for experimental usage of Langchain and Human-in-the-Loop"
13
13
  readme = "README.md"
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='olca',
5
- version = "0.2.19",
5
+ version = "0.2.21",
6
6
  author='Jean GUillaume ISabelle',
7
7
  author_email='jgi@jgwill.com',
8
8
  description='A Python package for experimenting with Langchain agent and interactivity in Terminal modalities.',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes