Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Update gpt3.py

Omar Khattab11004c24de6a
diff --git a/dsp/modules/gpt3.py b/dsp/modules/gpt3.py
index 487d3b4f3..363625413 100644
--- a/dsp/modules/gpt3.py
+++ b/dsp/modules/gpt3.py
@@ -76,7 +76,10 @@ class GPT3(LM):
openai.api_key = api_key
if api_base:
- openai.base_url = api_base
+ if OPENAI_LEGACY:
+ openai.api_base = api_base
+ else:
+ openai.base_url = api_base
self.kwargs = {
"temperature": 0.0,