8000 Allow first logprob token to be null to match openai api · HardSoft2023/llama-cpp-python@a634a24 · GitHub
[go: up one dir, main page]

Skip to content

Commit a634a24

Browse files
committed
Allow first logprob token to be null to match openai api
1 parent dc39cc0 commit a634a24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama_cpp/llama_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Embedding(TypedDict):
2222

2323
class CompletionLogprobs(TypedDict):
2424
text_offset: List[int]
25-
token_logprobs: List[float]
25+
token_logprobs: List[Optional[float]]
2626
tokens: List[str]
27-
top_logprobs: List[Dict[str, float]]
27+
top_logprobs: List[Optional[Dict[str, float]]]
2828

2929

3030
class CompletionChoice(TypedDict):

0 commit comments

Comments
 (0)
0