File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed
Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change 6060 "Extract key error terms, component names, or operators from the log summary to search for similar issues. "
6161 "Include the top 3 most relevant JIRA issues in your final response under a 'Related JIRA Issues' section."
6262 ),
63- "user_suffix" : (
64- "\n - Related JIRA issues (search using search_jira_issues tool with OCPBUGS project "
65- "and include the top 3 most relevant issues)"
66- ),
67- "assistant_suffix" : (
68- "\n \n **Related JIRA Issues:**\n - <Top 3 relevant issues from JIRA search>"
69- ),
7063}
Original file line number Diff line number Diff line change @@ -179,29 +179,20 @@ async def analyze_log_with_gemini(
179179 if has_jira :
180180 logger .info ("Jira MCP tools detected - injecting Jira prompt" )
181181 system_prompt = prompt_config ["system" ] + JIRA_TOOL_PROMPT ["system_suffix" ]
182- user_suffix = JIRA_TOOL_PROMPT ["user_suffix" ]
183- assistant_suffix = JIRA_TOOL_PROMPT ["assistant_suffix" ]
184182 else :
185183 system_prompt = prompt_config ["system" ]
186- user_suffix = ""
187- assistant_suffix = ""
188184
189185 try :
190- formatted_content = (
191- prompt_config [ "user" ]. format ( error_summary = error_summary ) + user_suffix
186+ formatted_content = prompt_config [ "user" ]. format (
187+ error_summary = error_summary
192188 )
193189 except KeyError :
194- formatted_content = (
195- prompt_config ["user" ].format (summary = error_summary ) + user_suffix
196- )
190+ formatted_content = prompt_config ["user" ].format (summary = error_summary )
197191
198192 messages = [
199193 {"role" : "system" , "content" : system_prompt },
200194 {"role" : "user" , "content" : formatted_content },
201- {
202- "role" : "assistant" ,
203- "content" : prompt_config ["assistant" ] + assistant_suffix ,
204- },
195+ {"role" : "assistant" , "content" : prompt_config ["assistant" ]},
205196 ]
206197
207198 # Convert LangChain tools to OpenAI format if provided
You can’t perform that action at this time.
0 commit comments