mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
More Model test cases
This commit is contained in:
parent
10a2288105
commit
d00dca034d
1 changed files with 21 additions and 3 deletions
|
@ -1,10 +1,28 @@
|
|||
import unittest
|
||||
|
||||
from aider.models import Model
|
||||
|
||||
|
||||
class TestModels(unittest.TestCase):
|
||||
def test_max_context_tokens(self):
|
||||
model = Model('gpt-3.5')
|
||||
self.assertEqual(model.max_context_tokens, 4*1024)
|
||||
model = Model("gpt-3.5-turbo")
|
||||
self.assertEqual(model.max_context_tokens, 4 * 1024)
|
||||
|
||||
if __name__ == '__main__':
|
||||
model = Model("gpt-3.5-turbo-16k")
|
||||
self.assertEqual(model.max_context_tokens, 16 * 1024)
|
||||
|
||||
model = Model("gpt-4")
|
||||
self.assertEqual(model.max_context_tokens, 8 * 1024)
|
||||
|
||||
model = Model("gpt-4-32k")
|
||||
self.assertEqual(model.max_context_tokens, 32 * 1024)
|
||||
|
||||
model = Model("gpt-4-0101")
|
||||
self.assertEqual(model.max_context_tokens, 8 * 1024)
|
||||
|
||||
model = Model("gpt-4-32k-2123")
|
||||
self.assertEqual(model.max_context_tokens, 32 * 1024)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue