amsdal_ml 0.1.0__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.
Files changed (59) hide show
  1. amsdal_ml-0.1.0/.amsdal/.dependencies +0 -0
  2. amsdal_ml-0.1.0/.amsdal/.environment +1 -0
  3. amsdal_ml-0.1.0/.amsdal/.secrets +0 -0
  4. amsdal_ml-0.1.0/.amsdal-cli +13 -0
  5. amsdal_ml-0.1.0/.github/workflows/ci.yml +62 -0
  6. amsdal_ml-0.1.0/.github/workflows/release.yml +99 -0
  7. amsdal_ml-0.1.0/.github/workflows/tag_check.yml +29 -0
  8. amsdal_ml-0.1.0/.gitignore +33 -0
  9. amsdal_ml-0.1.0/PKG-INFO +69 -0
  10. amsdal_ml-0.1.0/README.md +52 -0
  11. amsdal_ml-0.1.0/amsdal_ml/Third-Party Materials - AMSDAL Dependencies - License Notices.md +1477 -0
  12. amsdal_ml-0.1.0/amsdal_ml/__about__.py +1 -0
  13. amsdal_ml-0.1.0/amsdal_ml/__init__.py +0 -0
  14. amsdal_ml-0.1.0/amsdal_ml/agents/__init__.py +0 -0
  15. amsdal_ml-0.1.0/amsdal_ml/agents/agent.py +39 -0
  16. amsdal_ml-0.1.0/amsdal_ml/agents/default_qa_agent.py +376 -0
  17. amsdal_ml-0.1.0/amsdal_ml/agents/promts/__init__.py +58 -0
  18. amsdal_ml-0.1.0/amsdal_ml/agents/promts/react_chat.prompt +37 -0
  19. amsdal_ml-0.1.0/amsdal_ml/agents/retriever_tool.py +48 -0
  20. amsdal_ml-0.1.0/amsdal_ml/app.py +24 -0
  21. amsdal_ml-0.1.0/amsdal_ml/mcp_client/__init__.py +0 -0
  22. amsdal_ml-0.1.0/amsdal_ml/mcp_client/base.py +20 -0
  23. amsdal_ml-0.1.0/amsdal_ml/mcp_client/http_client.py +52 -0
  24. amsdal_ml-0.1.0/amsdal_ml/mcp_client/stdio_client.py +130 -0
  25. amsdal_ml-0.1.0/amsdal_ml/mcp_server/__init__.py +0 -0
  26. amsdal_ml-0.1.0/amsdal_ml/mcp_server/server_retriever_stdio.py +11 -0
  27. amsdal_ml-0.1.0/amsdal_ml/ml_config.py +57 -0
  28. amsdal_ml-0.1.0/amsdal_ml/ml_ingesting/__init__.py +0 -0
  29. amsdal_ml-0.1.0/amsdal_ml/ml_ingesting/default_ingesting.py +319 -0
  30. amsdal_ml-0.1.0/amsdal_ml/ml_ingesting/embedding_data.py +9 -0
  31. amsdal_ml-0.1.0/amsdal_ml/ml_ingesting/ingesting.py +52 -0
  32. amsdal_ml-0.1.0/amsdal_ml/ml_ingesting/openai_ingesting.py +38 -0
  33. amsdal_ml-0.1.0/amsdal_ml/ml_models/__init__.py +0 -0
  34. amsdal_ml-0.1.0/amsdal_ml/ml_models/models.py +50 -0
  35. amsdal_ml-0.1.0/amsdal_ml/ml_models/openai_model.py +171 -0
  36. amsdal_ml-0.1.0/amsdal_ml/ml_retrievers/__init__.py +0 -0
  37. amsdal_ml-0.1.0/amsdal_ml/ml_retrievers/default_retriever.py +105 -0
  38. amsdal_ml-0.1.0/amsdal_ml/ml_retrievers/openai_retriever.py +39 -0
  39. amsdal_ml-0.1.0/amsdal_ml/ml_retrievers/retriever.py +40 -0
  40. amsdal_ml-0.1.0/amsdal_ml/models/__init__.py +0 -0
  41. amsdal_ml-0.1.0/amsdal_ml/models/embedding_model.py +21 -0
  42. amsdal_ml-0.1.0/amsdal_ml/py.typed +0 -0
  43. amsdal_ml-0.1.0/change-logs.md +0 -0
  44. amsdal_ml-0.1.0/config.yml +20 -0
  45. amsdal_ml-0.1.0/latest-changelogs.md +5 -0
  46. amsdal_ml-0.1.0/license_check.py +38 -0
  47. amsdal_ml-0.1.0/pyproject.toml +151 -0
  48. amsdal_ml-0.1.0/scripts/release.sh +18 -0
  49. amsdal_ml-0.1.0/scripts/tag_check.sh +50 -0
  50. amsdal_ml-0.1.0/tests/__init__.py +0 -0
  51. amsdal_ml-0.1.0/tests/agents_tests/__init__.py +0 -0
  52. amsdal_ml-0.1.0/tests/agents_tests/test_arun.py +28 -0
  53. amsdal_ml-0.1.0/tests/agents_tests/test_astream.py +39 -0
  54. amsdal_ml-0.1.0/tests/agents_tests/test_astream_final_only.py +33 -0
  55. amsdal_ml-0.1.0/tests/agents_tests/test_fakes.py +153 -0
  56. amsdal_ml-0.1.0/tests/agents_tests/test_tool_call_arguments_async.py +25 -0
  57. amsdal_ml-0.1.0/tests/conftest.py +105 -0
  58. amsdal_ml-0.1.0/tests/test_openai_model.py +207 -0
  59. amsdal_ml-0.1.0/uv.lock +3054 -0
File without changes
@@ -0,0 +1 @@
1
+ main
File without changes
@@ -0,0 +1,13 @@
1
+ {
2
+ "application_name": "AmsdalMl",
3
+ "application_uuid": "w17bc914117604324baa11abed99e06f",
4
+ "config_path": "./config.yml",
5
+ "http_port": 8080,
6
+ "check_model_exists": true,
7
+ "is_plugin": true,
8
+ "models_format": "py",
9
+ "indent": 4,
10
+ "verbose": true,
11
+ "vcs": null,
12
+ "src_dir": "amsdal_ml"
13
+ }
@@ -0,0 +1,62 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ license-check:
8
+ name: License check
9
+ runs-on: self-hosted
10
+ steps:
11
+ - name: Reset permissions
12
+ run: |
13
+ sudo chown -R $(id -u):$(id -g) .
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Python install
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.11"
20
+ - name: License check
21
+ run: |
22
+ pip install toml
23
+ python license_check.py
24
+
25
+ test-lint:
26
+ name: Run tests and check style
27
+ needs: [license-check]
28
+ runs-on: self-hosted
29
+ strategy:
30
+ max-parallel: 1
31
+ fail-fast: false
32
+ matrix:
33
+ python-version: ["3.11", "3.12"]
34
+ env:
35
+ PYTHON: ${{ matrix.python-version }}
36
+ DEPS: yes
37
+ _TYPER_FORCE_DISABLE_TERMINAL: true
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - uses: szenius/set-timezone@v2.0
41
+ with:
42
+ timezoneLinux: "EEST"
43
+
44
+ - name: Set up python
45
+ uses: actions/setup-python@v5
46
+ with:
47
+ python-version: ${{ matrix.python-version }}
48
+
49
+ - name: Hatch and UV setup
50
+ run: |
51
+ pip install --upgrade uv hatch
52
+ hatch env prune
53
+ hatch env create
54
+ hatch run sync
55
+
56
+ - name: Run style checks
57
+ if: always()
58
+ run: hatch run all
59
+
60
+ - name: Run tests
61
+ if: always()
62
+ run: hatch run cov tests/
@@ -0,0 +1,99 @@
1
+ name: CD
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7
+
8
+ jobs:
9
+ license-check:
10
+ name: License check
11
+ runs-on: self-hosted
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Python install
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.11"
19
+ - name: License check
20
+ run: |
21
+ pip install toml
22
+ python license_check.py
23
+
24
+ build:
25
+ name: Build and compile
26
+ needs: [license-check]
27
+ runs-on: self-hosted
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ python-version: [ "3.10" ]
32
+ env:
33
+ PYTHON: ${{ matrix.python-version }}
34
+ DEPS: yes
35
+
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+
39
+ - name: Set up python
40
+ uses: actions/setup-python@v5
41
+ with:
42
+ python-version: ${{ matrix.python-version }}
43
+
44
+ - name: Install hatch
45
+ run: |
46
+ python -m pip install --upgrade setuptools
47
+ python -m pip install --upgrade hatch
48
+
49
+ - name: Build
50
+ run: hatch build
51
+
52
+ - name: Store the distribution packages
53
+ uses: actions/upload-artifact@v4
54
+ with:
55
+ name: python-package-distributions
56
+ path: dist/
57
+
58
+ publish:
59
+ name: Publish to PyPi
60
+ runs-on: self-hosted
61
+ needs: build
62
+ strategy:
63
+ fail-fast: false
64
+ matrix:
65
+ python-version: [ "3.10" ]
66
+ steps:
67
+ - name: Set up python
68
+ uses: actions/setup-python@v5
69
+ with:
70
+ python-version: ${{ matrix.python-version }}
71
+
72
+ - name: Download all the dists
73
+ uses: actions/download-artifact@v4
74
+ with:
75
+ name: python-package-distributions
76
+ path: dist/
77
+
78
+ - name: Branch info
79
+ id: branch_info
80
+ run: |
81
+ echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
82
+
83
+ - name: Install hatch
84
+ run: |
85
+ python -m pip install --upgrade setuptools
86
+ python -m pip install --upgrade hatch
87
+
88
+ - name: Publish
89
+ run: |
90
+ hatch publish --user ${{ secrets.PYPI_USERNAME }} --auth ${{ secrets.PYPI_TOKEN }}
91
+
92
+ - name: Create Release
93
+ uses: softprops/action-gh-release@v2
94
+ with:
95
+ body_path: latest-changelogs.md
96
+ files: dist/*
97
+ name: ${{ steps.branch_info.outputs.SOURCE_TAG }}
98
+ draft: false
99
+ prerelease: false
@@ -0,0 +1,29 @@
1
+ name: Tags Check
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ types: [closed]
8
+
9
+
10
+ jobs:
11
+ tags_check:
12
+ name: Tags Check
13
+ if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' && startsWith(github.event.pull_request.head.ref, 'release/')
14
+ runs-on: self-hosted
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ token: ${{ secrets.ACCESS_KEY }}
19
+
20
+ - name: Install jq
21
+ run: |
22
+ sudo apt-get update
23
+ sudo apt-get install -y jq
24
+
25
+ - name: Create tag
26
+ env:
27
+ GITHUB_TOKEN: ${{ secrets.ACCESS_KEY }}
28
+ run: |
29
+ bash ./scripts/tag_check.sh
@@ -0,0 +1,33 @@
1
+ .venv/
2
+ venv/
3
+ /warehouse
4
+
5
+ __pycache__/
6
+ *.py[cod]
7
+ *.pyo
8
+ *.pyd
9
+
10
+ .pytest_cache/
11
+ .coverage
12
+ .coverage.*
13
+ htmlcov/
14
+ .mypy_cache/
15
+ .ruff_cache/
16
+
17
+ build/
18
+ dist/
19
+ *.egg-info/
20
+
21
+ .vscode/
22
+ .idea/
23
+ *.code-workspace
24
+ .DS_Store
25
+ Thumbs.db
26
+
27
+ .env
28
+ .env.*
29
+ !.env.example
30
+
31
+
32
+ transactions/
33
+ migrations/
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: amsdal_ml
3
+ Version: 0.1.0
4
+ Summary: amsdal_ml plugin for AMSDAL Framework
5
+ Requires-Python: >=3.11
6
+ Requires-Dist: aiohttp==3.12.15
7
+ Requires-Dist: amsdal-cli>=0.5.7
8
+ Requires-Dist: amsdal-data>=0.5.9
9
+ Requires-Dist: amsdal-models>=0.5.9
10
+ Requires-Dist: amsdal-utils>=0.5.4
11
+ Requires-Dist: amsdal>=0.5.6
12
+ Requires-Dist: mcp>=0.1
13
+ Requires-Dist: openai==1.100.2
14
+ Requires-Dist: pydantic-settings==2.10.1
15
+ Requires-Dist: pydantic==2.11.7
16
+ Description-Content-Type: text/markdown
17
+
18
+ # amsdal-ml
19
+
20
+ This plugin extends the AMSDAL Framework with machine learning utilities,
21
+ including custom models for embeddings, properties for ML metadata, and
22
+ hooks for working with vector search and AI-driven features.
23
+
24
+ ## Plugin Structure
25
+
26
+ - `src/models/` - Contains model definitions in Python format
27
+ - `src/transactions/` - Contains transaction definitions
28
+ - `pyproject.toml` - Plugin configuration file
29
+ - `config.yml` - Configuration for connections
30
+
31
+ ## Installing this Plugin
32
+
33
+ To use this plugin in an AMSDAL application:
34
+
35
+ 1. Copy the plugin directory to your AMSDAL application
36
+ 2. Import the models and transactions as needed
37
+ 3. Register the plugin in your application configuration
38
+
39
+ ## Development
40
+
41
+ This plugin uses sync mode.
42
+
43
+ ### Adding Models
44
+
45
+ ```bash
46
+ amsdal generate model ModelName --format py
47
+ ```
48
+
49
+ ### Adding Properties
50
+
51
+ ```bash
52
+ amsdal generate property --model ModelName property_name
53
+ ```
54
+
55
+ ### Adding Transactions
56
+
57
+ ```bash
58
+ amsdal generate transaction TransactionName
59
+ ```
60
+
61
+ ### Adding Hooks
62
+
63
+ ```bash
64
+ amsdal generate hook --model ModelName on_create
65
+ ```
66
+
67
+ ## Testing
68
+
69
+ Test your plugin by integrating it with an AMSDAL application and running the application's test suite.
@@ -0,0 +1,52 @@
1
+ # amsdal-ml
2
+
3
+ This plugin extends the AMSDAL Framework with machine learning utilities,
4
+ including custom models for embeddings, properties for ML metadata, and
5
+ hooks for working with vector search and AI-driven features.
6
+
7
+ ## Plugin Structure
8
+
9
+ - `src/models/` - Contains model definitions in Python format
10
+ - `src/transactions/` - Contains transaction definitions
11
+ - `pyproject.toml` - Plugin configuration file
12
+ - `config.yml` - Configuration for connections
13
+
14
+ ## Installing this Plugin
15
+
16
+ To use this plugin in an AMSDAL application:
17
+
18
+ 1. Copy the plugin directory to your AMSDAL application
19
+ 2. Import the models and transactions as needed
20
+ 3. Register the plugin in your application configuration
21
+
22
+ ## Development
23
+
24
+ This plugin uses sync mode.
25
+
26
+ ### Adding Models
27
+
28
+ ```bash
29
+ amsdal generate model ModelName --format py
30
+ ```
31
+
32
+ ### Adding Properties
33
+
34
+ ```bash
35
+ amsdal generate property --model ModelName property_name
36
+ ```
37
+
38
+ ### Adding Transactions
39
+
40
+ ```bash
41
+ amsdal generate transaction TransactionName
42
+ ```
43
+
44
+ ### Adding Hooks
45
+
46
+ ```bash
47
+ amsdal generate hook --model ModelName on_create
48
+ ```
49
+
50
+ ## Testing
51
+
52
+ Test your plugin by integrating it with an AMSDAL application and running the application's test suite.