Beta-Results-Processor

I will begin by loading three things.

  1. the data that were stored from creating the batch file.
library(jsonlite)
library(tidyverse)
load("rbeta-1-2.RData")
  1. The queries
Beta12Call <- stream_in(file("rbeta-1-2-Call-Revised-0806.jsonl"))
opening file input connection.

 Found 500 records...
 Imported 500 records. Simplifying...
closing file input connection.
  1. The Results
Beta12Result <- stream_in(file("rbeta_1_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.1.2.OpenAI <- left_join(Beta12Call,Beta12Result)
Joining with `by = join_by(custom_id)`
Full.Beta.1.2.0806 <- left_join(Beta12$params, Beta.1.2.OpenAI)
Joining with `by = join_by(custom_id)`

The file is saved as Full.Beta.1.2.0806.RData.

Put the result in the params file.

Full.Beta.1.2.0806$Outcome <- map_chr(Beta12$params$iter, function(x) { unlist(Beta12Result$response$body$choices[[x]][[2]][2]) })
table(Full.Beta.1.2.0806$Outcome)

       Beta Exponential      Normal     Uniform 
        396          34           4          66 
save(Full.Beta.1.2.0806, file="Full.Beta.1.2.0806.RData")