olca 0.2.18__tar.gz → 0.2.20__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.18
3
+ Version: 0.2.20
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,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 not os.getenv("LANGFUSE_PUBLIC_KEY") or not os.getenv("LANGFUSE_SECRET_KEY"):
16
- dotenv.load_dotenv(dotenv_path=os.path.expanduser("~/.env"))
17
- if not os.getenv("LANGFUSE_PUBLIC_KEY") and not os.getenv("LANGFUSE_SECRET_KEY"):
18
- print("Error: LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY not found in .env")
19
- sys.exit(1)
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: olca
3
- Version: 0.2.18
3
+ Version: 0.2.20
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.18"
10
+ version = "0.2.20"
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.18",
5
+ version = "0.2.20",
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