Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
feat: 增强FAQ列表搜索功能,支持按指定字段(标准问题/相似问法/答案/全部)进行搜索
wizardchen762a906a1b03
diff --git a/client/faq.go b/client/faq.goindex 2e27ba377..039016fe5 100644--- a/client/faq.go+++ b/client/faq.go@@ -140,9 +140,10 @@ type faqSimpleResponse struct {}// ListFAQEntries returns paginated FAQ entries under a knowledge base.+// searchField: specifies which field to search in ("standard_question", "similar_questions", "answers", "" for all)// sortOrder: "asc" for time ascending (updated_at ASC), default is time descending (updated_at DESC)func (c *Client) ListFAQEntries(ctx context.Context,- knowledgeBaseID string, page, pageSize int, tagID string, keyword string, sortOrder string,+ knowledgeBaseID string, page, pageSize int, tagID string, keyword string, searchField string, sortOrder string,) (*FAQEntriesPage, error) {path := fmt.Sprintf("/api/v1/knowledge-bases/%s/faq/entries", knowledgeBaseID)query := url.Values{}@@ -158,6 +159,9 @@ func (c *Client) ListFAQEntries(ctx context.Context,if keyword != "" {query.Add("keyword", keyword)}+ if searchField != "" {+ query.Add("search_field", searchField)+ }if sortOrder != "" {query.Add("sort_order", sortOrder)}