Skip to content

Commit

Permalink
[CLEANUP]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Dec 10, 2023
1 parent c911c67 commit 6be91cf
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/models/test_gpt4_vision_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,6 @@ def test_initialization_with_custom_key():
assert api.openai_api_key == custom_key


def test_run_successful_response(gpt_api):
task = "What is in the image?"
img_url = img
response_json = {
"choices": [{"text": "Answer from GPT-4 Vision"}]
}
mock_response = Mock()
mock_response.json.return_value = response_json
with patch(
"requests.post", return_value=mock_response
) as mock_post:
result = gpt_api.run(task, img_url)
mock_post.assert_called_once()
assert result == response_json["choices"][0]["text"]


def test_run_with_exception(gpt_api):
task = "What is in the image?"
Expand Down

0 comments on commit 6be91cf

Please sign in to comment.