-
Notifications
You must be signed in to change notification settings - Fork 16
Description
As of #71, manubot-ai-editor writes output to stdout that is scraped by the ai-revision workflow in the upcoming PR manubot/rootstock#522 to provide an authoritative response to the user about what specific model provider and model was used to revise their manuscript.
This was done for expediency, but as @d33bs mentions in #91 (review) we'd like to get away from relying on print statements and instead use Python's logging features, as raised in #66.
Since we know we'll always need to know the provider/model in the workflow, we don't want to rely on having to run the tool at a specific logging level to scrape the output. Instead, we could write a structured output, say in JSON format, that contains information about the revision run, including the provider and model that were actually used. This file could also be useful for provenance, since it'll be included in the resulting PR and thus version-controlled.
We could start with something as simple as the following:
{
"provider": "openai",
"model": "gpt-4o",
"run_date": "2025-05-14 11:30:00 MDT"
}Perhaps placing it in output, the location for other Manubot build artifacts, could work. Maybe output/ai-editor-run.json?