DSPy: The framework for programming—not prompting—language models
Python
feat(hotfix): Fixing bug with bedrock n parameter and max_tokens parameters
Jamie Scharf4fd70be99cfd
diff --git a/dsp/modules/aws_lm.py b/dsp/modules/aws_lm.pyindex 33185254b..00906282a 100644--- a/dsp/modules/aws_lm.py+++ b/dsp/modules/aws_lm.py@@ -28,7 +28,7 @@ class AWSLM(LM):max_new_tokens: int,truncate_long_prompts: bool = False,input_output_ratio: int = 3,- batch_n: bool = False,+ batch_n: bool = True,) -> None:"""_summary_diff --git a/dsp/modules/bedrock.py b/dsp/modules/bedrock.pyindex 192a3016b..64277f65c 100644--- a/dsp/modules/bedrock.py+++ b/dsp/modules/bedrock.py@@ -30,6 +30,7 @@ class Bedrock(AWSLM):truncate_long_prompts=False,input_output_ratio=input_output_ratio,max_new_tokens=max_new_tokens,+ batch_n=True, # Bedrock does not support the `n` parameter)self._validate_model(model)