godo.AgentPlatform.UpdateKnowledgeBase()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.AgentPlatform.UpdateKnowledgeBase(ctx context.Context, knowledgeBaseID string, update *godo.UpdateKnowledgeBaseRequest) (*godo.KnowledgeBase, *godo.Response, error)

Description

Update a knowledge base

This method sends a PUT request to /v2/gen-ai/knowledge_bases/{}.

Parameters

knowledgeBaseID string required
update *godo.UpdateKnowledgeBaseRequest required

Fields of godo.UpdateKnowledgeBaseRequest

DatabaseID string

JSON key: database_id

EmbeddingModelUuid string

JSON key: embedding_model_uuid

Name string

JSON key: name

ProjectID string

JSON key: project_id

Tags []string

JSON key: tags

KnowledgeBaseUUID string

JSON key: uuid

Returns

*godo.KnowledgeBase
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.KnowledgeBase

KnowledgeBase represents an Agent Platform Knowledge Base

AddedToAgentAt *godo.Timestamp

Omitted from JSON when empty. JSON key: added_to_agent_at

CreatedAt *godo.Timestamp

Omitted from JSON when empty. JSON key: created_at

DatabaseId string

Omitted from JSON when empty. JSON key: database_id

EmbeddingModelUuid string

Omitted from JSON when empty. JSON key: embedding_model_uuid

IsPublic bool

Omitted from JSON when empty. JSON key: is_public

LastIndexingJob *godo.LastIndexingJob

Omitted from JSON when empty. JSON key: last_indexing_job

Name string

Omitted from JSON when empty. JSON key: name

ProjectId string

Omitted from JSON when empty. JSON key: project_id

Region string

Omitted from JSON when empty. JSON key: region

Tags []string

Omitted from JSON when empty. JSON key: tags

UpdatedAt *godo.Timestamp

Omitted from JSON when empty. JSON key: updated_at

UserId string

Omitted from JSON when empty. JSON key: user_id

Uuid string

Omitted from JSON when empty. JSON key: uuid

IsDeleted bool

Omitted from JSON when empty. JSON key: is_deleted

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.AgentPlatform.UpdateKnowledgeBase(ctx, "<your-knowledge-base-id>", &godo.UpdateKnowledgeBaseRequest{
		DatabaseID: "<your-database-id>",
		EmbeddingModelUuid: "<your-embedding-model-uuid>",
		Name: "<your-name>",
		ProjectID: "<your-project-id>",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

More Information

See PUT /v2/gen-ai/knowledge_bases/{} in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.