Class ExtractPricesTool
java.lang.Object
ai.redouble.nucleo.harness.AbstractJob<PriceMentions>
ai.redouble.nucleo.tools.AbstractTool<DocumentText, PriceMentions>
ai.redouble.nucleo.tools.AbstractModelDependentTool<DocumentText, PriceMentions>
ai.redouble.demo.pricing.ExtractPricesTool
- All Implemented Interfaces:
GuardedExecution, Identifiable, Job<PriceMentions>, ModelDependent, ModelDependentTool<DocumentText, PriceMentions>, Tool<DocumentText, PriceMentions>
The reading tier of the pricing demo: a small model reads one document's text and lists
every price it states, with what the document says about each (who pays it, whether it
is in force, proposed, former or a cost, and the dates attached). One call per document,
all documents in parallel. The tool never decides what is current; it reports what the
document says, and
PriceHistory decides across documents.- Since:
- 0.1 (2026-09-15)
- Author:
- Andrey Santrosyan
-
Field Summary
Fields inherited from class AbstractTool
inputFields inherited from class AbstractJob
timeout, upstreamRetriesFields inherited from interface Job
DEFAULT_UPSTREAM_RETRIESFields inherited from interface Tool
OBS_INPUT, OBS_OUTPUT -
Constructor Summary
ConstructorsConstructorDescriptionExtractPricesTool(Identifiable parent) The reading tier's own seat: a SMALL model, whichever the deployment serves there. -
Method Summary
Modifier and TypeMethodDescriptionexecute(JobResources resources, JobContext<PriceMentions> context) Executes the job with the provided resources and context.Default requirements for tools.Methods inherited from class AbstractModelDependentTool
buildInputPrompt, client, converse, getGrade, pinModel, pinnedModel, request, setGrade, wireConversation, wireConversationMethods inherited from class AbstractTool
getInput, getJobType, postExecute, preExecute, setInputMethods inherited from class AbstractJob
getId, getName, getParentJobId, getPriority, getTimeout, getUpstreamRetries, getUserId, getWorkflowId, randomIdSuffix, setTimeout, setUpstreamRetries, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface GuardedExecution
declareAdmissionGuardrails, declareAuthGuardrails, declareContentGuardrailsMethods inherited from interface Identifiable
getParentJobId, getUserId, getWorkflowIdMethods inherited from interface Job
getDisplayName, getId, getJobId, getJobType, getName, getPriority, getTimeout, getUpstreamRetries, postExecute, preExecuteMethods inherited from interface ModelDependent
requireSeatMethods inherited from interface Tool
getInput, guardedInputTarget, setInput
-
Constructor Details
-
ExtractPricesTool
The reading tier's own seat: a SMALL model, whichever the deployment serves there.
-
-
Method Details
-
getRequirements
Description copied from class:AbstractToolDefault requirements for tools. Subclasses should override to add database, LLM, or other requirements. JobType is handled byAbstractTool.getJobType(), not here.- Specified by:
getRequirementsin interfaceJob<PriceMentions>- Overrides:
getRequirementsin classAbstractTool<DocumentText, PriceMentions>- Returns:
- resource requirements, or null if the job needs no resources
-
execute
public PriceMentions execute(JobResources resources, JobContext<PriceMentions> context) throws LLMReadableCheckedException Description copied from interface:JobExecutes the job with the provided resources and context. A job reports progress and checks for cancellation through the context, and completes all its work before returning. A tool narrows this contract to the LLM-readable exceptions ofTool.execute(JobResources, JobContext).- Parameters:
resources- the allocated resourcescontext- the job execution context for monitoring- Returns:
- the job result, which may be null
- Throws:
LLMReadableCheckedException- if execution fails
-