papers/.clinerules

48 lines
1.6 KiB
Plaintext

## Here are the api signatures for arxiva
### FetchPapers(startDate, endDate, query string, maxResults int) ([]Paper, error)
startDate: Start date in format "YYYYMMDD"
endDate: End date in format "YYYYMMDD"
query: Search query
maxResults: Maximum number of results (1-2000)
Fetches papers from arXiv API
### SaveToFile(papers []Paper, startDate, endDate, query string) error
papers: Array of Paper structs
startDate: Start date in format "YYYYMMDD"
endDate: End date in format "YYYYMMDD"
query: Search query
Saves papers to a JSON file
JSON file is named "YYYMMDD-YYYYMMDD-query.json" (where YYYYMMDD is start date and YYYYMMDD is end date and query is search query)
## here is the API signature for paperprocessor:
### 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
You create config like this:
config := paperprocessor.Config{
APIEndpoint: "http://localhost:1234/v1/chat/completions",
APIKey: apiKey,
Model: "qwen2-7b-instruct",
RequestDelay: 2 * time.Second, // 2 second delay between requests
## Here is the usage for paperformatter:
err := paperformatter.FormatPapers("input.json", "output.md")
if err != nil {
log.Fatal(err)
}