rag007 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.
@@ -0,0 +1,32 @@
1
+ # ── Azure OpenAI ─────────────────────────────────────────────────────────────
2
+ AZURE_OPENAI_ENDPOINT=https://<your-resource-name>.cognitiveservices.azure.com/
3
+ AZURE_OPENAI_API_KEY=<your-azure-openai-api-key>
4
+ AZURE_OPENAI_DEPLOYMENT=gpt-5.4-mini
5
+ AZURE_OPENAI_FAST_DEPLOYMENT=gpt-5.4-nano
6
+ AZURE_OPENAI_GENERATION_DEPLOYMENT=brain
7
+ AZURE_OPENAI_API_VERSION=2024-12-01-preview
8
+
9
+ AZURE_OPENAI_EMBEDDING_DEPLOYMENT=text-embedding-3-small
10
+
11
+ # ── Azure Cohere (reranker) ───────────────────────────────────────────────────
12
+ AZURE_COHERE_ENDPOINT=https://<your-cohere-endpoint>.services.ai.azure.com/providers/cohere/v2/rerank
13
+ AZURE_COHERE_API_KEY=<your-azure-cohere-api-key>
14
+ AZURE_COHERE_DEPLOYMENT=<your-cohere-deployment>
15
+
16
+ # ── Meilisearch ───────────────────────────────────────────────────────────────
17
+ MEILI_URL=https://<your-meilisearch-url>
18
+ MEILI_KEY=<your-meilisearch-key>
19
+ MS_INDEX=onetrade_articles_de
20
+
21
+
22
+ AZURE_SEARCH_ENDPOINT=https://<your-ai-search-instance>.search.windows.net
23
+ AZURE_SEARCH_API_KEY=<your-admin-or-query-key>
24
+
25
+ # ── AgenticRAG tuning (optional — override defaults) ──────────────────────────
26
+ RAG_TOP_K=10
27
+ RAG_RERANK_TOP_N=5
28
+ RAG_RETRIEVAL_FACTOR=2
29
+ RAG_MAX_ITER=3
30
+ RAG_N_SWARM_QUERIES=4
31
+ RAG_EMBEDDER_NAME=azure_openai
32
+ RAG_SEMANTIC_RATIO=0.5
@@ -0,0 +1,104 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+
19
+ - name: Install ruff
20
+ run: pip install ruff
21
+
22
+ - name: Lint
23
+ run: ruff check rag007
24
+
25
+ - name: Format check
26
+ run: ruff format --check rag007
27
+
28
+ test:
29
+ runs-on: ubuntu-latest
30
+ strategy:
31
+ matrix:
32
+ python-version: ["3.11", "3.12", "3.13"]
33
+
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+
37
+ - uses: actions/setup-python@v5
38
+ with:
39
+ python-version: ${{ matrix.python-version }}
40
+
41
+ - name: Install package + test deps
42
+ run: pip install -e ".[duckdb,chromadb]" pytest faker python-dotenv
43
+
44
+ - name: Generate fake test data
45
+ run: python tests/generate_fake_data.py
46
+
47
+ - name: Run tests
48
+ run: pytest tests/ -v --ignore=tests/test_mteb_benchmark.py --ignore=tests/eval.py --ignore=tests/intelligence_eval.py --ignore=tests/test_ir_benchmarks.py
49
+ env:
50
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
51
+
52
+ test-backends:
53
+ runs-on: ubuntu-latest
54
+ services:
55
+ pgvector:
56
+ image: pgvector/pgvector:pg17
57
+ env:
58
+ POSTGRES_USER: test
59
+ POSTGRES_PASSWORD: test
60
+ POSTGRES_DB: testdb
61
+ ports:
62
+ - 5433:5432
63
+ options: >-
64
+ --health-cmd "pg_isready -U test -d testdb"
65
+ --health-interval 3s
66
+ --health-timeout 5s
67
+ --health-retries 10
68
+ meilisearch:
69
+ image: getmeili/meilisearch:v1.13
70
+ env:
71
+ MEILI_MASTER_KEY: masterKey
72
+ MEILI_ENV: development
73
+ ports:
74
+ - 7700:7700
75
+ options: >-
76
+ --health-cmd "curl -sf http://localhost:7700/health || exit 1"
77
+ --health-interval 3s
78
+ --health-timeout 5s
79
+ --health-retries 10
80
+ qdrant:
81
+ image: qdrant/qdrant:v1.14.0
82
+ ports:
83
+ - 6333:6333
84
+ options: >-
85
+ --health-cmd "curl -sf http://localhost:6333/healthz || exit 1"
86
+ --health-interval 3s
87
+ --health-timeout 5s
88
+ --health-retries 10
89
+
90
+ steps:
91
+ - uses: actions/checkout@v4
92
+
93
+ - uses: actions/setup-python@v5
94
+ with:
95
+ python-version: "3.12"
96
+
97
+ - name: Install package + all backend deps
98
+ run: pip install -e ".[all]" pytest faker python-dotenv
99
+
100
+ - name: Generate fake test data
101
+ run: python tests/generate_fake_data.py
102
+
103
+ - name: Run backend tests
104
+ run: pytest tests/test_fake_data.py tests/test_backends.py -v --tb=short
@@ -0,0 +1,52 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.12"
17
+
18
+ - name: Install build tools
19
+ run: pip install build
20
+
21
+ - name: Build distributions
22
+ run: python -m build
23
+
24
+ - name: Upload dist artifacts
25
+ uses: actions/upload-artifact@v4
26
+ with:
27
+ name: dist
28
+ path: dist/
29
+
30
+ publish:
31
+ needs: build
32
+ runs-on: ubuntu-latest
33
+ environment: pypi
34
+ permissions:
35
+ id-token: write # required for OIDC trusted publishing (no API token needed)
36
+ contents: write # required for creating GitHub Release
37
+
38
+ steps:
39
+ - name: Download dist artifacts
40
+ uses: actions/download-artifact@v4
41
+ with:
42
+ name: dist
43
+ path: dist/
44
+
45
+ - name: Publish to PyPI
46
+ uses: pypa/gh-action-pypi-publish@release/v1
47
+
48
+ - name: Create GitHub Release
49
+ uses: softprops/action-gh-release@v2
50
+ with:
51
+ generate_release_notes: true
52
+ files: dist/*
@@ -0,0 +1,165 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98
+ __pypackages__/
99
+
100
+ # Celery stuff
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath parsed files
105
+ *.sage.py
106
+
107
+ # Environments
108
+ .env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder project settings
117
+ .spyderproject
118
+ .spyproject
119
+
120
+ # Rope project settings
121
+ .ropeproject
122
+
123
+ # mkdocs documentation
124
+ /site
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
133
+
134
+ # pytype static type analyzer
135
+ .pytype/
136
+
137
+ # Cython debug symbols
138
+ cython_debug/
139
+
140
+ # Claude Code / AI agents
141
+ .claude/
142
+ .agents/
143
+
144
+ # Ruff
145
+ .ruff_cache/
146
+
147
+ # Project data
148
+ data/
149
+
150
+ # Autoresearch artifacts
151
+ autoresearch-*.tsv
152
+ autoresearch-*.log
153
+
154
+ # MTEB benchmark test data
155
+ .mteb_data/
156
+ .lancedb_mteb/
157
+
158
+ # Generated fake test data (regenerate: python tests/generate_fake_data.py)
159
+ tests/fake_customers.json
160
+ tests/fake_products.json
161
+ tests/fake_confusion_products.json
162
+
163
+
164
+ .agents
165
+ .claude
@@ -0,0 +1 @@
1
+ 3.14
rag007-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Dominik Peter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.