olca 0.2.35__py3-none-any.whl → 0.2.36__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/olcacli.py CHANGED
@@ -192,21 +192,10 @@ def main():
192
192
  tracing_manager = TracingManager(config)
193
193
  callbacks = tracing_manager.get_callbacks()
194
194
 
195
- # Check for tracing flag in config and CLI
196
- tracing_enabled = config.get('tracing', False) or args.tracing or os.getenv("LANGCHAIN_TRACING_V2") == "true"
197
- if tracing_enabled:
198
- os.environ["LANGCHAIN_TRACING_V2"] = "true"
199
- if not os.getenv("LANGCHAIN_API_KEY"):
200
- print("Error: LANGCHAIN_API_KEY environment variable is required for tracing. Please set it up at : https://smith.langchain.com/settings")
201
- exit(1)
202
- # Initialize LangSmith client
203
- import langsmith
204
- LANGSMITH_API_KEY = os.getenv("LANGSMITH_API_KEY")
205
- LANGCHAIN_API_KEY = os.getenv("LANGCHAIN_API_KEY")
206
- if not LANGSMITH_API_KEY and not LANGCHAIN_API_KEY:
207
- print("Error: LANGSMITH_API_KEY or LANGCHAIN_API_KEY environment variable is not set.")
208
- exit(1)
209
- client = langsmith.Client(api_key=LANGSMITH_API_KEY or LANGCHAIN_API_KEY)
195
+ # Remove old tracing setup
196
+ tracing_enabled = config.get('tracing', False) or args.tracing
197
+ if tracing_enabled and not callbacks:
198
+ print("Warning: Tracing enabled but no handlers configured")
210
199
 
211
200
  try:
212
201
 
@@ -292,7 +281,10 @@ def main():
292
281
 
293
282
 
294
283
  try:
295
- print_stream(graph.stream(inputs, config={"callbacks": callbacks} if callbacks else None))
284
+ graph_config = {"callbacks": callbacks} if callbacks else {}
285
+ if recursion_limit:
286
+ graph_config["recursion_limit"] = recursion_limit
287
+ print_stream(graph.stream(inputs, config=graph_config))
296
288
  except GraphRecursionError as e:
297
289
  #print(f"Error: {e}")
298
290
  print("Recursion limit reached. Please increase the 'recursion_limit' in the olca_config.yaml file.")
olca/tracing.py CHANGED
@@ -1,6 +1,5 @@
1
1
  import os
2
2
  from langfuse.callback import CallbackHandler as LangfuseCallbackHandler
3
- import langsmith
4
3
 
5
4
  class TracingManager:
6
5
  def __init__(self, config):
@@ -16,9 +15,7 @@ class TracingManager:
16
15
  return
17
16
 
18
17
  if 'langsmith' in providers:
19
- handler = self._setup_langsmith()
20
- if handler:
21
- self.handlers.append(handler)
18
+ self._setup_langsmith()
22
19
 
23
20
  if 'langfuse' in providers:
24
21
  handler = self._setup_langfuse()
@@ -26,14 +23,9 @@ class TracingManager:
26
23
  self.handlers.append(handler)
27
24
 
28
25
  def _setup_langsmith(self):
29
- os.environ["LANGCHAIN_TRACING_V2"] = "true"
30
26
  api_key = os.getenv("LANGCHAIN_API_KEY") or os.getenv("LANGSMITH_API_KEY")
31
-
32
- if not api_key:
33
- print("Warning: LANGCHAIN_API_KEY/LANGSMITH_API_KEY not set for LangSmith tracing")
34
- return None
35
-
36
- return langsmith.Client(api_key=api_key)
27
+ if api_key:
28
+ os.environ["LANGCHAIN_TRACING_V2"] = "true"
37
29
 
38
30
  def _setup_langfuse(self):
39
31
  if not (os.getenv("LANGFUSE_PUBLIC_KEY") and os.getenv("LANGFUSE_SECRET_KEY")):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: olca
3
- Version: 0.2.35
3
+ Version: 0.2.36
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
@@ -0,0 +1,11 @@
1
+ olca/__init__.py,sha256=3QyLLAys_KiiDIe-cfO_7QyY7di_qCaCS-sVziW2BOw,23
2
+ olca/fusewill_cli.py,sha256=Gf8CaYs7Uo4NH8QfgRNYalpmSUo047p9rzdkvIABHi8,7872
3
+ olca/fusewill_utils.py,sha256=IOIElqWCIsNzePlS1FZa5_35vySYLwbMUGW6UhNefIc,6065
4
+ olca/olcacli.py,sha256=MBWanmGn1vWiy0S2lhe_dJc7u-B14n3ywA7lEP4qttM,14578
5
+ olca/tracing.py,sha256=A6K9K_mhCPS1_NncFv2-7hbeMkqfKT3XgUCERusbIYE,1248
6
+ olca-0.2.36.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
7
+ olca-0.2.36.dist-info/METADATA,sha256=ovFeWWj5Xn2It7PqskYfvDNCSW0MjjO9bTKhb3y8DyY,25311
8
+ olca-0.2.36.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
+ olca-0.2.36.dist-info/entry_points.txt,sha256=AhP5FMv6vnOq9C76V_vxRVIO50smnZXG4RIY47oD2_U,103
10
+ olca-0.2.36.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
11
+ olca-0.2.36.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- olca/__init__.py,sha256=3QyLLAys_KiiDIe-cfO_7QyY7di_qCaCS-sVziW2BOw,23
2
- olca/fusewill_cli.py,sha256=Gf8CaYs7Uo4NH8QfgRNYalpmSUo047p9rzdkvIABHi8,7872
3
- olca/fusewill_utils.py,sha256=IOIElqWCIsNzePlS1FZa5_35vySYLwbMUGW6UhNefIc,6065
4
- olca/olcacli.py,sha256=0t8HBP-tLwgRCOi9z0gLgA_2UD5YB--_V8izDWPMJbQ,15143
5
- olca/tracing.py,sha256=D8RL6QnBdjCyjxyt-3LHTbq4NVL_6gXYjjw20ewQX2I,1536
6
- olca-0.2.35.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
7
- olca-0.2.35.dist-info/METADATA,sha256=Wr-OlwhfER3iUCvqsDrWyb4lrugjhlueCg46jcYrK1o,25311
8
- olca-0.2.35.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
- olca-0.2.35.dist-info/entry_points.txt,sha256=AhP5FMv6vnOq9C76V_vxRVIO50smnZXG4RIY47oD2_U,103
10
- olca-0.2.35.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
11
- olca-0.2.35.dist-info/RECORD,,
File without changes
File without changes