feat(intelligent-assistant): add optional OKP document retrieval - #310
maysunfaisal wants to merge 8 commits into
Conversation
a5384ad to
71536eb
Compare
|
/fs-review |
a37117e to
f288dfc
Compare
|
/agentic_review |
Code Review by Qodo
1. Default document lookup endpoint fails
|
f288dfc to
d730540
Compare
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit d730540 |
|
fyi @rm3l @maysunfaisal pulled in my #328 changes into here to have the IA part of RHDH Local updated in one go. Still have equivalent changes for operator and chart in their own PRs, redhat-developer/rhdh-operator#3612 and redhat-developer/rhdh-chart#549 respectively. |
9cdfa3e to
bfd21d8
Compare
|
@rm3l we had another team discussion about Ollama and decided for RHDH Local to leave the Ollama content in place for the time being given its not RHDH product supported. @maysunfaisal has taken these changes out, but left in my change for the RC release of the target LCORE version. |
|
@rm3l addressed all your reviews, pls take a look, thank you |
| LIGHTSPEED_STACK_OKP_CONFIG=./configs/extra-files/lightspeed-stack-okp.local.yaml | ||
| ``` | ||
|
|
||
| By default, Lightspeed Core reaches the host-published OKP endpoint at `http://host.docker.internal:8081`. LCORE uses this same base URL for generated citation links, so it is directly resolvable by browsers on Podman and Docker Desktop. The endpoint is also available as `http://localhost:8081` on the host. On native Linux, set `OKP_SERVICE_URL` in `.env` to a hostname or IP that is reachable from both the container and browser if `host.docker.internal` is unavailable. |
There was a problem hiding this comment.
so it is directly resolvable by browsers on Podman and Docker Desktop.
[...]
setOKP_SERVICE_URLin.envto a hostname or IP that is reachable from both the container and browser ifhost.docker.internalis unavailable
These seem confusing.. host.docker.internal did not resolve directly from the browser on my Linux. Also, I guess users might also point to an OKP running anywhere, not necessarily if host.docker.internal is unavailable, no?
WDYT about something like this (suggestion from Claude):
| By default, Lightspeed Core reaches the host-published OKP endpoint at `http://host.docker.internal:8081`. LCORE uses this same base URL for generated citation links, so it is directly resolvable by browsers on Podman and Docker Desktop. The endpoint is also available as `http://localhost:8081` on the host. On native Linux, set `OKP_SERVICE_URL` in `.env` to a hostname or IP that is reachable from both the container and browser if `host.docker.internal` is unavailable. | |
| Lightspeed Core uses `OKP_SERVICE_URL` for both document retrieval and browser-facing citation links, so the URL must be reachable from both the container and your browser. The default is `http://host.docker.internal:8081`. | |
| On Docker Desktop and Podman Desktop, `host.docker.internal` resolves in both contexts and no extra configuration is needed. | |
| On native Linux (Docker Engine or rootless Podman without a machine), the container resolves `host.docker.internal` but the host browser does not, which breaks citation links. Either add `127.0.0.1 host.docker.internal` to your host's `/etc/hosts`, or set `OKP_SERVICE_URL` in `.env` to your host's LAN IP (e.g., http://10.10.10.105:8081). | |
| To use an OKP instance running outside the compose stack, set `OKP_SERVICE_URL` in `.env` to its URL. |
There was a problem hiding this comment.
Updated the wording. OKP_SERVICE_URL is now clearly documented as the URL used by both LCORE and browser-facing citations. Desktop environments retain the default, while native Linux users can provide a shared host/LAN IP. I avoided recommending /etc/hosts because native Docker Engine might also lack host.docker.internal inside the container. Verified successfully with Docker on native Linux.
@rm3l rebased with main, could you please take a look and lgtm if its good, thanks...
Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com> Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Co-authored-by: Codex <noreply@openai.com>
1f464a1 to
9eda82e
Compare
Co-authored-by: Codex <noreply@openai.com>
9eda82e to
59ec248
Compare
|



Target branch
Description
This PR integrates Offline Knowledge Portal (OKP) as an optional product-documentation source for Developer Hub Intelligent Assistant in RHDH Local.
registry.redhat.ioor pulling the OKP image.Which issue(s) does this PR fix or relate to
https://redhat.atlassian.net/browse/RHIDP-14136
PR acceptance criteria
How to test changes / Special notes to the reviewer
Intelligent Assistant without OKP (default)
Create a local provider configuration and
.envfile:Uncomment an inference provider in
configs/extra-files/lightspeed-stack.local.yaml, configure its credentials in.env, and add:Start RHDH Local without logging in to
registry.redhat.io:Verify
rhdhandlightspeed-coreare running, nookpcontainer exists, and the following commands return no output:Open http://localhost:7007/intelligent-assistant and verify the chatbot works without OKP-backed documentation or citations.
Intelligent Assistant with OKP (opt-in)
Stop the default deployment and authenticate to the Red Hat registry:
Enable OKP and create an OKP-enabled local provider configuration:
Uncomment the same inference provider in
configs/extra-files/lightspeed-stack-okp.local.yaml, then add to.env:Start and verify the opt-in deployment:
Verify
rhdh,lightspeed-core, andokpare running,okpis healthy, and LCORE has the OKP URL:podman exec lightspeed-core printenv OKP_SERVICE_URLOpen http://localhost:7007/intelligent-assistant, ask an RHDH documentation question, and verify the response contains clickable OKP citations.
Docker users can replace
podmanwithdockerin the commands above.Cleanup