fix tests
This commit is contained in:
parent
e059ba3c49
commit
7913df4db1
|
|
@ -128,12 +128,12 @@ def test_estimate_tokens():
|
||||||
|
|
||||||
# Test string content
|
# Test string content
|
||||||
assert CiaynAgent._estimate_tokens("test") == 1 # 4 bytes
|
assert CiaynAgent._estimate_tokens("test") == 1 # 4 bytes
|
||||||
assert CiaynAgent._estimate_tokens("hello world") == 2 # 11 bytes
|
assert CiaynAgent._estimate_tokens("hello world") == 3 # 11 bytes
|
||||||
assert CiaynAgent._estimate_tokens("🚀") == 1 # 4 bytes
|
assert CiaynAgent._estimate_tokens("🚀") == 1 # 4 bytes
|
||||||
|
|
||||||
# Test message content
|
# Test message content
|
||||||
msg = HumanMessage(content="test message")
|
msg = HumanMessage(content="test message")
|
||||||
assert CiaynAgent._estimate_tokens(msg) == 3 # 11 bytes
|
assert CiaynAgent._estimate_tokens(msg) == 4 # 11 bytes
|
||||||
|
|
||||||
|
|
||||||
def test_initialize_openai(clean_env, mock_openai):
|
def test_initialize_openai(clean_env, mock_openai):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue