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.
- package/.dockerignore +12 -0
- package/.gitattributes +2 -0
- package/CHANGELOG.md +86 -0
- package/Dockerfile +21 -0
- package/LICENSE +21 -0
- package/README.md +139 -0
- package/USAGE.md +106 -0
- package/agents/__init__.py +0 -0
- package/agents/cleaner.py +38 -0
- package/agents/insights.py +44 -0
- package/agents/relation.py +36 -0
- package/agents/visualizer.py +41 -0
- package/assets/badge_crewai.svg +4 -0
- package/assets/badge_matplotlib.svg +4 -0
- package/assets/badge_ollama.svg +4 -0
- package/assets/badge_pandas.svg +4 -0
- package/assets/badge_seaborn.svg +4 -0
- package/assets/branding_image.png +0 -0
- package/assets/complete_workflow.svg +216 -0
- package/assets/favicon.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/stars.svg +12 -0
- package/bin/crewlyze.js +79 -0
- package/config/README.md +129 -0
- package/config/__init__.py +1 -0
- package/config/context.py +16 -0
- package/config/llm_config.py +300 -0
- package/config/metrics_tracker.py +70 -0
- package/crew.py +870 -0
- package/crewlyze-3.1.0.tgz +0 -0
- package/fix_syntax.py +54 -0
- package/main.py +1279 -0
- package/package.json +22 -0
- package/pyproject.toml +32 -0
- package/requirements.txt +33 -0
- package/tools/__init__.py +0 -0
- package/tools/dataset_tools.py +803 -0
- package/ui/__init__.py +3 -0
- package/ui/copilot.py +200 -0
- package/ui/export.py +800 -0
- package/update_appjs.py +54 -0
- package/update_llm.py +21 -0
- package/update_main.py +20 -0
- package/web/app.js +3142 -0
- package/web/index.html +1105 -0
- package/web/style.css +2561 -0
- package/workflows/__init__.py +0 -0
- package/workflows/pipeline.py +254 -0
package/update_appjs.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import re
|
|
2
|
+
|
|
3
|
+
path = 'web/app.js'
|
|
4
|
+
with open(path, 'r', encoding='utf-8') as f:
|
|
5
|
+
c = f.read()
|
|
6
|
+
|
|
7
|
+
# Add to MODEL_OPTIONS
|
|
8
|
+
if 'custom: [' not in c:
|
|
9
|
+
c = c.replace(
|
|
10
|
+
"ollama: ['ollama/llama3','ollama/mistral','ollama/gemma2'],",
|
|
11
|
+
"ollama: ['ollama/llama3','ollama/mistral','ollama/gemma2'],\n custom: ['custom/model'],"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
# Add to DOM elements
|
|
15
|
+
if 'urlCustom:' not in c:
|
|
16
|
+
c = c.replace(
|
|
17
|
+
"urlOllama: $('urlOllama'),",
|
|
18
|
+
"urlOllama: $('urlOllama'),\n urlCustom: $('urlCustom'),\n keyCustom: $('keyCustom'),\n showCustom: $('showCustom'),"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
# Add to PROVIDERS array if exists
|
|
22
|
+
if "{ id: 'custom'" not in c:
|
|
23
|
+
c = c.replace(
|
|
24
|
+
"{ id: 'ollama', name: 'Ollama (local)' }",
|
|
25
|
+
"{ id: 'ollama', name: 'Ollama (local)' },\n { id: 'custom', name: 'Custom API' }"
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
# Add to default keys
|
|
29
|
+
if 'custom:' not in c and "ollama: 'ollama/llama3'" in c:
|
|
30
|
+
c = c.replace(
|
|
31
|
+
"ollama: 'ollama/llama3',",
|
|
32
|
+
"ollama: 'ollama/llama3',\n custom: 'custom/model',"
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# Update api_url loading
|
|
36
|
+
if 'api_url_custom' not in c:
|
|
37
|
+
c = c.replace(
|
|
38
|
+
"els.urlOllama.value = localStorage.getItem('api_url_ollama') || 'http://localhost:11434';",
|
|
39
|
+
"els.urlOllama.value = localStorage.getItem('api_url_ollama') || 'http://localhost:11434';\n els.urlCustom.value = localStorage.getItem('api_url_custom') || 'https://api.openai.com/v1';\n els.keyCustom.value = localStorage.getItem('api_key_custom') || '';"
|
|
40
|
+
)
|
|
41
|
+
c = c.replace(
|
|
42
|
+
"localStorage.setItem('api_url_ollama', els.urlOllama.value.trim());",
|
|
43
|
+
"localStorage.setItem('api_url_ollama', els.urlOllama.value.trim());\n localStorage.setItem('api_url_custom', els.urlCustom.value.trim());\n localStorage.setItem('api_key_custom', els.keyCustom.value.trim());"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
# Target input for Custom
|
|
47
|
+
if 'els.keyCustom' not in c and 'els.urlOllama' in c:
|
|
48
|
+
c = c.replace(
|
|
49
|
+
"else if (provider === 'ollama') targetInput = els.urlOllama;",
|
|
50
|
+
"else if (provider === 'ollama') targetInput = els.urlOllama;\n else if (provider === 'custom') targetInput = els.keyCustom;"
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
with open(path, 'w', encoding='utf-8') as f:
|
|
54
|
+
f.write(c)
|
package/update_llm.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import re
|
|
2
|
+
path = 'config/llm_config.py'
|
|
3
|
+
with open(path, 'r', encoding='utf-8') as f:
|
|
4
|
+
c = f.read()
|
|
5
|
+
|
|
6
|
+
# Add custom to configs
|
|
7
|
+
inject = '''
|
|
8
|
+
"custom": {
|
|
9
|
+
"model": os.getenv("LLM_MODEL", "custom/model"),
|
|
10
|
+
"api_key": current_llm_api_key.get() or os.getenv("CUSTOM_API_KEY", ""),
|
|
11
|
+
"base_url": os.getenv("CUSTOM_BASE_URL"),
|
|
12
|
+
},
|
|
13
|
+
'''
|
|
14
|
+
if '"custom": {' not in c:
|
|
15
|
+
c = c.replace('"openai": {', inject.lstrip() + ' "openai": {')
|
|
16
|
+
|
|
17
|
+
# Add custom to requires_key
|
|
18
|
+
c = c.replace('"openrouter", "deepseek", "perplexity"', '"openrouter", "deepseek", "perplexity", "custom"')
|
|
19
|
+
|
|
20
|
+
with open(path, 'w', encoding='utf-8') as f:
|
|
21
|
+
f.write(c)
|
package/update_main.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import re
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
path = 'main.py'
|
|
5
|
+
with open(path, 'r', encoding='utf-8') as f:
|
|
6
|
+
c = f.read()
|
|
7
|
+
|
|
8
|
+
# Replace endpoint parameters to add custom_base_url
|
|
9
|
+
c = c.replace('api_key: Optional[str] = Form(""),', 'api_key: Optional[str] = Form(""),\n custom_base_url: Optional[str] = Form(""),')
|
|
10
|
+
|
|
11
|
+
# Before _load_crew() in these endpoints, set the env var
|
|
12
|
+
inject = """
|
|
13
|
+
if custom_base_url:
|
|
14
|
+
import os
|
|
15
|
+
os.environ["CUSTOM_BASE_URL"] = custom_base_url
|
|
16
|
+
"""
|
|
17
|
+
c = c.replace(' _load_crew()', inject + ' _load_crew()')
|
|
18
|
+
|
|
19
|
+
with open(path, 'w', encoding='utf-8') as f:
|
|
20
|
+
f.write(c)
|