Class: Assistant::PublicationToolBuilder

Inherits:
Object
  • Object
show all
Defined in:
app/services/assistant/publication_tool_builder.rb

Overview

Employee-only reader for the existing Publication library. Discovery stays
in semantic_search/find_publications; this tool reads the extracted source
document by exact ID and keeps internal/public citations explicit.

Defined Under Namespace

Classes: ReaderTool

Constant Summary collapse

DOCUMENT_PAGE_CHARS =
12_000
MAX_RESULT_CHARS =
20_000
METADATA_BUDGET_CHARS =
8_000
MAX_VISUAL_CONTENT_CHARS =
4_000

Class Method Summary collapse

Class Method Details

.tools(account:) ⇒ Array<RubyLLM::Tool>

Returns no reader unless the account may read CRM Items.

Parameters:

  • account (Account, nil)

    current Sunny account

Returns:

  • (Array<RubyLLM::Tool>)

    no reader unless the account may read CRM Items



115
116
117
118
119
# File 'app/services/assistant/publication_tool_builder.rb', line 115

def tools(account:)
  return [] unless EmployeeToolAuthorization.allowed?(, :read, Item)

  [reader_tool]
end