mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
Reverted error while refactoring
This commit is contained in:
parent
07e8cf1d9a
commit
eeac3954d5
2 changed files with 5 additions and 5 deletions
|
@ -38,7 +38,7 @@ def test_multiple_messages_trimming():
|
|||
{"role": "user", "content": "This is a long message that will exceed the token limit."},
|
||||
{"role": "user", "content": "This is another long message that will also exceed the limit."}
|
||||
]
|
||||
trimmed_messages = trim_messages(messages_copy=messages, model="gpt-3.5-turbo", max_tokens=20)
|
||||
trimmed_messages = trim_messages(messages=messages, model="gpt-3.5-turbo", max_tokens=20)
|
||||
# print(get_token_count(messages=trimmed_messages, model="gpt-3.5-turbo"))
|
||||
assert(get_token_count(messages=trimmed_messages, model="gpt-3.5-turbo")) <= 20
|
||||
# test_multiple_messages_trimming()
|
||||
|
@ -48,7 +48,7 @@ def test_multiple_messages_no_trimming():
|
|||
{"role": "user", "content": "This is a long message that will exceed the token limit."},
|
||||
{"role": "user", "content": "This is another long message that will also exceed the limit."}
|
||||
]
|
||||
trimmed_messages = trim_messages(messages_copy=messages, model="gpt-3.5-turbo", max_tokens=100)
|
||||
trimmed_messages = trim_messages(messages=messages, model="gpt-3.5-turbo", max_tokens=100)
|
||||
print("Trimmed messages")
|
||||
print(trimmed_messages)
|
||||
assert(messages==trimmed_messages)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue