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: implementation.datasources.index
  • IndexCreate
  • __init__
  • execute
  • IndexData
  • execute
  • IndexSearch
  • __init__
  • execute
  • GetTextsByIndexes
  • execute
  1. Datasources

Index

Actions for handling index objects

PreviousImageNextJSON

Last updated 1 year ago

Module: .datasources.index



IndexCreate

Create FAISS index. Subclass of . Type of [Any, Dict[str, Any]]


__init__

Arguments:

  • dataset_dimensions (int, optional): Dataset dimension. Defaults to 1024.

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


execute

Arguments:

  • input_data (Any): Ignored.

Returns:

  • Dict[str, Any]: Expected keys:

    • "index" (faiss.IndexFlatL2): Created index.




IndexData


execute

Arguments:

  • input_data (Dict[str, Any]): Expected keys:

    • "index" (faiss.IndexFlatL2): Index to update;

    • "dataset" (Any): Data to index;




IndexSearch


__init__

Arguments:

  • results_count (int, optional): How many results to return. Defaults to 1.

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


execute

Arguments:

  • input_data (Dict[str, Any]): Expected keys:

    • "index" (faiss.IndexFlatL2): Index to search;

    • "query" (Any): Query to search;

Returns:

  • Dict[str, Any]: Expected keys:

    • "search_results" (Dict[str, Any]): Results of search. Results include:

      • "distances" (List[float]): List of distances;

      • "indexes" (List[Any]): Indexes of indexed data;




GetTextsByIndexes


execute

Arguments:

  • input_data (Dict[str, Any]): Expected keys:

    • "texts" (List[str]): Indexed texts;

    • "search_results" (Dict[str, Any]): Results of search. Results include:

      • "distances" (List[float]): List of distances;

      • "indexes" (List[Any]): Indexes of indexed data;

Returns:

  • Dict[str, Any]: Expected keys:

    • "search_results" (Dict[str, Any]): Results of search. Results include:

      • "distances" (List[float]): List of distances;

      • "indexes" (List[Any]): Indexes of indexed data;

      • "texts" (List[str]): Texts of results;



Index data. Subclass of . Type of [Dict[str, Any], None]

Search index. Subclass of . Type of [Dict[str, Any], Dict[str, Any]]

Get texts from resulted indexes. Subclass of . Type of [Dict[str, Any], Dict[str, Any]]

Action
Action
Action
Action
Action
Action
Action
Action
implementation