Skip to content

Conversation

anup-deka
Copy link
Contributor

Implemented methods for Knowledge base endpoints for the GenAI Service

  • List Knowledge Bases
  • Create a Knowledge Base
  • List Data Sources for a Knowledge Base
  • Add Data Source to a Knowledge Base
  • Delete Data Source from a Knowledge Base
  • Retrieve Information About an Existing Knowledge Base
  • Update a Knowledge Base
  • Delete a Knowledge Base
  • Attach Knowledge Base to an Agent
  • Detach Knowledge Base from an Agent

@anup-deka anup-deka marked this pull request as draft May 29, 2025 14:45
@anup-deka anup-deka force-pushed the adeka/knowledge-base branch from da32cee to 9075487 Compare June 3, 2025 09:38
@anup-deka anup-deka force-pushed the adeka/knowledge-base branch from ff2f9cb to f371e32 Compare June 3, 2025 18:39
@anup-deka anup-deka force-pushed the adeka/knowledge-base branch from 476457a to 19ccbdd Compare June 16, 2025 15:13
@anup-deka anup-deka marked this pull request as ready for review June 17, 2025 04:25
@anup-deka anup-deka force-pushed the adeka/knowledge-base branch 2 times, most recently from ecc1715 to b6c022d Compare June 19, 2025 13:47
@anup-deka anup-deka force-pushed the adeka/knowledge-base branch from b6c022d to 68b174d Compare June 19, 2025 13:50
@harshmaru7
Copy link
Contributor

Can we rename knowledge_base.go to genai_knowledge_base.go ? would be consistent with genai_agent.go

@anup-deka anup-deka requested a review from Copilot July 4, 2025 08:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements GenAI Knowledge Base features, adding methods, commands, displayers, and integration tests to support full CRUD and data‐source management.

  • Extended the GenAIService interface and its implementation with Knowledge Base and Data Source methods.
  • Added CLI commands and displayers for Knowledge Base operations (create, list, get, update, delete, attach/detach, data‐source add/list/delete).
  • Added integration tests and mocks covering all new endpoints.

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
do/genai.go Added KnowledgeBase* types and service methods.
commands/genai_knowledge_base.go Added CLI commands for Knowledge Base endpoints.
commands/displayers/genai.go Added displayers for Knowledge Base and Data Sources.
do/mocks/GenAIService.go Added mocks for all Knowledge Base service methods.
integration/knowledgebase_test.go Added end-to-end integration tests for each operation.
Comments suppressed due to low confidence (2)

args.go:753

  • The comment for ArgKnowledgeBaseItemPath is incorrect; it should describe the item path for a data source (e.g., // ArgKnowledgeBaseItemPath is the item path within a Spaces data source).
	// ArgKnowledgeBaseItemPath is the region of the knowledge base

commands/genai_knowledge_base.go:181

  • The placeholder <knowledgebase-uuid> is missing a hyphen and should be <knowledge-base-uuid> to match the command naming convention and usage elsewhere.
		"detach <agent-uuid> <knowledgebase-uuid>",

@anup-deka anup-deka force-pushed the adeka/knowledge-base branch from ca3c34d to 619e59a Compare July 4, 2025 10:29
@anup-deka anup-deka merged commit 2e58145 into digitalocean:main Jul 7, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants