ROB-2197 Allow passing custom sys prompt param in Holmes chat endpoint - #1006
Avi-Robusta merged 14 commits into
Conversation
…o newrelic-transactions-embed
WalkthroughThreads an optional Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant Server
participant Builder as build_chat_messages
participant SysUpd as add_or_update_system_prompt
participant LLM
Client->>Server: POST /chat (ChatRequest incl. additional_system_prompt)
Server->>Builder: build_chat_messages(ask, history, ai, config, global_instructions, additional_system_prompt)
Builder->>SysUpd: add_or_update_system_prompt(history, ai, config, additional_system_prompt)
Note over SysUpd: If provided, append additional_system_prompt to the system prompt text
SysUpd-->>Builder: updated conversation messages (with system prompt)
Builder-->>Server: final messages
Server->>LLM: invoke LLM with messages/tools
LLM-->>Server: response
Server-->>Client: chat reply
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…aram-in-ask-holmes
…aram-in-ask-holmes
…s-prompt-param-in-ask-holmes' into ROB-2197-allow-passing-custom-sys-prompt-param-in-ask-holmes
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
server.py (1)
329-336: Add missingadditional_system_promptparameter tobuild_chat_messagessignatureThe
build_chat_messagesfunction currently doesn’t acceptadditional_system_prompt, causing a mismatch when it’s forwarded fromserver.py. Update its definition (and similarlyadd_or_update_system_promptand theChatRequestmodel) to include:def build_chat_messages(..., additional_system_prompt: Optional[str] = None): ...
🧹 Nitpick comments (1)
server.py (1)
254-276: Parity: add additional_system_prompt to workload_health_chatIf product scope allows, pass the field into build_workload_health_chat_messages so health checks support the same customization.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
server.py(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Pre-commit checks
- GitHub Check: llm_evals
🔇 Additional comments (1)
server.py (1)
144-153: Extend support to RCA and follow‑ups for parityConsider threading additional_system_prompt through:
- investigate_issues (/api/investigate)
- stream_investigate_issues (/api/stream/investigate)
- issue_conversation (/api/issue_chat)
This keeps behavior consistent across RCA and follow‑up flows.
Also applies to: 164-189, 285-312
…aram-in-ask-holmes
No description provided.