Class MoonshotChatModel

java.lang.Object
org.springframework.ai.chat.model.AbstractToolCallSupport
org.springframework.ai.moonshot.MoonshotChatModel
All Implemented Interfaces:
ChatModel, StreamingChatModel, Model<Prompt,ChatResponse>, StreamingModel<Prompt,ChatResponse>

public class MoonshotChatModel extends AbstractToolCallSupport implements ChatModel, StreamingChatModel
Author:
Geng Rong
  • Constructor Details

    • MoonshotChatModel

      public MoonshotChatModel(MoonshotApi moonshotApi)
      Initializes a new instance of the MoonshotChatModel.
      Parameters:
      moonshotApi - The Moonshot instance to be used for interacting with the Moonshot Chat API.
    • MoonshotChatModel

      public MoonshotChatModel(MoonshotApi moonshotApi, MoonshotChatOptions options)
      Initializes a new instance of the MoonshotChatModel.
      Parameters:
      moonshotApi - The Moonshot instance to be used for interacting with the Moonshot Chat API.
      options - The MoonshotChatOptions to configure the chat client.
    • MoonshotChatModel

      public MoonshotChatModel(MoonshotApi moonshotApi, MoonshotChatOptions options, FunctionCallbackContext functionCallbackContext, org.springframework.retry.support.RetryTemplate retryTemplate)
      Initializes a new instance of the MoonshotChatModel.
      Parameters:
      moonshotApi - The Moonshot instance to be used for interacting with the Moonshot Chat API.
      options - The MoonshotChatOptions to configure the chat client.
      functionCallbackContext - The function callback context.
      retryTemplate - The retry template.
    • MoonshotChatModel

      public MoonshotChatModel(MoonshotApi moonshotApi, MoonshotChatOptions options, FunctionCallbackContext functionCallbackContext, List<FunctionCallback> toolFunctionCallbacks, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry)
      Initializes a new instance of the MoonshotChatModel.
      Parameters:
      moonshotApi - The Moonshot instance to be used for interacting with the Moonshot Chat API.
      options - The MoonshotChatOptions to configure the chat client.
      functionCallbackContext - The function callback context.
      toolFunctionCallbacks - The tool function callbacks.
      retryTemplate - The retry template.
      observationRegistry - The ObservationRegistry used for instrumentation.
  • Method Details