Class LmStudioChatClientImpl

java.lang.Object
fr.tiogars.chat.domains.prompt.services.LmStudioChatClientImpl
All Implemented Interfaces:
ChatClientAdapter

@Component public class LmStudioChatClientImpl extends Object implements ChatClientAdapter
Implementation of ChatClientAdapter for LMStudio. This uses direct HTTP calls to LMStudio's API until Spring AI is available. Connection settings are persisted by the dedicated LM Studio domain.
  • Constructor Details

  • Method Details

    • call

      public String call(String prompt)
      Description copied from interface: ChatClientAdapter
      Send a prompt to the AI and get a response.
      Specified by:
      call in interface ChatClientAdapter
      Parameters:
      prompt - the user prompt
      Returns:
      the AI response
    • call

      public String call(String systemPrompt, String userPrompt)
      Description copied from interface: ChatClientAdapter
      Send a prompt with system message to the AI and get a response.
      Specified by:
      call in interface ChatClientAdapter
      Parameters:
      systemPrompt - the system prompt
      userPrompt - the user prompt
      Returns:
      the AI response