Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/entities/datasource_entities/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const (
DataSourceResponseChunkTypeLink DataSourceResponseChunkType = "link"
DataSourceResponseChunkTypeImage DataSourceResponseChunkType = "image"
DataSourceResponseChunkTypeImageLink DataSourceResponseChunkType = "image_link"
DataSourceResponseChunkTypeBinaryLink DataSourceResponseChunkType = "binary_link"
DataSourceResponseChunkTypeVariable DataSourceResponseChunkType = "variable"
DataSourceResponseChunkTypeLog DataSourceResponseChunkType = "log"
DataSourceResponseChunkTypeRetrieverResources DataSourceResponseChunkType = "retriever_resources"
Expand All @@ -36,6 +37,7 @@ func IsValidDataSourceResponseChunkType(fl validator.FieldLevel) bool {
DataSourceResponseChunkTypeLink,
DataSourceResponseChunkTypeImage,
DataSourceResponseChunkTypeImageLink,
DataSourceResponseChunkTypeBinaryLink,
DataSourceResponseChunkTypeVariable,
DataSourceResponseChunkTypeLog,
DataSourceResponseChunkTypeRetrieverResources:
Expand Down
2 changes: 2 additions & 0 deletions pkg/entities/tool_entities/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const (
ToolResponseChunkTypeLink ToolResponseChunkType = "link"
ToolResponseChunkTypeImage ToolResponseChunkType = "image"
ToolResponseChunkTypeImageLink ToolResponseChunkType = "image_link"
ToolResponseChunkTypeBinaryLink ToolResponseChunkType = "binary_link"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The BinaryLink chunk type is being added to both datasource_entities and tool_entities. These two packages appear to maintain identical sets of response chunk types. Consider centralizing these shared types into a common package to reduce duplication and ensure consistency across the codebase.

ToolResponseChunkTypeVariable ToolResponseChunkType = "variable"
ToolResponseChunkTypeLog ToolResponseChunkType = "log"
ToolResponseChunkTypeRetrieverResources ToolResponseChunkType = "retriever_resources"
Expand All @@ -33,6 +34,7 @@ func IsValidToolResponseChunkType(fl validator.FieldLevel) bool {
ToolResponseChunkTypeLink,
ToolResponseChunkTypeImage,
ToolResponseChunkTypeImageLink,
ToolResponseChunkTypeBinaryLink,
ToolResponseChunkTypeVariable,
ToolResponseChunkTypeLog,
ToolResponseChunkTypeRetrieverResources:
Expand Down
Loading