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条目导出
wizardchen121e9b3e1b31
diff --git a/client/faq.go b/client/faq.goindex 4fe01464a..14c6f9ce1 100644--- a/client/faq.go+++ b/client/faq.go@@ -172,28 +172,6 @@ func (c *Client) ListFAQEntries(ctx context.Context,return response.Data, nil}-// ExportFAQEntries exports all FAQ entries from a knowledge base as CSV data.-// The CSV format matches the import example format with 8 columns:-// 分类(必填), 问题(必填), 相似问题(选填-多个用##分隔), 反例问题(选填-多个用##分隔),-// 机器人回答(必填-多个用##分隔), 是否全部回复(选填-默认FALSE), 是否停用(选填-默认FALSE),-// 是否禁止被推荐(选填-默认False 可被推荐)-func (c *Client) ExportFAQEntries(ctx context.Context, knowledgeBaseID string) ([]byte, error) {- path := fmt.Sprintf("/api/v1/knowledge-bases/%s/faq/entries/export", knowledgeBaseID)- resp, err := c.doRequest(ctx, http.MethodGet, path, nil, nil)- if err != nil {- return nil, err- }- defer resp.Body.Close()-- // Read the raw CSV data from response body- data, err := io.ReadAll(resp.Body)- if err != nil {- return nil, fmt.Errorf("failed to read export response: %w", err)- }-- return data, nil-}-// UpsertFAQEntries imports or appends FAQ entries asynchronously and returns the task ID.func (c *Client) UpsertFAQEntries(ctx context.Context,knowledgeBaseID string, payload *FAQBatchUpsertPayload,@@ -231,28 +209,6 @@ func (c *Client) CreateFAQEntry(ctx context.Context,return response.Data, nil}-// ExportFAQEntries exports all FAQ entries from a knowledge base as CSV data.-// The CSV format matches the import example format with 8 columns:-// 分类(必填), 问题(必填), 相似问题(选填-多个用##分隔), 反例问题(选填-多个用##分隔),-// 机器人回答(必填-多个用##分隔), 是否全部回复(选填-默认FALSE), 是否停用(选填-默认FALSE),-// 是否禁止被推荐(选填-默认False 可被推荐)-func (c *Client) ExportFAQEntries(ctx context.Context, knowledgeBaseID string) ([]byte, error) {- path := fmt.Sprintf("/api/v1/knowledge-bases/%s/faq/entries/export", knowledgeBaseID)- resp, err := c.doRequest(ctx, http.MethodGet, path, nil, nil)- if err != nil {- return nil, err- }- defer resp.Body.Close()-- // Read the raw CSV data from response body- data, err := io.ReadAll(resp.Body)- if err != nil {- return nil, fmt.Errorf("failed to read export response: %w", err)- }-- return data, nil-}-// UpdateFAQEntry updates a single FAQ entry.func (c *Client) UpdateFAQEntry(ctx context.Context,knowledgeBaseID, entryID string, payload *FAQEntryPayload,