Skip to content

Commit 2438839

Browse files
committed
fixes
1 parent 12a724c commit 2438839

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# OptiLLM
22

33
<p align="center">
4-
<img src="optillm-logo.png" alt="OptiLLM Logo" width="200" />
4+
<img src="optillm-logo.png" alt="OptiLLM Logo" width="400" />
55
</p>
66

77
<p align="center">

optillm/plugins/json_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_device(self):
2222
else:
2323
return torch.device("cpu")
2424

25-
def __init__(self, model_name: str = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"):
25+
def __init__(self, model_name: str = "google/gemma-3-270m-it"):
2626
"""Initialize the JSON generator with a specific model."""
2727
self.device = self.get_device()
2828
logger.info(f"Using device: {self.device}")

tests/test_json_plugin.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,19 @@ def test_json_generator_init(self, mock_tokenizer, mock_from_transformers):
8282
self.assertIsNotNone(generator.model)
8383
self.assertIsNotNone(generator.tokenizer)
8484

85-
def test_parse_json_schema_to_pydantic(self):
85+
@patch('optillm.plugins.json_plugin.outlines.from_transformers')
86+
@patch('optillm.plugins.json_plugin.AutoModelForCausalLM.from_pretrained')
87+
@patch('optillm.plugins.json_plugin.AutoTokenizer.from_pretrained')
88+
def test_parse_json_schema_to_pydantic(self, mock_tokenizer, mock_model, mock_from_transformers):
8689
"""Test JSON schema to Pydantic model conversion."""
8790
if not PLUGIN_AVAILABLE:
8891
self.skipTest("JSON plugin not available")
8992

93+
# Mock the dependencies
94+
mock_model.return_value = Mock()
95+
mock_tokenizer.return_value = Mock()
96+
mock_from_transformers.return_value = Mock()
97+
9098
# Create JSONGenerator instance
9199
generator = JSONGenerator()
92100

0 commit comments

Comments
 (0)