Skip to content

Commit a6ed6cd

Browse files
committed
Save html files from analyze_log
1 parent 5a6a07c commit a6ed6cd

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

libtbx/langchain/run_analyze_log.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ def run(file_name = None,
1616
display_results: bool = True,
1717
text_to_append_to_summary: str = None,
1818
text_to_append_to_analysis: str = None,
19-
provider: str = 'google',
19+
summary_html_file_name = None, # write to these files if supplied
20+
analysis_html_file_name = None, # write to these files if supplied
21+
provider: str = 'openai',
2022
max_analyze_log_tries = 3,
2123
):
2224

@@ -97,7 +99,9 @@ def run(file_name = None,
9799

98100
# Put log summary in an html window
99101
if display_results:
100-
fn = os.path.join(output_file_path,'log_summary.html')
102+
fn = summary_html_file_name
103+
if not fn:
104+
fn = os.path.join(output_file_path,'log_summary.html')
101105
text = log_info.summary
102106
if text_to_append_to_summary:
103107
text += text_to_append_to_summary
@@ -142,7 +146,9 @@ def run(file_name = None,
142146
text = log_info.analysis
143147
if text_to_append_to_analysis:
144148
text += text_to_append_to_analysis
145-
fn = os.path.join(output_file_path,'analysis.html')
149+
fn = analysis_html_file_name
150+
if not fn:
151+
fn = os.path.join(output_file_path,'analysis.html')
146152
save_as_html(text, file_name = fn,
147153
title = 'Analysis of %s' %(file_name))
148154
print("Loading analysis at %s" %(fn))

libtbx/langchain/run_query_docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import os
1111

1212
def run(query_text = None, output_file_path = None, db_dir = None,
13-
timeout= 60, provider = 'google'):
13+
timeout= 60, provider = 'openai'):
1414
"""
1515
Loads the reranking RAG and queries it with a user-provided question.
1616
"""

0 commit comments

Comments
 (0)