Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesturk committed Nov 25, 2023
1 parent 07b72d9 commit 4fe7e72
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ def _mock_response(**kwargs):
openai.types.completion.CompletionChoice(
index=0,
text="",
message=openai.types.chat.ChatCompletionMessage(content=kwargs.get("content", "hello world"), role="assistant"),
finish_reason= kwargs.get("finish_reason", "stop"),
message=openai.types.chat.ChatCompletionMessage(
content=kwargs.get("content", "hello world"), role="assistant"
),
finish_reason=kwargs.get("finish_reason", "stop"),
logprobs={},
)
],
usage={
"prompt_tokens": kwargs.get("prompt_tokens", 1),
"completion_tokens": kwargs.get("completion_tokens", 1),
"total_tokens": kwargs.get("prompt_tokens", 1) + kwargs.get("completion_tokens", 1),
"total_tokens": kwargs.get("prompt_tokens", 1)
+ kwargs.get("completion_tokens", 1),
},
created=1629200000,
id="cmpl-xxxxxxxxxxxxxxxxxxxx",
Expand Down

0 comments on commit 4fe7e72

Please sign in to comment.