@@ -70,39 +70,35 @@ def set_run_config(self, run_config: RunConfig):
70
70
71
71
def get_temperature (self , n : int ) -> float :
72
72
"""Return the temperature to use for completion based on n."""
73
- return 0.3 if n > 1 else 1e-8
74
-
75
- def is_finished (self , response : LLMResult ) -> bool :
76
- logger .warning (
77
- f"is_finished not implemented for { self .__class__ .__name__ } . Will default to True."
78
- )
79
- return True
73
+ return 0.3 if n > 1 else 0.01
80
74
81
75
@abstractmethod
82
76
def generate_text (
83
77
self ,
84
78
prompt : PromptValue ,
85
79
n : int = 1 ,
86
- temperature : float = 1e-8 ,
80
+ temperature : float = 0.01 ,
87
81
stop : t .Optional [t .List [str ]] = None ,
88
82
callbacks : Callbacks = None ,
89
- ) -> LLMResult : ...
83
+ ) -> LLMResult :
84
+ ...
90
85
91
86
@abstractmethod
92
87
async def agenerate_text (
93
88
self ,
94
89
prompt : PromptValue ,
95
90
n : int = 1 ,
96
- temperature : t .Optional [float ] = None ,
91
+ temperature : t .Optional [float ] = 0.01 ,
97
92
stop : t .Optional [t .List [str ]] = None ,
98
93
callbacks : Callbacks = None ,
99
- ) -> LLMResult : ...
94
+ ) -> LLMResult :
95
+ ...
100
96
101
97
async def generate (
102
98
self ,
103
99
prompt : PromptValue ,
104
100
n : int = 1 ,
105
- temperature : t .Optional [float ] = None ,
101
+ temperature : t .Optional [float ] = 0.01 ,
106
102
stop : t .Optional [t .List [str ]] = None ,
107
103
callbacks : Callbacks = None ,
108
104
) -> LLMResult :
@@ -207,7 +203,7 @@ def generate_text(
207
203
self ,
208
204
prompt : PromptValue ,
209
205
n : int = 1 ,
210
- temperature : t .Optional [float ] = None ,
206
+ temperature : t .Optional [float ] = 0.01 ,
211
207
stop : t .Optional [t .List [str ]] = None ,
212
208
callbacks : Callbacks = None ,
213
209
) -> LLMResult :
0 commit comments