DSPy: The framework for programming—not prompting—language models
Python
feat(dspy): rm print
Michael Jones843d63bd8ead
diff --git a/tests/predict/test_chain_of_thought.py b/tests/predict/test_chain_of_thought.pyindex 51fd88f4e..bdc9122c7 100644--- a/tests/predict/test_chain_of_thought.py+++ b/tests/predict/test_chain_of_thought.py@@ -15,10 +15,6 @@ def test_initialization_with_string_signature():]assert predict(question="What is 1+1?").answer == "2"- for message in lm.get_convo(-1)[0]:- print("----")- print(textwrap.indent(message["content"], " "))- print("----")assert lm.get_convo(-1)[0] == [{"role": "system",diff --git a/tests/predict/test_chain_of_thought_with_hint.py b/tests/predict/test_chain_of_thought_with_hint.pyindex 4ae612817..3fff5d2cb 100644--- a/tests/predict/test_chain_of_thought_with_hint.py+++ b/tests/predict/test_chain_of_thought_with_hint.py@@ -74,10 +74,6 @@ def test_cot_with_hint():]assert predict(question="What is 1+1?", hint="think small").answer == "2"- for message in lm.get_convo(-1)[0]:- print("----")- print(textwrap.indent(message["content"], " "))- print("----")assert lm.get_convo(-1)[0] == [{"role": "system",diff --git a/tests/predict/test_predict.py b/tests/predict/test_predict.pyindex 8ccb1970d..cf499474e 100644--- a/tests/predict/test_predict.py+++ b/tests/predict/test_predict.py@@ -46,10 +46,6 @@ def test_call_method():result = predict_instance(input="test input")assert result.output == "test output"- for message in lm.get_convo(-1)[0]:- print("----")- print(textwrap.indent(message["content"], " "))- print("----")assert lm.get_convo(-1)[0] == [{"role": "system",@@ -241,10 +237,6 @@ def test_output_only():dspy.settings.configure(lm=lm)assert predictor().output == "short answer"- for message in lm.get_convo(-1)[0]:- print("----")- print(textwrap.indent(message["content"], " "))- print("----")assert lm.get_convo(-1)[0] == [{"role": "system",diff --git a/tests/teleprompt/test_bootstrap.py b/tests/teleprompt/test_bootstrap.pyindex ed3e61446..ebf23f3b4 100644--- a/tests/teleprompt/test_bootstrap.py+++ b/tests/teleprompt/test_bootstrap.py@@ -80,10 +80,6 @@ def test_bootstrap_effectiveness():prediction = compiled_student(input=trainset[0].input)assert prediction.output == trainset[0].output- for message in lm.get_convo(-1)[0]:- print("----")- print(textwrap.indent(message["content"], " "))- print("----")assert lm.get_convo(-1)[0] == [{"role": "system",diff --git a/tests/teleprompt/test_copro_optimizer.py b/tests/teleprompt/test_copro_optimizer.pyindex 7f391f351..301106dae 100644--- a/tests/teleprompt/test_copro_optimizer.py+++ b/tests/teleprompt/test_copro_optimizer.py@@ -121,10 +121,6 @@ def test_optimization_and_output_verification():assert prediction.output == "Paris"- for message in lm.get_convo(-1)[0]:- print("----")- print(textwrap.indent(message["content"], " "))- print("----")assert lm.get_convo(-1)[0] == [{"role": "system",