Skip to content

armgit / dspy

Public Imported from GitHub
0

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

Python

Update custom-lm-client.mdx

arnavsinghvi11c4d3e328ae88
diff --git a/docs/docs/deep-dive/language_model_clients/custom-lm-client.mdx b/docs/docs/deep-dive/language_model_clients/custom-lm-client.mdx
index 5ca5f2bca..23606862e 100644
--- a/docs/docs/deep-dive/language_model_clients/custom-lm-client.mdx
+++ b/docs/docs/deep-dive/language_model_clients/custom-lm-client.mdx
@@ -10,11 +10,14 @@ import AuthorDetails from '@site/src/components/AuthorDetails';
**Deprecation Notice**
-In DSPy 2.5, all LM clients except `dspy.LM` are deprecated.
+Before building a custom LM client, please note that many use cases are now supported by LiteLLM or other integrations. If your model has an OpenAI-SDK-compatible endpoint, you likely don't need to build a custom LM client and can instead use `dspy.LM`.
-You are using a custom LM client, which will be removed in DSPy 2.6. Changing to `dspy.LM` is straightforward and will let you use new features (Adapters) that improve the consistency of LM outputs, especially when using chat LMs.
+In DSPy 2.5, all LM clients except `dspy.LM` are deprecated and will be removed in DSPy 2.6.
-Learn more about the changes and how to migrate [here](https://github.com/stanfordnlp/dspy/blob/main/examples/migration.ipynb).
+Migrating to `dspy.LM` is straightforward and will let you use new features (Adapters) that improve the consistency of LM outputs, especially when using chat LMs.
+Learn more about the changes and how to migrate [in this notebook](https://github.com/stanfordnlp/dspy/blob/main/examples/migration.ipynb).
+
+If you still need to build a custom client, subclassing dspy.LM is a good last resort to ensure compatibility with future updates.
---
@@ -169,4 +172,4 @@ dspy.settings.configure(lm=claude)
***
-<AuthorDetails name="Arnav Singhvi"/>
\ No newline at end of file
+<AuthorDetails name="Arnav Singhvi"/>