release initial code
Co-authored-by: Ying Sheng <sqy1415@gmail.com> Co-authored-by: Liangsheng Yin <hnyls2002@gmail.com> Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu> Co-authored-by: parasol-aser <3848358+parasol-aser@users.noreply.github.com> Co-authored-by: LiviaSun <33578456+ChuyueSun@users.noreply.github.com> Co-authored-by: Cody Yu <hao.yu.cody@gmail.com>
This commit is contained in:
35
test/lang/test_anthropic_backend.py
Normal file
35
test/lang/test_anthropic_backend.py
Normal file
@@ -0,0 +1,35 @@
|
||||
import json
|
||||
import unittest
|
||||
|
||||
from sglang.test.test_programs import test_mt_bench, test_stream
|
||||
|
||||
from sglang import Anthropic, set_default_backend
|
||||
|
||||
|
||||
class TestAnthropicBackend(unittest.TestCase):
|
||||
backend = None
|
||||
chat_backend = None
|
||||
|
||||
def setUp(self):
|
||||
cls = type(self)
|
||||
|
||||
if cls.backend is None:
|
||||
cls.backend = Anthropic("claude-2")
|
||||
set_default_backend(cls.backend)
|
||||
|
||||
def test_mt_bench(self):
|
||||
test_mt_bench()
|
||||
|
||||
def test_stream(self):
|
||||
test_stream()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main(warnings="ignore")
|
||||
|
||||
# from sglang.global_config import global_config
|
||||
|
||||
# global_config.verbosity = 2
|
||||
# t = TestAnthropicBackend()
|
||||
# t.setUp()
|
||||
# t.test_mt_bench()
|
||||
Reference in New Issue
Block a user