DSPy: The framework for programming—not prompting—language models
Python
small fix, to update _openai_client
KCaverly745aaf2a7f16
diff --git a/dsp/modules/gpt3.py b/dsp/modules/gpt3.pyindex 9bbca4b0a..f7293bdeb 100644--- a/dsp/modules/gpt3.py+++ b/dsp/modules/gpt3.py@@ -134,7 +134,10 @@ class GPT3(LM):self.history: list[dict[str, Any]] = []def _openai_client(self):- return client+ if OPENAI_LEGACY:+ return openai++ return self.clientdef log_usage(self, response):"""Log the total tokens from the OpenAI API response."""