可信代码库-AI大模型公网接口对接

This commit is contained in:
付民康
2025-06-24 17:35:03 +08:00
parent 8e76b60c75
commit dfde8df815
6 changed files with 225 additions and 56 deletions

View File

@@ -369,3 +369,86 @@ export function basicDict(data) {
data: data,
});
}
/*AI大模型接口*/
// 1. 创建对话
export function fetchCreateConversation(data) {
return request({
url: `/agentHelper/api/createConversation`,
method: 'post',
data: data,
});
}
// 2. 对话
export function fetchChatUseSql(data) {
return request({
url: `/agentHelper/api/v0/chat_use_sql`,
method: 'post',
data: data,
});
}
// 3. 查询会话列表
export function fetchConversationList(data) {
return request({
url: `/agentHelper/api/conversationList`,
method: 'post',
data: data,
});
}
// 4. 查询会话详情
export function fetchConversationDetail(params) {
return request({
url: `/agentHelper/api/conversationDetail`,
method: 'get',
params: params,
});
}
// 5. 获取推荐问题
export function FetchFollowupQuestions(data) {
return request({
url: `/agentHelper/api/v0/provide_followup_questions`,
method: 'post',
data: data,
});
}
// 6. 修改会话标题
export function fetchChangeConversationTitle(data) {
return request({
url: `/agentHelper/api/changeConversationTitle`,
method: 'post',
data: data,
});
}
// 7. 修改会话的收藏状态
export function fetchToggleConversationCollect(data) {
return request({
url: `/agentHelper/api/toggleConversationCollect`,
method: 'post',
data: data,
});
}
// 8. 删除对话
export function fetchDeleteConversation(data) {
return request({
url: `/agentHelper/api/deleteConversation`,
method: 'post',
data: data,
});
}
// 9. 首页推荐问题
export function fetchUpdateRecommendQuestions(data) {
return request({
url: `/agentHelper/api/v0/update_recommend_questions`,
method: 'post',
data: data,
});
}