Skip to content

Commit

Permalink
Merge pull request #107 from sashirestela/106-logprobs-are-not-expose…
Browse files Browse the repository at this point in the history
…d-in-chat-completions

Adding logprobs in Chat Completions response
  • Loading branch information
sashirestela authored Apr 23, 2024
2 parents 64cabcb + d8ba9db commit 8b269fb
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.sashirestela</groupId>
<artifactId>simple-openai</artifactId>
<version>2.3.0</version>
<version>2.3.1</version>
<packaging>jar</packaging>

<name>simple-openai</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ public class Choice {

private String finishReason;

private LogprobInfo logprobs;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package io.github.sashirestela.openai.domain.chat;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

@NoArgsConstructor
@Getter
@ToString
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class LogprobInfo {

private List<TokenLogprob> content;

@NoArgsConstructor
@Getter
@ToString
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class TokenLogprob {

private String token;
private Double logprob;
private List<Integer> bytes;
private List<TopLogprob> topLogprobs;

}

@NoArgsConstructor
@Getter
@ToString
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public static class TopLogprob {

private String token;
private Double logprob;
private List<Integer> bytes;

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void testChatCompletionsCreateStream() throws IOException {
void testChatCompletionsCreate() throws IOException {
DomainTestingHelper.get().mockForObject(httpClient, "src/test/resources/chatcompletions_create.json");
var chatResponse = openAI.chatCompletions().create(chatTextRequest).join();
System.out.println(chatResponse.firstContent());
System.out.println(chatResponse);
assertNotNull(chatResponse);
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/chatcompletions_create.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "id": "chatcmpl-8LhvWDcE3HDBEorEOKUs5OhHmEi5e", "object": "chat.completion", "created": 1700184434, "model": "gpt-4-1106-preview", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The Pythagorean theorem states that in a right-angled triangle, the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the lengths of the other two sides. Mathematically, \\(a^2 + b^2 = c^2\\)." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 35, "completion_tokens": 67, "total_tokens": 102 }, "system_fingerprint": "fp_a24b4d720c" }
{ "id": "chatcmpl-9HBbLXEoSdGk8EmBuhrbxRi6yn8v7", "object": "chat.completion", "created": 1713883199, "model": "gpt-4-1106-preview", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The Pythagorean theorem states that in a right-angled triangle, the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the lengths of the other two sides. Mathematically, \\(a^2 + b^2 = c^2\\)." }, "logprobs": { "content": [ { "token": "The", "logprob": -0.50839794, "bytes": [ 84, 104, 101 ], "top_logprobs": [ { "token": "The", "logprob": -0.50839794, "bytes": [ 84, 104, 101 ] }, { "token": "Py", "logprob": -0.94589794, "bytes": [ 80, 121 ] } ] }, { "token": " Py", "logprob": -9.4914985e-6, "bytes": [ 32, 80, 121 ], "top_logprobs": [ { "token": " Py", "logprob": -9.4914985e-6, "bytes": [ 32, 80, 121 ] }, { "token": " theorem", "logprob": -11.765635, "bytes": [ 32, 116, 104, 101, 111, 114, 101, 109 ] } ] }, { "token": "thag", "logprob": 0.0, "bytes": [ 116, 104, 97, 103 ], "top_logprobs": [ { "token": "thag", "logprob": 0.0, "bytes": [ 116, 104, 97, 103 ] }, { "token": "th", "logprob": -17.953125, "bytes": [ 116, 104 ] } ] }, { "token": "orean", "logprob": -0.0022244835, "bytes": [ 111, 114, 101, 97, 110 ], "top_logprobs": [ { "token": "orean", "logprob": -0.0022244835, "bytes": [ 111, 114, 101, 97, 110 ] }, { "token": "oras", "logprob": -6.1115994, "bytes": [ 111, 114, 97, 115 ] } ] }, { "token": " theorem", "logprob": -0.28115234, "bytes": [ 32, 116, 104, 101, 111, 114, 101, 109 ], "top_logprobs": [ { "token": " theorem", "logprob": -0.28115234, "bytes": [ 32, 116, 104, 101, 111, 114, 101, 109 ] }, { "token": " The", "logprob": -1.4061524, "bytes": [ 32, 84, 104, 101 ] } ] }, { "token": " states", "logprob": -0.0005667338, "bytes": [ 32, 115, 116, 97, 116, 101, 115 ], "top_logprobs": [ { "token": " states", "logprob": -0.0005667338, "bytes": [ 32, 115, 116, 97, 116, 101, 115 ] }, { "token": " asserts", "logprob": -7.969317, "bytes": [ 32, 97, 115, 115, 101, 114, 116, 115 ] } ] }, { "token": " that", "logprob": -0.014127547, "bytes": [ 32, 116, 104, 97, 116 ], "top_logprobs": [ { "token": " that", "logprob": -0.014127547, "bytes": [ 32, 116, 104, 97, 116 ] }, { "token": ":", "logprob": -4.3266277, "bytes": [ 58 ] } ] }, { "token": " in", "logprob": -0.045742918, "bytes": [ 32, 105, 110 ], "top_logprobs": [ { "token": " in", "logprob": -0.045742918, "bytes": [ 32, 105, 110 ] }, { "token": ",", "logprob": -3.389493, "bytes": [ 44 ] } ] }, { "token": " a", "logprob": -0.000042510914, "bytes": [ 32, 97 ], "top_logprobs": [ { "token": " a", "logprob": -0.000042510914, "bytes": [ 32, 97 ] }, { "token": " any", "logprob": -10.281293, "bytes": [ 32, 97, 110, 121 ] } ] }, { "token": " right", "logprob": -5.5122365e-7, "bytes": [ 32, 114, 105, 103, 104, 116 ], "top_logprobs": [ { "token": " right", "logprob": -5.5122365e-7, "bytes": [ 32, 114, 105, 103, 104, 116 ] }, { "token": " ", "logprob": -15.640626, "bytes": [ 32 ] } ] }, { "token": "-", "logprob": -0.12488303, "bytes": [ 45 ], "top_logprobs": [ { "token": "-", "logprob": -0.12488303, "bytes": [ 45 ] }, { "token": " triangle", "logprob": -2.156133, "bytes": [ 32, 116, 114, 105, 97, 110, 103, 108, 101 ] } ] }, { "token": "angled", "logprob": -2.4584822e-6, "bytes": [ 97, 110, 103, 108, 101, 100 ], "top_logprobs": [ { "token": "angled", "logprob": -2.4584822e-6, "bytes": [ 97, 110, 103, 108, 101, 100 ] }, { "token": "angle", "logprob": -13.546878, "bytes": [ 97, 110, 103, 108, 101 ] } ] }, { "token": " triangle", "logprob": -4.246537e-6, "bytes": [ 32, 116, 114, 105, 97, 110, 103, 108, 101 ], "top_logprobs": [ { "token": " triangle", "logprob": -4.246537e-6, "bytes": [ 32, 116, 114, 105, 97, 110, 103, 108, 101 ] }, { "token": " (", "logprob": -12.750004, "bytes": [ 32, 40 ] } ] }, { "token": ",", "logprob": -0.0033466825, "bytes": [ 44 ], "top_logprobs": [ { "token": ",", "logprob": -0.0033466825, "bytes": [ 44 ] }, { "token": " the", "logprob": -5.706472, "bytes": [ 32, 116, 104, 101 ] } ] }, { "token": " the", "logprob": -1.2664457e-6, "bytes": [ 32, 116, 104, 101 ], "top_logprobs": [ { "token": " the", "logprob": -1.2664457e-6, "bytes": [ 32, 116, 104, 101 ] }, { "token": " square", "logprob": -15.328126, "bytes": [ 32, 115, 113, 117, 97, 114, 101 ] } ] }, { "token": " square", "logprob": -0.0051311697, "bytes": [ 32, 115, 113, 117, 97, 114, 101 ], "top_logprobs": [ { "token": " square", "logprob": -0.0051311697, "bytes": [ 32, 115, 113, 117, 97, 114, 101 ] }, { "token": " area", "logprob": -5.7551312, "bytes": [ 32, 97, 114, 101, 97 ] } ] }, { "token": " of", "logprob": -0.000027372049, "bytes": [ 32, 111, 102 ], "top_logprobs": [ { "token": " of", "logprob": -0.000027372049, "bytes": [ 32, 111, 102 ] }, { "token": " on", "logprob": -11.218778, "bytes": [ 32, 111, 110 ] } ] }, { "token": " the", "logprob": -1.3856493e-6, "bytes": [ 32, 116, 104, 101 ], "top_logprobs": [ { "token": " the", "logprob": -1.3856493e-6, "bytes": [ 32, 116, 104, 101 ] }, { "token": " its", "logprob": -14.375001, "bytes": [ 32, 105, 116, 115 ] } ] }, { "token": " length", "logprob": -0.094683565, "bytes": [ 32, 108, 101, 110, 103, 116, 104 ], "top_logprobs": [ { "token": " length", "logprob": -0.094683565, "bytes": [ 32, 108, 101, 110, 103, 116, 104 ] }, { "token": " hyp", "logprob": -2.4071836, "bytes": [ 32, 104, 121, 112 ] } ] }, { "token": " of", "logprob": -1.6240566e-6, "bytes": [ 32, 111, 102 ], "top_logprobs": [ { "token": " of", "logprob": -1.6240566e-6, "bytes": [ 32, 111, 102 ] }, { "token": " on", "logprob": -14.656252, "bytes": [ 32, 111, 110 ] } ] }, { "token": " the", "logprob": -7.465036e-6, "bytes": [ 32, 116, 104, 101 ], "top_logprobs": [ { "token": " the", "logprob": -7.465036e-6, "bytes": [ 32, 116, 104, 101 ] }, { "token": " hyp", "logprob": -12.140633, "bytes": [ 32, 104, 121, 112 ] } ] }, { "token": " hyp", "logprob": -0.00008566264, "bytes": [ 32, 104, 121, 112 ], "top_logprobs": [ { "token": " hyp", "logprob": -0.00008566264, "bytes": [ 32, 104, 121, 112 ] }, { "token": " longest", "logprob": -9.531336, "bytes": [ 32, 108, 111, 110, 103, 101, 115, 116 ] } ] }, { "token": "oten", "logprob": 0.0, "bytes": [ 111, 116, 101, 110 ], "top_logprobs": [ { "token": "oten", "logprob": 0.0, "bytes": [ 111, 116, 101, 110 ] }, { "token": "ot", "logprob": -17.578125, "bytes": [ 111, 116 ] } ] }, { "token": "use", "logprob": -0.0009718485, "bytes": [ 117, 115, 101 ], "top_logprobs": [ { "token": "use", "logprob": -0.0009718485, "bytes": [ 117, 115, 101 ] }, { "token": "ause", "logprob": -8.047847, "bytes": [ 97, 117, 115, 101 ] } ] }, { "token": " (", "logprob": -0.013627189, "bytes": [ 32, 40 ], "top_logprobs": [ { "token": " (", "logprob": -0.013627189, "bytes": [ 32, 40 ] }, { "token": " is", "logprob": -4.404252, "bytes": [ 32, 105, 115 ] } ] }, { "token": "the", "logprob": -0.45549643, "bytes": [ 116, 104, 101 ], "top_logprobs": [ { "token": "the", "logprob": -0.45549643, "bytes": [ 116, 104, 101 ] }, { "token": "c", "logprob": -1.0804964, "bytes": [ 99 ] } ] }, { "token": " side", "logprob": -0.0013569058, "bytes": [ 32, 115, 105, 100, 101 ], "top_logprobs": [ { "token": " side", "logprob": -0.0013569058, "bytes": [ 32, 115, 105, 100, 101 ] }, { "token": " longest", "logprob": -6.610732, "bytes": [ 32, 108, 111, 110, 103, 101, 115, 116 ] } ] }, { "token": " opposite", "logprob": -0.00001700133, "bytes": [ 32, 111, 112, 112, 111, 115, 105, 116, 101 ], "top_logprobs": [ { "token": " opposite", "logprob": -0.00001700133, "bytes": [ 32, 111, 112, 112, 111, 115, 105, 116, 101 ] }, { "token": " opposing", "logprob": -11.281267, "bytes": [ 32, 111, 112, 112, 111, 115, 105, 110, 103 ] } ] }, { "token": " the", "logprob": -0.0010618675, "bytes": [ 32, 116, 104, 101 ], "top_logprobs": [ { "token": " the", "logprob": -0.0010618675, "bytes": [ 32, 116, 104, 101 ] }, { "token": " to", "logprob": -6.860437, "bytes": [ 32, 116, 111 ] } ] }, { "token": " right", "logprob": -1.504853e-6, "bytes": [ 32, 114, 105, 103, 104, 116 ], "top_logprobs": [ { "token": " right", "logprob": -1.504853e-6, "bytes": [ 32, 114, 105, 103, 104, 116 ] }, { "token": " ", "logprob": -13.859377, "bytes": [ 32 ] } ] }, { "token": " angle", "logprob": -0.00012130453, "bytes": [ 32, 97, 110, 103, 108, 101 ], "top_logprobs": [ { "token": " angle", "logprob": -0.00012130453, "bytes": [ 32, 97, 110, 103, 108, 101 ] }, { "token": "-angle", "logprob": -9.031371, "bytes": [ 45, 97, 110, 103, 108, 101 ] } ] }, { "token": ")", "logprob": -0.00008375538, "bytes": [ 41 ], "top_logprobs": [ { "token": ")", "logprob": -0.00008375538, "bytes": [ 41 ] }, { "token": "),", "logprob": -9.718834, "bytes": [ 41, 44 ] } ] }, { "token": " is", "logprob": -0.015789865, "bytes": [ 32, 105, 115 ], "top_logprobs": [ { "token": " is", "logprob": -0.015789865, "bytes": [ 32, 105, 115 ] }, { "token": " equals", "logprob": -4.156415, "bytes": [ 32, 101, 113, 117, 97, 108, 115 ] } ] }, { "token": " equal", "logprob": -4.4849444e-6, "bytes": [ 32, 101, 113, 117, 97, 108 ], "top_logprobs": [ { "token": " equal", "logprob": -4.4849444e-6, "bytes": [ 32, 101, 113, 117, 97, 108 ] }, { "token": " the", "logprob": -12.48438, "bytes": [ 32, 116, 104, 101 ] } ] }, { "token": " to", "logprob": -5.2001665e-6, "bytes": [ 32, 116, 111 ], "top_logprobs": [ { "token": " to", "logprob": -5.2001665e-6, "bytes": [ 32, 116, 111 ] }, { "token": " ", "logprob": -14.179692, "bytes": [ 32 ] } ] }, { "token": " the", "logprob": -4.3202e-7, "bytes": [ 32, 116, 104, 101 ], "top_logprobs": [ { "token": " the", "logprob": -4.3202e-7, "bytes": [ 32, 116, 104, 101 ] }, { "token": " sum", "logprob": -15.234375, "bytes": [ 32, 115, 117, 109 ] } ] }, { "token": " sum", "logprob": -0.000014974867, "bytes": [ 32, 115, 117, 109 ], "top_logprobs": [ { "token": " sum", "logprob": -0.000014974867, "bytes": [ 32, 115, 117, 109 ] }, { "token": " sums", "logprob": -11.23439, "bytes": [ 32, 115, 117, 109, 115 ] } ] }, { "token": " of", "logprob": -2.3392786e-6, "bytes": [ 32, 111, 102 ], "top_logprobs": [ { "token": " of", "logprob": -2.3392786e-6, "bytes": [ 32, 111, 102 ] }, { "token": " the", "logprob": -14.859377, "bytes": [ 32, 116, 104, 101 ] } ] }, { "token": " the", "logprob": -0.000023915141, "bytes": [ 32, 116, 104, 101 ], "top_logprobs": [ { "token": " the", "logprob": -0.000023915141, "bytes": [ 32, 116, 104, 101 ] }, { "token": " squares", "logprob": -10.656274, "bytes": [ 32, 115, 113, 117, 97, 114, 101, 115 ] } ] }, { "token": " squares", "logprob": -1.9816675e-6, "bytes": [ 32, 115, 113, 117, 97, 114, 101, 115 ], "top_logprobs": [ { "token": " squares", "logprob": -1.9816675e-6, "bytes": [ 32, 115, 113, 117, 97, 114, 101, 115 ] }, { "token": " square", "logprob": -13.468752, "bytes": [ 32, 115, 113, 117, 97, 114, 101 ] } ] }, { "token": " of", "logprob": -0.000018074163, "bytes": [ 32, 111, 102 ], "top_logprobs": [ { "token": " of", "logprob": -0.000018074163, "bytes": [ 32, 111, 102 ] }, { "token": " on", "logprob": -11.171893, "bytes": [ 32, 111, 110 ] } ] }, { "token": " the", "logprob": -0.00011105302, "bytes": [ 32, 116, 104, 101 ], "top_logprobs": [ { "token": " the", "logprob": -0.00011105302, "bytes": [ 32, 116, 104, 101 ] }, { "token": " lengths", "logprob": -9.109486, "bytes": [ 32, 108, 101, 110, 103, 116, 104, 115 ] } ] }, { "token": " lengths", "logprob": -0.025932262, "bytes": [ 32, 108, 101, 110, 103, 116, 104, 115 ], "top_logprobs": [ { "token": " lengths", "logprob": -0.025932262, "bytes": [ 32, 108, 101, 110, 103, 116, 104, 115 ] }, { "token": " other", "logprob": -3.6665573, "bytes": [ 32, 111, 116, 104, 101, 114 ] } ] }, { "token": " of", "logprob": -2.4584822e-6, "bytes": [ 32, 111, 102 ], "top_logprobs": [ { "token": " of", "logprob": -2.4584822e-6, "bytes": [ 32, 111, 102 ] }, { "token": " ", "logprob": -14.96094, "bytes": [ 32 ] } ] }, { "token": " the", "logprob": -1.6240566e-6, "bytes": [ 32, 116, 104, 101 ], "top_logprobs": [ { "token": " the", "logprob": -1.6240566e-6, "bytes": [ 32, 116, 104, 101 ] }, { "token": " other", "logprob": -13.546877, "bytes": [ 32, 111, 116, 104, 101, 114 ] } ] }, { "token": " other", "logprob": -0.000191024, "bytes": [ 32, 111, 116, 104, 101, 114 ], "top_logprobs": [ { "token": " other", "logprob": -0.000191024, "bytes": [ 32, 111, 116, 104, 101, 114 ] }, { "token": " two", "logprob": -8.593941, "bytes": [ 32, 116, 119, 111 ] } ] }, { "token": " two", "logprob": -1.9361265e-7, "bytes": [ 32, 116, 119, 111 ], "top_logprobs": [ { "token": " two", "logprob": -1.9361265e-7, "bytes": [ 32, 116, 119, 111 ] }, { "token": " sides", "logprob": -17.109375, "bytes": [ 32, 115, 105, 100, 101, 115 ] } ] }, { "token": " sides", "logprob": -1.6240566e-6, "bytes": [ 32, 115, 105, 100, 101, 115 ], "top_logprobs": [ { "token": " sides", "logprob": -1.6240566e-6, "bytes": [ 32, 115, 105, 100, 101, 115 ] }, { "token": " shorter", "logprob": -13.718752, "bytes": [ 32, 115, 104, 111, 114, 116, 101, 114 ] } ] }, { "token": ".", "logprob": -0.11429666, "bytes": [ 46 ], "top_logprobs": [ { "token": ".", "logprob": -0.11429666, "bytes": [ 46 ] }, { "token": ":", "logprob": -2.5361717, "bytes": [ 58 ] } ] }, { "token": " Math", "logprob": -0.27502525, "bytes": [ 32, 77, 97, 116, 104 ], "top_logprobs": [ { "token": " Math", "logprob": -0.27502525, "bytes": [ 32, 77, 97, 116, 104 ] }, { "token": " This", "logprob": -1.8219002, "bytes": [ 32, 84, 104, 105, 115 ] } ] }, { "token": "em", "logprob": -6.704273e-7, "bytes": [ 101, 109 ], "top_logprobs": [ { "token": "em", "logprob": -6.704273e-7, "bytes": [ 101, 109 ] }, { "token": " formula", "logprob": -14.812501, "bytes": [ 32, 102, 111, 114, 109, 117, 108, 97 ] } ] }, { "token": "atically", "logprob": -3.1281633e-7, "bytes": [ 97, 116, 105, 99, 97, 108, 108, 121 ], "top_logprobs": [ { "token": "atically", "logprob": -3.1281633e-7, "bytes": [ 97, 116, 105, 99, 97, 108, 108, 121 ] }, { "token": "atic", "logprob": -16.265625, "bytes": [ 97, 116, 105, 99 ] } ] }, { "token": ",", "logprob": -0.23052111, "bytes": [ 44 ], "top_logprobs": [ { "token": ",", "logprob": -0.23052111, "bytes": [ 44 ] }, { "token": ":", "logprob": -1.5898961, "bytes": [ 58 ] } ] }, { "token": " \\(", "logprob": -0.946616, "bytes": [ 32, 92, 40 ], "top_logprobs": [ { "token": " \\(", "logprob": -0.946616, "bytes": [ 32, 92, 40 ] }, { "token": " it", "logprob": -1.0091159, "bytes": [ 32, 105, 116 ] } ] }, { "token": "a", "logprob": -0.6071696, "bytes": [ 97 ], "top_logprobs": [ { "token": "a", "logprob": -0.6071696, "bytes": [ 97 ] }, { "token": " a", "logprob": -0.9509196, "bytes": [ 32, 97 ] } ] }, { "token": "^", "logprob": -0.0009493336, "bytes": [ 94 ], "top_logprobs": [ { "token": "^", "logprob": -0.0009493336, "bytes": [ 94 ] }, { "token": "^{", "logprob": -6.9696994, "bytes": [ 94, 123 ] } ] }, { "token": "2", "logprob": -1.8624639e-6, "bytes": [ 50 ], "top_logprobs": [ { "token": "2", "logprob": -1.8624639e-6, "bytes": [ 50 ] }, { "token": "{\\", "logprob": -13.578127, "bytes": [ 123, 92 ] } ] }, { "token": " +", "logprob": -0.001658636, "bytes": [ 32, 43 ], "top_logprobs": [ { "token": " +", "logprob": -0.001658636, "bytes": [ 32, 43 ] }, { "token": "+b", "logprob": -6.4079084, "bytes": [ 43, 98 ] } ] }, { "token": " b", "logprob": -0.000015570886, "bytes": [ 32, 98 ], "top_logprobs": [ { "token": " b", "logprob": -0.000015570886, "bytes": [ 32, 98 ] }, { "token": "b", "logprob": -11.281265, "bytes": [ 98 ] } ] }, { "token": "^", "logprob": -4.3202e-7, "bytes": [ 94 ], "top_logprobs": [ { "token": "^", "logprob": -4.3202e-7, "bytes": [ 94 ] }, { "token": "^{", "logprob": -15.46875, "bytes": [ 94, 123 ] } ] }, { "token": "2", "logprob": -1.7432603e-6, "bytes": [ 50 ], "top_logprobs": [ { "token": "2", "logprob": -1.7432603e-6, "bytes": [ 50 ] }, { "token": " ", "logprob": -13.515627, "bytes": [ 32 ] } ] }, { "token": " =", "logprob": -2.6968896e-6, "bytes": [ 32, 61 ], "top_logprobs": [ { "token": " =", "logprob": -2.6968896e-6, "bytes": [ 32, 61 ] }, { "token": "=", "logprob": -13.468753, "bytes": [ 61 ] } ] }, { "token": " c", "logprob": -1.147242e-6, "bytes": [ 32, 99 ], "top_logprobs": [ { "token": " c", "logprob": -1.147242e-6, "bytes": [ 32, 99 ] }, { "token": " h", "logprob": -14.515626, "bytes": [ 32, 104 ] } ] }, { "token": "^", "logprob": -6.704273e-7, "bytes": [ 94 ], "top_logprobs": [ { "token": "^", "logprob": -6.704273e-7, "bytes": [ 94 ] }, { "token": "^{", "logprob": -14.437501, "bytes": [ 94, 123 ] } ] }, { "token": "2", "logprob": 0.0, "bytes": [ 50 ], "top_logprobs": [ { "token": "2", "logprob": 0.0, "bytes": [ 50 ] }, { "token": " ", "logprob": -16.828125, "bytes": [ 32 ] } ] }, { "token": "\\", "logprob": -0.005430358, "bytes": [ 92 ], "top_logprobs": [ { "token": "\\", "logprob": -0.005430358, "bytes": [ 92 ] }, { "token": "\\)", "logprob": -5.521055, "bytes": [ 92, 41 ] } ] }, { "token": ").", "logprob": -0.15103681, "bytes": [ 41, 46 ], "top_logprobs": [ { "token": ").", "logprob": -0.15103681, "bytes": [ 41, 46 ] }, { "token": "),", "logprob": -2.0104117, "bytes": [ 41, 44 ] } ] } ] }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 35, "completion_tokens": 67, "total_tokens": 102 }, "system_fingerprint": "fp_fb84c680ea" }

0 comments on commit 8b269fb

Please sign in to comment.