diff --git a/tests/test_autocommit_model.py b/tests/test_autocommit_model.py index bfdc6315..725b8fe2 100644 --- a/tests/test_autocommit_model.py +++ b/tests/test_autocommit_model.py @@ -2,9 +2,6 @@ from ell.configurator import config import anthropic -ell.init(verbose=True, autocommit_model="gpt-4o-mini") -# ell.init(verbose=True, autocommit_model="claude-3-haiku-20240307") - test1_v1 = '''import ell import numpy as np @@ -57,17 +54,23 @@ def write_a_chord_progression_for_song(genre: Optional[str], key : Optional[str] ]""" -from ell.util.differ import write_commit_message_for_diff -# test 1 -(response, *args) = write_commit_message_for_diff(test1_v1, test1_v2) -print(response) +import os + +if os.environ.get("OPENAI_API_KEY"): + from ell.util.differ import write_commit_message_for_diff + ell.init(verbose=True, autocommit_model="gpt-4o-mini") + # ell.init(verbose=True, autocommit_model="claude-3-haiku-20240307") + def test_commit_message_1(): + # test 1 + (response, *args) = write_commit_message_for_diff(test1_v1, test1_v2) + print(response) -# test 2 -(response, *args) = write_commit_message_for_diff(test2_v1, test2_v2) -print(response) + # test 2 + (response, *args) = write_commit_message_for_diff(test2_v1, test2_v2) + print(response) -### --BEFORE PROMPT CHANGES-- ### + ### --BEFORE PROMPT CHANGES-- ### ### CLAUDE 3 HAIKU ### # Test 1: