Skip to content

Commit

Permalink
add response check
Browse files Browse the repository at this point in the history
  • Loading branch information
okdshin committed Nov 28, 2023
1 parent 5cb8f00 commit 9cd8697
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flatline_lsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def forward( # type: ignore
f"http://{self.baseckend_server_host}:{self.baseckend_server_port}/v1/calc_next_token_logits",
json=dict(input_tokens=input_ids[0].tolist()),
)
res.raise_for_status()
return CausalLMOutput(
loss=None,
logits=torch.FloatTensor(res.json()["next_token_logits"]).reshape(
Expand Down

0 comments on commit 9cd8697

Please sign in to comment.