feat: advanced prompt backend (#1301)
Co-authored-by: takatost <takatost@gmail.com>
This commit is contained in:
parent
2d1cb076c6
commit
42a5b3ec17
61 changed files with 767 additions and 581 deletions
|
|
@ -52,7 +52,7 @@ def test_chat_get_num_tokens(mock_decrypt):
|
|||
openai_model = get_mock_openai_model('gpt-3.5-turbo')
|
||||
rst = openai_model.get_num_tokens([
|
||||
PromptMessage(type=MessageType.SYSTEM, content='you are a kindness Assistant.'),
|
||||
PromptMessage(type=MessageType.HUMAN, content='Who is your manufacturer?')
|
||||
PromptMessage(type=MessageType.USER, content='Who is your manufacturer?')
|
||||
])
|
||||
assert rst == 22
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue