Knowledgator UTCA
KnowledgatorGitHubDiscord
  • Welcome to UTCA documentation!
  • Quickstart
  • Concepts
    • Components
    • Types of components
    • ExecutionSchema
    • Context
    • Scopes
  • Development and Contribution
    • Contribution
    • Future relises
  • Framework structure
  • Core
    • Component
    • BaseExecutor
    • Action
    • Executable
    • Evaluator
    • Memory management
    • Schemas
    • Exceptions
  • Structural components
    • ExecutionSchema
    • Switch
    • ForEach
    • Filter
    • While
    • Condition
    • BREAK
    • Log
  • Base Actions
    • Flush
    • AddData
    • RenameAttribute
    • RenameAttributeQuery
    • SetValue
    • UnpackValue
    • NestToKey
    • ExecuteFunction
  • Predictors
    • Predictor
    • Transformers predictors
    • Transformers schemas
    • TokenSearcherPredictor
    • ComprehendItPredictor
    • GLiNERPredictor
    • OpenAIChatGPTPredictor
    • OpenAIWhisperPredictor
  • Tasks
    • Task
    • ComprehendIt
    • TokenSearcherTextCleaner
    • TokenSearcherNER
    • TokenSearcherQandA
    • TokenSearcherRelationExtraction
    • GLiNER
    • GLiNERRelationExtraction
    • GLiNERQandA
    • OpenAIChat
    • WhisperSpeechToText
    • TransformersTextToSpeech
    • TransformersChartsAndPlotsAnalysis
    • TransformersDocumentQandA
    • TransformersImageClassification
    • TransformersVisualQandA
    • TransformersObjectDetection
    • TransformersTextEmbedding
    • TransformersEntityLinking
    • TransformersTokenClassifier
    • TransformersTextSummarization
    • TransformersTextualQandA
    • TransformersTextClassification
    • TransformersChat
    • Objects
    • Chat tasks utilities
    • Relation extraction tasks utilities
  • Executable Schemas
    • SemanticSearchSchema
    • Web2Meaning
    • RequestsHTML
  • Datasources
    • Audio
    • DB
      • SQL
      • Neo4j
      • Chroma
      • Qdrant
    • Google Documents
    • Google Sheets
    • Image
    • Index
    • JSON
    • PDF
    • Plain text
    • Video
  • Conditions
    • RePattern
    • SemanticCondition
  • APIs
    • GoogleCloudClient
  • Integrations
    • Google Cloud
  • Examples
    • Basic image classification
    • Text to speech
    • PDF document processing
Powered by GitBook
On this page
  • Module: core
  • Methods and properties
  • __init__
  • invoke
  • validate
  • validate_input
  • validate_output
  • execute
  • use
  • ExecutableExecutor
  • __call__
  1. Core

Executable

Base class of executables

PreviousActionNextEvaluator

Last updated 1 year ago

Subclass of .

Module:

Methods and properties

Main methods and properties


__init__

Arguments:

  • input_class (Type[]): Class for input validation.

  • output_class (Type[]): Class for output validation.

  • name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.

  • replace (, optional): Replacing strategy. Defaults to ..


invoke

Main logic. This method should overwritten when custom executable created.

Arguments:

Returns:

  • Dict[str, Any]: Result of execution.


validate

Validation of input/output

Arguments:

  • data (Dict[str, Any]): Input/output data.

Raises:

  • IvalidInputDataValue: If data is invalid.

Returns:


validate_input

Validation of input

Arguments:

  • data (Dict[str, Any]): Input data.

Returns:


validate_output

Validation of output

Arguments:

  • data (Dict[str, Any]): Output data.

Returns:


execute

Validate input, invoke and validate output

Arguments:

  • input_data (Dict[str, Any]): Data for processing.

Raises:

  • ExecutableError: If any error occures.

Returns:

  • Dict[str, Any]: Result of execution.


use

Arguments:

  • get_key (Optional[str], optional): Which key value of input_data will be used. If value equal to None, root dict will be used. Defaults to None.

  • set_key (Optional[str], optional): Which key will be used to set result value. If set_key value equal to None: - if result of type Dict[str, Any], update root dict; - else, set result to default_key. Defaults to None.

  • default_key (str, optional): Default key used for results that is not of type Dict. Defaults to "output".

Returns:




ExecutableExecutor


__call__

Component Call

Arguments:

Raises:

  • ExecutableError: If any error occures.

Returns:

If get_key is associated with list of inputs and set_key is not specified, result will be seted to default_key (By default equals to "output").



input_data (): Validated input.

evaluator (): Evaluator in context of which executed.

validation_class (Type[]): Class used for validation.

: Validated data.

: Validated input.

: Validated output.

evaluator (): Evaluator in context of which executed.

Creates which manages context

replace (, optional): Replacing strategy for executor. If equals to None, this executable strategy will be used. Defaults to None.

: Wrapper of Executable

Subclass of . Wrapper of .

input_data (): Data for processing

evaluator (Optional[], optional): Evaluator in context of which component executed. If equals to None, default evaluator will be created. Defaults to None.

: Result of executed component.

Evaluator
Evaluator
BaseExecutor
Executable
Evaluator
ExecutableExecutor
ExecutableExecutor
Component
core
Input
Output
ReplacingScope
ReplacingScope
INPLACE
Input
ValidationClass
ValidationClass
Input
Output
ReplacingScope
Transformable
Transformable