diff --git a/lib/OpenAIAsync/Types/Results.pm b/lib/OpenAIAsync/Types/Results.pm index 8ba648d..ad30346 100644 --- a/lib/OpenAIAsync/Types/Results.pm +++ b/lib/OpenAIAsync/Types/Results.pm @@ -81,7 +81,7 @@ class OpenAIAsync::Types::Results::LogProbs :does(OpenAIAsync::Types::Base) :Str class OpenAIAsync::Types::Results::CompletionChoices :does(OpenAIAsync::Types::Base) :Struct { field $text :JSONStr; field $index :JSONNum; - field $logprobs :MarshalTo(OpenAIAsync::Types::Results::LogProbs) = undef; # TODO make nicer type? + field $logprobs :MarshalTo([OpenAIAsync::Types::Results::LogProbs]) = undef; # TODO make nicer type? field $finish_reason :JSONStr = undef; # TODO enum? helper funcs for this class? ->is_finished? } diff --git a/lib/OpenAIAsync/Types/Results/CompletionChoices.pod b/lib/OpenAIAsync/Types/Results/CompletionChoices.pod index 1afe016..4e5c190 100644 --- a/lib/OpenAIAsync/Types/Results/CompletionChoices.pod +++ b/lib/OpenAIAsync/Types/Results/CompletionChoices.pod @@ -36,7 +36,7 @@ Index of the choice? I believe this will just always be the same as it's positio =head2 logprobs -Logit probabilities, see L for details +Log probabilities, see L for details =head2 finish_reason diff --git a/lib/OpenAIAsync/Types/Results/LogProbs.pod b/lib/OpenAIAsync/Types/Results/LogProbs.pod new file mode 100644 index 0000000..7633c31 --- /dev/null +++ b/lib/OpenAIAsync/Types/Results/LogProbs.pod @@ -0,0 +1,35 @@ +=pod + +=head1 NAME + +OpenAIAsync::Types::Results::LogProbs + +=head1 DESCRIPTION + +An object representing Log Probabilities from the LLM. + +=head1 SYNOPSIS + + ... TODO? difficult to make an example + +=head1 Fields + +=head2 text_offset + +Which position in the resulting text this log probability represents + +=head2 token_logprobs + +=head2 tokens + +=head2 top_logprobss + +=head1 SEE ALSO + +L, L, L + +=head1 AUTHOR + +Ryan Voots ... + +=cu \ No newline at end of file