Migrate healthcare-assistant demo app from galileo to splunk-ao SDK - #735
Closed
etserend wants to merge 8 commits into
Closed
Migrate healthcare-assistant demo app from galileo to splunk-ao SDK#735etserend wants to merge 8 commits into
etserend wants to merge 8 commits into
Conversation
…pp and 3-app - app.py: patch both sync and async OpenAI clients to inject api-version query param (Azure APIM requires it; openai 3.x non-Azure client omits it) - rag.py: honour OPENAI_EMBEDDING_BASE_URL so embeddings route to the correct Azure deployment instead of the chat deployment (which returns 400) - hallucination_helpers.py (2-app, 3-app): wrap retriever+llm spans in a workflow span so the Galileo console shows "Hallucination Demo" as a single root trace instead of two orphan spans - k8s.yaml: add OPENAI_EMBEDDING_BASE_URL, SPLUNK_AO_PROJECT, SPLUNK_AO_AGENT_STREAM; fix secret names (openai-api→openai-secrets, splunk-ao-secret→splunk-ao-secrets); remove splunk-ao-config ConfigMap ref Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…1y support - config.py: add create_chat_llm() and create_embeddings() factory functions that return AzureChatOpenAI/AzureOpenAIEmbeddings when AZURE_OPENAI_ENDPOINT is set, otherwise fall back to ChatOpenAI/OpenAIEmbeddings — replaces the monkey-patch - agent.py: use create_chat_llm(); wrap start_session in try/except so O11y CRUD failures (no session write permission) are non-fatal - app.py: remove Azure monkey-patch (now in create_chat_llm); pass only latest user message per trace; use splunk_ao_context directly for hallucination existing_logger - rag.py: use create_embeddings()/create_chat_llm() from config; remove inline OPENAI_EMBEDDING_BASE_URL handling (subsumed by factory) - hallucination_helpers.py: call set_session() when reusing existing logger so O11y deployments that lack CRUD token don't fail on start_session() - setup_env.py: accept either O11y (REALM+TOKEN) or standalone (API_KEY+CONSOLE_URL) credential sets; remove OPENAI_BASE_URL from required (not needed for Azure) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…bility Plain ChatOpenAI in generate_sql() was routing through OPENAI_BASE_URL (Azure chat deployment) without the api-version param, returning 404. Switching to create_chat_llm() picks up AZURE_OPENAI_ENDPOINT when set so SQL generation works on both Azure and standard OpenAI deployments. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
start_session(external_id=) requires a CRUD POST which returns 403 on ingest-only O11y tokens — silently failing and generating a new SDK session ID per query instead of using the shared UUID from Streamlit session state. Passing session_id= to the __call__ uses set_session() locally, no network call, and correctly groups all traces under one session across multiple user turns. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…pp-with-instrumentation only Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation — Phase 1 (Galileo SDK baseline) ✅
Ran full test session against Galileo staging REST via `_validate_galileo.py`:
Validation — Phase 2 (splunk-ao SDK → Galileo staging REST) ✅
Ran full test session via Streamlit UI at localhost:8540:
Test plan
Closes HYBIM-977