View Javadoc
1   package fr.tiogars.chat.domains.prompt.services;
2   
3   import org.springframework.stereotype.Component;
4   
5   /**
6    * Adapter interface for chat clients.
7    * This allows us to switch between different AI providers.
8    * When Spring AI is available, this will be replaced by the actual Spring AI ChatClient.
9    */
10  @Component
11  public interface ChatClientAdapter {
12  
13      /**
14       * Send a prompt to the AI and get a response.
15       *
16       * @param prompt the user prompt
17       * @return the AI response
18       */
19      String call(String prompt);
20  
21      /**
22       * Send a prompt with system message to the AI and get a response.
23       *
24       * @param systemPrompt the system prompt
25       * @param userPrompt the user prompt
26       * @return the AI response
27       */
28      String call(String systemPrompt, String userPrompt);
29  }