iatoolkit 0.63.6__tar.gz
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.
- iatoolkit-0.63.6/PKG-INFO +258 -0
- iatoolkit-0.63.6/pyproject.toml +29 -0
- iatoolkit-0.63.6/readme.md +49 -0
- iatoolkit-0.63.6/requirements.txt +200 -0
- iatoolkit-0.63.6/setup.cfg +4 -0
- iatoolkit-0.63.6/src/iatoolkit/__init__.py +38 -0
- iatoolkit-0.63.6/src/iatoolkit/base_company.py +119 -0
- iatoolkit-0.63.6/src/iatoolkit/cli_commands.py +61 -0
- iatoolkit-0.63.6/src/iatoolkit/common/__init__.py +0 -0
- iatoolkit-0.63.6/src/iatoolkit/common/exceptions.py +46 -0
- iatoolkit-0.63.6/src/iatoolkit/common/routes.py +132 -0
- iatoolkit-0.63.6/src/iatoolkit/common/session_manager.py +24 -0
- iatoolkit-0.63.6/src/iatoolkit/common/util.py +331 -0
- iatoolkit-0.63.6/src/iatoolkit/company_registry.py +76 -0
- iatoolkit-0.63.6/src/iatoolkit/iatoolkit.py +454 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/__init__.py +5 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/call_service.py +140 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/connectors/__init__.py +5 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/connectors/file_connector.py +17 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/connectors/file_connector_factory.py +57 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/connectors/google_cloud_storage_connector.py +53 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/connectors/google_drive_connector.py +68 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/connectors/local_file_connector.py +46 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/connectors/s3_connector.py +33 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/gemini_adapter.py +356 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/google_chat_app.py +57 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/llm_client.py +429 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/llm_proxy.py +139 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/llm_response.py +40 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/mail_app.py +145 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/openai_adapter.py +90 -0
- iatoolkit-0.63.6/src/iatoolkit/infra/redis_session_manager.py +122 -0
- iatoolkit-0.63.6/src/iatoolkit/repositories/__init__.py +5 -0
- iatoolkit-0.63.6/src/iatoolkit/repositories/database_manager.py +110 -0
- iatoolkit-0.63.6/src/iatoolkit/repositories/document_repo.py +33 -0
- iatoolkit-0.63.6/src/iatoolkit/repositories/llm_query_repo.py +91 -0
- iatoolkit-0.63.6/src/iatoolkit/repositories/models.py +334 -0
- iatoolkit-0.63.6/src/iatoolkit/repositories/profile_repo.py +123 -0
- iatoolkit-0.63.6/src/iatoolkit/repositories/tasks_repo.py +52 -0
- iatoolkit-0.63.6/src/iatoolkit/repositories/vs_repo.py +139 -0
- iatoolkit-0.63.6/src/iatoolkit/services/__init__.py +5 -0
- iatoolkit-0.63.6/src/iatoolkit/services/auth_service.py +188 -0
- iatoolkit-0.63.6/src/iatoolkit/services/benchmark_service.py +139 -0
- iatoolkit-0.63.6/src/iatoolkit/services/branding_service.py +147 -0
- iatoolkit-0.63.6/src/iatoolkit/services/dispatcher_service.py +305 -0
- iatoolkit-0.63.6/src/iatoolkit/services/document_service.py +159 -0
- iatoolkit-0.63.6/src/iatoolkit/services/excel_service.py +104 -0
- iatoolkit-0.63.6/src/iatoolkit/services/file_processor_service.py +115 -0
- iatoolkit-0.63.6/src/iatoolkit/services/history_service.py +37 -0
- iatoolkit-0.63.6/src/iatoolkit/services/jwt_service.py +82 -0
- iatoolkit-0.63.6/src/iatoolkit/services/load_documents_service.py +187 -0
- iatoolkit-0.63.6/src/iatoolkit/services/mail_service.py +62 -0
- iatoolkit-0.63.6/src/iatoolkit/services/onboarding_service.py +43 -0
- iatoolkit-0.63.6/src/iatoolkit/services/profile_service.py +422 -0
- iatoolkit-0.63.6/src/iatoolkit/services/prompt_manager_service.py +188 -0
- iatoolkit-0.63.6/src/iatoolkit/services/query_service.py +372 -0
- iatoolkit-0.63.6/src/iatoolkit/services/search_service.py +48 -0
- iatoolkit-0.63.6/src/iatoolkit/services/sql_service.py +60 -0
- iatoolkit-0.63.6/src/iatoolkit/services/tasks_service.py +188 -0
- iatoolkit-0.63.6/src/iatoolkit/services/user_feedback_service.py +103 -0
- iatoolkit-0.63.6/src/iatoolkit/services/user_session_context_service.py +143 -0
- iatoolkit-0.63.6/src/iatoolkit/static/images/fernando.jpeg +0 -0
- iatoolkit-0.63.6/src/iatoolkit/static/js/chat_feedback_button.js +82 -0
- iatoolkit-0.63.6/src/iatoolkit/static/js/chat_filepond.js +85 -0
- iatoolkit-0.63.6/src/iatoolkit/static/js/chat_history_button.js +93 -0
- iatoolkit-0.63.6/src/iatoolkit/static/js/chat_logout_button.js +36 -0
- iatoolkit-0.63.6/src/iatoolkit/static/js/chat_main.js +347 -0
- iatoolkit-0.63.6/src/iatoolkit/static/js/chat_onboarding_button.js +97 -0
- iatoolkit-0.63.6/src/iatoolkit/static/js/chat_prompt_manager.js +94 -0
- iatoolkit-0.63.6/src/iatoolkit/static/js/chat_reload_button.js +35 -0
- iatoolkit-0.63.6/src/iatoolkit/static/styles/chat_iatoolkit.css +538 -0
- iatoolkit-0.63.6/src/iatoolkit/static/styles/chat_info.css +53 -0
- iatoolkit-0.63.6/src/iatoolkit/static/styles/chat_modal.css +157 -0
- iatoolkit-0.63.6/src/iatoolkit/static/styles/landing_page.css +182 -0
- iatoolkit-0.63.6/src/iatoolkit/static/styles/llm_output.css +115 -0
- iatoolkit-0.63.6/src/iatoolkit/static/styles/onboarding.css +169 -0
- iatoolkit-0.63.6/src/iatoolkit/system_prompts/format_styles.prompt +97 -0
- iatoolkit-0.63.6/src/iatoolkit/system_prompts/query_main.prompt +57 -0
- iatoolkit-0.63.6/src/iatoolkit/system_prompts/sql_rules.prompt +1337 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/_company_header.html +20 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/_login_widget.html +40 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/about.html +13 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/base.html +50 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/change_password.html +62 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/chat.html +263 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/chat_modals.html +140 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/error.html +48 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/forgot_password.html +46 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/header.html +31 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/index.html +140 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/login_simulation.html +34 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/onboarding_shell.html +105 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/signup.html +76 -0
- iatoolkit-0.63.6/src/iatoolkit/templates/test.html +9 -0
- iatoolkit-0.63.6/src/iatoolkit/views/__init__.py +5 -0
- iatoolkit-0.63.6/src/iatoolkit/views/base_login_view.py +81 -0
- iatoolkit-0.63.6/src/iatoolkit/views/change_password_view.py +102 -0
- iatoolkit-0.63.6/src/iatoolkit/views/external_login_view.py +73 -0
- iatoolkit-0.63.6/src/iatoolkit/views/file_store_api_view.py +65 -0
- iatoolkit-0.63.6/src/iatoolkit/views/forgot_password_view.py +74 -0
- iatoolkit-0.63.6/src/iatoolkit/views/history_api_view.py +51 -0
- iatoolkit-0.63.6/src/iatoolkit/views/home_view.py +67 -0
- iatoolkit-0.63.6/src/iatoolkit/views/index_view.py +14 -0
- iatoolkit-0.63.6/src/iatoolkit/views/init_context_api_view.py +68 -0
- iatoolkit-0.63.6/src/iatoolkit/views/llmquery_api_view.py +45 -0
- iatoolkit-0.63.6/src/iatoolkit/views/login_simulation_view.py +81 -0
- iatoolkit-0.63.6/src/iatoolkit/views/login_view.py +144 -0
- iatoolkit-0.63.6/src/iatoolkit/views/logout_api_view.py +45 -0
- iatoolkit-0.63.6/src/iatoolkit/views/prompt_api_view.py +37 -0
- iatoolkit-0.63.6/src/iatoolkit/views/signup_view.py +96 -0
- iatoolkit-0.63.6/src/iatoolkit/views/tasks_api_view.py +72 -0
- iatoolkit-0.63.6/src/iatoolkit/views/tasks_review_api_view.py +55 -0
- iatoolkit-0.63.6/src/iatoolkit/views/user_feedback_api_view.py +59 -0
- iatoolkit-0.63.6/src/iatoolkit/views/verify_user_view.py +60 -0
- iatoolkit-0.63.6/src/iatoolkit.egg-info/PKG-INFO +258 -0
- iatoolkit-0.63.6/src/iatoolkit.egg-info/SOURCES.txt +117 -0
- iatoolkit-0.63.6/src/iatoolkit.egg-info/dependency_links.txt +1 -0
- iatoolkit-0.63.6/src/iatoolkit.egg-info/requires.txt +200 -0
- iatoolkit-0.63.6/src/iatoolkit.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iatoolkit
|
|
3
|
+
Version: 0.63.6
|
|
4
|
+
Summary: IAToolkit
|
|
5
|
+
Author: Fernando Libedinsky
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.12
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: aiohappyeyeballs==2.4.4
|
|
10
|
+
Requires-Dist: aiohttp==3.11.9
|
|
11
|
+
Requires-Dist: aiosignal==1.3.1
|
|
12
|
+
Requires-Dist: annotated-types==0.7.0
|
|
13
|
+
Requires-Dist: anyio==4.6.2.post1
|
|
14
|
+
Requires-Dist: asgiref==3.8.1
|
|
15
|
+
Requires-Dist: async-timeout==4.0.3
|
|
16
|
+
Requires-Dist: attrs==24.3.0
|
|
17
|
+
Requires-Dist: backoff==2.2.1
|
|
18
|
+
Requires-Dist: bcrypt==4.2.1
|
|
19
|
+
Requires-Dist: beautifulsoup4==4.12.3
|
|
20
|
+
Requires-Dist: blinker==1.9.0
|
|
21
|
+
Requires-Dist: boto3==1.36.22
|
|
22
|
+
Requires-Dist: botocore==1.36.22
|
|
23
|
+
Requires-Dist: build==1.2.2.post1
|
|
24
|
+
Requires-Dist: cachelib==0.13.0
|
|
25
|
+
Requires-Dist: cachetools==5.5.0
|
|
26
|
+
Requires-Dist: certifi==2024.12.14
|
|
27
|
+
Requires-Dist: cffi==1.17.1
|
|
28
|
+
Requires-Dist: charset-normalizer==3.4.0
|
|
29
|
+
Requires-Dist: click==8.1.8
|
|
30
|
+
Requires-Dist: coloredlogs==15.0.1
|
|
31
|
+
Requires-Dist: contourpy==1.3.3
|
|
32
|
+
Requires-Dist: coverage==7.6.10
|
|
33
|
+
Requires-Dist: cryptography==44.0.3
|
|
34
|
+
Requires-Dist: cycler==0.12.1
|
|
35
|
+
Requires-Dist: dataclasses-json==0.6.7
|
|
36
|
+
Requires-Dist: Deprecated==1.2.15
|
|
37
|
+
Requires-Dist: distro==1.9.0
|
|
38
|
+
Requires-Dist: durationpy==0.9
|
|
39
|
+
Requires-Dist: ecs-logging==2.2.0
|
|
40
|
+
Requires-Dist: elastic-apm==6.23.0
|
|
41
|
+
Requires-Dist: et_xmlfile==2.0.0
|
|
42
|
+
Requires-Dist: exceptiongroup==1.2.2
|
|
43
|
+
Requires-Dist: fastapi==0.115.6
|
|
44
|
+
Requires-Dist: filelock==3.16.1
|
|
45
|
+
Requires-Dist: Flask==3.1.0
|
|
46
|
+
Requires-Dist: Flask-Bcrypt==1.0.1
|
|
47
|
+
Requires-Dist: flask-cors==6.0.0
|
|
48
|
+
Requires-Dist: Flask-Injector==0.15.0
|
|
49
|
+
Requires-Dist: Flask-Session==0.8.0
|
|
50
|
+
Requires-Dist: flatbuffers==24.3.25
|
|
51
|
+
Requires-Dist: fonttools==4.59.2
|
|
52
|
+
Requires-Dist: frozenlist==1.5.0
|
|
53
|
+
Requires-Dist: fsspec==2024.10.0
|
|
54
|
+
Requires-Dist: google-ai-generativelanguage==0.6.15
|
|
55
|
+
Requires-Dist: google-api-core==2.24.1
|
|
56
|
+
Requires-Dist: google-api-python-client==2.161.0
|
|
57
|
+
Requires-Dist: google-auth==2.37.0
|
|
58
|
+
Requires-Dist: google-auth-httplib2==0.2.0
|
|
59
|
+
Requires-Dist: google-auth-oauthlib==1.2.1
|
|
60
|
+
Requires-Dist: google-cloud-core==2.4.1
|
|
61
|
+
Requires-Dist: google-cloud-storage==3.0.0
|
|
62
|
+
Requires-Dist: google-crc32c==1.6.0
|
|
63
|
+
Requires-Dist: google-generativeai==0.8.5
|
|
64
|
+
Requires-Dist: google-resumable-media==2.7.2
|
|
65
|
+
Requires-Dist: googleapis-common-protos==1.66.0
|
|
66
|
+
Requires-Dist: grpcio==1.74.0
|
|
67
|
+
Requires-Dist: grpcio-status==1.71.2
|
|
68
|
+
Requires-Dist: gunicorn==23.0.0
|
|
69
|
+
Requires-Dist: h11==0.14.0
|
|
70
|
+
Requires-Dist: httpcore==1.0.7
|
|
71
|
+
Requires-Dist: httplib2==0.22.0
|
|
72
|
+
Requires-Dist: httptools==0.6.4
|
|
73
|
+
Requires-Dist: httpx==0.28.0
|
|
74
|
+
Requires-Dist: httpx-sse==0.4.0
|
|
75
|
+
Requires-Dist: huggingface-hub==0.31.4
|
|
76
|
+
Requires-Dist: humanfriendly==10.0
|
|
77
|
+
Requires-Dist: idna==3.10
|
|
78
|
+
Requires-Dist: importlib_metadata==8.5.0
|
|
79
|
+
Requires-Dist: importlib_resources==6.4.5
|
|
80
|
+
Requires-Dist: iniconfig==2.0.0
|
|
81
|
+
Requires-Dist: injector==0.22.0
|
|
82
|
+
Requires-Dist: itsdangerous==2.2.0
|
|
83
|
+
Requires-Dist: Jinja2==3.1.5
|
|
84
|
+
Requires-Dist: jiter==0.8.0
|
|
85
|
+
Requires-Dist: jmespath==1.0.1
|
|
86
|
+
Requires-Dist: joblib==1.4.2
|
|
87
|
+
Requires-Dist: jsonpatch==1.33
|
|
88
|
+
Requires-Dist: jsonpointer==3.0.0
|
|
89
|
+
Requires-Dist: kiwisolver==1.4.9
|
|
90
|
+
Requires-Dist: kubernetes==31.0.0
|
|
91
|
+
Requires-Dist: langchain==0.3.19
|
|
92
|
+
Requires-Dist: langchain-core==0.3.35
|
|
93
|
+
Requires-Dist: langchain-text-splitters==0.3.6
|
|
94
|
+
Requires-Dist: langsmith==0.3.8
|
|
95
|
+
Requires-Dist: lxml==5.3.0
|
|
96
|
+
Requires-Dist: markdown-it-py==3.0.0
|
|
97
|
+
Requires-Dist: markdown2==2.5.3
|
|
98
|
+
Requires-Dist: MarkupSafe==3.0.2
|
|
99
|
+
Requires-Dist: marshmallow==3.23.1
|
|
100
|
+
Requires-Dist: matplotlib==3.10.6
|
|
101
|
+
Requires-Dist: mdurl==0.1.2
|
|
102
|
+
Requires-Dist: mmh3==5.0.1
|
|
103
|
+
Requires-Dist: monotonic==1.6
|
|
104
|
+
Requires-Dist: mpmath==1.3.0
|
|
105
|
+
Requires-Dist: msgspec==0.19.0
|
|
106
|
+
Requires-Dist: multidict==6.1.0
|
|
107
|
+
Requires-Dist: mypy-extensions==1.0.0
|
|
108
|
+
Requires-Dist: narwhals==2.3.0
|
|
109
|
+
Requires-Dist: networkx==3.4.2
|
|
110
|
+
Requires-Dist: numpy==2.2.3
|
|
111
|
+
Requires-Dist: oauth2client==4.1.3
|
|
112
|
+
Requires-Dist: oauthlib==3.2.2
|
|
113
|
+
Requires-Dist: onnxruntime==1.19.2
|
|
114
|
+
Requires-Dist: openai==1.79.0
|
|
115
|
+
Requires-Dist: openpyxl==3.1.5
|
|
116
|
+
Requires-Dist: opentelemetry-api==1.28.2
|
|
117
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.28.2
|
|
118
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.28.2
|
|
119
|
+
Requires-Dist: opentelemetry-instrumentation==0.49b2
|
|
120
|
+
Requires-Dist: opentelemetry-instrumentation-asgi==0.49b2
|
|
121
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi==0.49b2
|
|
122
|
+
Requires-Dist: opentelemetry-proto==1.28.2
|
|
123
|
+
Requires-Dist: opentelemetry-sdk==1.28.2
|
|
124
|
+
Requires-Dist: opentelemetry-semantic-conventions==0.49b2
|
|
125
|
+
Requires-Dist: opentelemetry-util-http==0.49b2
|
|
126
|
+
Requires-Dist: orjson==3.10.12
|
|
127
|
+
Requires-Dist: overrides==7.7.0
|
|
128
|
+
Requires-Dist: packaging==24.2
|
|
129
|
+
Requires-Dist: pandas==2.3.1
|
|
130
|
+
Requires-Dist: pgvector==0.3.6
|
|
131
|
+
Requires-Dist: pillow==11.0.0
|
|
132
|
+
Requires-Dist: plotly==6.3.0
|
|
133
|
+
Requires-Dist: pluggy==1.5.0
|
|
134
|
+
Requires-Dist: posthog==3.7.4
|
|
135
|
+
Requires-Dist: propcache==0.2.1
|
|
136
|
+
Requires-Dist: proto-plus==1.26.0
|
|
137
|
+
Requires-Dist: protobuf==5.29.1
|
|
138
|
+
Requires-Dist: psutil==7.0.0
|
|
139
|
+
Requires-Dist: psycopg2-binary==2.9.10
|
|
140
|
+
Requires-Dist: pyarrow==21.0.0
|
|
141
|
+
Requires-Dist: pyasn1==0.6.1
|
|
142
|
+
Requires-Dist: pyasn1_modules==0.4.1
|
|
143
|
+
Requires-Dist: pycparser==2.22
|
|
144
|
+
Requires-Dist: pydantic==2.10.2
|
|
145
|
+
Requires-Dist: pydantic-settings==2.6.1
|
|
146
|
+
Requires-Dist: pydantic_core==2.27.1
|
|
147
|
+
Requires-Dist: PyDrive==1.3.1
|
|
148
|
+
Requires-Dist: Pygments==2.18.0
|
|
149
|
+
Requires-Dist: PyJWT==2.10.1
|
|
150
|
+
Requires-Dist: PyMuPDF==1.25.0
|
|
151
|
+
Requires-Dist: pyparsing==3.2.1
|
|
152
|
+
Requires-Dist: pypdf==5.1.0
|
|
153
|
+
Requires-Dist: PyPika==0.48.9
|
|
154
|
+
Requires-Dist: pyproject_hooks==1.2.0
|
|
155
|
+
Requires-Dist: pytesseract==0.3.13
|
|
156
|
+
Requires-Dist: pytest==8.3.4
|
|
157
|
+
Requires-Dist: pytest-cov==5.0.0
|
|
158
|
+
Requires-Dist: pytest-mock==3.14.0
|
|
159
|
+
Requires-Dist: python-dateutil==2.9.0.post0
|
|
160
|
+
Requires-Dist: python-docx==1.1.2
|
|
161
|
+
Requires-Dist: python-dotenv==1.0.1
|
|
162
|
+
Requires-Dist: pytz==2025.2
|
|
163
|
+
Requires-Dist: PyYAML==6.0.2
|
|
164
|
+
Requires-Dist: redis==5.2.1
|
|
165
|
+
Requires-Dist: regex==2024.11.6
|
|
166
|
+
Requires-Dist: requests==2.32.3
|
|
167
|
+
Requires-Dist: requests-oauthlib==2.0.0
|
|
168
|
+
Requires-Dist: requests-toolbelt==1.0.0
|
|
169
|
+
Requires-Dist: rich==13.9.4
|
|
170
|
+
Requires-Dist: rsa==4.9
|
|
171
|
+
Requires-Dist: s3transfer==0.11.2
|
|
172
|
+
Requires-Dist: safetensors==0.5.2
|
|
173
|
+
Requires-Dist: scikit-learn==1.7.1
|
|
174
|
+
Requires-Dist: scipy==1.15.1
|
|
175
|
+
Requires-Dist: seaborn==0.13.2
|
|
176
|
+
Requires-Dist: setuptools==75.8.0
|
|
177
|
+
Requires-Dist: shellingham==1.5.4
|
|
178
|
+
Requires-Dist: sib-api-v3-sdk==7.6.0
|
|
179
|
+
Requires-Dist: six==1.17.0
|
|
180
|
+
Requires-Dist: sniffio==1.3.1
|
|
181
|
+
Requires-Dist: soupsieve==2.6
|
|
182
|
+
Requires-Dist: SQLAlchemy==2.0.36
|
|
183
|
+
Requires-Dist: starlette==0.41.3
|
|
184
|
+
Requires-Dist: sympy==1.13.1
|
|
185
|
+
Requires-Dist: tenacity==9.0.0
|
|
186
|
+
Requires-Dist: threadpoolctl==3.5.0
|
|
187
|
+
Requires-Dist: tiktoken==0.8.0
|
|
188
|
+
Requires-Dist: tokenizers==0.21.0
|
|
189
|
+
Requires-Dist: tomli==2.2.1
|
|
190
|
+
Requires-Dist: tqdm==4.67.1
|
|
191
|
+
Requires-Dist: typer==0.15.1
|
|
192
|
+
Requires-Dist: typing-inspect==0.9.0
|
|
193
|
+
Requires-Dist: typing_extensions==4.12.2
|
|
194
|
+
Requires-Dist: tzdata==2025.2
|
|
195
|
+
Requires-Dist: uritemplate==4.1.1
|
|
196
|
+
Requires-Dist: urllib3==2.3.0
|
|
197
|
+
Requires-Dist: uvicorn==0.32.1
|
|
198
|
+
Requires-Dist: uvloop==0.21.0
|
|
199
|
+
Requires-Dist: watchfiles==1.0.0
|
|
200
|
+
Requires-Dist: websocket-client==1.8.0
|
|
201
|
+
Requires-Dist: websockets==14.1
|
|
202
|
+
Requires-Dist: Werkzeug==3.1.3
|
|
203
|
+
Requires-Dist: whitenoise==6.8.2
|
|
204
|
+
Requires-Dist: wikipedia==1.4.0
|
|
205
|
+
Requires-Dist: wrapt==1.17.0
|
|
206
|
+
Requires-Dist: yarl==1.18.3
|
|
207
|
+
Requires-Dist: zipp==3.21.0
|
|
208
|
+
Requires-Dist: zstandard==0.23.0
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<div align="center">
|
|
212
|
+
<h1>IAToolkit</h1>
|
|
213
|
+
<p><strong>The Open-Source Framework for Building AI Chatbots on Your Private Data.</strong></p>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
IAToolkit is a comprehensive, open-source framework designed for building enterprise-grade
|
|
217
|
+
AI chatbots and conversational applications.
|
|
218
|
+
With IAToolkit, you can build production-ready, context-aware chatbots and agents that
|
|
219
|
+
can query relational databases, perform semantic searches on documents,
|
|
220
|
+
and connect to your internal APIs in minutes.
|
|
221
|
+
|
|
222
|
+
IAToolkit bridges the gap between powerful LLMs and your company's data.
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
## 🚀 Key Features
|
|
226
|
+
|
|
227
|
+
* **🔗 Unified Data Connection**:
|
|
228
|
+
* **Natural Language to SQL**: Let your chatbot query relational databases (PostgreSQL, MySQL, SQLite) using everyday language.
|
|
229
|
+
* **Semantic Document Search**: Automatically chunk, embed, and search across your private documents (PDFs, Word, etc.) to provide contextually accurate answers.
|
|
230
|
+
|
|
231
|
+
* **🏢 Enterprise-Ready Multi-Tenancy**:
|
|
232
|
+
* Deploy isolated "Company" modules, each with its own data, tools, and context. Perfect for SaaS products or internal departmental agents.
|
|
233
|
+
|
|
234
|
+
* **🧠 LLM Agnostic**:
|
|
235
|
+
* Switch between **OpenAI (GPT-*)** and **Google (Gemini-*)** with a single line change in your configuration. No code refactoring needed.
|
|
236
|
+
|
|
237
|
+
* **🛠️ Developer-First Experience**:
|
|
238
|
+
* Built with a clean, **Dependency Injection** architecture.
|
|
239
|
+
* High-quality code base with **90%+ test coverage**.
|
|
240
|
+
* Powerful Flask-based **CLI** for database setup, API key generation, and more.
|
|
241
|
+
|
|
242
|
+
* **🔒 Security & Observability Built-In**:
|
|
243
|
+
* Comes with JWT-based authentication, user management, and secure session handling out of the box.
|
|
244
|
+
* Full traceability with detailed logging of all queries, function calls, token usage, and costs.
|
|
245
|
+
|
|
246
|
+
## ⚡ Quick Start: Create a Custom Tool in 30 Seconds
|
|
247
|
+
|
|
248
|
+
See how easy it is to give your AI a new skill. Just define a method inside your Company class and describe it.
|
|
249
|
+
IAToolkit handles the rest.
|
|
250
|
+
|
|
251
|
+
## 🤝 Contributing
|
|
252
|
+
|
|
253
|
+
We welcome contributions! Whether it's adding a new feature, improving documentation, or fixing a bug,
|
|
254
|
+
please feel free to open a pull request.
|
|
255
|
+
|
|
256
|
+
## 📄 License
|
|
257
|
+
|
|
258
|
+
IAToolkit is open-source and licensed under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel", "build"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "iatoolkit"
|
|
7
|
+
version = "0.63.6"
|
|
8
|
+
requires-python = ">=3.12"
|
|
9
|
+
description = "IAToolkit"
|
|
10
|
+
readme = "readme.md"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{ name = "Fernando Libedinsky" }]
|
|
13
|
+
|
|
14
|
+
# Si quieres seguir leyendo deps de requirements.txt:
|
|
15
|
+
dynamic = ["dependencies"]
|
|
16
|
+
|
|
17
|
+
[tool.setuptools]
|
|
18
|
+
package-dir = {"" = "src"}
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.packages.find]
|
|
21
|
+
where = ["src"]
|
|
22
|
+
exclude = ["tests*", "*/tests*"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[tool.setuptools.dynamic]
|
|
26
|
+
dependencies = { file = ["requirements.txt"] }
|
|
27
|
+
|
|
28
|
+
[tool.setuptools.package-data]
|
|
29
|
+
iatoolkit = ["system_prompts/*.prompt", "templates/**/*", "static/**/*"]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
<div align="center">
|
|
3
|
+
<h1>IAToolkit</h1>
|
|
4
|
+
<p><strong>The Open-Source Framework for Building AI Chatbots on Your Private Data.</strong></p>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
IAToolkit is a comprehensive, open-source framework designed for building enterprise-grade
|
|
8
|
+
AI chatbots and conversational applications.
|
|
9
|
+
With IAToolkit, you can build production-ready, context-aware chatbots and agents that
|
|
10
|
+
can query relational databases, perform semantic searches on documents,
|
|
11
|
+
and connect to your internal APIs in minutes.
|
|
12
|
+
|
|
13
|
+
IAToolkit bridges the gap between powerful LLMs and your company's data.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## 🚀 Key Features
|
|
17
|
+
|
|
18
|
+
* **🔗 Unified Data Connection**:
|
|
19
|
+
* **Natural Language to SQL**: Let your chatbot query relational databases (PostgreSQL, MySQL, SQLite) using everyday language.
|
|
20
|
+
* **Semantic Document Search**: Automatically chunk, embed, and search across your private documents (PDFs, Word, etc.) to provide contextually accurate answers.
|
|
21
|
+
|
|
22
|
+
* **🏢 Enterprise-Ready Multi-Tenancy**:
|
|
23
|
+
* Deploy isolated "Company" modules, each with its own data, tools, and context. Perfect for SaaS products or internal departmental agents.
|
|
24
|
+
|
|
25
|
+
* **🧠 LLM Agnostic**:
|
|
26
|
+
* Switch between **OpenAI (GPT-*)** and **Google (Gemini-*)** with a single line change in your configuration. No code refactoring needed.
|
|
27
|
+
|
|
28
|
+
* **🛠️ Developer-First Experience**:
|
|
29
|
+
* Built with a clean, **Dependency Injection** architecture.
|
|
30
|
+
* High-quality code base with **90%+ test coverage**.
|
|
31
|
+
* Powerful Flask-based **CLI** for database setup, API key generation, and more.
|
|
32
|
+
|
|
33
|
+
* **🔒 Security & Observability Built-In**:
|
|
34
|
+
* Comes with JWT-based authentication, user management, and secure session handling out of the box.
|
|
35
|
+
* Full traceability with detailed logging of all queries, function calls, token usage, and costs.
|
|
36
|
+
|
|
37
|
+
## ⚡ Quick Start: Create a Custom Tool in 30 Seconds
|
|
38
|
+
|
|
39
|
+
See how easy it is to give your AI a new skill. Just define a method inside your Company class and describe it.
|
|
40
|
+
IAToolkit handles the rest.
|
|
41
|
+
|
|
42
|
+
## 🤝 Contributing
|
|
43
|
+
|
|
44
|
+
We welcome contributions! Whether it's adding a new feature, improving documentation, or fixing a bug,
|
|
45
|
+
please feel free to open a pull request.
|
|
46
|
+
|
|
47
|
+
## 📄 License
|
|
48
|
+
|
|
49
|
+
IAToolkit is open-source and licensed under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
aiohappyeyeballs==2.4.4
|
|
2
|
+
aiohttp==3.11.9
|
|
3
|
+
aiosignal==1.3.1
|
|
4
|
+
annotated-types==0.7.0
|
|
5
|
+
anyio==4.6.2.post1
|
|
6
|
+
asgiref==3.8.1
|
|
7
|
+
async-timeout==4.0.3
|
|
8
|
+
attrs==24.3.0
|
|
9
|
+
backoff==2.2.1
|
|
10
|
+
bcrypt==4.2.1
|
|
11
|
+
beautifulsoup4==4.12.3
|
|
12
|
+
blinker==1.9.0
|
|
13
|
+
boto3==1.36.22
|
|
14
|
+
botocore==1.36.22
|
|
15
|
+
build==1.2.2.post1
|
|
16
|
+
cachelib==0.13.0
|
|
17
|
+
cachetools==5.5.0
|
|
18
|
+
certifi==2024.12.14
|
|
19
|
+
cffi==1.17.1
|
|
20
|
+
charset-normalizer==3.4.0
|
|
21
|
+
click==8.1.8
|
|
22
|
+
coloredlogs==15.0.1
|
|
23
|
+
contourpy==1.3.3
|
|
24
|
+
coverage==7.6.10
|
|
25
|
+
cryptography==44.0.3
|
|
26
|
+
cycler==0.12.1
|
|
27
|
+
dataclasses-json==0.6.7
|
|
28
|
+
Deprecated==1.2.15
|
|
29
|
+
distro==1.9.0
|
|
30
|
+
durationpy==0.9
|
|
31
|
+
ecs-logging==2.2.0
|
|
32
|
+
elastic-apm==6.23.0
|
|
33
|
+
et_xmlfile==2.0.0
|
|
34
|
+
exceptiongroup==1.2.2
|
|
35
|
+
fastapi==0.115.6
|
|
36
|
+
filelock==3.16.1
|
|
37
|
+
Flask==3.1.0
|
|
38
|
+
Flask-Bcrypt==1.0.1
|
|
39
|
+
flask-cors==6.0.0
|
|
40
|
+
Flask-Injector==0.15.0
|
|
41
|
+
Flask-Session==0.8.0
|
|
42
|
+
flatbuffers==24.3.25
|
|
43
|
+
fonttools==4.59.2
|
|
44
|
+
frozenlist==1.5.0
|
|
45
|
+
fsspec==2024.10.0
|
|
46
|
+
google-ai-generativelanguage==0.6.15
|
|
47
|
+
google-api-core==2.24.1
|
|
48
|
+
google-api-python-client==2.161.0
|
|
49
|
+
google-auth==2.37.0
|
|
50
|
+
google-auth-httplib2==0.2.0
|
|
51
|
+
google-auth-oauthlib==1.2.1
|
|
52
|
+
google-cloud-core==2.4.1
|
|
53
|
+
google-cloud-storage==3.0.0
|
|
54
|
+
google-crc32c==1.6.0
|
|
55
|
+
google-generativeai==0.8.5
|
|
56
|
+
google-resumable-media==2.7.2
|
|
57
|
+
googleapis-common-protos==1.66.0
|
|
58
|
+
grpcio==1.74.0
|
|
59
|
+
grpcio-status==1.71.2
|
|
60
|
+
gunicorn==23.0.0
|
|
61
|
+
h11==0.14.0
|
|
62
|
+
httpcore==1.0.7
|
|
63
|
+
httplib2==0.22.0
|
|
64
|
+
httptools==0.6.4
|
|
65
|
+
httpx==0.28.0
|
|
66
|
+
httpx-sse==0.4.0
|
|
67
|
+
huggingface-hub==0.31.4
|
|
68
|
+
humanfriendly==10.0
|
|
69
|
+
idna==3.10
|
|
70
|
+
importlib_metadata==8.5.0
|
|
71
|
+
importlib_resources==6.4.5
|
|
72
|
+
iniconfig==2.0.0
|
|
73
|
+
injector==0.22.0
|
|
74
|
+
itsdangerous==2.2.0
|
|
75
|
+
Jinja2==3.1.5
|
|
76
|
+
jiter==0.8.0
|
|
77
|
+
jmespath==1.0.1
|
|
78
|
+
joblib==1.4.2
|
|
79
|
+
jsonpatch==1.33
|
|
80
|
+
jsonpointer==3.0.0
|
|
81
|
+
kiwisolver==1.4.9
|
|
82
|
+
kubernetes==31.0.0
|
|
83
|
+
langchain==0.3.19
|
|
84
|
+
langchain-core==0.3.35
|
|
85
|
+
langchain-text-splitters==0.3.6
|
|
86
|
+
langsmith==0.3.8
|
|
87
|
+
lxml==5.3.0
|
|
88
|
+
markdown-it-py==3.0.0
|
|
89
|
+
markdown2==2.5.3
|
|
90
|
+
MarkupSafe==3.0.2
|
|
91
|
+
marshmallow==3.23.1
|
|
92
|
+
matplotlib==3.10.6
|
|
93
|
+
mdurl==0.1.2
|
|
94
|
+
mmh3==5.0.1
|
|
95
|
+
monotonic==1.6
|
|
96
|
+
mpmath==1.3.0
|
|
97
|
+
msgspec==0.19.0
|
|
98
|
+
multidict==6.1.0
|
|
99
|
+
mypy-extensions==1.0.0
|
|
100
|
+
narwhals==2.3.0
|
|
101
|
+
networkx==3.4.2
|
|
102
|
+
numpy==2.2.3
|
|
103
|
+
oauth2client==4.1.3
|
|
104
|
+
oauthlib==3.2.2
|
|
105
|
+
onnxruntime==1.19.2
|
|
106
|
+
openai==1.79.0
|
|
107
|
+
openpyxl==3.1.5
|
|
108
|
+
opentelemetry-api==1.28.2
|
|
109
|
+
opentelemetry-exporter-otlp-proto-common==1.28.2
|
|
110
|
+
opentelemetry-exporter-otlp-proto-grpc==1.28.2
|
|
111
|
+
opentelemetry-instrumentation==0.49b2
|
|
112
|
+
opentelemetry-instrumentation-asgi==0.49b2
|
|
113
|
+
opentelemetry-instrumentation-fastapi==0.49b2
|
|
114
|
+
opentelemetry-proto==1.28.2
|
|
115
|
+
opentelemetry-sdk==1.28.2
|
|
116
|
+
opentelemetry-semantic-conventions==0.49b2
|
|
117
|
+
opentelemetry-util-http==0.49b2
|
|
118
|
+
orjson==3.10.12
|
|
119
|
+
overrides==7.7.0
|
|
120
|
+
packaging==24.2
|
|
121
|
+
pandas==2.3.1
|
|
122
|
+
pgvector==0.3.6
|
|
123
|
+
pillow==11.0.0
|
|
124
|
+
plotly==6.3.0
|
|
125
|
+
pluggy==1.5.0
|
|
126
|
+
posthog==3.7.4
|
|
127
|
+
propcache==0.2.1
|
|
128
|
+
proto-plus==1.26.0
|
|
129
|
+
protobuf==5.29.1
|
|
130
|
+
psutil==7.0.0
|
|
131
|
+
psycopg2-binary==2.9.10
|
|
132
|
+
pyarrow==21.0.0
|
|
133
|
+
pyasn1==0.6.1
|
|
134
|
+
pyasn1_modules==0.4.1
|
|
135
|
+
pycparser==2.22
|
|
136
|
+
pydantic==2.10.2
|
|
137
|
+
pydantic-settings==2.6.1
|
|
138
|
+
pydantic_core==2.27.1
|
|
139
|
+
PyDrive==1.3.1
|
|
140
|
+
Pygments==2.18.0
|
|
141
|
+
PyJWT==2.10.1
|
|
142
|
+
PyMuPDF==1.25.0
|
|
143
|
+
pyparsing==3.2.1
|
|
144
|
+
pypdf==5.1.0
|
|
145
|
+
PyPika==0.48.9
|
|
146
|
+
pyproject_hooks==1.2.0
|
|
147
|
+
pytesseract==0.3.13
|
|
148
|
+
pytest==8.3.4
|
|
149
|
+
pytest-cov==5.0.0
|
|
150
|
+
pytest-mock==3.14.0
|
|
151
|
+
python-dateutil==2.9.0.post0
|
|
152
|
+
python-docx==1.1.2
|
|
153
|
+
python-dotenv==1.0.1
|
|
154
|
+
pytz==2025.2
|
|
155
|
+
PyYAML==6.0.2
|
|
156
|
+
redis==5.2.1
|
|
157
|
+
regex==2024.11.6
|
|
158
|
+
requests==2.32.3
|
|
159
|
+
requests-oauthlib==2.0.0
|
|
160
|
+
requests-toolbelt==1.0.0
|
|
161
|
+
rich==13.9.4
|
|
162
|
+
rsa==4.9
|
|
163
|
+
s3transfer==0.11.2
|
|
164
|
+
safetensors==0.5.2
|
|
165
|
+
scikit-learn==1.7.1
|
|
166
|
+
scipy==1.15.1
|
|
167
|
+
seaborn==0.13.2
|
|
168
|
+
setuptools==75.8.0
|
|
169
|
+
shellingham==1.5.4
|
|
170
|
+
sib-api-v3-sdk==7.6.0
|
|
171
|
+
six==1.17.0
|
|
172
|
+
sniffio==1.3.1
|
|
173
|
+
soupsieve==2.6
|
|
174
|
+
SQLAlchemy==2.0.36
|
|
175
|
+
starlette==0.41.3
|
|
176
|
+
sympy==1.13.1
|
|
177
|
+
tenacity==9.0.0
|
|
178
|
+
threadpoolctl==3.5.0
|
|
179
|
+
tiktoken==0.8.0
|
|
180
|
+
tokenizers==0.21.0
|
|
181
|
+
tomli==2.2.1
|
|
182
|
+
tqdm==4.67.1
|
|
183
|
+
typer==0.15.1
|
|
184
|
+
typing-inspect==0.9.0
|
|
185
|
+
typing_extensions==4.12.2
|
|
186
|
+
tzdata==2025.2
|
|
187
|
+
uritemplate==4.1.1
|
|
188
|
+
urllib3==2.3.0
|
|
189
|
+
uvicorn==0.32.1
|
|
190
|
+
uvloop==0.21.0
|
|
191
|
+
watchfiles==1.0.0
|
|
192
|
+
websocket-client==1.8.0
|
|
193
|
+
websockets==14.1
|
|
194
|
+
Werkzeug==3.1.3
|
|
195
|
+
whitenoise==6.8.2
|
|
196
|
+
wikipedia==1.4.0
|
|
197
|
+
wrapt==1.17.0
|
|
198
|
+
yarl==1.18.3
|
|
199
|
+
zipp==3.21.0
|
|
200
|
+
zstandard==0.23.0
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""
|
|
2
|
+
IAToolkit Package
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# Expose main classes and functions at the top level of the package
|
|
6
|
+
|
|
7
|
+
# main IAToolkit class
|
|
8
|
+
from .iatoolkit import IAToolkit, current_iatoolkit, create_app
|
|
9
|
+
|
|
10
|
+
# for registering the client companies
|
|
11
|
+
from .company_registry import register_company
|
|
12
|
+
from .base_company import BaseCompany
|
|
13
|
+
from iatoolkit.repositories.database_manager import DatabaseManager
|
|
14
|
+
|
|
15
|
+
# --- Services ---
|
|
16
|
+
from iatoolkit.services.query_service import QueryService
|
|
17
|
+
from iatoolkit.services.sql_service import SqlService
|
|
18
|
+
from iatoolkit.services.document_service import DocumentService
|
|
19
|
+
from iatoolkit.services.search_service import SearchService
|
|
20
|
+
from iatoolkit.services.load_documents_service import LoadDocumentsService
|
|
21
|
+
from iatoolkit.services.excel_service import ExcelService
|
|
22
|
+
from iatoolkit.infra.call_service import CallServiceClient
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
'IAToolkit',
|
|
26
|
+
'create_app',
|
|
27
|
+
'current_iatoolkit',
|
|
28
|
+
'register_company',
|
|
29
|
+
'BaseCompany',
|
|
30
|
+
'DatabaseManager',
|
|
31
|
+
'QueryService',
|
|
32
|
+
'SqlService',
|
|
33
|
+
'ExcelService',
|
|
34
|
+
'DocumentService',
|
|
35
|
+
'SearchService',
|
|
36
|
+
'LoadDocumentsService',
|
|
37
|
+
'CallServiceClient',
|
|
38
|
+
]
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Copyright (c) 2024 Fernando Libedinsky
|
|
2
|
+
# Product: IAToolkit
|
|
3
|
+
#
|
|
4
|
+
# IAToolkit is open source software.
|
|
5
|
+
|
|
6
|
+
# companies/base_company.py
|
|
7
|
+
from abc import ABC, abstractmethod
|
|
8
|
+
from iatoolkit.repositories.profile_repo import ProfileRepo
|
|
9
|
+
from iatoolkit.repositories.llm_query_repo import LLMQueryRepo
|
|
10
|
+
|
|
11
|
+
from iatoolkit.services.prompt_manager_service import PromptService
|
|
12
|
+
from iatoolkit.repositories.models import Company, Function, PromptCategory
|
|
13
|
+
from iatoolkit import IAToolkit
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class BaseCompany(ABC):
|
|
17
|
+
def __init__(self):
|
|
18
|
+
# Obtener el inyector global y resolver las dependencias internamente
|
|
19
|
+
injector = IAToolkit.get_instance().get_injector()
|
|
20
|
+
self.profile_repo: ProfileRepo = injector.get(ProfileRepo)
|
|
21
|
+
self.llm_query_repo: LLMQueryRepo = injector.get(LLMQueryRepo)
|
|
22
|
+
self.prompt_service: PromptService = injector.get(PromptService)
|
|
23
|
+
self.company: Company | None = None
|
|
24
|
+
|
|
25
|
+
def _load_company_by_short_name(self, short_name: str) -> Company:
|
|
26
|
+
self.company = self.profile_repo.get_company_by_short_name(short_name)
|
|
27
|
+
return self.company
|
|
28
|
+
|
|
29
|
+
def _create_company(self,
|
|
30
|
+
short_name: str,
|
|
31
|
+
name: str,
|
|
32
|
+
parameters: dict | None = None,
|
|
33
|
+
branding: dict | None = None,
|
|
34
|
+
onboarding_cards: dict | None = None,
|
|
35
|
+
) -> Company:
|
|
36
|
+
company_obj = Company(short_name=short_name,
|
|
37
|
+
name=name,
|
|
38
|
+
parameters=parameters,
|
|
39
|
+
branding=branding,
|
|
40
|
+
onboarding_cards=onboarding_cards)
|
|
41
|
+
self.company = self.profile_repo.create_company(company_obj)
|
|
42
|
+
return self.company
|
|
43
|
+
|
|
44
|
+
def _create_function(self, function_name: str, description: str, params: dict, **kwargs):
|
|
45
|
+
if not self.company:
|
|
46
|
+
raise ValueError("La compañía debe estar definida antes de crear una función.")
|
|
47
|
+
|
|
48
|
+
self.llm_query_repo.create_or_update_function(
|
|
49
|
+
Function(
|
|
50
|
+
company_id=self.company.id,
|
|
51
|
+
name=function_name,
|
|
52
|
+
description=description,
|
|
53
|
+
parameters=params,
|
|
54
|
+
system_function=False,
|
|
55
|
+
**kwargs
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
def _create_prompt_category(self, name: str, order: int) -> PromptCategory:
|
|
60
|
+
if not self.company:
|
|
61
|
+
raise ValueError("La compañía debe estar definida antes de crear una categoría.")
|
|
62
|
+
|
|
63
|
+
return self.llm_query_repo.create_or_update_prompt_category(
|
|
64
|
+
PromptCategory(name=name, order=order, company_id=self.company.id)
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
def _create_prompt(self, prompt_name: str, description: str, category: PromptCategory, order: int, **kwargs):
|
|
68
|
+
if not self.company:
|
|
69
|
+
raise ValueError("La compañía debe estar definida antes de crear un prompt.")
|
|
70
|
+
|
|
71
|
+
self.prompt_service.create_prompt(
|
|
72
|
+
prompt_name=prompt_name,
|
|
73
|
+
description=description,
|
|
74
|
+
order=order,
|
|
75
|
+
company=self.company,
|
|
76
|
+
category=category,
|
|
77
|
+
**kwargs
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@abstractmethod
|
|
82
|
+
# initialize all the database tables needed
|
|
83
|
+
def register_company(self):
|
|
84
|
+
raise NotImplementedError("La subclase debe implementar el método create_company()")
|
|
85
|
+
|
|
86
|
+
@abstractmethod
|
|
87
|
+
# get context specific for this company
|
|
88
|
+
def get_company_context(self, **kwargs) -> str:
|
|
89
|
+
raise NotImplementedError("La subclase debe implementar el método get_company_context()")
|
|
90
|
+
|
|
91
|
+
@abstractmethod
|
|
92
|
+
# get context specific for this company
|
|
93
|
+
def get_user_info(self, user_identifier: str) -> dict:
|
|
94
|
+
raise NotImplementedError("La subclase debe implementar el método get_user_info()")
|
|
95
|
+
|
|
96
|
+
@abstractmethod
|
|
97
|
+
# execute the specific action configured in the intent table
|
|
98
|
+
def handle_request(self, tag: str, params: dict) -> dict:
|
|
99
|
+
raise NotImplementedError("La subclase debe implementar el método handle_request()")
|
|
100
|
+
|
|
101
|
+
@abstractmethod
|
|
102
|
+
# get context specific for the query
|
|
103
|
+
def start_execution(self):
|
|
104
|
+
raise NotImplementedError("La subclase debe implementar el método start_execution()")
|
|
105
|
+
|
|
106
|
+
@abstractmethod
|
|
107
|
+
# get context specific for the query
|
|
108
|
+
def get_metadata_from_filename(self, filename: str) -> dict:
|
|
109
|
+
raise NotImplementedError("La subclase debe implementar el método get_query_context()")
|
|
110
|
+
|
|
111
|
+
def register_cli_commands(self, app):
|
|
112
|
+
"""
|
|
113
|
+
optional method for a company definition of it's cli commands
|
|
114
|
+
"""
|
|
115
|
+
pass
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def unsupported_operation(self, tag):
|
|
119
|
+
raise NotImplementedError(f"La operación '{tag}' no está soportada por esta empresa.")
|