|
|
|
@ -12,7 +12,8 @@ |
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
|
|
* See the License for the specific language governing permissions and |
|
|
|
* limitations under the License. |
|
|
|
*/ |
|
|
|
*//* |
|
|
|
|
|
|
|
|
|
|
|
package com.xs.ai.services; |
|
|
|
|
|
|
|
@ -30,9 +31,11 @@ import java.time.LocalDate; |
|
|
|
import static org.springframework.ai.chat.client.advisor.AbstractChatMemoryAdvisor.CHAT_MEMORY_CONVERSATION_ID_KEY; |
|
|
|
import static org.springframework.ai.chat.client.advisor.AbstractChatMemoryAdvisor.CHAT_MEMORY_RETRIEVE_SIZE_KEY; |
|
|
|
|
|
|
|
*/ |
|
|
|
/** |
|
|
|
* * @author Christian Tzolov |
|
|
|
*/ |
|
|
|
*//* |
|
|
|
|
|
|
|
@Service |
|
|
|
public class CustomerSupportAssistant { |
|
|
|
|
|
|
|
@ -58,13 +61,13 @@ public class CustomerSupportAssistant { |
|
|
|
.defaultAdvisors( |
|
|
|
new PromptChatMemoryAdvisor(chatMemory), // Chat Memory |
|
|
|
// new VectorStoreChatMemoryAdvisor(vectorStore)), |
|
|
|
|
|
|
|
|
|
|
|
new QuestionAnswerAdvisor(vectorStore, SearchRequest.defaults()), // RAG |
|
|
|
// new QuestionAnswerAdvisor(vectorStore, SearchRequest.defaults() |
|
|
|
// .withFilterExpression("'documentType' == 'terms-of-service' && region in ['EU', 'US']")), |
|
|
|
|
|
|
|
|
|
|
|
new LoggingAdvisor()) |
|
|
|
|
|
|
|
|
|
|
|
.defaultFunctions("getBookingDetails", "changeBooking", "cancelBooking") // FUNCTION CALLING |
|
|
|
|
|
|
|
.build(); |
|
|
|
@ -81,4 +84,4 @@ public class CustomerSupportAssistant { |
|
|
|
.content(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}*/ |