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