DSPy: The framework for programming—not prompting—language models
Python
deduplication: raise temperature only when requested
nbqu9e660fda4587
diff --git a/dsp/modules/google.py b/dsp/modules/google.pyindex 2fdd99887..3a5a57063 100644--- a/dsp/modules/google.py+++ b/dsp/modules/google.py@@ -48,6 +48,7 @@ BLOCK_ONLY_HIGH = [},]+class Google(LM):"""Wrapper around Google's API.@@ -80,8 +81,6 @@ class Google(LM):# Google API uses "candidate_count" instead of "n" or "num_generations"# For now, google API only supports 1 generation at a time. Raises an error if candidate_count > 1num_generations = kwargs.pop("n", kwargs.pop("num_generations", 1))- if num_generations > 1 and kwargs['temperature'] == 0.0:- kwargs['temperature'] = 0.7self.provider = "google"kwargs = {@@ -195,5 +194,3 @@ class Google(LM):text = response.parts[0].textself.print_green(text, end="")print("\n\n\n")--