feat: 新增API Key认证支持,优化Swagger文档安全配置
This commit is contained in:
@@ -33,6 +33,7 @@ func NewChunkHandler(service interfaces.ChunkService) *ChunkHandler {
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 404 {object} errors.AppError "分块不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /chunks/by-id/{id} [get]
|
||||
func (h *ChunkHandler) GetChunkByIDOnly(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -102,6 +103,7 @@ func (h *ChunkHandler) GetChunkByIDOnly(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "分块列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /chunks/{knowledge_id} [get]
|
||||
func (h *ChunkHandler) ListKnowledgeChunks(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -236,6 +238,7 @@ func (h *ChunkHandler) validateAndGetChunk(c *gin.Context) (*types.Chunk, string
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 404 {object} errors.AppError "分块不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /chunks/{knowledge_id}/{id} [put]
|
||||
func (h *ChunkHandler) UpdateChunk(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -287,6 +290,7 @@ func (h *ChunkHandler) UpdateChunk(c *gin.Context) {
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 404 {object} errors.AppError "分块不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /chunks/{knowledge_id}/{id} [delete]
|
||||
func (h *ChunkHandler) DeleteChunk(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -321,6 +325,7 @@ func (h *ChunkHandler) DeleteChunk(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /chunks/{knowledge_id} [delete]
|
||||
func (h *ChunkHandler) DeleteChunksByKnowledgeID(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -359,6 +364,7 @@ func (h *ChunkHandler) DeleteChunksByKnowledgeID(c *gin.Context) {
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 404 {object} errors.AppError "分块不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /chunks/by-id/{id}/questions [delete]
|
||||
func (h *ChunkHandler) DeleteGeneratedQuestion(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -39,6 +39,7 @@ type EvaluationRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "评估任务"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /evaluation/ [post]
|
||||
func (e *EvaluationHandler) Evaluation(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -101,6 +102,7 @@ type GetEvaluationRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "评估结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /evaluation/ [get]
|
||||
func (e *EvaluationHandler) GetEvaluationResult(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -36,6 +36,7 @@ func NewFAQHandler(knowledgeService interfaces.KnowledgeService) *FAQHandler {
|
||||
// @Success 200 {object} map[string]interface{} "FAQ列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/entries [get]
|
||||
func (h *FAQHandler) ListEntries(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -73,6 +74,7 @@ func (h *FAQHandler) ListEntries(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "任务ID"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/entries [post]
|
||||
func (h *FAQHandler) UpsertEntries(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -109,6 +111,7 @@ func (h *FAQHandler) UpsertEntries(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "创建的FAQ条目"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/entry [post]
|
||||
func (h *FAQHandler) CreateEntry(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -144,6 +147,7 @@ func (h *FAQHandler) CreateEntry(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/entries/{entry_id} [put]
|
||||
func (h *FAQHandler) UpdateEntry(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -177,6 +181,7 @@ func (h *FAQHandler) UpdateEntry(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/entries/tags [put]
|
||||
func (h *FAQHandler) UpdateEntryTagBatch(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -208,6 +213,7 @@ func (h *FAQHandler) UpdateEntryTagBatch(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/entries/fields [put]
|
||||
func (h *FAQHandler) UpdateEntryFieldsBatch(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -249,6 +255,7 @@ type faqEntryTagBatchRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/entries [delete]
|
||||
func (h *FAQHandler) DeleteEntries(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -283,6 +290,7 @@ func (h *FAQHandler) DeleteEntries(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "搜索结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/search [post]
|
||||
func (h *FAQHandler) SearchFAQ(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -322,6 +330,7 @@ func (h *FAQHandler) SearchFAQ(c *gin.Context) {
|
||||
// @Success 200 {file} file "CSV文件"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/faq/entries/export [get]
|
||||
func (h *FAQHandler) ExportEntries(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -352,6 +361,7 @@ func (h *FAQHandler) ExportEntries(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "导入进度"
|
||||
// @Failure 404 {object} errors.AppError "任务不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /faq/import/progress/{task_id} [get]
|
||||
func (h *FAQHandler) GetImportProgress(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -217,6 +217,7 @@ type InitializationRequest struct {
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 404 {object} errors.AppError "知识库不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/kb/{kbId}/config [put]
|
||||
func (h *InitializationHandler) UpdateKBConfig(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -397,6 +398,7 @@ func (h *InitializationHandler) UpdateKBConfig(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "初始化成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/kb/{kbId} [post]
|
||||
func (h *InitializationHandler) InitializeByKB(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -849,6 +851,7 @@ func (h *InitializationHandler) CheckOllamaStatus(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "模型状态"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/ollama/models/check [post]
|
||||
func (h *InitializationHandler) CheckOllamaModels(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -910,6 +913,7 @@ func (h *InitializationHandler) CheckOllamaModels(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "下载任务信息"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/ollama/models/download [post]
|
||||
func (h *InitializationHandler) DownloadOllamaModel(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -1021,6 +1025,7 @@ func (h *InitializationHandler) DownloadOllamaModel(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "下载进度"
|
||||
// @Failure 404 {object} errors.AppError "任务不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/ollama/download/{taskId} [get]
|
||||
func (h *InitializationHandler) GetDownloadProgress(c *gin.Context) {
|
||||
taskID := c.Param("taskId")
|
||||
@@ -1053,6 +1058,7 @@ func (h *InitializationHandler) GetDownloadProgress(c *gin.Context) {
|
||||
// @Produce json
|
||||
// @Success 200 {object} map[string]interface{} "任务列表"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/ollama/download/tasks [get]
|
||||
func (h *InitializationHandler) ListDownloadTasks(c *gin.Context) {
|
||||
tasksMutex.RLock()
|
||||
@@ -1077,6 +1083,7 @@ func (h *InitializationHandler) ListDownloadTasks(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "模型列表"
|
||||
// @Failure 500 {object} errors.AppError "服务器错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/ollama/models [get]
|
||||
func (h *InitializationHandler) ListOllamaModels(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -1215,6 +1222,7 @@ func (h *InitializationHandler) updateTaskStatus(
|
||||
// @Success 200 {object} map[string]interface{} "配置信息"
|
||||
// @Failure 404 {object} errors.AppError "知识库不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/kb/{kbId}/config [get]
|
||||
func (h *InitializationHandler) GetCurrentConfigByKB(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -1429,6 +1437,7 @@ type RemoteModelCheckRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "检查结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/models/remote/check [post]
|
||||
func (h *InitializationHandler) CheckRemoteModel(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -1484,6 +1493,7 @@ func (h *InitializationHandler) CheckRemoteModel(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "测试结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/models/embedding/test [post]
|
||||
func (h *InitializationHandler) TestEmbeddingModel(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -1647,6 +1657,7 @@ func (h *InitializationHandler) checkRerankModelConnection(ctx context.Context,
|
||||
// @Success 200 {object} map[string]interface{} "检查结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/models/rerank/check [post]
|
||||
func (h *InitializationHandler) CheckRerankModel(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -1730,6 +1741,7 @@ type testMultimodalForm struct {
|
||||
// @Success 200 {object} map[string]interface{} "测试结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/multimodal/test [post]
|
||||
func (h *InitializationHandler) TestMultimodalFunction(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -1999,6 +2011,7 @@ type TextRelationExtractionResponse struct {
|
||||
// @Success 200 {object} map[string]interface{} "提取结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/extract/relations [post]
|
||||
func (h *InitializationHandler) ExtractTextRelations(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -2103,6 +2116,7 @@ type FabriTextResponse struct {
|
||||
// @Success 200 {object} map[string]interface{} "生成的文本"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /initialization/fabri/text [post]
|
||||
func (h *InitializationHandler) FabriText(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -97,6 +97,7 @@ func (h *KnowledgeHandler) handleDuplicateKnowledgeError(c *gin.Context,
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 409 {object} map[string]interface{} "文件重复"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/knowledge/file [post]
|
||||
func (h *KnowledgeHandler) CreateKnowledgeFromFile(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -194,6 +195,7 @@ func (h *KnowledgeHandler) CreateKnowledgeFromFile(c *gin.Context) {
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 409 {object} map[string]interface{} "URL重复"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/knowledge/url [post]
|
||||
func (h *KnowledgeHandler) CreateKnowledgeFromURL(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -261,6 +263,7 @@ func (h *KnowledgeHandler) CreateKnowledgeFromURL(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "创建的知识"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/knowledge/manual [post]
|
||||
func (h *KnowledgeHandler) CreateManualKnowledge(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -311,6 +314,7 @@ func (h *KnowledgeHandler) CreateManualKnowledge(c *gin.Context) {
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 404 {object} errors.AppError "知识不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/{id} [get]
|
||||
func (h *KnowledgeHandler) GetKnowledge(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -360,6 +364,7 @@ func (h *KnowledgeHandler) GetKnowledge(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "知识列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/knowledge [get]
|
||||
func (h *KnowledgeHandler) ListKnowledge(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -430,6 +435,7 @@ func (h *KnowledgeHandler) ListKnowledge(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/{id} [delete]
|
||||
func (h *KnowledgeHandler) DeleteKnowledge(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -469,6 +475,7 @@ func (h *KnowledgeHandler) DeleteKnowledge(c *gin.Context) {
|
||||
// @Success 200 {file} file "文件内容"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/{id}/download [get]
|
||||
func (h *KnowledgeHandler) DownloadKnowledgeFile(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -536,6 +543,7 @@ type GetKnowledgeBatchRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "知识列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/batch [get]
|
||||
func (h *KnowledgeHandler) GetKnowledgeBatch(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -594,6 +602,7 @@ func (h *KnowledgeHandler) GetKnowledgeBatch(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/{id} [put]
|
||||
func (h *KnowledgeHandler) UpdateKnowledge(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -636,6 +645,7 @@ func (h *KnowledgeHandler) UpdateKnowledge(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新后的知识"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/manual/{id} [put]
|
||||
func (h *KnowledgeHandler) UpdateManualKnowledge(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -689,6 +699,7 @@ type knowledgeTagBatchRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "更新成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/tags [put]
|
||||
func (h *KnowledgeHandler) UpdateKnowledgeTagBatch(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -720,6 +731,7 @@ func (h *KnowledgeHandler) UpdateKnowledgeTagBatch(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/image/{id}/{chunk_id} [put]
|
||||
func (h *KnowledgeHandler) UpdateImageInfo(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -777,6 +789,7 @@ func (h *KnowledgeHandler) UpdateImageInfo(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "Search results"
|
||||
// @Failure 400 {object} errors.AppError "Invalid request"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge/search [get]
|
||||
func (h *KnowledgeHandler) SearchKnowledge(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -48,6 +48,7 @@ func NewKnowledgeBaseHandler(
|
||||
// @Success 200 {object} map[string]interface{} "搜索结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/hybrid-search [get]
|
||||
func (h *KnowledgeBaseHandler) HybridSearch(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -99,6 +100,7 @@ func (h *KnowledgeBaseHandler) HybridSearch(c *gin.Context) {
|
||||
// @Success 201 {object} map[string]interface{} "创建的知识库"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases [post]
|
||||
func (h *KnowledgeBaseHandler) CreateKnowledgeBase(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -186,6 +188,7 @@ func (h *KnowledgeBaseHandler) validateAndGetKnowledgeBase(c *gin.Context) (*typ
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 404 {object} errors.AppError "知识库不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id} [get]
|
||||
func (h *KnowledgeBaseHandler) GetKnowledgeBase(c *gin.Context) {
|
||||
// Validate and get the knowledge base
|
||||
@@ -209,6 +212,7 @@ func (h *KnowledgeBaseHandler) GetKnowledgeBase(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "知识库列表"
|
||||
// @Failure 500 {object} errors.AppError "服务器错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases [get]
|
||||
func (h *KnowledgeBaseHandler) ListKnowledgeBases(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -245,6 +249,7 @@ type UpdateKnowledgeBaseRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "更新后的知识库"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id} [put]
|
||||
func (h *KnowledgeBaseHandler) UpdateKnowledgeBase(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -294,6 +299,7 @@ func (h *KnowledgeBaseHandler) UpdateKnowledgeBase(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id} [delete]
|
||||
func (h *KnowledgeBaseHandler) DeleteKnowledgeBase(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -347,6 +353,7 @@ type CopyKnowledgeBaseResponse struct {
|
||||
// @Success 200 {object} map[string]interface{} "任务ID"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/copy [post]
|
||||
func (h *KnowledgeBaseHandler) CopyKnowledgeBase(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -432,6 +439,7 @@ func (h *KnowledgeBaseHandler) CopyKnowledgeBase(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "进度信息"
|
||||
// @Failure 404 {object} errors.AppError "任务不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/copy/progress/{task_id} [get]
|
||||
func (h *KnowledgeBaseHandler) GetKBCloneProgress(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -33,6 +33,7 @@ func NewMCPServiceHandler(mcpServiceService interfaces.MCPServiceService) *MCPSe
|
||||
// @Success 200 {object} map[string]interface{} "创建的MCP服务"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /mcp-services [post]
|
||||
func (h *MCPServiceHandler) CreateMCPService(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -73,6 +74,7 @@ func (h *MCPServiceHandler) CreateMCPService(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "MCP服务列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /mcp-services [get]
|
||||
func (h *MCPServiceHandler) ListMCPServices(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -107,6 +109,7 @@ func (h *MCPServiceHandler) ListMCPServices(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "MCP服务详情"
|
||||
// @Failure 404 {object} errors.AppError "服务不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /mcp-services/{id} [get]
|
||||
func (h *MCPServiceHandler) GetMCPService(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -143,6 +146,7 @@ func (h *MCPServiceHandler) GetMCPService(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新后的MCP服务"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /mcp-services/{id} [put]
|
||||
func (h *MCPServiceHandler) UpdateMCPService(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -273,6 +277,7 @@ func (h *MCPServiceHandler) UpdateMCPService(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 500 {object} errors.AppError "服务器错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /mcp-services/{id} [delete]
|
||||
func (h *MCPServiceHandler) DeleteMCPService(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -308,6 +313,7 @@ func (h *MCPServiceHandler) DeleteMCPService(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "测试结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /mcp-services/{id}/test [post]
|
||||
func (h *MCPServiceHandler) TestMCPService(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -352,6 +358,7 @@ func (h *MCPServiceHandler) TestMCPService(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "工具列表"
|
||||
// @Failure 500 {object} errors.AppError "服务器错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /mcp-services/{id}/tools [get]
|
||||
func (h *MCPServiceHandler) GetMCPServiceTools(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -387,6 +394,7 @@ func (h *MCPServiceHandler) GetMCPServiceTools(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "资源列表"
|
||||
// @Failure 500 {object} errors.AppError "服务器错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /mcp-services/{id}/resources [get]
|
||||
func (h *MCPServiceHandler) GetMCPServiceResources(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -42,6 +42,7 @@ func NewMessageHandler(messageService interfaces.MessageService) *MessageHandler
|
||||
// @Success 200 {object} map[string]interface{} "消息列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /messages/{session_id}/load [get]
|
||||
func (h *MessageHandler) LoadMessages(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -129,6 +130,7 @@ func (h *MessageHandler) LoadMessages(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 500 {object} errors.AppError "服务器错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /messages/{session_id}/{id} [delete]
|
||||
func (h *MessageHandler) DeleteMessage(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -78,6 +78,7 @@ type CreateModelRequest struct {
|
||||
// @Success 201 {object} map[string]interface{} "创建的模型"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /models [post]
|
||||
func (h *ModelHandler) CreateModel(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -141,6 +142,7 @@ func (h *ModelHandler) CreateModel(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "模型详情"
|
||||
// @Failure 404 {object} errors.AppError "模型不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /models/{id} [get]
|
||||
func (h *ModelHandler) GetModel(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -190,6 +192,7 @@ func (h *ModelHandler) GetModel(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "模型列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /models [get]
|
||||
func (h *ModelHandler) ListModels(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -248,6 +251,7 @@ type UpdateModelRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "更新后的模型"
|
||||
// @Failure 404 {object} errors.AppError "模型不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /models/{id} [put]
|
||||
func (h *ModelHandler) UpdateModel(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -320,6 +324,7 @@ func (h *ModelHandler) UpdateModel(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 404 {object} errors.AppError "模型不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /models/{id} [delete]
|
||||
func (h *ModelHandler) DeleteModel(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -49,6 +49,7 @@ func NewHandler(
|
||||
// @Success 201 {object} map[string]interface{} "创建的会话"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions [post]
|
||||
func (h *Handler) CreateSession(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -207,6 +208,7 @@ func (h *Handler) applyConversationDefaults(ctx context.Context, session *types.
|
||||
// @Success 200 {object} map[string]interface{} "会话详情"
|
||||
// @Failure 404 {object} errors.AppError "会话不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/{id} [get]
|
||||
func (h *Handler) GetSession(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -254,6 +256,7 @@ func (h *Handler) GetSession(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "会话列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions [get]
|
||||
func (h *Handler) GetSessionsByTenant(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -295,6 +298,7 @@ func (h *Handler) GetSessionsByTenant(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新后的会话"
|
||||
// @Failure 404 {object} errors.AppError "会话不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/{id} [put]
|
||||
func (h *Handler) UpdateSession(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -356,6 +360,7 @@ func (h *Handler) UpdateSession(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 404 {object} errors.AppError "会话不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/{id} [delete]
|
||||
func (h *Handler) DeleteSession(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
// @Success 200 {object} map[string]interface{} "搜索结果"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/search [post]
|
||||
func (h *Handler) SearchKnowledge(c *gin.Context) {
|
||||
ctx := logger.CloneContext(c.Request.Context())
|
||||
@@ -88,6 +89,7 @@ func (h *Handler) SearchKnowledge(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "问答结果(SSE流)"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/{session_id}/knowledge-qa [post]
|
||||
func (h *Handler) KnowledgeQA(c *gin.Context) {
|
||||
ctx := logger.CloneContext(c.Request.Context())
|
||||
@@ -170,6 +172,7 @@ func (h *Handler) KnowledgeQA(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "问答结果(SSE流)"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/{session_id}/agent-qa [post]
|
||||
func (h *Handler) AgentQA(c *gin.Context) {
|
||||
ctx := logger.CloneContext(c.Request.Context())
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
// @Success 200 {object} map[string]interface{} "流式响应"
|
||||
// @Failure 404 {object} errors.AppError "会话或消息不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/{session_id}/continue [get]
|
||||
func (h *Handler) ContinueStream(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -185,6 +186,7 @@ func (h *Handler) ContinueStream(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "停止成功"
|
||||
// @Failure 404 {object} errors.AppError "会话或消息不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/{session_id}/stop [post]
|
||||
func (h *Handler) StopSession(c *gin.Context) {
|
||||
ctx := logger.CloneContext(c.Request.Context())
|
||||
|
||||
@@ -19,6 +19,7 @@ import (
|
||||
// @Success 200 {object} map[string]interface{} "生成的标题"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /sessions/{session_id}/title [post]
|
||||
func (h *Handler) GenerateTitle(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -35,6 +35,7 @@ func NewTagHandler(tagService interfaces.KnowledgeTagService) *TagHandler {
|
||||
// @Success 200 {object} map[string]interface{} "标签列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/tags [get]
|
||||
func (h *TagHandler) ListTags(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -79,6 +80,7 @@ type createTagRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "创建的标签"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/tags [post]
|
||||
func (h *TagHandler) CreateTag(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -125,6 +127,7 @@ type updateTagRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "更新后的标签"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/tags/{tag_id} [put]
|
||||
func (h *TagHandler) UpdateTag(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -164,6 +167,7 @@ func (h *TagHandler) UpdateTag(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "删除成功"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /knowledge-bases/{id}/tags/{tag_id} [delete]
|
||||
func (h *TagHandler) DeleteTag(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -102,6 +102,7 @@ func (h *TenantHandler) CreateTenant(c *gin.Context) {
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Failure 404 {object} errors.AppError "租户不存在"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /tenants/{id} [get]
|
||||
func (h *TenantHandler) GetTenant(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -338,6 +339,7 @@ func (h *TenantHandler) ListAllTenants(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "搜索结果"
|
||||
// @Failure 403 {object} errors.AppError "权限不足"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /tenants/search [get]
|
||||
func (h *TenantHandler) SearchTenants(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -435,6 +437,7 @@ type AgentConfigRequest struct {
|
||||
// @Success 200 {object} map[string]interface{} "Agent配置"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /tenants/kv/agent-config [get]
|
||||
func (h *TenantHandler) GetTenantAgentConfig(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -591,6 +594,7 @@ func (h *TenantHandler) updateTenantAgentConfigInternal(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "配置值"
|
||||
// @Failure 400 {object} errors.AppError "不支持的键"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /tenants/kv/{key} [get]
|
||||
func (h *TenantHandler) GetTenantKV(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -624,6 +628,7 @@ func (h *TenantHandler) GetTenantKV(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "更新成功"
|
||||
// @Failure 400 {object} errors.AppError "不支持的键"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /tenants/kv/{key} [put]
|
||||
func (h *TenantHandler) UpdateTenantKV(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -699,6 +704,7 @@ func (h *TenantHandler) updateTenantWebSearchConfigInternal(c *gin.Context) {
|
||||
// @Success 200 {object} map[string]interface{} "网络搜索配置"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /tenants/kv/web-search-config [get]
|
||||
func (h *TenantHandler) GetTenantWebSearchConfig(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
@@ -784,6 +790,7 @@ func validateConversationConfig(req *types.ConversationConfig) error {
|
||||
// @Success 200 {object} map[string]interface{} "对话配置"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /tenants/kv/conversation-config [get]
|
||||
func (h *TenantHandler) GetTenantConversationConfig(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
@@ -28,7 +28,9 @@ func NewWebSearchHandler(cfg *config.Config) *WebSearchHandler {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} map[string]interface{} "List of providers"
|
||||
// @Router /api/v1/web-search/providers [get]
|
||||
// @Security Bearer
|
||||
// @Security ApiKeyAuth
|
||||
// @Router /web-search/providers [get]
|
||||
func (h *WebSearchHandler) GetProviders(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
logger.Info(ctx, "Getting web search providers")
|
||||
|
||||
Reference in New Issue
Block a user