Skip to content

Commit

Permalink
Allow cost estimation on gpt-4-0613 (same as gpt-4-0314).
Browse files Browse the repository at this point in the history
  • Loading branch information
codeofdusk committed Jun 24, 2023
1 parent 9fa2a63 commit 4a48e49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gptcmd/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@ async def asend(self) -> Union[Message, AioMessageStream]:
def _post_send(self, resp, stream_cls: Type[S]) -> Union[Message, S]:
"Handles API response objects generated by openai."
if not self.stream:
if resp.model != "gpt-4-0314" and resp.model.startswith("gpt-4"):
if resp.model not in (
"gpt-4-0314",
"gpt-4-0613",
) and resp.model.startswith("gpt-4"):
self.prompt_tokens = None
self.sampled_tokens = None
if self.prompt_tokens is not None:
Expand Down

0 comments on commit 4a48e49

Please sign in to comment.