Skip to content

Commit db5de35

Browse files
committed
Fix: Prediction model
1 parent 86527db commit db5de35

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/services/cnn/openai_vision.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def predict(image_bytes) -> Tuple[List[Tuple[str, float]], List[float]]:
108108
"temperature": 1,
109109
"max_output_tokens": 2048,
110110
"top_p": 1,
111-
"text": {"format": {"type": "json"}},
111+
"text": {"format": {"type": "json_object"}},
112112
"reasoning": {},
113113
"store": True
114114
}

test/test_cnn/test_openai_vision.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_predict_with_successful_response(mock_openai_client, mock_image_bytes,
7373
assert call_args['temperature'] == 1
7474
assert call_args['max_output_tokens'] == 2048
7575
assert call_args['top_p'] == 1
76-
assert call_args['text'] == {"format": {"type": "json"}}
76+
assert call_args['text'] == {"format": {"type": "json_object"}}
7777
assert call_args['reasoning'] == {}
7878
assert call_args['store'] is True
7979

0 commit comments

Comments
 (0)