library(jsonlite)
library(tidyverse)
load("rbeta-4-2.RData")Beta-Results-Processor
I will begin by loading three things.
- the data that were stored from creating the batch file.
- The queries
Beta42Call <- stream_in(file("rbeta-4-2-Call-Revised.jsonl"))opening file input connection.
Found 500 records...
Imported 500 records. Simplifying...
closing file input connection.
- The Results
Beta42Result <- stream_in(file("rbeta-4-2_output.jsonl"))opening file input connection.
Found 500 records...
Imported 500 records. Simplifying...
closing file input connection.
Merge the call and the result
Beta.4.2.OpenAI <- left_join(Beta42Call,Beta42Result)Joining with `by = join_by(custom_id)`
Full.Beta.4.2 <- left_join(Beta42$params, Beta.4.2.OpenAI)Joining with `by = join_by(custom_id)`
The file is saved as Full.Beta.4.2.RData.
Put the result in the params file.
Full.Beta.4.2$Outcome <- map_chr(Beta42$params$iter, function(x) { unlist(Beta42Result$response$body$choices[[x]][[2]][2]) })
table(Full.Beta.4.2$Outcome)
Normal
500
save(Full.Beta.4.2, file="Full.Beta.4.2.RData")