I need some tests for log probs to see how to do it properly
Some checks failed
ci/woodpecker/push/author-tests Pipeline failed
Some checks failed
ci/woodpecker/push/author-tests Pipeline failed
This commit is contained in:
parent
950e83017a
commit
c1a08eeb27
3 changed files with 37 additions and 2 deletions
|
@ -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?
|
||||
}
|
||||
|
||||
|
|
|
@ -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<OpenAIAsync::Types::Results::LogProbs> for details
|
||||
Log probabilities, see L<OpenAIAsync::Types::Results::LogProbs> for details
|
||||
|
||||
=head2 finish_reason
|
||||
|
||||
|
|
35
lib/OpenAIAsync/Types/Results/LogProbs.pod
Normal file
35
lib/OpenAIAsync/Types/Results/LogProbs.pod
Normal file
|
@ -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<OpenAIAsync::Types::Request::Completion>, L<OpenAIAsync::Types::Result::Completion>, L<OpenAIAsync::Client>
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Ryan Voots ...
|
||||
|
||||
=cu
|
Loading…
Add table
Reference in a new issue