Files
zhxg_app/api/aiChat/ai_index.js

38 lines
796 B
JavaScript
Raw Normal View History

2025-08-13 09:19:28 +08:00
// src/api/index.js
// import request from '@/utils/ai_request.js'
import request from "../../utils/ai_request";
// 获取历史
export const getHistory = ({
conversationId,
user,
limit = 20
}) => {
return request({
url: '/aitutor/aichat/getMessagesToUser',
method: 'get',
params: {
conversationId,
user,
limit
}
// headers: {
// Authorization: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjBmMTY3NmY2LTgwOGMtNGUwMC04NDJjLWIwNmY1ZTM5NzJlNCJ9.VVc6OwQ-Xn9pxzYbPhlCpvDp6TwESS00gJi9IXUEIbFw4RFACZDmYCYjQ7voTM4fppy9SAMJCWT-L7Uy-K1eqw'
// }
});
};
// 点赞/点踩 action: 1 点赞 0 点踩
export const sendFeedback = ({
messageId,
action
}) => {
return request({
url: '/api/chat/feedback',
method: 'post',
data: {
messageId,
action
}
});
};