feat: Add title field for creating knowledge requests.

This commit is contained in:
begoniezhao
2025-12-04 15:54:52 +08:00
parent a50f53d205
commit b24fdc2d24
4 changed files with 8 additions and 2 deletions
+3
View File
@@ -193,15 +193,18 @@ func (c *Client) CreateKnowledgeFromURL(
knowledgeBaseID string,
url string,
enableMultimodel *bool,
title string,
) (*Knowledge, error) {
path := fmt.Sprintf("/api/v1/knowledge-bases/%s/knowledge/url", knowledgeBaseID)
reqBody := struct {
URL string `json:"url"`
EnableMultimodel *bool `json:"enable_multimodel"`
Title string `json:"title"`
}{
URL: url,
EnableMultimodel: enableMultimodel,
Title: title,
}
resp, err := c.doRequest(ctx, http.MethodPost, path, reqBody, nil)