monarch-initiative/ontogpt

Update output options for multilingual analysis

Closed this issue · 1 comments

The multilingual analysis function doesn't use the output exporters in the CLI.
It should be able to use those options rather than opening its own output file - minimally, it should be able to append results to the same file rather than attempting to re-open the same file anew each time.

See

ontogpt/src/ontogpt/cli.py

Lines 1504 to 1519 in 2339950

def run_multilingual_analysis(
input_data_dir,
output_directory,
output,
temperature,
cut_input_text,
api_base,
api_version,
model_provider,
system_message,
model,
):
"""Call the multilingual analysis function."""
multilingual_analysis(
input_data_dir=input_data_dir, output_directory=output_directory, output=output, model=model
)

Using
ontogpt run-multilingual-analysis --output=some/path/filename.yaml ...
on an existing some/path/filename.yaml overwrites the file. It would be nice if it could append results, especially for longer runs.