redhat-oracle 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.
- redhat_oracle-0.1.0/.github/workflows/main.yml +22 -0
- redhat_oracle-0.1.0/.gitignore +61 -0
- redhat_oracle-0.1.0/Makefile +22 -0
- redhat_oracle-0.1.0/PKG-INFO +152 -0
- redhat_oracle-0.1.0/README.md +111 -0
- redhat_oracle-0.1.0/checks.sh +31 -0
- redhat_oracle-0.1.0/oracle.yaml +133 -0
- redhat_oracle-0.1.0/plan/architecture.md +494 -0
- redhat_oracle-0.1.0/plan/data-flow.md +295 -0
- redhat_oracle-0.1.0/plan/milestones.md +236 -0
- redhat_oracle-0.1.0/pyproject.toml +124 -0
- redhat_oracle-0.1.0/setup.cfg +4 -0
- redhat_oracle-0.1.0/src/redhat_oracle/__init__.py +17 -0
- redhat_oracle-0.1.0/src/redhat_oracle/__main__.py +5 -0
- redhat_oracle-0.1.0/src/redhat_oracle/cli/__init__.py +0 -0
- redhat_oracle-0.1.0/src/redhat_oracle/cli/app.py +541 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/__init__.py +0 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/cache.py +283 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/config.py +349 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/llm/__init__.py +0 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/llm/base.py +34 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/llm/external.py +129 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/llm/ollama.py +85 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/llm/openvino.py +107 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/rag.py +177 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/session.py +138 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/sources/__init__.py +0 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/sources/github.py +396 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/sources/gitlab.py +479 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/sources/jira.py +315 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/sources/pages.py +230 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/sources/slack.py +501 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/sources/slack_creds.py +121 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/sources/web.py +332 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/vectordb/__init__.py +0 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/vectordb/chunker.py +278 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/vectordb/embeddings.py +45 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/vectordb/store.py +378 -0
- redhat_oracle-0.1.0/src/redhat_oracle/core/vectordb/tracker.py +91 -0
- redhat_oracle-0.1.0/src/redhat_oracle/gui/__init__.py +0 -0
- redhat_oracle-0.1.0/src/redhat_oracle/gui/app.py +1608 -0
- redhat_oracle-0.1.0/src/redhat_oracle.egg-info/PKG-INFO +152 -0
- redhat_oracle-0.1.0/src/redhat_oracle.egg-info/SOURCES.txt +56 -0
- redhat_oracle-0.1.0/src/redhat_oracle.egg-info/dependency_links.txt +1 -0
- redhat_oracle-0.1.0/src/redhat_oracle.egg-info/entry_points.txt +2 -0
- redhat_oracle-0.1.0/src/redhat_oracle.egg-info/requires.txt +26 -0
- redhat_oracle-0.1.0/src/redhat_oracle.egg-info/top_level.txt +1 -0
- redhat_oracle-0.1.0/tests/__init__.py +0 -0
- redhat_oracle-0.1.0/tests/conftest.py +19 -0
- redhat_oracle-0.1.0/tests/test_chunker.py +204 -0
- redhat_oracle-0.1.0/tests/test_cli.py +223 -0
- redhat_oracle-0.1.0/tests/test_config.py +245 -0
- redhat_oracle-0.1.0/tests/test_gui.py +420 -0
- redhat_oracle-0.1.0/tests/test_llm_providers.py +269 -0
- redhat_oracle-0.1.0/tests/test_rag.py +304 -0
- redhat_oracle-0.1.0/tests/test_sources.py +357 -0
- redhat_oracle-0.1.0/tests/test_vectordb.py +326 -0
- redhat_oracle-0.1.0/version +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: CI/CD Pipeline
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions: write-all
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
pipeline:
|
|
13
|
+
uses: dmzoneill/dmzoneill/.github/workflows/dispatch.yaml@main
|
|
14
|
+
with:
|
|
15
|
+
pypi-extension: "true"
|
|
16
|
+
test-ready: "true"
|
|
17
|
+
VALIDATE_PYTHON_BLACK: "false"
|
|
18
|
+
VALIDATE_PYTHON_FLAKE8: "false"
|
|
19
|
+
VALIDATE_PYTHON_ISORT: "false"
|
|
20
|
+
VALIDATE_PYTHON_MYPY: "false"
|
|
21
|
+
VALIDATE_PYTHON_PYLINT: "false"
|
|
22
|
+
secrets: inherit
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
*.egg
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
*.whl
|
|
10
|
+
|
|
11
|
+
# Virtual environments
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
env/
|
|
15
|
+
|
|
16
|
+
# IDE
|
|
17
|
+
.idea/
|
|
18
|
+
.vscode/
|
|
19
|
+
*.swp
|
|
20
|
+
*.swo
|
|
21
|
+
*~
|
|
22
|
+
|
|
23
|
+
# Testing
|
|
24
|
+
.pytest_cache/
|
|
25
|
+
.coverage
|
|
26
|
+
htmlcov/
|
|
27
|
+
.mypy_cache/
|
|
28
|
+
.ruff_cache/
|
|
29
|
+
|
|
30
|
+
# OS
|
|
31
|
+
.DS_Store
|
|
32
|
+
Thumbs.db
|
|
33
|
+
|
|
34
|
+
# Project data (local runtime artifacts, not under src/)
|
|
35
|
+
/repos/
|
|
36
|
+
/vectordb/
|
|
37
|
+
/sessions/
|
|
38
|
+
/logs/
|
|
39
|
+
# AI tool configurations
|
|
40
|
+
.claude/
|
|
41
|
+
.cursor/
|
|
42
|
+
.codex/
|
|
43
|
+
.opencode/
|
|
44
|
+
.gemini/
|
|
45
|
+
.aider*
|
|
46
|
+
.cody/
|
|
47
|
+
.tabnine/
|
|
48
|
+
.windsurf/
|
|
49
|
+
.devai/
|
|
50
|
+
.bolt/
|
|
51
|
+
.v0/
|
|
52
|
+
.lovable/
|
|
53
|
+
.codeium/
|
|
54
|
+
CLAUDE.md
|
|
55
|
+
GEMINI.md
|
|
56
|
+
.cursorrules
|
|
57
|
+
.cursorignore
|
|
58
|
+
opencode.json
|
|
59
|
+
copilot-instructions.md
|
|
60
|
+
.github/copilot-instructions.md
|
|
61
|
+
.github/hooks/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.PHONY: setup test-setup test lint typecheck build clean
|
|
2
|
+
|
|
3
|
+
setup:
|
|
4
|
+
pip install -e ".[dev]"
|
|
5
|
+
|
|
6
|
+
test-setup:
|
|
7
|
+
@echo "No additional test setup required"
|
|
8
|
+
|
|
9
|
+
test:
|
|
10
|
+
pytest tests/
|
|
11
|
+
|
|
12
|
+
lint:
|
|
13
|
+
ruff check src/ tests/
|
|
14
|
+
|
|
15
|
+
typecheck:
|
|
16
|
+
mypy src/
|
|
17
|
+
|
|
18
|
+
build:
|
|
19
|
+
python -m build
|
|
20
|
+
|
|
21
|
+
clean:
|
|
22
|
+
rm -rf dist/ build/ src/*.egg-info
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: redhat-oracle
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: AI-powered knowledge assistant for Red Hat engineering teams
|
|
5
|
+
Author: Red Hat Oracle Contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/dmzoneill/redhat-oracle
|
|
8
|
+
Project-URL: Repository, https://github.com/dmzoneill/redhat-oracle
|
|
9
|
+
Project-URL: Issues, https://github.com/dmzoneill/redhat-oracle/issues
|
|
10
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: pydantic>=2.0
|
|
18
|
+
Requires-Dist: pyyaml>=6.0
|
|
19
|
+
Requires-Dist: httpx>=0.27
|
|
20
|
+
Requires-Dist: gitpython>=3.1
|
|
21
|
+
Requires-Dist: chromadb>=0.5
|
|
22
|
+
Requires-Dist: sentence-transformers>=3.0
|
|
23
|
+
Requires-Dist: click>=8.1
|
|
24
|
+
Requires-Dist: prompt-toolkit>=3.0
|
|
25
|
+
Requires-Dist: rich>=13.0
|
|
26
|
+
Requires-Dist: platformdirs>=4.0
|
|
27
|
+
Requires-Dist: PySide6>=6.6
|
|
28
|
+
Requires-Dist: pycookiecheat>=0.7
|
|
29
|
+
Requires-Dist: beautifulsoup4>=4.12
|
|
30
|
+
Provides-Extra: gui
|
|
31
|
+
Requires-Dist: PySide6-WebEngine>=6.6; extra == "gui"
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-xdist>=3.5; extra == "dev"
|
|
36
|
+
Requires-Dist: ruff>=0.8; extra == "dev"
|
|
37
|
+
Requires-Dist: mypy>=1.13; extra == "dev"
|
|
38
|
+
Requires-Dist: types-PyYAML>=6.0; extra == "dev"
|
|
39
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
40
|
+
Requires-Dist: twine>=5.0; extra == "dev"
|
|
41
|
+
|
|
42
|
+
# Red Hat Oracle
|
|
43
|
+
|
|
44
|
+
AI-powered knowledge assistant for Red Hat engineering teams. Ingests GitHub/GitLab repositories, Jira issues, GitLab Pages, public web docs, and Slack conversations, indexes them in a ChromaDB vector store, and provides RAG-based chat via local or cloud LLMs.
|
|
45
|
+
|
|
46
|
+
## Prerequisites
|
|
47
|
+
|
|
48
|
+
- Python 3.11+
|
|
49
|
+
- [Ollama](https://ollama.com/) running locally (recommended LLM backend)
|
|
50
|
+
- Git (for cloning source repos)
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Clone the repo
|
|
56
|
+
git clone git@github.com:dmzoneill/redhat-oracle.git
|
|
57
|
+
cd redhat-oracle
|
|
58
|
+
|
|
59
|
+
# Create a virtual environment
|
|
60
|
+
python3 -m venv .venv
|
|
61
|
+
source .venv/bin/activate
|
|
62
|
+
|
|
63
|
+
# Install in development mode (with dev dependencies)
|
|
64
|
+
pip install -e ".[dev]"
|
|
65
|
+
|
|
66
|
+
# Or install without dev dependencies
|
|
67
|
+
pip install -e .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
Copy and edit the sample config:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
cp oracle.yaml ~/.config/redhat-oracle/oracle.yaml
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Config files are loaded and merged in order (higher precedence wins):
|
|
79
|
+
|
|
80
|
+
1. `/etc/redhat-oracle/oracle.yaml` (system)
|
|
81
|
+
2. `~/.config/redhat-oracle/oracle.yaml` (user)
|
|
82
|
+
3. `./oracle.yaml` (project)
|
|
83
|
+
|
|
84
|
+
### Secrets
|
|
85
|
+
|
|
86
|
+
Tokens are **never** stored in config files. Set them as environment variables:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
export ORACLE_GITHUB_TOKEN="ghp_..."
|
|
90
|
+
export ORACLE_GITLAB_TOKEN="glpat-..."
|
|
91
|
+
export ORACLE_SLACK_TOKEN="xoxb-..."
|
|
92
|
+
export ORACLE_JIRA_TOKEN="..."
|
|
93
|
+
export OPENAI_API_KEY="sk-..." # optional, if using OpenAI
|
|
94
|
+
export ANTHROPIC_API_KEY="sk-ant-..." # optional, if using Anthropic
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Usage
|
|
98
|
+
|
|
99
|
+
### CLI
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
oracle # Start interactive chat
|
|
103
|
+
oracle sync # Sync all configured sources
|
|
104
|
+
oracle status # Show index status
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### GUI (optional)
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pip install -e ".[gui]"
|
|
111
|
+
oracle --gui
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Development
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Run tests
|
|
118
|
+
make test
|
|
119
|
+
|
|
120
|
+
# Lint
|
|
121
|
+
make lint
|
|
122
|
+
|
|
123
|
+
# Type check
|
|
124
|
+
make typecheck
|
|
125
|
+
|
|
126
|
+
# Build distribution
|
|
127
|
+
make build
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Or run commands directly:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
pytest tests/
|
|
134
|
+
ruff check src/ tests/
|
|
135
|
+
mypy src/
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Architecture
|
|
139
|
+
|
|
140
|
+
| Module | Purpose |
|
|
141
|
+
|---|---|
|
|
142
|
+
| `core/config.py` | YAML config loading with Pydantic validation |
|
|
143
|
+
| `core/sources/` | Data source connectors (GitHub, GitLab, Slack, Jira, Pages, Web) |
|
|
144
|
+
| `core/vectordb/` | ChromaDB vector store, AST-aware chunking, change tracking |
|
|
145
|
+
| `core/rag.py` | RAG pipeline: embed query, search, assemble context, stream LLM |
|
|
146
|
+
| `core/cache.py` | Response caching |
|
|
147
|
+
| `cli/app.py` | Click + prompt-toolkit + Rich terminal UI |
|
|
148
|
+
| `gui/app.py` | PySide6 (Qt) desktop GUI |
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Red Hat Oracle
|
|
2
|
+
|
|
3
|
+
AI-powered knowledge assistant for Red Hat engineering teams. Ingests GitHub/GitLab repositories, Jira issues, GitLab Pages, public web docs, and Slack conversations, indexes them in a ChromaDB vector store, and provides RAG-based chat via local or cloud LLMs.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Python 3.11+
|
|
8
|
+
- [Ollama](https://ollama.com/) running locally (recommended LLM backend)
|
|
9
|
+
- Git (for cloning source repos)
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Clone the repo
|
|
15
|
+
git clone git@github.com:dmzoneill/redhat-oracle.git
|
|
16
|
+
cd redhat-oracle
|
|
17
|
+
|
|
18
|
+
# Create a virtual environment
|
|
19
|
+
python3 -m venv .venv
|
|
20
|
+
source .venv/bin/activate
|
|
21
|
+
|
|
22
|
+
# Install in development mode (with dev dependencies)
|
|
23
|
+
pip install -e ".[dev]"
|
|
24
|
+
|
|
25
|
+
# Or install without dev dependencies
|
|
26
|
+
pip install -e .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Configuration
|
|
30
|
+
|
|
31
|
+
Copy and edit the sample config:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cp oracle.yaml ~/.config/redhat-oracle/oracle.yaml
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Config files are loaded and merged in order (higher precedence wins):
|
|
38
|
+
|
|
39
|
+
1. `/etc/redhat-oracle/oracle.yaml` (system)
|
|
40
|
+
2. `~/.config/redhat-oracle/oracle.yaml` (user)
|
|
41
|
+
3. `./oracle.yaml` (project)
|
|
42
|
+
|
|
43
|
+
### Secrets
|
|
44
|
+
|
|
45
|
+
Tokens are **never** stored in config files. Set them as environment variables:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
export ORACLE_GITHUB_TOKEN="ghp_..."
|
|
49
|
+
export ORACLE_GITLAB_TOKEN="glpat-..."
|
|
50
|
+
export ORACLE_SLACK_TOKEN="xoxb-..."
|
|
51
|
+
export ORACLE_JIRA_TOKEN="..."
|
|
52
|
+
export OPENAI_API_KEY="sk-..." # optional, if using OpenAI
|
|
53
|
+
export ANTHROPIC_API_KEY="sk-ant-..." # optional, if using Anthropic
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
### CLI
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
oracle # Start interactive chat
|
|
62
|
+
oracle sync # Sync all configured sources
|
|
63
|
+
oracle status # Show index status
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### GUI (optional)
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install -e ".[gui]"
|
|
70
|
+
oracle --gui
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Run tests
|
|
77
|
+
make test
|
|
78
|
+
|
|
79
|
+
# Lint
|
|
80
|
+
make lint
|
|
81
|
+
|
|
82
|
+
# Type check
|
|
83
|
+
make typecheck
|
|
84
|
+
|
|
85
|
+
# Build distribution
|
|
86
|
+
make build
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Or run commands directly:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pytest tests/
|
|
93
|
+
ruff check src/ tests/
|
|
94
|
+
mypy src/
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Architecture
|
|
98
|
+
|
|
99
|
+
| Module | Purpose |
|
|
100
|
+
|---|---|
|
|
101
|
+
| `core/config.py` | YAML config loading with Pydantic validation |
|
|
102
|
+
| `core/sources/` | Data source connectors (GitHub, GitLab, Slack, Jira, Pages, Web) |
|
|
103
|
+
| `core/vectordb/` | ChromaDB vector store, AST-aware chunking, change tracking |
|
|
104
|
+
| `core/rag.py` | RAG pipeline: embed query, search, assemble context, stream LLM |
|
|
105
|
+
| `core/cache.py` | Response caching |
|
|
106
|
+
| `cli/app.py` | Click + prompt-toolkit + Rich terminal UI |
|
|
107
|
+
| `gui/app.py` | PySide6 (Qt) desktop GUI |
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
MIT
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Install only ruff and mypy if not available (without full dev dependencies)
|
|
5
|
+
if ! command -v ruff &> /dev/null; then
|
|
6
|
+
echo "Installing ruff..." >&2
|
|
7
|
+
pip install --no-cache-dir -q ruff
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
if ! command -v mypy &> /dev/null; then
|
|
11
|
+
echo "Installing mypy..." >&2
|
|
12
|
+
pip install --no-cache-dir -q mypy types-PyYAML
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
echo "Running ruff check..." >&2
|
|
16
|
+
ruff check src/ tests/ >&2
|
|
17
|
+
RUFF_EXIT=$?
|
|
18
|
+
|
|
19
|
+
echo "Running mypy..." >&2
|
|
20
|
+
mypy src/ >&2
|
|
21
|
+
MYPY_EXIT=$?
|
|
22
|
+
|
|
23
|
+
if [ $RUFF_EXIT -ne 0 ] || [ $MYPY_EXIT -ne 0 ]; then
|
|
24
|
+
echo "Checks failed." >&2
|
|
25
|
+
echo 1
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
echo "All checks passed." >&2
|
|
30
|
+
echo 0
|
|
31
|
+
exit 0
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Red Hat Oracle — Configuration
|
|
2
|
+
#
|
|
3
|
+
# Config files are loaded and merged in order (higher precedence wins):
|
|
4
|
+
# 1. /etc/redhat-oracle/oracle.yaml (system, Linux/macOS only)
|
|
5
|
+
# 2. ~/.config/redhat-oracle/oracle.yaml (user)
|
|
6
|
+
# 3. ./oracle.yaml (project / working directory)
|
|
7
|
+
#
|
|
8
|
+
# Secrets: Set token fields to null and use environment variables instead:
|
|
9
|
+
# ORACLE_GITHUB_TOKEN, ORACLE_GITLAB_TOKEN, ORACLE_SLACK_TOKEN
|
|
10
|
+
# OPENAI_API_KEY, ANTHROPIC_API_KEY
|
|
11
|
+
|
|
12
|
+
sources:
|
|
13
|
+
github:
|
|
14
|
+
token: null # Use ORACLE_GITHUB_TOKEN env var
|
|
15
|
+
use_ssh: true
|
|
16
|
+
orgs:
|
|
17
|
+
- name: RedHatInsights
|
|
18
|
+
include: [] # Glob patterns; empty = all repos
|
|
19
|
+
exclude: [] # Glob patterns to skip
|
|
20
|
+
depth: 1 # Shallow clone (null = full history)
|
|
21
|
+
- name: ansible
|
|
22
|
+
include: [] # All repos under github.com/ansible/*
|
|
23
|
+
exclude: []
|
|
24
|
+
depth: 1
|
|
25
|
+
|
|
26
|
+
gitlab:
|
|
27
|
+
token: null # Use ORACLE_GITLAB_TOKEN env var
|
|
28
|
+
use_ssh: true
|
|
29
|
+
instances:
|
|
30
|
+
- url: https://gitlab.cee.redhat.com
|
|
31
|
+
token: null # Instance-specific token override
|
|
32
|
+
groups:
|
|
33
|
+
- name: automation-analytics
|
|
34
|
+
- name: Dataverse
|
|
35
|
+
- name: service
|
|
36
|
+
- name: insights-platform
|
|
37
|
+
- name: releng
|
|
38
|
+
- name: insights-qe
|
|
39
|
+
|
|
40
|
+
slack:
|
|
41
|
+
token: null # Use ORACLE_SLACK_TOKEN env var (bot/user token)
|
|
42
|
+
xoxc_token: null # Use ORACLE_SLACK_XOXC_TOKEN env var (Chrome session)
|
|
43
|
+
d_cookie: null # Use ORACLE_SLACK_D_COOKIE env var (Chrome session)
|
|
44
|
+
workspace_id: "E030G10V24F"
|
|
45
|
+
enterprise_id: ""
|
|
46
|
+
host: redhat.enterprise.slack.com
|
|
47
|
+
channels: [] # Empty = all accessible channels
|
|
48
|
+
history_days: 365
|
|
49
|
+
|
|
50
|
+
jira:
|
|
51
|
+
url: https://issues.redhat.com
|
|
52
|
+
token: null # Use ORACLE_JIRA_TOKEN env var (PAT)
|
|
53
|
+
projects: [RHCLOUD, AAP, ANSTRAT, INSIGHTS]
|
|
54
|
+
max_results: 100
|
|
55
|
+
include_comments: true
|
|
56
|
+
history_days: 365
|
|
57
|
+
|
|
58
|
+
web:
|
|
59
|
+
urls:
|
|
60
|
+
- https://ansible.pages.redhat.com
|
|
61
|
+
- https://clouddot.pages.redhat.com
|
|
62
|
+
- https://clowder.pages.redhat.com
|
|
63
|
+
- https://consoledot.pages.redhat.com
|
|
64
|
+
- https://dataverse.pages.redhat.com
|
|
65
|
+
- https://insights-qe.pages.redhat.com
|
|
66
|
+
- https://konflux.pages.redhat.com
|
|
67
|
+
- https://projects.pages.redhat.com
|
|
68
|
+
- https://service.pages.redhat.com
|
|
69
|
+
timeout: 30
|
|
70
|
+
max_depth: 3 # How many link levels deep to crawl
|
|
71
|
+
max_pages_per_site: 200 # Max pages to fetch per site
|
|
72
|
+
|
|
73
|
+
pages:
|
|
74
|
+
gitlab_url: https://gitlab.cee.redhat.com
|
|
75
|
+
token: null # Uses sources.gitlab.token if null
|
|
76
|
+
depth: 1
|
|
77
|
+
sites:
|
|
78
|
+
- agent-files
|
|
79
|
+
- ai-assisted-coding
|
|
80
|
+
- ansible
|
|
81
|
+
- brq-map
|
|
82
|
+
- consoledot
|
|
83
|
+
- core-platform-apps
|
|
84
|
+
- data-hub
|
|
85
|
+
- dataverse
|
|
86
|
+
- devhub
|
|
87
|
+
- fuse
|
|
88
|
+
- fuse-prod
|
|
89
|
+
- infrastories
|
|
90
|
+
- insights-experiences
|
|
91
|
+
- it-akamai
|
|
92
|
+
- it-platform
|
|
93
|
+
- ocponrhv
|
|
94
|
+
- osbuild
|
|
95
|
+
- osci
|
|
96
|
+
- ospodata
|
|
97
|
+
- poseidon
|
|
98
|
+
- releng-league
|
|
99
|
+
- rhel-lightspeed
|
|
100
|
+
- shiftstack
|
|
101
|
+
- spmm
|
|
102
|
+
- sysdeseng
|
|
103
|
+
- vault
|
|
104
|
+
|
|
105
|
+
# Maximum concurrent git clone/pull operations
|
|
106
|
+
max_concurrent_clones: 5
|
|
107
|
+
|
|
108
|
+
vectordb:
|
|
109
|
+
embeddings:
|
|
110
|
+
provider: sentence-transformers # sentence-transformers | ollama | openai
|
|
111
|
+
model: all-MiniLM-L6-v2 # 384-dim, ~80MB
|
|
112
|
+
batch_size: 64
|
|
113
|
+
|
|
114
|
+
chunking:
|
|
115
|
+
method: ast # ast (Python) / fixed (everything else)
|
|
116
|
+
chunk_size: 500 # Words per chunk (fixed mode)
|
|
117
|
+
chunk_overlap: 50 # Overlap words between chunks
|
|
118
|
+
max_file_size: 524288 # Skip files larger than 512KB
|
|
119
|
+
|
|
120
|
+
llm:
|
|
121
|
+
default_provider: ollama # ollama | openvino | openai | anthropic
|
|
122
|
+
ollama_base_url: http://localhost:11436
|
|
123
|
+
ollama_model: llama3:8b
|
|
124
|
+
openai_api_key: null # Use OPENAI_API_KEY env var
|
|
125
|
+
anthropic_api_key: null # Use ANTHROPIC_API_KEY env var
|
|
126
|
+
|
|
127
|
+
rag:
|
|
128
|
+
top_k: 10 # Number of chunks to retrieve
|
|
129
|
+
min_score: 0.3 # Minimum similarity score threshold
|
|
130
|
+
system_prompt: >
|
|
131
|
+
You are the Red Hat Oracle, an AI assistant with deep knowledge of
|
|
132
|
+
Red Hat engineering codebases and internal communications. Answer questions
|
|
133
|
+
using the provided context. Always cite your sources.
|