@@ -2112,7 +2112,8 @@ def send_message(
2112
2112
max_output_tokens : Optional [int ] = None ,
2113
2113
temperature : Optional [float ] = None ,
2114
2114
stop_sequences : Optional [List [str ]] = None ,
2115
- ) -> "TextGenerationResponse" :
2115
+ candidate_count : Optional [int ] = None ,
2116
+ ) -> "MultiCandidateTextGenerationResponse" :
2116
2117
"""Sends message to the code chat model and gets a response.
2117
2118
2118
2119
Args:
@@ -2122,15 +2123,18 @@ def send_message(
2122
2123
temperature: Controls the randomness of predictions. Range: [0, 1].
2123
2124
Uses the value specified when calling `CodeChatModel.start_chat` by default.
2124
2125
stop_sequences: Customized stop sequences to stop the decoding process.
2126
+ candidate_count: Number of candidates to return.
2125
2127
2126
2128
Returns:
2127
- A `TextGenerationResponse` object that contains the text produced by the model.
2129
+ A `MultiCandidateTextGenerationResponse` object that contains the
2130
+ text produced by the model.
2128
2131
"""
2129
2132
return super ().send_message (
2130
2133
message = message ,
2131
2134
max_output_tokens = max_output_tokens ,
2132
2135
temperature = temperature ,
2133
2136
stop_sequences = stop_sequences ,
2137
+ candidate_count = candidate_count ,
2134
2138
)
2135
2139
2136
2140
async def send_message_async (
@@ -2139,7 +2143,8 @@ async def send_message_async(
2139
2143
* ,
2140
2144
max_output_tokens : Optional [int ] = None ,
2141
2145
temperature : Optional [float ] = None ,
2142
- ) -> "TextGenerationResponse" :
2146
+ candidate_count : Optional [int ] = None ,
2147
+ ) -> "MultiCandidateTextGenerationResponse" :
2143
2148
"""Asynchronously sends message to the code chat model and gets a response.
2144
2149
2145
2150
Args:
@@ -2148,14 +2153,17 @@ async def send_message_async(
2148
2153
Uses the value specified when calling `CodeChatModel.start_chat` by default.
2149
2154
temperature: Controls the randomness of predictions. Range: [0, 1].
2150
2155
Uses the value specified when calling `CodeChatModel.start_chat` by default.
2156
+ candidate_count: Number of candidates to return.
2151
2157
2152
2158
Returns:
2153
- A `TextGenerationResponse` object that contains the text produced by the model.
2159
+ A `MultiCandidateTextGenerationResponse` object that contains the
2160
+ text produced by the model.
2154
2161
"""
2155
2162
return super ().send_message_async (
2156
2163
message = message ,
2157
2164
max_output_tokens = max_output_tokens ,
2158
2165
temperature = temperature ,
2166
+ candidate_count = candidate_count ,
2159
2167
)
2160
2168
2161
2169
def send_message_streaming (
0 commit comments