From 0d44120a63400f947d9fee03dfa10c6b814c544a Mon Sep 17 00:00:00 2001 From: Steve White Date: Sun, 26 Jan 2025 00:25:55 -0600 Subject: [PATCH] Updated README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 8e33ef2..84b33c0 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,23 @@ Go package for automated evaluation of academic papers using LLM-based criteria go get gitea.r8z.us/stwhite/paperprocessor ``` +## API Reference + +### ProcessFile +`func ProcessFile(inputPath, outputPath, criteriaPath string, config Config, debug bool) error` + +Processes papers from input JSON file and writes results to output JSON file + +Parameters: +- inputPath: Path to input JSON file containing papers array +- outputPath: Path to write processing results JSON +- criteriaPath: Path to text file with evaluation criteria +- config: Configuration settings for API and processing +- debug: Enable debug logging when true + +Returns: +- error: Processing error or nil if successful + ## Usage ### Basic Configuration @@ -37,7 +54,11 @@ err := paperprocessor.ProcessFile( "output/results.json", "criteria.txt", config, + true, // debug mode ) +if err != nil { + log.Fatal("Processing failed:", err) +} ``` ## Input Formats