Unverified Commit 9d02bb3e authored by Mick's avatar Mick Committed by GitHub
Browse files

Urgent model support: support gemma-3-it (#4424)

parent 402db5c5
...@@ -75,7 +75,8 @@ class TestOpenAIVisionServer(unittest.TestCase): ...@@ -75,7 +75,8 @@ class TestOpenAIVisionServer(unittest.TestCase):
assert response.choices[0].message.role == "assistant" assert response.choices[0].message.role == "assistant"
text = response.choices[0].message.content text = response.choices[0].message.content
assert isinstance(text, str) assert isinstance(text, str)
assert "man" in text or "person" in text, text # `driver` is for gemma-3-it
assert "man" in text or "person" or "driver" in text, text
assert "cab" in text or "taxi" in text or "SUV" in text, text assert "cab" in text or "taxi" in text or "SUV" in text, text
assert "iron" in text, text assert "iron" in text, text
assert response.id assert response.id
...@@ -540,5 +541,27 @@ class TestJanusProServer(TestOpenAIVisionServer): ...@@ -540,5 +541,27 @@ class TestJanusProServer(TestOpenAIVisionServer):
pass pass
class TestGemma3itServer(TestOpenAIVisionServer):
@classmethod
def setUpClass(cls):
cls.model = "google/gemma-3-4b-it"
cls.base_url = DEFAULT_URL_FOR_TEST
cls.api_key = "sk-123456"
cls.process = popen_launch_server(
cls.model,
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
other_args=[
"--trust-remote-code",
"--chat-template",
"gemma-it",
],
)
cls.base_url += "/v1"
def test_video_chat_completion(self):
pass
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment