Skip to content

armgit / dspy

Public Imported from GitHub
0

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

Python

Update anthropic.py

ZY.Li0db53e5c10e7
diff --git a/dsp/modules/anthropic.py b/dsp/modules/anthropic.py
index 0c4cd2e08..c343e2a2a 100644
--- a/dsp/modules/anthropic.py
+++ b/dsp/modules/anthropic.py
@@ -62,7 +62,7 @@ class Claude(LM):
}
self.kwargs["model"] = model
self.history: list[dict[str, Any]] = []
- self.client = Anthropic(api_key=api_key)
+ self.client = Anthropic(api_key=api_key, base_url=api_base)
def log_usage(self, response):
"""Log the total tokens from the Anthropic API response."""