@@ -85,7 +85,7 @@ public class HunYuanChatModel extends AbstractToolCallSupport implements ChatMod
8585 /**
8686 * Low-level access to the Hunyuan API.
8787 */
88- private final HunYuanApi moonshotApi ;
88+ private final HunYuanApi hunYuanApi ;
8989
9090 private final RetryTemplate retryTemplate ;
9191
@@ -101,58 +101,58 @@ public class HunYuanChatModel extends AbstractToolCallSupport implements ChatMod
101101
102102 /**
103103 * Initializes a new instance of the HunyuanChatModel.
104- * @param moonshotApi The Hunyuan instance to be used for interacting with the
104+ * @param hunYuanApi The Hunyuan instance to be used for interacting with the
105105 * Hunyuan Chat API.
106106 */
107- public HunYuanChatModel (HunYuanApi moonshotApi ) {
108- this (moonshotApi , HunYuanChatOptions .builder ().model (HunYuanApi .DEFAULT_CHAT_MODEL ).build ());
107+ public HunYuanChatModel (HunYuanApi hunYuanApi ) {
108+ this (hunYuanApi , HunYuanChatOptions .builder ().model (HunYuanApi .DEFAULT_CHAT_MODEL ).build ());
109109 }
110110
111111 /**
112112 * Initializes a new instance of the HunyuanChatModel.
113- * @param moonshotApi The Hunyuan instance to be used for interacting with the
113+ * @param hunYuanApi The Hunyuan instance to be used for interacting with the
114114 * Hunyuan Chat API.
115115 * @param options The HunyuanChatOptions to configure the chat client.
116116 */
117- public HunYuanChatModel (HunYuanApi moonshotApi , HunYuanChatOptions options ) {
118- this (moonshotApi , options , null , RetryUtils .DEFAULT_RETRY_TEMPLATE );
117+ public HunYuanChatModel (HunYuanApi hunYuanApi , HunYuanChatOptions options ) {
118+ this (hunYuanApi , options , null , RetryUtils .DEFAULT_RETRY_TEMPLATE );
119119 }
120120
121121 /**
122122 * Initializes a new instance of the HunyuanChatModel.
123- * @param moonshotApi The Hunyuan instance to be used for interacting with the
123+ * @param hunYuanApi The Hunyuan instance to be used for interacting with the
124124 * Hunyuan Chat API.
125125 * @param options The HunyuanChatOptions to configure the chat client.
126126 * @param functionCallbackResolver The function callback resolver to resolve the
127127 * function by its name.
128128 * @param retryTemplate The retry template.
129129 */
130- public HunYuanChatModel (HunYuanApi moonshotApi , HunYuanChatOptions options ,
130+ public HunYuanChatModel (HunYuanApi hunYuanApi , HunYuanChatOptions options ,
131131 FunctionCallbackResolver functionCallbackResolver , RetryTemplate retryTemplate ) {
132- this (moonshotApi , options , functionCallbackResolver , List .of (), retryTemplate , ObservationRegistry .NOOP );
132+ this (hunYuanApi , options , functionCallbackResolver , List .of (), retryTemplate , ObservationRegistry .NOOP );
133133 }
134134
135135 /**
136136 * Initializes a new instance of the HunyuanChatModel.
137- * @param moonshotApi The Hunyuan instance to be used for interacting with the
137+ * @param hunYuanApi The Hunyuan instance to be used for interacting with the
138138 * Hunyuan Chat API.
139139 * @param options The HunyuanChatOptions to configure the chat client.
140140 * @param functionCallbackResolver resolves the function by its name.
141141 * @param toolFunctionCallbacks The tool function callbacks.
142142 * @param retryTemplate The retry template.
143143 * @param observationRegistry The ObservationRegistry used for instrumentation.
144144 */
145- public HunYuanChatModel (HunYuanApi moonshotApi , HunYuanChatOptions options ,
145+ public HunYuanChatModel (HunYuanApi hunYuanApi , HunYuanChatOptions options ,
146146 FunctionCallbackResolver functionCallbackResolver , List <FunctionCallback > toolFunctionCallbacks ,
147147 RetryTemplate retryTemplate , ObservationRegistry observationRegistry ) {
148148 super (functionCallbackResolver , options , toolFunctionCallbacks );
149- Assert .notNull (moonshotApi , "HunyuanApi must not be null" );
149+ Assert .notNull (hunYuanApi , "HunyuanApi must not be null" );
150150 Assert .notNull (options , "Options must not be null" );
151151 Assert .notNull (retryTemplate , "RetryTemplate must not be null" );
152152 Assert .isTrue (CollectionUtils .isEmpty (options .getFunctionCallbacks ()),
153153 "The default function callbacks must be set via the toolFunctionCallbacks constructor parameter" );
154154 Assert .notNull (observationRegistry , "ObservationRegistry must not be null" );
155- this .moonshotApi = moonshotApi ;
155+ this .hunYuanApi = hunYuanApi ;
156156 this .defaultOptions = options ;
157157 this .retryTemplate = retryTemplate ;
158158 this .observationRegistry = observationRegistry ;
@@ -188,7 +188,7 @@ public ChatResponse call(Prompt prompt) {
188188 this .observationRegistry )
189189 .observe (() -> {
190190 ResponseEntity <ChatCompletionResponse > completionEntity = this .retryTemplate
191- .execute (ctx -> this .moonshotApi .chatCompletionEntity (request ));
191+ .execute (ctx -> this .hunYuanApi .chatCompletionEntity (request ));
192192
193193 var chatCompletion = completionEntity .getBody ().response ();
194194
@@ -243,7 +243,7 @@ public Flux<ChatResponse> stream(Prompt prompt) {
243243 ChatCompletionRequest request = createRequest (prompt , true );
244244
245245 Flux <ChatCompletionChunk > completionChunks = this .retryTemplate
246- .execute (ctx -> this .moonshotApi .chatCompletionStream (request ));
246+ .execute (ctx -> this .hunYuanApi .chatCompletionStream (request ));
247247
248248 // For chunked responses, only the first chunk contains the choice role.
249249 // The rest of the chunks with same ID share the same role.
0 commit comments