-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement api for rebuilding Vector Store #9133
feat: Implement api for rebuilding Vector Store #9133
Conversation
|
} | ||
|
||
next(); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI 機能が利用可能かどうかを判断するための express middleware
return res.apiv3({}); | ||
}, | ||
]; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- vector store を再作成するためのエンドポイント
- 中身は feat: Implement OpenAI client delegator #9138 で実装しています
"rebuild_vector_store_succeeded": "Vector Store のリビルドに成功しました", | ||
"rebuild_vector_store_failed": "Vector Store のリビルドに失敗しました" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
クリック時に表示するメッセージは成功可否ではなく「リビルドを受け付けた」という内容ではないか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました
if (!aiEnabled) { | ||
const message = 'AI_ENABLED is not true'; | ||
logger.error(message); | ||
return res.apiv3Err(message, 400); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
403 かなあ
400 だとパラメータ次第でリクエスト通りそうな印象
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました
|
||
const router = express.Router(); | ||
|
||
module.exports = (crowi) => { | ||
router.post('/chat', chatHandlersFactory(crowi)); | ||
router.put('/rebuild-vector-store', rebuildVectorStoreHandlersFactory(crowi)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post でよい
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました
Task
Demo
2024-09-18.16.19.54.mov