crewlyze 3.1.0

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.
Files changed (48) hide show
  1. package/.dockerignore +12 -0
  2. package/.gitattributes +2 -0
  3. package/CHANGELOG.md +86 -0
  4. package/Dockerfile +21 -0
  5. package/LICENSE +21 -0
  6. package/README.md +139 -0
  7. package/USAGE.md +106 -0
  8. package/agents/__init__.py +0 -0
  9. package/agents/cleaner.py +38 -0
  10. package/agents/insights.py +44 -0
  11. package/agents/relation.py +36 -0
  12. package/agents/visualizer.py +41 -0
  13. package/assets/badge_crewai.svg +4 -0
  14. package/assets/badge_matplotlib.svg +4 -0
  15. package/assets/badge_ollama.svg +4 -0
  16. package/assets/badge_pandas.svg +4 -0
  17. package/assets/badge_seaborn.svg +4 -0
  18. package/assets/branding_image.png +0 -0
  19. package/assets/complete_workflow.svg +216 -0
  20. package/assets/favicon.png +0 -0
  21. package/assets/logo.png +0 -0
  22. package/assets/stars.svg +12 -0
  23. package/bin/crewlyze.js +79 -0
  24. package/config/README.md +129 -0
  25. package/config/__init__.py +1 -0
  26. package/config/context.py +16 -0
  27. package/config/llm_config.py +300 -0
  28. package/config/metrics_tracker.py +70 -0
  29. package/crew.py +870 -0
  30. package/crewlyze-3.1.0.tgz +0 -0
  31. package/fix_syntax.py +54 -0
  32. package/main.py +1279 -0
  33. package/package.json +22 -0
  34. package/pyproject.toml +32 -0
  35. package/requirements.txt +33 -0
  36. package/tools/__init__.py +0 -0
  37. package/tools/dataset_tools.py +803 -0
  38. package/ui/__init__.py +3 -0
  39. package/ui/copilot.py +200 -0
  40. package/ui/export.py +800 -0
  41. package/update_appjs.py +54 -0
  42. package/update_llm.py +21 -0
  43. package/update_main.py +20 -0
  44. package/web/app.js +3142 -0
  45. package/web/index.html +1105 -0
  46. package/web/style.css +2561 -0
  47. package/workflows/__init__.py +0 -0
  48. package/workflows/pipeline.py +254 -0
Binary file
package/fix_syntax.py ADDED
@@ -0,0 +1,54 @@
1
+ import sys
2
+
3
+ with open('web/app.js', 'r', encoding='utf-8') as f:
4
+ c = f.read()
5
+
6
+ # Revert my previous FormData modification
7
+ c = c.replace("\n fd.append('custom_base_url', localStorage.getItem('api_url_custom') || '');", "")
8
+
9
+ # In saveSettings:
10
+ c = c.replace('els.apiKey.value = apiKey;', """
11
+ if (provider === 'custom') {
12
+ const customUrl = els.urlCustom.value.trim() || 'https://api.openai.com/v1';
13
+ apiKey = customUrl + '|' + apiKey;
14
+ }
15
+ els.apiKey.value = apiKey;
16
+ """)
17
+
18
+ # In testIndividualConnection
19
+ c = c.replace('const apiKey = targetInput.value.trim();', """
20
+ let apiKey = targetInput.value.trim();
21
+ if (provider === 'custom') {
22
+ const customUrl = els.urlCustom.value.trim() || 'https://api.openai.com/v1';
23
+ apiKey = customUrl + '|' + apiKey;
24
+ }
25
+ """)
26
+
27
+ with open('web/app.js', 'w', encoding='utf-8') as f:
28
+ f.write(c)
29
+
30
+ # Now update config/llm_config.py to parse this combo key
31
+ with open('config/llm_config.py', 'r', encoding='utf-8') as f:
32
+ c_llm = f.read()
33
+
34
+ # I need to add a parser right inside get_llm_config or get_llm_params
35
+ inject = """
36
+ if provider == "custom" and api_key and "|" in api_key:
37
+ parts = api_key.split("|", 1)
38
+ os.environ["CUSTOM_BASE_URL"] = parts[0]
39
+ api_key = parts[1]
40
+ """
41
+ # We'll inject this at the beginning of validate_llm_connection and apply_runtime_llm_settings
42
+ if 'parts = api_key.split("|", 1)' not in c_llm:
43
+ c_llm = c_llm.replace(
44
+ 'def apply_runtime_llm_settings(\n provider: str,\n model: str,\n api_key: str = "",\n env_key_name: str = "",\n) -> None:\n """Inject provider/model/key into context variables before agent execution."""',
45
+ 'def apply_runtime_llm_settings(\n provider: str,\n model: str,\n api_key: str = "",\n env_key_name: str = "",\n) -> None:\n """Inject provider/model/key into context variables before agent execution."""\n' + inject
46
+ )
47
+
48
+ c_llm = c_llm.replace(
49
+ 'def validate_llm_connection(provider: str, model: str, api_key: str = "") -> dict:\n """\n Ping the configured LLM with a minimal prompt.\n Returns {"valid": bool, "message": str}.\n """',
50
+ 'def validate_llm_connection(provider: str, model: str, api_key: str = "") -> dict:\n """\n Ping the configured LLM with a minimal prompt.\n Returns {"valid": bool, "message": str}.\n """\n' + inject
51
+ )
52
+
53
+ with open('config/llm_config.py', 'w', encoding='utf-8') as f:
54
+ f.write(c_llm)