olca 0.2.53__tar.gz → 0.2.55__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {olca-0.2.53 → olca-0.2.55}/PKG-INFO +1 -1
- {olca-0.2.53 → olca-0.2.55}/olca/olcacli.py +17 -1
- {olca-0.2.53 → olca-0.2.55}/olca.egg-info/PKG-INFO +1 -1
- {olca-0.2.53 → olca-0.2.55}/pyproject.toml +1 -1
- {olca-0.2.53 → olca-0.2.55}/setup.py +1 -1
- {olca-0.2.53 → olca-0.2.55}/LICENSE +0 -0
- {olca-0.2.53 → olca-0.2.55}/README.md +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca/__init__.py +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca/fusewill_cli.py +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca/fusewill_utils.py +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca/olcahelper.py +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca/tracing.py +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca/utils.py +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca.egg-info/SOURCES.txt +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca.egg-info/dependency_links.txt +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca.egg-info/entry_points.txt +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca.egg-info/requires.txt +0 -0
- {olca-0.2.53 → olca-0.2.55}/olca.egg-info/top_level.txt +0 -0
- {olca-0.2.53 → olca-0.2.55}/setup.cfg +0 -0
@@ -8,6 +8,9 @@ import yaml
|
|
8
8
|
from olca.utils import load_environment, initialize_langfuse
|
9
9
|
from olca.tracing import TracingManager
|
10
10
|
from olca.olcahelper import setup_required_directories, initialize_config_file
|
11
|
+
import time
|
12
|
+
import httpx
|
13
|
+
from openai.error import APIConnectionError
|
11
14
|
|
12
15
|
#jgwill/olca1
|
13
16
|
#olca1_prompt = hub.pull("jgwill/olca1") #Future use
|
@@ -46,6 +49,7 @@ Example Interaction:
|
|
46
49
|
==============================================
|
47
50
|
{ PROMPT_FOR_USER_INPUT_SHORT } :
|
48
51
|
</example>
|
52
|
+
REMEMBER: Never ask to brainstorm (NEVER USE THAT WORD)
|
49
53
|
"""
|
50
54
|
def get_input() -> str:
|
51
55
|
print("----------------------")
|
@@ -304,7 +308,19 @@ def main():
|
|
304
308
|
graph_config = {"callbacks": callbacks} if callbacks else {}
|
305
309
|
if recursion_limit:
|
306
310
|
graph_config["recursion_limit"] = recursion_limit
|
307
|
-
|
311
|
+
|
312
|
+
retry_attempts = 3
|
313
|
+
for attempt in range(retry_attempts):
|
314
|
+
try:
|
315
|
+
print_stream(graph.stream(inputs, config=graph_config))
|
316
|
+
break
|
317
|
+
except (httpx.ConnectError, APIConnectionError) as e:
|
318
|
+
if attempt < retry_attempts - 1:
|
319
|
+
print(f"Network error encountered: {e}. Retrying in 5 seconds...")
|
320
|
+
time.sleep(5)
|
321
|
+
else:
|
322
|
+
print("Failed to connect after multiple attempts. Exiting.")
|
323
|
+
raise e
|
308
324
|
except GraphRecursionError as e:
|
309
325
|
print("Recursion limit reached. Please increase the 'recursion_limit' in the olca_config.yaml file.")
|
310
326
|
print("For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT")
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='olca',
|
5
|
-
version = "0.2.
|
5
|
+
version = "0.2.55",
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|