Doc (#2910)
* feat: add app chat openapi (#2908) * add chat openapi * create question guide openapi * change auth method * add chat openapi doc * delete unused code * feat: chat openapi doc * rerank doc * add chat detail openapi & doc * update chat openapi doc --------- Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: heheer <1239331448@qq.com>
This commit is contained in:
@@ -18,7 +18,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
|
||||
const {
|
||||
appId,
|
||||
chatId,
|
||||
responseChatItemId: chatItemId,
|
||||
responseChatItemId: dataId,
|
||||
defaultFeedback,
|
||||
customFeedback
|
||||
} = req.body as Props;
|
||||
@@ -38,12 +38,12 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
|
||||
addCustomFeedbacks({
|
||||
appId,
|
||||
chatId,
|
||||
chatItemId,
|
||||
dataId,
|
||||
feedbacks: [feedback]
|
||||
});
|
||||
}, 60000);
|
||||
|
||||
if (!chatId || !chatItemId) {
|
||||
if (!chatId || !dataId) {
|
||||
return res.json({
|
||||
response: `\\n\\n**自动反馈调试**: ${feedback}\\n\\n`
|
||||
});
|
||||
|
||||
@@ -20,7 +20,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
|
||||
customFeedback,
|
||||
appId,
|
||||
chatId,
|
||||
responseChatItemId: chatItemId,
|
||||
responseChatItemId: dataId,
|
||||
customInputs
|
||||
} = req.body as Props;
|
||||
|
||||
@@ -37,12 +37,12 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
|
||||
addCustomFeedbacks({
|
||||
appId,
|
||||
chatId,
|
||||
chatItemId,
|
||||
dataId,
|
||||
feedbacks: [feedbackText]
|
||||
});
|
||||
}, 60000);
|
||||
|
||||
if (!chatId || !chatItemId) {
|
||||
if (!chatId || !dataId) {
|
||||
return res.json({
|
||||
[NodeOutputKeyEnum.answerText]: `\\n\\n**自动反馈调试**: "${feedbackText}"\\n\\n`,
|
||||
text: feedbackText
|
||||
|
||||
Reference in New Issue
Block a user