Skip to content

armgit / dspy

Public Imported from GitHub
0

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

Python

Expose TrainableLM

dilaraff6ecbcb442d
diff --git a/dsp/modules/__init__.py b/dsp/modules/__init__.py
index 42cf8222f..bd7bdbaaf 100644
--- a/dsp/modules/__init__.py
+++ b/dsp/modules/__init__.py
@@ -1,6 +1,5 @@
from .anthropic import Claude
from .aws_models import AWSAnthropic, AWSMeta, AWSMistral, AWSModel
-
# Below is obsolete. It has been replaced with Bedrock class in dsp/modules/aws_providers.py
# from .bedrock import *
from .aws_providers import Bedrock, Sagemaker
@@ -31,3 +30,8 @@ from .snowflake import *
from .tensorrt_llm import TensorRTModel
from .watsonx import *
from .you import You
+
+# TODO: Replace the * imports with explicit imports. For example, "LM" is
+# imported implicitly by an * import, but it should be imported explicitly.
+# Here we are importing it again.
+from .lm import LM, TrainableLM
diff --git a/dspy/__init__.py b/dspy/__init__.py
index 05d2a6d48..93222530e 100644
--- a/dspy/__init__.py
+++ b/dspy/__init__.py
@@ -13,6 +13,7 @@ from .functional import * # isort: skip
settings = dsp.settings
LM = dsp.LM
+TrainableLM = dsp.TrainableLM
AzureOpenAI = dsp.AzureOpenAI
OpenAI = dsp.GPT3