mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 20:23:58 +01:00
Compare commits
1 commit
de2710539f
...
33fd0bf690
Author | SHA1 | Date | |
---|---|---|---|
33fd0bf690 |
|
@ -38,10 +38,10 @@ async def count_for_messages(messages: list, model: str='gpt-3.5-turbo-0613') ->
|
||||||
tokens_per_name = -1 # if there's a name, the role is omitted
|
tokens_per_name = -1 # if there's a name, the role is omitted
|
||||||
|
|
||||||
elif 'gpt-3.5-turbo' in model:
|
elif 'gpt-3.5-turbo' in model:
|
||||||
return count_for_messages(messages, model='gpt-3.5-turbo-0613')
|
return await count_for_messages(messages, model='gpt-3.5-turbo-0613')
|
||||||
|
|
||||||
elif 'gpt-4' in model:
|
elif 'gpt-4' in model:
|
||||||
return count_for_messages(messages, model='gpt-4-0613')
|
return await count_for_messages(messages, model='gpt-4-0613')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError(f"""count_for_messages() is not implemented for model {model}.
|
raise NotImplementedError(f"""count_for_messages() is not implemented for model {model}.
|
||||||
|
|
Loading…
Reference in a new issue