{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "0a8abbfa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "import re\n",
    "import uuid\n",
    "from pathlib import Path\n",
    "from typing import Any, Protocol\n",
    "import markdown\n",
    "from bs4 import BeautifulSoup\n",
    "\n",
    "from langchain_core.documents import Document\n",
    "from langchain_elasticsearch import ElasticsearchStore\n",
    "import torch\n",
    "import torch.nn.functional as F\n",
    "from loguru import logger\n",
    "from langchain_ollama import OllamaEmbeddings\n",
    "from transformers import AutoTokenizer, AutoModel, AutoConfig\n",
    "from elasticsearch import Elasticsearch\n",
    "import nltk\n",
    "from nltk.tokenize import sent_tokenize\n",
    "from pathlib import Path\n",
    "import re\n",
    "from lark import Lark, Transformer\n",
    "from src.config import PROJ_ROOT, DATA_DIR\n",
    "nltk.download(\"punkt\", quiet=True)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "5c9d292b",
   "metadata": {},
   "outputs": [],
   "source": [
    "ELASTICSEARCH_URL = os.getenv(\"ELASTICSEARCH_LOCAL_URL\")\n",
    "ELASTICSEARCH_DOCS_INDEX = os.getenv(\"ELASTICSEARCH_DOCS_INDEX\")\n",
    "ELASTICSEARCH_CODE_INDEX = os.getenv(\"ELASTICSEARCH_CODE_INDEX\")\n",
    "HF_EMB_MODEL_NAME = os.getenv(\"HF_EMB_MODEL_NAME\")\n",
    "OLLAMA_URL = os.getenv(\"OLLAMA_URL\")\n",
    "OLLAMA_LOCAL_URL = os.getenv(\"OLLAMA_LOCAL_URL\")\n",
    "OLLAMA_MODEL_NAME = os.getenv(\"OLLAMA_MODEL_NAME\")\n",
    "OLLAMA_EMB_MODEL_NAME = os.getenv(\"OLLAMA_EMB_MODEL_NAME\")\n",
    "\n",
    "config = AutoConfig.from_pretrained(HF_EMB_MODEL_NAME)\n",
    "embedding_dim = config.hidden_size"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "0e1cd9b9",
   "metadata": {},
   "outputs": [],
   "source": [
    "BNF_META_GRAMMAR = (DATA_DIR / \"raw\" / \"code\" / \"BNF_v1.txt\").read_text(\n",
    "    encoding=\"utf-8\"\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "baa779f3",
   "metadata": {},
   "source": [
    "# Functions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "a6b025fe",
   "metadata": {},
   "outputs": [],
   "source": [
    "def clean_text(text: str) -> str:\n",
    "    text = text.replace(\"\\u00a0\", \" \")\n",
    "    text = re.sub(r\"\\s+\", \" \", text).strip()\n",
    "    return text\n",
    "\n",
    "def markdown_to_text(md_text: str) -> str:\n",
    "    html = markdown.markdown(md_text)\n",
    "    soup = BeautifulSoup(html, \"html.parser\")\n",
    "    return soup.get_text()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "9d636b38",
   "metadata": {},
   "outputs": [],
   "source": [
    "def build_chunks_from_folder(\n",
    "    folder_path: str,\n",
    ") -> list[Document]:\n",
    "\n",
    "    folder = Path(folder_path)\n",
    "\n",
    "    if not folder.exists() or not folder.is_dir():\n",
    "        raise ValueError(f\"Invalid folder path: {folder_path}\")\n",
    "\n",
    "    all_chunks: list[Document] = []\n",
    "\n",
    "    for file_path in folder.glob(\"*.txt\"):\n",
    "\n",
    "        doc_text = file_path.read_text(encoding=\"utf-8\")\n",
    "\n",
    "        if not doc_text.strip():\n",
    "            continue\n",
    "\n",
    "        metadata: dict[str, Any] = {\n",
    "            \"source\": file_path.name,\n",
    "        }\n",
    "\n",
    "        doc_text = clean_text(doc_text)\n",
    "\n",
    "        chunk = Document(\n",
    "            id=str(uuid.uuid4()),\n",
    "            page_content=doc_text,\n",
    "            metadata={**metadata,}\n",
    "        )\n",
    "\n",
    "        all_chunks.append(chunk)\n",
    "\n",
    "    return all_chunks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "ca43bd67",
   "metadata": {},
   "outputs": [],
   "source": [
    "class BnfToDict(Transformer):\n",
    "    def NONTERMINAL(self, token):\n",
    "        return str(token)[1:-1].strip()\n",
    "\n",
    "    def QUOTED(self, token):\n",
    "        return str(token)[1:-1]\n",
    "\n",
    "    def IDENT(self, token):\n",
    "        return str(token)\n",
    "\n",
    "    def SYMBOL(self, token):\n",
    "        return str(token)\n",
    "\n",
    "    def alternative(self, items):\n",
    "        return [str(item) for item in items]\n",
    "\n",
    "    def expansion(self, items):\n",
    "        return items\n",
    "\n",
    "    def rule(self, items):\n",
    "        lhs = items[0]\n",
    "        rhs = items[1]\n",
    "        return {\"lhs\": lhs, \"alternatives\": rhs}\n",
    "\n",
    "    def start(self, items):\n",
    "        return items\n",
    "\n",
    "\n",
    "def load_bnf_rules_for_rag(code_path: Path) -> list[dict]:\n",
    "    parser = Lark(BNF_META_GRAMMAR, parser=\"lalr\")\n",
    "    transformer = BnfToDict()\n",
    "    rules: list[dict] = []\n",
    "    skipped: list[str] = []\n",
    "\n",
    "    for raw_line in code_path.read_text(encoding=\"utf-8\").splitlines():\n",
    "        line = raw_line.strip()\n",
    "        if not line or line.startswith(\"#\") or \"::=\" not in line:\n",
    "            continue\n",
    "        try:\n",
    "            tree = parser.parse(line)\n",
    "            parsed = transformer.transform(tree)\n",
    "            rules.extend(parsed)\n",
    "        except Exception:\n",
    "            skipped.append(line)\n",
    "\n",
    "    print(f\"Parsed rules: {len(rules)}\")\n",
    "    print(f\"Skipped lines: {len(skipped)}\")\n",
    "    return rules"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "7969500e",
   "metadata": {},
   "outputs": [],
   "source": [
    "def bnf_rules_to_documents(rules: list[dict]) -> list[Document]:\n",
    "    docs: list[Document] = []\n",
    "    for rule in rules:\n",
    "        lhs = rule[\"lhs\"]\n",
    "        alternatives = rule[\"alternatives\"]\n",
    "        rendered_alts = [\" \".join(alt) if alt else \"<empty>\" for alt in alternatives]\n",
    "        content = f\"{lhs} ::= \" + \" | \".join(rendered_alts)\n",
    "        docs.append(\n",
    "            Document(\n",
    "                id=str(uuid.uuid4()),\n",
    "                page_content=content,\n",
    "                metadata={\n",
    "                    \"source\": \"BNF.txt\",\n",
    "                    \"type\": \"grammar_rule\",\n",
    "                    \"non_terminal\": lhs,\n",
    "                    \"alternatives\": len(alternatives),\n",
    "                },\n",
    "            )\n",
    "        )\n",
    "    return docs"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "23a92e13",
   "metadata": {},
   "source": [
    "## BNF "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "6e777f53",
   "metadata": {},
   "outputs": [
    {
     "ename": "GrammarError",
     "evalue": "Unexpected input at line 1 column 1 in <string>: \n\n<program> ::= <statement_list>\n^\n",
     "output_type": "error",
     "traceback": [
      "\u001b[31m---------------------------------------------------------------------------\u001b[39m",
      "\u001b[31mUnexpectedCharacters\u001b[39m                      Traceback (most recent call last)",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/load_grammar.py:968\u001b[39m, in \u001b[36m_parse_grammar\u001b[39m\u001b[34m(text, name, start)\u001b[39m\n\u001b[32m    967\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m--> \u001b[39m\u001b[32m968\u001b[39m     tree = \u001b[43m_get_parser\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m.\u001b[49m\u001b[43mparse\u001b[49m\u001b[43m(\u001b[49m\u001b[43mtext\u001b[49m\u001b[43m \u001b[49m\u001b[43m+\u001b[49m\u001b[43m \u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[38;5;130;43;01m\\n\u001b[39;49;00m\u001b[33;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstart\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m    969\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m UnexpectedCharacters \u001b[38;5;28;01mas\u001b[39;00m e:\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/parser_frontends.py:131\u001b[39m, in \u001b[36mParsingFrontend.parse\u001b[39m\u001b[34m(self, text, start, on_error)\u001b[39m\n\u001b[32m    130\u001b[39m stream = \u001b[38;5;28mself\u001b[39m._make_lexer_thread(text)\n\u001b[32m--> \u001b[39m\u001b[32m131\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mparser\u001b[49m\u001b[43m.\u001b[49m\u001b[43mparse\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mchosen_start\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkw\u001b[49m\u001b[43m)\u001b[49m\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/parsers/lalr_parser.py:42\u001b[39m, in \u001b[36mLALR_Parser.parse\u001b[39m\u001b[34m(self, lexer, start, on_error)\u001b[39m\n\u001b[32m     41\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m---> \u001b[39m\u001b[32m42\u001b[39m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mparser\u001b[49m\u001b[43m.\u001b[49m\u001b[43mparse\u001b[49m\u001b[43m(\u001b[49m\u001b[43mlexer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstart\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m     43\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m UnexpectedInput \u001b[38;5;28;01mas\u001b[39;00m e:\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/parsers/lalr_parser.py:88\u001b[39m, in \u001b[36m_Parser.parse\u001b[39m\u001b[34m(self, lexer, start, value_stack, state_stack, start_interactive)\u001b[39m\n\u001b[32m     87\u001b[39m     \u001b[38;5;28;01mreturn\u001b[39;00m InteractiveParser(\u001b[38;5;28mself\u001b[39m, parser_state, parser_state.lexer)\n\u001b[32m---> \u001b[39m\u001b[32m88\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mparse_from_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mparser_state\u001b[49m\u001b[43m)\u001b[49m\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/parsers/lalr_parser.py:111\u001b[39m, in \u001b[36m_Parser.parse_from_state\u001b[39m\u001b[34m(self, state, last_token)\u001b[39m\n\u001b[32m    110\u001b[39m         \u001b[38;5;28;01mpass\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m111\u001b[39m     \u001b[38;5;28;01mraise\u001b[39;00m e\n\u001b[32m    112\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/parsers/lalr_parser.py:100\u001b[39m, in \u001b[36m_Parser.parse_from_state\u001b[39m\u001b[34m(self, state, last_token)\u001b[39m\n\u001b[32m     99\u001b[39m token = last_token\n\u001b[32m--> \u001b[39m\u001b[32m100\u001b[39m \u001b[43m\u001b[49m\u001b[38;5;28;43;01mfor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mtoken\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m.\u001b[49m\u001b[43mlexer\u001b[49m\u001b[43m.\u001b[49m\u001b[43mlex\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\u001b[43m:\u001b[49m\n\u001b[32m    101\u001b[39m \u001b[43m    \u001b[49m\u001b[38;5;28;43;01massert\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mtoken\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mis\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mnot\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/lexer.py:539\u001b[39m, in \u001b[36mAbstractBasicLexer.lex\u001b[39m\u001b[34m(self, state, parser_state)\u001b[39m\n\u001b[32m    538\u001b[39m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[32m--> \u001b[39m\u001b[32m539\u001b[39m     \u001b[38;5;28;01myield\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mnext_token\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mparser_state\u001b[49m\u001b[43m)\u001b[49m\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/lexer.py:622\u001b[39m, in \u001b[36mBasicLexer.next_token\u001b[39m\u001b[34m(self, lex_state, parser_state)\u001b[39m\n\u001b[32m    621\u001b[39m         allowed = {\u001b[33m\"\u001b[39m\u001b[33m<END-OF-FILE>\u001b[39m\u001b[33m\"\u001b[39m}\n\u001b[32m--> \u001b[39m\u001b[32m622\u001b[39m     \u001b[38;5;28;01mraise\u001b[39;00m UnexpectedCharacters(lex_state.text.text, line_ctr.char_pos, line_ctr.line, line_ctr.column,\n\u001b[32m    623\u001b[39m                                allowed=allowed, token_history=lex_state.last_token \u001b[38;5;129;01mand\u001b[39;00m [lex_state.last_token],\n\u001b[32m    624\u001b[39m                                state=parser_state, terminals_by_name=\u001b[38;5;28mself\u001b[39m.terminals_by_name)\n\u001b[32m    626\u001b[39m value, type_ = res\n",
      "\u001b[31mUnexpectedCharacters\u001b[39m: No terminal matches '<' in the current parser context, at line 1 col 1\n\n<program> ::= <statement_list>\n^\nExpected one of: \n\t* TERMINAL\n\t* _NL_OR\n\t* _IGNORE\n\t* _DOT\n\t* OP\n\t* _RBRACE\n\t* NUMBER\n\t* RULE_MODIFIERS\n\t* _IMPORT\n\t* _OVERRIDE\n\t* _EXTEND\n\t* RULE\n\t* _COLON\n\t* _DOTDOT\n\t* _LBRACE\n\t* REGEXP\n\t* _LPAR\n\t* _DECLARE\n\t* _LBRA\n\t* _OR\n\t* _RPAR\n\t* _NL\n\t* STRING\n\t* _COMMA\n\t* _TO\n\t* TILDE\n\t* _RBRA\n",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001b[31mGrammarError\u001b[39m                              Traceback (most recent call last)",
      "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[18]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m      1\u001b[39m code_path = DATA_DIR / \u001b[33m\"\u001b[39m\u001b[33mraw\u001b[39m\u001b[33m\"\u001b[39m / \u001b[33m\"\u001b[39m\u001b[33mcode\u001b[39m\u001b[33m\"\u001b[39m / \u001b[33m\"\u001b[39m\u001b[33m25_Code_Examples.txt\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m bnf_rules = \u001b[43mload_bnf_rules_for_rag\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcode_path\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m      3\u001b[39m bnf_rules[:\u001b[32m5\u001b[39m]\n",
      "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[16]\u001b[39m\u001b[32m, line 30\u001b[39m, in \u001b[36mload_bnf_rules_for_rag\u001b[39m\u001b[34m(code_path)\u001b[39m\n\u001b[32m     29\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mload_bnf_rules_for_rag\u001b[39m(code_path: Path) -> \u001b[38;5;28mlist\u001b[39m[\u001b[38;5;28mdict\u001b[39m]:\n\u001b[32m---> \u001b[39m\u001b[32m30\u001b[39m     parser = \u001b[43mLark\u001b[49m\u001b[43m(\u001b[49m\u001b[43mBNF_META_GRAMMAR\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mparser\u001b[49m\u001b[43m=\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mlalr\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[32m     31\u001b[39m     transformer = BnfToDict()\n\u001b[32m     32\u001b[39m     rules: \u001b[38;5;28mlist\u001b[39m[\u001b[38;5;28mdict\u001b[39m] = []\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/lark.py:374\u001b[39m, in \u001b[36mLark.__init__\u001b[39m\u001b[34m(self, grammar, **options)\u001b[39m\n\u001b[32m    370\u001b[39m             \u001b[38;5;28mself\u001b[39m.options = old_options\n\u001b[32m    373\u001b[39m     \u001b[38;5;66;03m# Parse the grammar file and compose the grammars\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m374\u001b[39m     \u001b[38;5;28mself\u001b[39m.grammar, used_files = \u001b[43mload_grammar\u001b[49m\u001b[43m(\u001b[49m\u001b[43mgrammar\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43msource_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mimport_paths\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mkeep_all_tokens\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m    375\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m    376\u001b[39m     \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(grammar, Grammar)\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/load_grammar.py:1416\u001b[39m, in \u001b[36mload_grammar\u001b[39m\u001b[34m(grammar, source, import_paths, global_keep_all_tokens)\u001b[39m\n\u001b[32m   1414\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mload_grammar\u001b[39m(grammar, source, import_paths, global_keep_all_tokens):\n\u001b[32m   1415\u001b[39m     builder = GrammarBuilder(global_keep_all_tokens, import_paths)\n\u001b[32m-> \u001b[39m\u001b[32m1416\u001b[39m     \u001b[43mbuilder\u001b[49m\u001b[43m.\u001b[49m\u001b[43mload_grammar\u001b[49m\u001b[43m(\u001b[49m\u001b[43mgrammar\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msource\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m   1417\u001b[39m     \u001b[38;5;28;01mreturn\u001b[39;00m builder.build(), builder.used_files\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/load_grammar.py:1241\u001b[39m, in \u001b[36mGrammarBuilder.load_grammar\u001b[39m\u001b[34m(self, grammar_text, grammar_name, mangle)\u001b[39m\n\u001b[32m   1240\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mload_grammar\u001b[39m(\u001b[38;5;28mself\u001b[39m, grammar_text: \u001b[38;5;28mstr\u001b[39m, grammar_name: \u001b[38;5;28mstr\u001b[39m=\u001b[33m\"\u001b[39m\u001b[33m<?>\u001b[39m\u001b[33m\"\u001b[39m, mangle: Optional[Callable[[\u001b[38;5;28mstr\u001b[39m], \u001b[38;5;28mstr\u001b[39m]]=\u001b[38;5;28;01mNone\u001b[39;00m) -> \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m-> \u001b[39m\u001b[32m1241\u001b[39m     tree = \u001b[43m_parse_grammar\u001b[49m\u001b[43m(\u001b[49m\u001b[43mgrammar_text\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mgrammar_name\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m   1243\u001b[39m     imports: Dict[Tuple[\u001b[38;5;28mstr\u001b[39m, ...], Tuple[Optional[\u001b[38;5;28mstr\u001b[39m], Dict[\u001b[38;5;28mstr\u001b[39m, \u001b[38;5;28mstr\u001b[39m]]] = {}\n\u001b[32m   1245\u001b[39m     \u001b[38;5;28;01mfor\u001b[39;00m stmt \u001b[38;5;129;01min\u001b[39;00m tree.children:\n",
      "\u001b[36mFile \u001b[39m\u001b[32m~/VsCodeProjects/assistance-engine/.venv/lib/python3.12/site-packages/lark/load_grammar.py:971\u001b[39m, in \u001b[36m_parse_grammar\u001b[39m\u001b[34m(text, name, start)\u001b[39m\n\u001b[32m    969\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m UnexpectedCharacters \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[32m    970\u001b[39m     context = e.get_context(text)\n\u001b[32m--> \u001b[39m\u001b[32m971\u001b[39m     \u001b[38;5;28;01mraise\u001b[39;00m GrammarError(\u001b[33m\"\u001b[39m\u001b[33mUnexpected input at line \u001b[39m\u001b[38;5;132;01m%d\u001b[39;00m\u001b[33m column \u001b[39m\u001b[38;5;132;01m%d\u001b[39;00m\u001b[33m in \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[33m: \u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[33m\"\u001b[39m %\n\u001b[32m    972\u001b[39m                        (e.line, e.column, name, context))\n\u001b[32m    973\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m UnexpectedToken \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[32m    974\u001b[39m     context = e.get_context(text)\n",
      "\u001b[31mGrammarError\u001b[39m: Unexpected input at line 1 column 1 in <string>: \n\n<program> ::= <statement_list>\n^\n"
     ]
    }
   ],
   "source": [
    "code_path = DATA_DIR / \"raw\" / \"code\" / \"25_Code_Examples.txt\"\n",
    "bnf_rules = load_bnf_rules_for_rag(code_path)\n",
    "bnf_rules[:5]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "84e0054d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(18,\n",
       " Document(id='bda8ecfe-c243-4345-b4d7-47c622161849', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'program', 'alternatives': 1}, page_content='program ::= statement_list'))"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bnf_rule_docs = bnf_rules_to_documents(bnf_rules)\n",
    "len(bnf_rule_docs), bnf_rule_docs[0] if bnf_rule_docs else None"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c9bdbe5f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Document(id='bda8ecfe-c243-4345-b4d7-47c622161849', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'program', 'alternatives': 1}, page_content='program ::= statement_list'),\n",
       " Document(id='cffbd784-0f2e-4808-99cd-244e628f89c6', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'statement_list', 'alternatives': 2}, page_content='statement_list ::= statement | statement statement_list'),\n",
       " Document(id='4d192b4d-2378-4e40-b98a-27a3aa1c409a', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'statement', 'alternatives': 3}, page_content='statement ::= global_assignment | local_assignment | command'),\n",
       " Document(id='8bb655bc-1d93-4765-b014-88d2a770b301', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'global_assignment', 'alternatives': 1}, page_content='global_assignment ::= addVar( string_value , variable_name )'),\n",
       " Document(id='0bf1b420-80c8-4692-ba6f-ec8373fd1134', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'local_assignment', 'alternatives': 1}, page_content='local_assignment ::= variable_name = value'),\n",
       " Document(id='d0a8940b-3c05-4910-8fde-a299f6bd173d', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'string_value', 'alternatives': 1}, page_content='string_value ::=   <string_content>  '),\n",
       " Document(id='3d8b4665-d8f4-4020-96e4-9edb64b58bb7', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'string_content', 'alternatives': 2}, page_content='string_content ::= string_part | string_part string_content'),\n",
       " Document(id='33f72c13-9ac4-4235-b81a-ed348d565f88', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'string_part', 'alternatives': 2}, page_content='string_part ::= text | variable_reference'),\n",
       " Document(id='4696b0b0-10d6-4224-b450-50fd1c15a464', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'text', 'alternatives': 2}, page_content='text ::= character | character text'),\n",
       " Document(id='f6d410d8-27cf-4490-b437-2eb75cdea493', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'variable_reference', 'alternatives': 1}, page_content='variable_reference ::=  <variable_name> '),\n",
       " Document(id='a4631e41-8815-49c7-9c87-356a779b275d', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'variable_name', 'alternatives': 2}, page_content='variable_name ::= letter | letter variable_name'),\n",
       " Document(id='e74f53e6-7d22-4654-9c45-73da94c4f5c0', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'value', 'alternatives': 3}, page_content='value ::= string_value | number | expression'),\n",
       " Document(id='2eaf5fa5-383c-4506-86bd-541f43e9e343', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'number', 'alternatives': 2}, page_content='number ::= digit | digit number'),\n",
       " Document(id='8c30bbe4-8320-493e-b308-cf8772e7639b', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'expression', 'alternatives': 2}, page_content='expression ::= value | value operator value'),\n",
       " Document(id='223511f1-cae4-4079-b4c7-008f456d5eaf', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'operator', 'alternatives': 4}, page_content='operator ::= + | - | * | /'),\n",
       " Document(id='8a0c720f-7a7a-4143-a26f-63c04cfc4a5b', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'command', 'alternatives': 1}, page_content='command ::= any_valid_command_syntax'),\n",
       " Document(id='bfdac77a-4262-4e69-ac53-c4fca8997a6f', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'letter', 'alternatives': 63}, page_content='letter ::= a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | _'),\n",
       " Document(id='2b478f26-4eec-4f8b-89ca-3d68faa715c9', metadata={'source': 'BNF.txt', 'type': 'grammar_rule', 'non_terminal': 'digit', 'alternatives': 10}, page_content='digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9')]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bnf_rule_docs"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "39a10e99",
   "metadata": {},
   "source": [
    "## Build Docs Chunks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8e214f79",
   "metadata": {},
   "outputs": [],
   "source": [
    "chunks = build_chunks_from_folder(\n",
    "    folder_path=DATA_DIR/\"raw/docs\"\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "77f6c552",
   "metadata": {},
   "source": [
    "## Elastic Search"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "09ce3e29",
   "metadata": {},
   "outputs": [],
   "source": [
    "es = Elasticsearch(\n",
    "    ELASTICSEARCH_URL,\n",
    "    request_timeout=120,\n",
    "    max_retries=5,\n",
    "    retry_on_timeout=True,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d575c386",
   "metadata": {},
   "outputs": [],
   "source": [
    "if es.indices.exists(index=ELASTICSEARCH_DOCS_INDEX):\n",
    "    es.indices.delete(index=ELASTICSEARCH_DOCS_INDEX)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "40ea0af8",
   "metadata": {},
   "outputs": [],
   "source": [
    "for index in es.indices.get(index=\"*\"):\n",
    "    print(index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "4e091b39",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "OllamaEmbeddings(model='qwen3-0.6B-emb:latest', validate_model_on_init=False, base_url='http://localhost:11434', client_kwargs={}, async_client_kwargs={}, sync_client_kwargs={}, mirostat=None, mirostat_eta=None, mirostat_tau=None, num_ctx=None, num_gpu=None, keep_alive=None, num_thread=None, repeat_last_n=None, repeat_penalty=None, temperature=None, stop=None, tfs_z=None, top_k=None, top_p=None)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "embeddings = OllamaEmbeddings(base_url=OLLAMA_LOCAL_URL, model=OLLAMA_EMB_MODEL_NAME)\n",
    "embeddings"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1ed4c817",
   "metadata": {},
   "outputs": [],
   "source": [
    "docs_to_index = chunks + bnf_rule_docs\n",
    "\n",
    "db = ElasticsearchStore.from_documents(\n",
    "    docs_to_index,\n",
    "    embeddings,\n",
    "    client=es,\n",
    "    index_name=ELASTICSEARCH_DOCS_INDEX,\n",
    "    distance_strategy=\"COSINE\",\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "74c0a377",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ID: 926c1a70-2b44-414e-86ea-384a0c507d6c\n",
      "Source: {'text': 'Introduction The data model in AVAP™ defines how data is organized and manipulated within the language. Similar to Python, AVAP™ uses a flexible and dynamic data model that allows for working with a wide variety of data types and data structures. Data Types In AVAP™, just like in Python, data types are categories that represent different kinds of values that can be stored and manipulated in a program. Some of the most common data types in AVAP™ include: Integers (int): Represent whole numbers, positive or negative, without a fractional part. Floating-point numbers (float): Represent numbers with both integer and fractional parts. Strings (str): Represent sequences of Unicode characters. Booleans (bool): Represent truth values, either True or False. Lists (list): Ordered and mutable collections of elements. Tuples (tuple): Ordered and immutable collections of elements. Dictionaries (dict): Unordered collections of key-value pairs. Sets (set): Unordered collections of unique elements. Data Structures In addition to individual data types, AVAP™ provides various data structures that allow for more complex organization and manipulation of data: Lists: Created using square brackets [ ] and can contain any data type, including other lists. Tuples: Created using parentheses ( ) and are immutable, meaning they cannot be modified once created. Dictionaries: Created using curly braces and store key-value pairs, where each key is unique within the dictionary. Sets: Created using curly braces and contain unique elements, meaning there are no duplicates in a set. Data Structures In addition to individual data types, AVAP™ provides various data structures that allow for more complex organization and manipulation of data: Lists: Created using square brackets [ ] and can contain any data type, including other lists. Tuples: Created using parentheses ( ) and are immutable, meaning they cannot be modified once created. Dictionaries: Created using curly braces and store key-value pairs, where each key is unique within the dictionary. Sets: Created using curly braces and contain unique elements, meaning there are no duplicates in a set. Practical Example Below is a practical example that illustrates the use of the data model in AVAP™: # Definition of a list example_list = [1, 2, 3, 4, 5] # Accessing individual elements print(example_list[0]) # Output: 1 # Slicing to get a sublist sublist = example_list[2:4] print(sublist) # Output: [3, 4] # List methods example_list.append(6) print(example_list) # Output: [1, 2, 3, 4, 5, 6] Conclusions The data model in AVAP™ provides a flexible and dynamic structure for working with data in the language. By understanding the available data types, data structures, operations, and methods, developers can write efficient and effective code that manipulates and processes data effectively.', 'metadata': {'source': '5_Data_Model.txt'}, 'vector': [-0.025926683, 0.037697684, -0.006513687, -0.095764585, 0.035049133, 0.0672275, 0.020319926, 0.016196115, -0.039707076, -0.019905653, -0.008934261, 0.00066335005, -0.03065664, -0.006104602, -0.012540778, 0.0027391785, -0.019476345, 0.058401942, -0.012012648, -0.03499615, 0.025835568, 0.029044302, -0.009973734, 0.08932673, -0.0961684, -0.006092884, 0.0026412702, 0.0087029515, -0.0020723173, -0.053711865, 0.012949657, -0.075490765, -0.03660694, 0.008800853, -0.053950194, -0.008136532, -0.021625035, -0.03200634, 0.021844454, -0.05560641, -0.01650939, -0.0039685857, 0.01824231, 0.03593625, -0.007634433, -0.02544584, 0.04864322, -0.03250893, 0.019104624, -0.0014815942, -0.039845146, -0.0049643735, -0.0017407916, -0.04769096, 0.029080195, 0.057842292, 0.060729705, -0.011389516, -0.0038276587, 0.0034019323, -0.02343539, 0.017642947, -0.02686996, 0.04172738, -0.0027286315, -0.015136874, 0.0046531097, 0.031305827, -0.0135754375, -0.017085142, -0.008457306, -0.0019061511, -0.0062610996, -0.014249979, 0.05229122, 0.021722456, 0.039859742, -0.035752323, -0.031345356, 0.055575576, -0.010589295, 0.050173678, 0.0020566045, 0.05494555, 0.010878032, 0.035951044, -0.050103612, -0.022026643, 0.008151053, 0.008253378, -0.03961852, -0.056994393, -0.030944457, -0.0081273, 0.019378373, -0.013631327, -0.03561567, -0.04429196, 0.020614881, -0.040266756, 0.019184504, -0.025011351, -0.005391434, 0.09087959, -0.004911322, -0.0035742412, -0.006326254, 0.004364635, -0.0016201161, -0.028578408, -0.04636732, -0.008691164, 0.017183097, 0.02974982, -0.045689248, -0.006476724, 0.018755954, 0.014075634, 0.046804916, -0.0052975905, 0.019219084, 0.00092239026, 0.038913302, 0.0066827736, 0.024850963, 0.008900691, 0.0020827313, -0.029874012, -0.0013932086, -0.0017076957, 0.038551185, 0.01608301, -0.01079733, -0.0047706007, -0.0138246305, 0.0036782601, 0.02485223, -0.008852279, 0.03567753, -0.011537351, -0.047484204, 0.0034216435, 0.008895914, -0.009260059, -0.010101194, 0.032972757, -0.03564931, 0.047525786, -0.0051390603, 0.027853306, 0.011872038, -0.01778206, -0.0073960423, -0.03398282, -0.030250598, -0.0336893, 0.01047833, -0.005670863, -0.0060330434, 0.021619745, -0.004721656, 0.027161954, -0.008115722, -0.016785624, 0.0018954251, 0.0016238093, -0.017140748, -0.021330774, -0.028940111, -0.01605805, -0.018773248, 0.019005947, 0.016465269, -0.028627412, -0.02134554, 0.013587245, -0.034913357, -0.05120334, -0.034181364, 0.0016613209, 0.01965652, 0.007812261, -0.028914062, 0.014587217, 0.036694318, 0.06673612, 0.0022114574, -0.020602241, -0.028493207, -0.012662525, 0.015691081, -0.047373466, -0.034599353, -0.01550755, -0.012282378, -0.013322353, -0.018953854, 0.020280026, 0.037048213, -0.012610063, 0.003675654, -0.014525303, -0.015120592, -0.0130874105, 0.005388491, -0.024912568, -0.038188405, -0.023989229, -0.024796115, 0.0055785, 0.039317563, 0.025029214, -0.017166493, -0.007485651, -0.0066280575, 0.0034534826, 0.017394649, 0.023038719, -0.0021485162, 0.030857142, 0.018967716, 0.010275021, -0.019908516, 0.020106332, -0.00513916, 0.0011290817, -0.023883643, 0.014114397, -0.016420769, 0.0058318865, -0.019438652, 0.022174448, 0.013542772, -0.009654355, 0.009266852, 0.00570935, 0.004010823, 0.007513932, 0.041839555, 0.029781766, -0.01683641, -0.0057556396, 0.021019006, 0.0027876291, 0.013968946, -0.016474498, 0.019405749, 0.029563753, -0.016939495, -0.023424104, 0.00661096, 0.015776327, -0.013764286, 0.08876637, 0.005066863, -0.03540794, 0.0067641456, -0.03859146, 0.036065873, 0.0002527994, 0.07067947, 0.01835779, 0.052533843, 0.022363473, -0.014297415, 0.028904997, -0.01625004, 0.040621053, -0.009232666, -0.0036095, -0.008675764, -0.0047201286, 2.3825856e-05, -0.032783724, 0.016973574, 0.004637061, 0.0030031477, 0.013619337, 0.05779075, 0.017752495, 0.055128496, 0.007905501, 0.01299542, -0.03180582, -0.010521551, 0.03841313, 0.023359826, -0.060763154, -0.017914455, 0.0067257187, 0.03539413, 0.013450562, -0.028615221, 0.042359065, -0.047772184, -0.017773064, 0.01208291, -0.02061652, 0.025879374, -0.043246023, 0.007747921, 0.035559952, -0.038752582, -0.02359223, -0.065461956, 0.017236091, 0.08060491, -0.05905824, 0.03568364, 0.0033052848, 0.0052822414, 0.010877293, -0.0227818, 0.0056176055, -0.01109405, -0.0071285027, 0.0060319444, 0.021616053, 0.031428892, -0.04168881, 0.027771952, 0.027144628, 0.015561626, -0.042777847, 0.030969046, -0.010830652, 0.033557948, 0.022919487, -0.022697782, 0.045666423, 0.04081143, 0.08489713, 0.014416658, 0.0058567123, 0.045338206, -0.005069985, 0.014767188, 0.022395186, 0.04255876, -0.026114732, -0.013054323, 0.017182667, 0.0428733, 0.037213657, -0.0330558, -0.01987727, 0.004966962, 0.044990595, -0.008907916, 0.0036943615, -0.0056883353, -0.032676335, 0.0071833464, 0.025227083, 0.000169221, -0.011029055, 0.038240362, 0.054999426, 0.015768671, -0.044642817, 0.016839443, -0.00040373547, 0.008535713, 0.01296938, -0.0009045554, -0.051305614, -0.061614186, -0.042241227, 0.053000096, 0.023221212, -0.025172057, -0.016145814, -0.0063782935, 0.052952316, 0.016466169, 0.03931511, 0.021699678, 0.020653568, 0.043487314, 0.039181903, 0.029077329, -0.018880768, -0.0147862295, -0.021142941, -0.016935114, -0.023600133, 0.029522417, -0.03433731, -0.012314086, 0.020047883, 0.016452523, -0.02299673, 0.033532728, 0.01527427, -0.02595906, -0.011311242, -0.011424688, 0.025515458, 0.002915311, 0.03345702, 0.094543874, -0.0051750243, -0.01490969, 0.025749387, 0.03854697, 0.009891251, 0.04114219, 0.03923842, -0.028981762, 0.00904882, 0.04222203, 0.019858336, 0.00013797538, 0.029939782, 0.008704784, -0.039841708, 0.08540936, -0.04484293, -0.03729481, 0.026863638, -0.019559043, 0.004299791, -0.019983396, -0.03812676, 0.029572727, -0.010200372, -0.0490084, -0.01249872, 2.1031787e-05, -0.028994981, 0.011820194, 0.038921475, -0.05008648, 0.045560837, -0.026128637, 0.012455649, 0.010905456, 0.007777708, -0.008429242, 0.023532376, 0.018246578, -0.011242391, -0.0068282206, 0.041221987, -0.069710985, 0.011651205, -0.001452561, 0.038809597, -0.055720594, -0.016027048, -0.01696613, 0.017434943, -0.0142098265, 0.04015859, 0.07016645, -0.050204124, -0.02325003, -0.09632716, 0.0039724163, 0.04290944, -0.038471743, -0.0065587657, -0.020257872, -0.021433225, -0.0029213775, -0.010735192, 0.004338598, -0.026491353, 0.0968068, 0.0062800553, 0.05120716, 0.00045260324, -0.056507967, -0.0025096003, -0.04249467, -0.02480445, -0.025189161, 0.052932996, -0.031697407, -0.043890428, -0.0091130035, 0.024590373, 0.03311338, 0.044585094, 0.02516419, 0.018907752, -0.008539257, -0.001090954, -0.013766667, 0.008576606, 0.04887538, 0.03157974, 0.025196403, -0.017865999, 0.01302301, -0.009865566, 0.010124856, -0.016128154, -0.073633686, 0.058077097, 0.05310194, 0.016219703, 0.026721722, 0.040265784, -0.006378705, -0.047261264, 0.008611291, -0.006722579, 0.043536138, 0.0445112, -0.04121399, -0.016073754, -0.031049881, -0.016684836, -0.011434895, -0.00017430814, 0.032123774, 0.038939998, -0.05793282, 0.0058644195, 0.03909146, 0.061910182, 0.023854645, -0.009288739, -0.072871074, 0.022847274, -0.00069507817, -0.013834158, -0.028331019, 0.034651488, -0.009086537, -0.024972323, 0.029344698, -0.058994435, -0.021471174, -0.008243138, -0.014019473, -0.022863813, 0.009172209, 0.02039622, -0.032143887, 0.035002057, -0.019259114, 0.011742232, -0.02949081, 0.07122651, -0.032160528, 0.031102384, -0.018193489, -0.009535878, 0.012061647, 0.03551915, -0.009888269, -0.009691161, 0.04387436, -0.0013474539, -0.020340655, -0.012482727, 0.03493943, -0.012046796, -0.010122893, -0.0076166857, 0.012880166, -0.018638441, 0.0055606985, -0.027544176, -0.043448716, 0.027812203, 0.006468591, -0.02345191, 0.03055833, 0.041367088, 0.00095205114, -0.04271381, -0.010471572, 0.023795152, -0.0048479484, 0.0055033406, -0.025690531, -0.034468994, 0.0060904273, -0.024981212, 0.05280478, 0.054220963, 0.01710588, 0.032817043, 0.010674479, -0.022654327, 0.012114882, 0.022098027, -0.022138169, -0.0048729107, -0.012890238, 0.0075950236, 0.059528552, -0.04230511, 0.015732171, 0.030951262, -0.02752916, -0.018619437, 0.0028313778, 0.023976767, -0.024024934, -0.056773268, -0.050959338, -0.021546679, -0.018199649, -0.03799291, -0.07695979, -0.058559794, -0.015863126, 0.03336357, -0.0020543267, 0.004224012, -0.0030515937, -0.022184888, -0.044974174, 0.029522972, 0.0887829, -0.019978505, 0.0018745188, -0.041749675, -0.008065374, 0.04997077, 0.04805262, -0.008165533, 0.022439916, -0.008824749, -0.02981377, -0.056709953, -0.015213882, 0.03334883, 0.010066704, 0.011227009, -0.0394865, 0.009435426, 0.046657655, 0.003957372, 0.037085027, -0.09843449, 0.046944745, -0.027582109, -0.007659244, -0.0078977905, 0.02709464, -0.03353413, -0.05699801, 0.055980492, -0.0113354195, -0.0012279121, 0.019230284, 0.046408392, 0.03179197, 0.04929015, -0.03401449, 0.024783025, 0.023703892, -0.021673994, 0.008126365, -0.046941184, 0.019333858, -0.036642347, -0.024514057, -0.029444443, -0.018107723, -0.015323923, 0.068059094, 0.03186228, 0.015112597, 0.07456005, 0.02134369, -0.00046393104, 0.014280595, 0.044947274, 0.038266465, -0.081594944, 0.00784463, -0.05481246, -0.010185223, 0.04303059, -0.023005674, -0.015116338, 0.049943987, -0.019023424, 0.035097837, -0.02158529, -0.020963863, 0.0064564776, 0.019632502, -0.013428801, -0.017566347, 0.037818786, 0.047781296, -0.03278864, 0.016640471, -0.014875515, 0.009383118, 0.0025704836, -0.021545084, 0.026269343, 0.027650652, -0.0065479823, 0.045840666, 0.04439963, 0.002538127, -0.018663183, -0.0065749018, 0.02995151, -0.003469684, 0.00081028324, 0.02956537, 0.02296745, -0.015397368, 0.0070108976, 0.022504022, 0.0010214407, -0.024222055, 0.028216152, -0.02258519, -0.04519435, 0.036743484, -0.015636997, 0.036319554, -0.034244783, -0.10428377, -0.0020444444, -0.023640804, -0.025414264, -0.0021689062, -0.054498896, 0.017098265, 0.041022822, 0.0039054956, -0.02426642, 0.03252422, 0.050098594, 0.037349485, 0.026849179, 0.03174866, 0.03748399, -0.004929106, 0.024477487, -0.031314794, -0.0296763, 0.0068336823, -0.0023029475, 0.06947946, -0.024990592, -0.013847413, 0.030166788, 0.0440372, 0.005789508, -0.0010163729, 0.019695144, -0.022031516, 0.005944623, 0.017508905, 0.056082323, 0.009817881, -0.020049153, -0.0048225727, 0.03682053, 0.0016618128, -0.046156067, -0.0038690974, 0.046637814, 0.0063898093, 0.017125988, -0.053623527, -0.0010114907, 0.02274659, -0.029033864, -0.0023792086, -0.0061003943, 0.022619842, 0.024981305, 0.04292712, -0.046431463, -0.028117191, 0.060714744, 0.00038219724, 0.019071924, -0.0015303888, 0.02174518, -0.018087683, 0.013195472, 0.01876775, 0.053397022, -0.023353541, 0.033299796, -0.030654663, -0.036572743, 0.049886644, 0.026400847, 0.01612726, 0.025397306, -0.0045479303, 0.03146809, -0.022617197, -0.02304326, 0.0074377917, -0.015853904, -0.013590246, 0.017135277, 0.0064174375, -0.025030404, 0.055511117, 0.017600914, -0.017188739, -0.017669028, 0.006643335, -0.0018140518, 0.03272172, -0.00065045414, -0.005008589, -0.0032498373, -0.017735148, -0.024232257, -0.0392509, 0.001213334, -0.007205431, -0.014386504, -0.06380667, 0.0402747, 0.020017106, 0.015081778, 0.04191696, -0.023155952, 0.02783331, -0.013155903, 0.0010448531, -0.016661968, 0.028441522, 0.030082917, 0.0013301343, -0.019022278, -0.083081976, 0.05226581, -0.024145963, -0.03230469, -0.037765723, 0.011155229, -0.022276208, 0.015365831, 0.022405004, 0.04896889, 0.036570854, 0.023318173, -0.011506353, -0.06626188, -0.022514492, 0.050554417, -0.038524732, 0.031468164, -0.039738823, 0.06527843, -0.050223213, -0.002956474, 0.0076158927, -0.026675755, -0.038723946, 0.010573883, -0.031459294, 0.021027168, -0.012917834, -0.013819638, -0.059162866, 0.03310997, 0.001796788, 0.0059909564, 0.007046792, 0.026851857, -0.0018321743, 0.0013845289, -0.021499015, -3.186181e-06, -0.06067031, -0.010157171, 0.020218257, -0.0042679496, 0.00026692127, 0.029325288, 0.044650335, -0.008466524, -0.0068129334, -0.016877202, -0.03208905, 0.04893411, -0.038388237, -0.027278496, -0.042173397, 0.02683282, -0.028595725, 0.011000844, -0.08427705, 0.030822925, 0.04066372, 0.03760757, -0.035593476, 0.0032057608, 0.04009482, -0.019282423, 0.035076205, -0.008748392, 0.0011456426, 0.009635195, 0.008543599, 0.034032255, 0.03473071, -0.012108875, -0.08915842, 0.042619556, 0.01210503, 0.057828344, -0.016753726, -0.0253703, -0.040511258, 0.0681222, 0.011081308, 0.005319469, -0.07309882, 0.017296687, 0.047792684, 0.02835667, -0.02869631, 0.014123839, -0.06680634, -0.01887396, -0.0012672412, -0.0008430003, -0.01451833, 0.02912722, -0.018037299, 0.04087888, 0.036881316, -0.06263264, 0.025906475, -0.053007815, -0.00168978, 0.03132085, 0.050162878, 0.02799659, -0.020858184, -0.030194685, 0.049352754, -0.03448327, -0.0033396042, 0.034553368, 0.031638615, 0.02111804, -0.072885625, 0.0030862768, -0.056925092, -0.027379246, -0.009505851, -0.028231693, 0.0034696443, 0.0038851888, 0.018826121, 0.02125982, -0.0067518307, -0.025648246, -0.0590345, -0.004602528, -0.023468392, 0.013940206, -0.03548461, 0.050563574, 0.008435935, -0.032900833, -0.00046591286, 0.013566169, 0.023390474, 0.005197882, -0.049004935, -0.056737117, -0.0046290406, -0.002529146, -0.018751603, -0.013095744, 0.01120661, 0.011401868, -0.018410735, 0.024283288, -0.036214095, 0.0007520909, 0.013737137, 0.08184029, 0.026693843, -0.037814192, 0.00063449034, -0.0019996078, 0.06949838, -0.025293976, 0.04355834, 0.025508016, 0.020519147, 0.003967373, -0.006130136, 0.013231073, 0.00022467104, 0.0037752723, -0.00059974066, -0.008256409, -0.0059699235, 0.025662087, -0.0037557983, 0.031269632, 0.004419437, 0.035024833, -0.0069589657, -0.05431515, -0.026541954, 0.037338473, 0.021955125, -0.0074599683, 0.018458387, 0.023814688, 0.0031606792, -0.018371506, -0.03188762, -0.020636356, 0.027629865, -0.0056669046]}\n",
      "----------------------------------------\n",
      "ID: 83a4dfc6-ad25-4389-bb04-a59c4d06ea6b\n",
      "Source: {'text': \"StartLoop() Statement The loop statement in AVAP™ allows you to execute a block of code repeatedly until a specific condition is met. Below is a detailed explanation of its syntax and functionality. 7.1 Syntax of the Loop Statement The full syntax of the loop statement in AVAP™ is as follows: startLoop(control, start, end) // Code block to repeat endLoop() This syntax consists of three main parts: control: This is the loop control variable used to track the progress of the loop. It is initialized with the starting value of the loop and is incremented with each iteration until it reaches the end value. start: This is the starting value of the loop. The loop begins at this value. end: This is the ending value of the loop. The loop terminates when the control variable reaches this value. 7.2 Functioning of the Loop Statement The loop statement in AVAP™ follows this execution process: The control variable control is initialized with the starting value specified in start. The loop condition is evaluated: while the value of control is less than or equal to the end value end, the code block within startLoop() is executed. If the value of control exceeds the end value, the loop terminates, and execution continues after endLoop(). In each iteration of the loop, the code block within startLoop() is executed, and the control variable control is automatically incremented by one. Once the control variable reaches or exceeds the end value end, the loop terminates, and execution continues after endLoop(). 7.3 Example of Use Below is an example of using the loop statement in AVAP™, along with a detailed explanation of each part of the code: // Loop Sample Use // Initialize the variable 'variable' with the value 5. addVar(variable,5) // Start the loop with the control variable 'control', ranging from 1 to 5. startLoop(control,1,5) // In each iteration of the loop, assign the current value of 'control' to the variable 'counter'. addVar(counter,$control) endLoop() // Add the final value of 'counter' to the API result. addResult(counter) 7.4 Result and Conclusions After executing the above code, the result returned by the API is as follows: { status , elapsed:0.01605510711669922, result: { counter:5 } } This result confirms that the execution was successful (status:true) and that the final value of counter is 5. In summary, the loop statement in AVAP™ provides an efficient way to execute a block of code repeatedly within a specified range. By automating tasks that require repetition, such as processing a list of items or generating sequential numbers, this statement becomes a fundamental tool for programming in AVAP™.\", 'metadata': {'source': '12_Loop_statement.txt'}, 'vector': [0.036398456, -0.004979765, -0.008189453, -0.08868571, -0.0067139617, 0.07292422, 0.0036138617, -0.0069560823, -0.02956309, -0.03265854, -0.054191533, -0.028437892, -0.045994047, -0.0065711024, -0.006732487, 0.053342517, -0.02313536, -0.008526813, 0.022932, 0.051240806, -0.08888338, 0.023747813, -0.031431943, 0.06600909, -0.051242232, -0.048099026, 0.042384803, 0.0497349, -0.012007397, -0.03475291, -0.014549179, 0.053967424, -0.08416569, 0.008688063, -0.0485206, -0.010747122, 0.0065764072, -0.08503243, 0.06777571, -0.013306161, -0.040897865, -0.019857705, 0.008586337, -0.011801023, 0.021002633, -0.0171029, -0.021450747, -0.013881366, 0.07870241, -0.06625602, -0.032843966, 0.05614696, 0.028126817, -0.012958271, -0.0045212545, 0.041642487, -0.005530269, -0.052800905, -0.007938425, 0.020447744, 0.017119156, 0.03592434, 0.0038365747, -0.04283367, -0.011702322, 0.0013004205, 0.031698633, -0.028816776, -0.0533628, 0.0037992548, -0.008678605, -0.021162156, -0.035295624, 0.023579929, 0.01877828, -0.02291178, 0.017745487, -0.051992267, -0.032619573, 0.038827166, -0.009773525, 0.03360139, 0.029240696, 0.015498397, 0.0092366235, 0.030320572, -0.103888914, -0.048252102, -0.008863077, 0.00071362214, 0.044570174, -0.04177865, 0.016825553, -0.012813776, 0.010805708, 0.013918779, -0.04595957, 0.046424676, 0.03902325, -0.005597613, 0.019591153, -0.020062922, -0.044156153, -0.017934091, 0.031650946, -0.005513486, -0.012417766, 0.050328474, 0.015793523, -0.0340507, -0.016182128, 0.0014011025, 0.024624135, 0.036164526, -0.01302865, -0.074115716, -0.029982286, -0.010371272, 0.011181329, -0.02858551, 0.03059961, 0.00013940231, 0.025015697, 0.0067631705, -0.013367138, 0.0011280711, -0.0308446, -0.0062373155, 0.013382105, -0.01920369, 0.028483331, 0.020029334, -0.019613773, -0.012720643, 0.00016670818, 0.0029264763, -0.008370371, 0.007397983, 0.040393308, 0.013408926, -0.0226549, -0.041861147, 0.00038073718, -0.04270262, -0.0022034128, 0.033639118, -0.014778038, 0.036860242, 0.007199523, 0.031832676, 0.028385866, -0.023397962, -0.011957842, 0.0028304583, -0.0017391634, -0.004888336, 0.01878752, -0.03705545, 0.013682674, 0.051059533, 0.045737665, 0.02568177, -0.015720665, -0.013794109, -0.03541804, 0.03635464, -0.06809333, -0.0028093108, -0.06491052, -0.008408872, 0.019000987, 0.027579818, 0.030222416, -0.036950137, 0.0032829593, -0.02644479, -0.016580435, -0.011929123, 0.0043279836, -0.013868912, -0.01288, -0.026796881, 0.04295127, 0.0042560087, 0.027701195, 0.0014192014, -0.0355164, -0.015294818, -0.014006889, -0.030166715, -0.005352766, -0.030130714, -0.018030172, -0.015293172, -0.0034801248, -0.026327781, 0.0072969883, 0.0024515593, 0.0340885, 0.004644734, 0.020501168, -0.025691427, 0.009024668, 0.0045261336, 0.009429707, -0.028022183, -0.009941138, -0.0025037245, -0.035541415, -0.020323511, 0.009827198, 0.038641367, -0.049030907, 0.043330953, -0.0059410282, -0.036998987, 0.026049672, 0.025370907, 0.027228901, 0.014531027, 0.015367956, 0.012934733, -0.042036984, 0.007425294, 0.021573842, -0.017553715, 0.005847678, 0.0136488965, -0.044136826, 0.02904359, 0.0140038375, 0.01159069, 0.023612611, 0.025597706, -0.008592761, 0.060072307, -0.00829041, -0.024526378, 0.0063040704, -0.04920307, -0.02917849, -0.0067115803, 0.03531657, -0.013524306, 0.007044984, -0.0031018346, 0.018233277, -0.023876755, -0.037781186, 0.031920295, -0.008297638, -0.008253602, 0.042111296, 0.04064561, 0.004241909, -0.022845289, -0.0034425939, -0.021549193, 0.04064633, 0.014219073, 0.07726618, -0.010899306, 0.040852673, 0.011879059, 0.044963732, 0.019905483, 0.006094574, 0.045073565, -0.040322404, -0.037828047, 0.087070435, -0.011976977, -0.01198191, -0.0147389285, 0.009019958, -0.051532555, 0.018486422, -0.04530641, 0.019698018, 0.03010543, -0.0012034203, -0.022134934, 0.008026482, -0.022586618, -0.0012080268, 0.01403665, 0.029948864, -0.009550767, -0.02107734, -0.019225674, 0.016779216, 0.037560355, -0.0054559084, 0.033709772, 0.0014567835, 0.023082651, -0.035926674, -0.02540951, 0.039207514, 0.0331351, 0.03428289, -0.027239226, -0.023480412, -0.028015655, -0.03187881, 0.012346835, 0.017453194, -0.0027638716, 0.015861213, 0.06716878, 0.031437375, -0.0068352264, -0.010452465, -0.01588225, -0.009897866, -0.0038764083, 0.0099184625, 0.025993193, 0.04767868, 0.015882652, 0.10946423, -0.007337703, 0.034771446, -0.023154056, -0.017068824, -0.036925904, -0.0035711955, 0.03557474, 0.045131356, 0.0024123928, 0.03700909, 0.054688077, 0.03479292, -0.021354454, 0.024481244, -0.0296777, 0.0149554, -0.022068754, 0.06696009, -0.033758562, -0.012083603, -0.011910514, -0.011283213, -0.014639919, -0.040095173, -0.00019284883, -0.030842304, 0.011572814, -0.03092508, -0.004090112, -0.0021314085, 0.011041956, 0.009109398, -0.01197021, -0.0018103897, 0.045596134, 0.023153981, 0.014830568, -0.022918511, -0.018383598, 0.0020570145, -0.023992423, 0.0010475445, 0.012557441, -0.051533703, -0.04335191, -0.06264434, -0.008147037, 0.028949205, -0.03137226, -0.03871423, -0.017654205, -0.0020680437, -0.014880804, 0.008473145, -0.0016511537, 0.020251937, -0.03986434, -0.020855792, 0.031121328, 6.652328e-06, 0.011312919, 0.011987489, -0.0015997791, -0.021007108, -0.05243302, -0.0012899359, -0.009077626, -0.010060241, 0.057005256, 0.04495557, 0.01873778, -0.0051569324, 0.032653432, -0.025421217, 0.017386368, -0.068604186, 0.063088365, 0.05024777, -0.023934297, -0.0001279545, -0.008000187, -0.038824383, -0.00067488913, -0.008338858, 0.010715712, 0.018556489, 0.017190754, -0.0014497022, 0.02493139, 0.054903213, 0.052637152, -0.015626123, 0.023364928, 0.03465228, 0.02831225, 0.06122181, -0.048133086, -0.055297844, 0.03925038, 0.025882376, 0.024266634, -0.012289744, 0.0037698415, 0.046843886, 0.028768264, -0.009992863, 0.0231068, -0.029841857, 0.04444203, -0.010791411, 0.026740363, -0.012108427, 0.02702887, -0.026414096, -0.01481566, 0.045960337, 0.025589919, 0.044439994, 0.021349933, -0.0042449925, 0.039518334, -0.0047257366, 0.031184599, 0.006357184, -0.0070957076, -0.030665794, 0.0081557995, -0.013458023, -0.019683512, 0.006548164, 0.008346658, 0.014581065, 0.012225171, 0.014562111, -0.031280834, 0.010748872, -0.037436426, 0.011394239, -0.020757666, 0.023075491, 0.070421875, 0.0003500842, -0.047532745, -0.028896015, 0.022222534, 0.031563748, 0.006547515, 0.023616616, 0.018530924, 0.028863044, -0.0037721726, -0.05244307, -0.0031545337, -0.003703369, -0.004768591, -0.09690733, 0.026934383, -0.05093433, -0.0025218213, 0.007528132, -0.035798118, -0.005925408, -0.02737329, 0.04458256, 0.02372101, 0.024422813, -0.029466864, -0.03599378, 0.026111763, 0.007130621, 0.0006903081, 0.013520024, -0.08070435, 0.048866667, -0.03987458, 0.025452357, -0.01519221, -0.08633485, 0.040005293, -0.0064956634, -0.0063014925, 0.009930342, 0.052337535, -0.0011548641, -0.039732147, 0.03147871, -0.016140716, 0.033969387, 0.05904679, 0.020701524, -0.017528746, -0.003660005, 0.030560303, -0.0024994914, -0.061671484, 0.045740988, 0.030242423, 0.022606388, -0.0496991, -0.0033235806, 0.043189064, 0.017057987, 0.023651002, -0.036284935, 0.019304765, 0.049930036, 0.033888698, 0.032451138, 0.030437982, 0.01459673, 0.005836504, 0.020462329, -0.05367975, -0.03591594, -0.0023960322, -0.016902443, -0.0031279924, 0.04563631, 0.0006452033, -0.006695886, 0.010529386, -0.010849566, -0.016170615, 0.009885479, 0.0125319455, -0.027993698, 0.070967175, 0.00048567166, 0.0003574278, 0.055622865, -0.011212695, -0.0050125513, -0.030698974, 0.030716104, -0.030896049, 0.039423965, -0.020374002, -0.014394423, 0.028141525, -0.022509003, 0.015609568, 0.058735125, 0.05906739, 0.002306266, 0.007054978, -0.026243327, 0.04875135, 0.013055495, 0.011074052, 0.00010956085, 0.032348726, 0.0049009984, -0.02312398, -0.020670038, -0.006473631, -0.0017076067, 0.00794392, -0.029894428, -0.0045930743, 0.015384359, 0.0125329625, 0.055184662, 0.050743423, -0.019266449, 0.0153539255, 0.025000501, -0.052198358, 0.027385177, 0.008660611, -0.066427834, 0.023980143, 0.02558027, -0.003549061, 0.021292645, 0.028487148, 0.030665204, -0.0029771735, -0.07954265, 0.009911248, -0.0009858328, 0.023327235, -0.036655854, -0.02028472, -0.06017496, -0.0033642738, -0.009621774, -0.025896288, -0.025786808, 0.01338349, -0.03760653, -0.0058888025, 0.033454105, 0.013456273, 0.016907427, -0.04828961, -0.06330561, 0.0040697264, 0.019972624, -0.033506732, 0.01088791, -0.01606648, -0.042578798, 0.010718336, 0.061221845, -0.013407187, 0.010391484, -0.008831205, -0.0014465235, -0.041418213, -0.015014133, -0.03429726, -0.058480375, 0.010084343, -0.057429288, -0.040149122, 0.027036315, -0.01823326, 0.00012451413, -0.03872616, -0.0063689337, 0.04038015, -0.022277236, 0.042353574, -0.030564198, -0.0077843512, -0.017570205, 0.0063746395, -0.006634225, -0.011894543, 0.04130119, 0.090793565, -0.02335007, 0.025592053, -0.063618295, 0.0007068243, 0.03931895, 0.0045237346, -0.021769404, -0.05871779, 0.025473678, -0.038015958, -0.01911858, -0.020391235, -0.03807613, 0.037475124, 0.052399494, 0.04511258, 0.013970124, -0.006232389, -0.02297365, -0.036483694, -0.03550083, 0.07878784, -0.014232621, -0.041991085, -0.0071849287, -0.056600586, 0.014068163, -0.022255328, -0.029595368, -0.044962443, 0.06863411, 0.019373624, 0.04357839, -0.028802834, -0.0110685285, -0.022624133, 0.01817136, -0.011514154, -0.019565027, 0.00043277562, -0.011044164, -0.001960535, -0.01935086, -0.038237266, -0.0050818906, 0.012822055, 0.04928681, -0.014836605, 0.001185136, 0.02432803, 0.028574087, 0.004171436, 0.007473817, 0.044455077, -0.029310297, -0.0029160774, -0.04493461, -0.04213683, 0.0349914, 0.05483275, -0.029893905, -0.037211437, 0.008377794, -0.01361688, 0.019087624, -0.02748253, -0.047688194, 0.0046035578, 0.018090222, 0.00015022236, 0.042064298, 0.009113734, 0.0048028636, -0.017296873, 0.022868529, 0.04994959, 0.017064389, 0.01935474, 0.041236453, -0.0054730275, 0.019952841, -0.026241768, 0.006303837, 0.014231013, 0.041076507, 0.019807035, 0.025873138, 0.067207165, -0.024062539, -0.04198389, -0.0034933565, -0.05837592, 0.017470928, -0.017773852, 0.0136406515, -0.027077926, -0.0231694, 0.067094505, 0.040055774, -0.011271063, -0.009858359, -0.009925895, -0.037557084, 0.024314996, 0.058594037, 0.0061670556, 0.017061686, -0.03889869, 0.012950721, -0.005893756, -0.02920828, -0.07210608, -0.0005132429, -0.010550577, 0.058708917, -0.0059348475, -0.084408216, 0.02288354, 0.042328402, 0.00545347, 0.037152525, -0.015362173, 0.024342727, -0.0024553908, -0.003311248, -0.008711227, -0.0019677295, 0.02991407, -0.011648897, -0.03837737, -0.0030688208, -0.029337715, -0.01684103, -0.012615252, 0.009336018, -0.0200821, -0.018647553, 0.008681087, -0.04787947, -0.043164853, 0.04432407, 0.020144729, -0.026624337, 0.03627897, 0.03195962, 0.03734374, -0.030308923, -0.055682372, -0.0008674165, 0.007816848, -0.049936287, 0.0009663643, 0.010017703, -0.061363786, 0.018956857, -0.031839002, -0.024000935, 0.017464673, -0.024862653, -0.047591116, 0.052266136, 0.013901831, 0.024389988, -0.018532785, -0.04362362, -0.009196285, -0.047595046, 0.012618295, 0.00053687865, -0.03158424, -0.015235152, 0.03487227, -0.018266266, 0.006930146, 0.0026401659, -0.0029741358, -0.030508686, -0.011215449, 0.014523018, -0.004119372, 0.0011920251, 0.022130536, -0.0029210171, 0.018871384, -0.040377587, 0.0687326, -0.02016085, -0.017261293, 0.0011276054, -0.01805903, -0.0068602283, 0.062215798, 0.006797789, 0.059532095, 0.019645838, 0.033855826, -0.025490975, -0.010991698, 0.0013909222, 0.05502816, -0.038097546, 0.002337724, -0.019573446, 0.041761156, -0.0023996143, 0.022732472, -0.01916653, 0.011290383, -0.025452139, 0.038010623, -0.0679986, -0.01025879, 0.015033136, 0.004502706, -0.035347577, 0.008521217, -0.008387454, 0.015562046, -0.021462495, 0.03987983, -0.011414976, -0.0053094877, 0.048137467, 0.005483496, -0.04176751, -0.029581718, -0.0024304555, 0.02690537, -0.0070504164, 0.0059035327, -0.023446606, 0.038747374, -7.502832e-05, -0.035867576, -0.008706768, 0.025552431, -0.014060525, -6.295675e-05, -0.00036734997, -0.002975985, -0.012266906, -0.001177269, -0.11026142, 0.017149493, 0.06525697, 0.03352937, 0.019107593, -0.027034324, 0.00490649, -0.04878709, 0.039779972, -0.027957728, -0.040131453, -0.036999907, 0.0011033528, 0.013808913, -0.0013522434, 0.0059147, -0.02745032, -0.0052569904, 0.036039166, 0.03052685, 0.039878793, 0.016745625, -0.036671363, 0.039214537, 0.028380193, 0.008020928, -0.042928606, 0.028346477, 0.0003957038, -0.02179679, 0.010280024, -0.056433637, -0.027907776, 0.028648358, -0.03823943, -0.04894888, -0.076414146, 0.04948093, -0.004716588, 0.036450747, 0.06860618, -0.009029659, 0.026981693, 0.008989426, -0.055266686, 0.036402334, 0.01959253, 0.014440998, 0.00096962176, 0.03585703, 0.087110035, 0.0019365469, 0.022774164, -0.013458463, 0.000623638, 0.037742976, -0.03897256, 0.01064031, -0.02522441, -0.037090834, 0.0090713315, 0.06149419, -0.0077223093, 0.04438109, 0.030301938, -0.009444124, -0.005933643, -0.028725846, -0.021204056, -0.016040878, 0.0004244117, -0.025745034, 0.026071476, 0.048541922, 0.03370926, 0.03258943, -0.010543983, 0.017030925, 0.019188505, 0.015167674, -0.015768517, -0.03979051, -0.04326694, 0.003430341, -0.02608429, 0.0032381257, -0.036080334, -0.009519352, 0.018409394, -0.027067425, -0.030483223, 0.006787878, -0.023782145, 0.0549155, 0.046332758, -0.05638755, 0.022361925, 0.035525773, 0.019657591, -0.03128678, 0.04525237, 0.025021112, -0.0129818395, 0.0047122003, 0.018788427, -0.0004696601, 0.0029710366, -0.010985341, 0.0016925009, 0.0278345, 0.060102712, 0.024652401, -0.001345422, 0.0014339271, 0.011426942, 0.0017097284, -0.005239492, -0.037725806, 0.0031577083, -0.004199703, 0.05549175, 0.011725599, 0.019332808, 0.022565627, -0.018013434, 0.025877966, -0.007077398, -0.01624118, 0.056991026, -0.022728417]}\n",
      "----------------------------------------\n",
      "ID: 44e1432c-dabd-4314-9777-af54036484bd\n",
      "Source: {'text': 'Appendix Function Glossary randomString() The randomString() command generates a random string based on a specified pattern and stores it in a target variable. It is especially useful when random strings are needed to conform to a specific format, such as passwords or identifiers. Parameters Pattern Type: var Description: A regular expression (regex) pattern that defines the characters and structure of the string to be generated. It can be a direct value or a variable containing the pattern. For example, [a-zA-Z0-9] will generate a string that includes uppercase letters, lowercase letters, and numbers. Length Type: var Description: An integer value specifying the length of the random string to be generated. It can be a direct value or a variable containing the desired length. This value determines how many characters the resulting string will have. TargetVariable Type: var Description: The variable where the generated string will be stored. This variable should be used later in the program. Unlike the other parameters, this must be a variable and not a direct value. Usage Example // Direct call with values: randomString(\\'[a-zA-Z0-9]\\', 8, generatedPassword) // Call using variables: pattern = \\'[a-zA-Z0-9]\\' length = 8 randomString(pattern, length, generatedPassword) stampToDatetime() The stampToDatetime() command converts a timestamp value to a date and time according to a specified format, applying a possible time difference, and stores the result in a target variable. It is useful for manipulating and formatting time values into different representations. Parameters timestamp Type: var Description: A value representing a timestamp, which can be provided directly or through a variable. This value is the starting point for conversion to a date and time format. Format Type: var Description: A format string that defines how the resulting date and time should be presented. This string follows the same conventions used in Python for formatting dates and times. Common symbols include: %Y: Year with four digits (e.g., 2024) %m: Month with two digits (01 to 12) %d: Day of the month with two digits (01 to 31) %H: Hour in 24-hour format (00 to 23) %M: Minutes (00 to 59) %S: Seconds (00 to 59) For example, the format %Y-%m-%d %H:%M:%S converts a timestamp into a string like 2024-08-25 14:30:00. It can be a direct value or a variable containing the desired format. TimeDelta Type: var Description: An optional value representing a time adjustment (positive or negative) applied to the timestamp before conversion. This value can be provided directly or through a variable and is expressed in seconds. TargetVariable Type: var Description: The variable where the resulting date and time from the conversion will be stored. Unlike the other parameters, this must be a variable and not a direct value. Usage Example // Direct call with values: stampToDatetime(1692966600, \\'%Y-%m-%d %H:%M:%S\\', 3600, convertedDatetime) // Call using variables: timestamp = 1692966600 format = \\'%Y-%m-%d %H:%M:%S\\' adjustment = 3600 stampToDatetime(timestamp, format, adjustment, convertedDatetime) In the first example, a timestamp is converted to a date and time in the format \"%Y-%m-%d %H:%M:%S\", applying a 3600-second (1-hour) adjustment, and the result is stored in the variable convertedDatetime. In the second example, variables are used to define the timestamp, format, and adjustment. getTimeStamp() The getTimeStamp() command converts a date and time string, given in a specific format, to a timestamp value. Additionally, it allows for an optional time adjustment before storing the result in a target variable. This command is useful for converting human-readable date and time representations to a numeric timestamp format, which can be used in calculations or time comparisons. Parameters DateString Type: var Description: A string representing a date and time. This string must follow the format specified in the Format parameter. It can be a direct value or a variable containing the date string. Format Type: var Description: A format string that defines how to interpret the date and time string (DateString). This string follows Python\\'s conventions for formatting and parsing dates and times. Some common symbols include: %Y: Year with four digits (e.g., 2024) %m: Month with two digits (01 to 12) %d: Day of the month with two digits (01 to 31) %H: Hour in 24-hour format (00 to 23) %M: Minutes (00 to 59) %S: Seconds (00 to 59) For example, to interpret the string \"2024-08-25 14:30:00\", the format %Y-%m-%d %H:%M:%S would be used. It can be a direct value or a variable containing the format. TimeDelta Type: var Description: An optional value representing a time adjustment (positive or negative) applied to the timestamp after conversion. This value can be provided directly or through a variable and is expressed in seconds. TargetVariable Type: var Description: The variable where the resulting timestamp from the conversion will be stored. Unlike the other parameters, this must be a variable and not a direct value. Usage Example // Direct call with values: getTimeStamp(\\'2024-08-25 14:30:00\\', \\'%Y-%m-%d %H:%M:%S\\', 3600, generatedTimestamp) // Call using variables: date = \\'2024-08-25 14:30:00\\' format = \\'%Y-%m-%d %H:%M:%S\\' adjustment = 3600 getTimeStamp(date, format, adjustment, generatedTimestamp) In the first example, the date and time string \"2024-08-25 14:30:00\" is converted to a timestamp, applying a 3600-second (1-hour) adjustment, and the result is stored in the variable generatedTimestamp. In the second example, variables are used to define the date, format, and adjustment. getRegex() The getRegex() command searches for matches in a source string using a regular expression (regex) pattern and stores the result in a target variable. This command is useful for extracting specific parts of a string that match a defined pattern, such as email addresses, phone numbers, or any other structure defined by a regex. Parameters SourceVariable Type: variable Description: The variable containing the source string in which to search for regex pattern matches. This string is the text on which the regex search will be applied. rePattern Type: variable Description: The variable containing the regular expression (regex) pattern that defines what to search for in the source string. This pattern should follow standard regex rules, allowing the specification of sequences of characters to identify in the source string. TargetVariable Type: variable Description: The variable where the search result will be stored. Depending on the context and the pattern used, the result could be the first match found, all matches, or even specific groups within the match. Usage Example // Direct call with values: sourceText = \"Email: user@example.com and phone: 123-456-7890\" pattern = r\"\\\\b\\\\d{3}-\\\\d{3}-\\\\d{4}\\\\b\" getRegex(sourceText, pattern, phoneNumber) // Call using variables: sourceText = \"Visit our website at https://www.example.com for more information.\" regexPattern = r\"https?://\\\\S+\" getRegex(sourceText, regexPattern, foundURL) In the first example, a phone number in the format 123-456-7890 is searched in the sourceText string and the result is stored in the phoneNumber variable. In the second example, a URL is extracted from the sourceText string using a regex that identifies URL patterns, and the result is stored in the foundURL variable. getDateTime() The getDateTime() command retrieves the current date and time, formats it according to a specified format, applies an optional time adjustment, and converts it to a specific time zone before storing the result in a target variable. It is useful for obtaining and manipulating the current date and time in different formats and time zones. Parameters Format Type: var Description: A format string that defines how the resulting date and time should be presented. This string follows the date and time formatting conventions used in Python. Some of the most common symbols include: %Y: Year with four digits (e.g., 2024) %m: Month with two digits (01 to 12) %d: Day of the month with two digits (01 to 31) %H: Hour in 24-hour format (00 to 23) %M: Minutes (00 to 59) %S: Seconds (00 to 59) For example, the format \"%Y-%m-%d %H:%M:%S\" will present the date and time as 2024-08-25 14:30:00. It can be a direct value or a variable containing the desired format. TimeDelta Type: var Description: An optional value representing a time adjustment (positive or negative) applied to the current date and time before conversion. This value can be provided directly or through a variable and is expressed in seconds. TimeZone Type: var Description: The time zone to which the date and time should be converted. This value can be a time zone identifier provided directly or through a variable. Some common time zones include: \"UTC\": Coordinated Universal Time \"America/New_York\": U.S. Eastern Time (EST/EDT) \"America/Los_Angeles\": U.S. Pacific Time (PST/PDT) \"Europe/London\": London Time (GMT/BST) \"Europe/Madrid\": Madrid Time (CET/CEST) \"Asia/Tokyo\": Tokyo Time (JST) \"Australia/Sydney\": Sydney Time (AEST/AEDT) You can use any time zone recognized by the pytz library in Python, which includes most time zones worldwide. TargetVariable Type: var Description: The variable in which the resulting date and time from the operation will be stored. Unlike the other parameters, this must be a variable and not a direct value. Usage Example // Direct call with values: getDateTime(\\'%Y-%m-%d %H:%M:%S\\', 3600, \\'UTC\\', currentTime) // Call using variables: format = \\'%Y-%m-%d %H:%M:%S\\' adjustment = 3600 timeZone = \\'America/New_York\\' getDateTime(format, adjustment, timeZone, currentDateTime) In the first example, the current date and time are retrieved, adjusted by 3600 seconds (1 hour), converted to UTC, and stored in the variable currentTime. In the second example, variables are used to define the format, time adjustment, and time zone, with the result stored in the currentDateTime variable. encodeMD5() The encodeMD5() command generates an MD5 hash of the provided string and stores the result in a target variable. MD5 is a cryptographic hash function that produces a 128-bit value (32 hexadecimal characters), commonly used to verify data integrity. Parameters SourceVariable Type: var Description: The variable containing the text string to be encoded in MD5. It can be a direct value or a variable storing the input string. TargetVariable Type: var Description: The variable in which the resulting MD5 hash will be stored. Unlike the SourceVariable parameter, this must be a variable and not a direct value. Usage Example // Direct call with values: encodeMD5(\\'example_string\\', md5Hash) // Call using variables: text = \\'example_string\\' hashVariable = \\'md5Hash\\' encodeMD5(text, hashVariable) In the first example, an MD5 hash is generated from the string \\'example_string\\' and stored in the md5Hash variable. In the second example, a variable text is used to define the input string and another variable hashVariable is used to store the resulting MD5 hash. encodeSHA256() The encodeSHA256() command generates a SHA-256 hash of the provided string and stores the result in a target variable. SHA-256 is a cryptographic hash function that produces a 256-bit value (64 hexadecimal characters), offering greater security compared to MD5. Parameters SourceVariable Type: var Description: The variable containing the text string to be encoded in SHA-256. It can be a direct value or a variable storing the input string. TargetVariable Type: var Description: The variable in which the resulting SHA-256 hash will be stored. Unlike the SourceVariable parameter, this must be a variable and not a direct value. Usage Example // Direct call with values: encodeSHA256(\\'example_string\\', sha256Hash) // Call using variables: text = \\'example_string\\' hashVariable = \\'sha256Hash\\' encodeSHA256(text, hashVariable) In the first example, a SHA-256 hash is generated from the string \\'example_string\\' and stored in the sha256Hash variable. In the second example, a variable text is used to define the input string, and another variable hashVariable is used to store the resulting SHA-256 hash. getQueryParamList() The getQueryParamList() command extracts the query parameters from the current HTTP request and stores a list of these parameters in a target variable. This is useful for handling and processing query parameters in web applications. Parameters TargetVariable Type: var Description: The variable in which the extracted query parameter list will be stored. This should be a variable where the command\\'s result will be saved. Command Flow Parameter Extraction: Accesses the query parameters from the current HTTP request. List Construction: Creates a list containing dictionaries, where each dictionary represents a query parameter and its associated value. Result Storage: Saves the list of parameters in the variable specified by TargetVariable. Usage Example Suppose the HTTP query has the following parameters: ?user=alice&age=30. // Define the variable to store the result queryParamsList = [] // Call the command to extract query parameters getQueryParamList(queryParamsList) // Return the list of query parameters via addResult addResult(queryParamsList) Given the query string ?user=alice&age=30, the getQueryParamList() command will generate the following list of parameters: [ {\"user\": \"alice\"}, {\"age\": \"30\"} ] getListLen() The getListLen() command calculates the length of a list and stores the result in a target variable. This command is useful for determining the number of elements in a list. Parameters SourceVariable Type: var Description: The variable containing the list whose length you want to calculate. It can be a variable that stores the list or a direct value representing the list. TargetVariable Type: var Description: The variable where the result of the list length will be stored. This should be a variable that will receive the integer value representing the number of elements in the list. Command Flow Retrieve the List: Access the list stored in the SourceVariable. Calculate the Length: Calculate the number of elements in the list. Store the Result: Save the calculated length in the variable specified by TargetVariable. Usage Example Suppose the list in myList is [\\'apple\\', \\'banana\\', \\'cherry\\']. // Variable definitions myList = [\\'apple\\', \\'banana\\', \\'cherry\\'] listLength = 0 // Call the command to calculate the length of the list getListLen(myList, listLength) // Return the list length through addResult addResult(listLength) Since the list myList has 3 elements, the getListLen() command will calculate that the length is 3. This value will be stored in the listLength variable and returned through addResult(listLength), resulting in the following output: 3 itemFromList() The itemFromList() command extracts a specific element from a list based on a given index and stores the result in a target variable. This is useful for accessing individual elements within a list. Parameters SourceVariable Type: var Description: The variable containing the list from which an element is to be extracted. It can be a variable that stores the list or a direct value representing the list. index Type: value Description: The index of the element to be extracted from the list. It must be an integer value that indicates the position of the element within the list. TargetVariable Type: var Description: The variable where the extracted element will be stored. It must be a variable that will receive the value of the element at the specified index position. Command Flow Access the List: Access the list stored in the SourceVariable. Extract the Element: Retrieve the element at the position specified by the index. Store the Result: Save the extracted element in the variable specified by TargetVariable. Usage Example Suppose the list in myList is [\\'apple\\', \\'banana\\', \\'cherry\\'] and you want to extract the element at index 1. // Variable definitions myList = [\\'apple\\', \\'banana\\', \\'cherry\\'] element = \\'\\' // Call the command to extract the element at index 1 itemFromList(myList, 1, element) // Return the extracted element through addResult addResult(element) Since index 1 corresponds to the element \\'banana\\' in the myList, the itemFromList() command will extract \\'banana\\' and store it in the variable element. The element variable will be returned through addResult(element), resulting in the following output: \"banana\" variableFromJSON() The variableFromJSON() command extracts the value associated with a specific key from a JSON object and stores the result in a target variable. This command is useful for accessing values within a JSON object. Parameters SourceVariable Type: var Description: The variable containing the JSON object from which a value is to be extracted. It can be a variable that stores the JSON object or a direct value representing the JSON object. key Type: value Description: The key whose value is to be extracted from the JSON object. It must be a value that represents the key within the JSON object. TargetVariable Type: var Description: The variable where the extracted value will be stored. It must be a variable that will receive the value associated with the specified key in the JSON object. Command Flow Access the JSON Object: Access the JSON object stored in the SourceVariable. Extract the Value: Retrieve the value associated with the key within the JSON object. Store the Result: Save the extracted value in the variable specified by TargetVariable. Usage Example Suppose the JSON object in jsonData is \"name\": \"Alice\", \"age\": 30 and you want to extract the value associated with the key \"name\". // Variable definitions jsonData = {\"name\": \"Alice\", \"age\": 30} nameValue = \\'\\' // Call the command to extract the value associated with the key \"name\" variableFromJSON(jsonData, \"name\", nameValue) // Return the extracted value through addResult addResult(nameValue) Since the value associated with the key \"name\" in the JSON object jsonData is \"Alice\", the variableFromJSON() command will extract \"Alice\" and store it in the variable nameValue. The nameValue variable will be returned through addResult(nameValue), resulting in the following output: \"Alice\" AddVariableToJSON() The AddVariableToJSON() command adds a new key and its corresponding value to a JSON object and stores the result in a target variable. This command is useful for updating a JSON object with new key-value pairs. Parameters Key Type: variable Description: The key to be added to the JSON object. It must be a variable that stores the key to be added. Value Type: variable Description: The value associated with the key to be added to the JSON object. It must be a variable that stores the corresponding value. TargetVariable Type: variable Description: The variable where the updated JSON object will be stored. It must be a variable that will receive the JSON object with the new key and its added value. Command Flow Access the JSON Object: Access the JSON object stored in the TargetVariable. Add the Key and Value: Add the new key and its associated value to the JSON object. Store the Result: Save the updated JSON object in the variable specified by TargetVariable. Usage Example Suppose the initial JSON object in jsonData is \"name\": \"Alice\", \"age\": 30, and you want to add a new key \"email\" with the value \"alice@example.com\". // Variable definitions jsonData = {\"name\": \"Alice\", \"age\": 30} newKey = \"email\" newValue = \"alice@example.com\" // Call the command to add the new key and value to the JSON object AddVariableToJSON(newKey, newValue, jsonData) // Return the updated JSON object through addResult addResult(jsonData) This updated JSON object will be stored in the variable jsonData and will be returned through addResult(jsonData), resulting in the following output: { \"name\": \"Alice\", \"age\": 30, \"email\": \"alice@example.com\" } variableToList() The variableToList() command converts an element into a list that contains only that element and stores the resulting list in a target variable. This command is useful to ensure that a single value is handled as a list in subsequent processing. Parameters element Type: variable Description: The variable that contains the element to be converted into a list. It can be any type of value that you want to include as the only item in the list. TargetVariable Type: variable Description: The variable in which the resulting list will be stored. It must be a variable that will receive the list with the included element. Command Flow Access the Element: Access the element stored in the element variable. Create the List: Create a list that contains only the provided element. Store the Result: Save the resulting list in the variable specified by TargetVariable. Usage Example Suppose the element in myElement is \"apple\" and you want to convert it into a list. // Variable definitions myElement = \"apple\" myList = [] // Call the command to convert the element into a list variableToList(myElement, myList) // Return the resulting list through addResult addResult(myList) Since myElement is \"apple\", the variableToList() command will convert this element into a list with a single item: [\"apple\"]. This list will be stored in the variable myList, and myList will be returned through addResult(myList), resulting in the following output: [\"apple\"] addParam() The addParam() command retrieves the value associated with a specific key from the query string of the current request and assigns this value to a target variable. This command is useful for extracting values from query parameters in an HTTP request and storing them in variables for processing. Parameters param Type: value Description: The key of the query string whose value you want to retrieve. It should be a value that represents the key in the query string. variable Type: var Description: The variable in which the retrieved value from the query string will be stored. It must be a variable that will receive the value associated with the specified key. Command Flow Retrieve the Value: Access the value associated with the param key from the query string of the current request. Assign the Value: Assign the retrieved value to the variable specified by variable. Usage Example Suppose the query string of the current request is ?user=alice&age=30, and you want to retrieve the value associated with the key \"user\". // Variable definitions userName = \\'\\' // Call the command to retrieve the value for the \"user\" key and assign it to the variable addParam(\"user\", userName) // Return the retrieved value through addResult addResult(userName) Given the query string ?user=alice&age=30, the addParam() command will retrieve the value \"alice\" associated with the key \"user\" and store it in the userName variable. The userName variable will be returned through addResult(userName), resulting in the following output: \"alice\" addResult() The addResult() command is used to return the content of a variable as part of the command or function response. It is the way to present results or processed data from commands and operations performed in the language. Parameters variable Type: var Description: The variable whose content is to be returned as the result. It should be a variable that contains the value or data you want to include in the response. Command Flow Access the Content: Access the content of the variable provided as a parameter. Return the Result: Include the content of the variable in the final response. Example Usage Suppose we have performed an operation and want to return the result stored in the result variable. // Define the variable with the result of an operation result = \"Operation completed successfully.\" // Call the command to return the content of the variable addResult(result) In this example, the addResult(result) command will return the content of the result variable, which is \"Operation completed successfully.\". This content will be presented as part of the response. Note The addResult() command is the primary mechanism for returning information and results in the language. Make sure that the variable passed to the command contains the desired data or result before calling addResult(). RequestPost() The RequestPost() command performs an HTTP POST request to a specified URL, sending a query string, headers, and a request body, and stores the result of the request in a destination variable. This command is useful for sending data to a server and handling the responses from the request. Parameters url Type: variable Description: The URL to which the POST request will be sent. It should be a variable containing the address of the resource to which the request is to be made. querystring Type: variable Description: The query string that will be appended to the URL. It should be a variable containing the query parameters in string format. headers Type: variable Description: The HTTP headers that will be included in the POST request. It should be a variable containing a dictionary of headers and their values. body Type: variable Description: The body of the POST request that will be sent to the server. It should be a variable containing the data to be sent in the request. o_result Type: variable Description: The variable in which the result of the POST request will be stored. It should be a variable that will receive the server\\'s response. Command Flow Build the Request: Uses the provided URL, query string, headers, and body to construct the POST request. Send the Request: Sends the POST request to the specified server. Store the Result: Saves the server\\'s response in the variable specified by o_result. Example Usage Suppose you want to send a POST request to https://api.example.com/data, with a query string userId=123, headers including Content-Type: application/json, and a body with JSON data. // Define variables url = \"https://api.example.com/data\" querystring = \"userId=123\" headers = {\"Content-Type\": \"application/json\"} body = \\'{\"name\": \"Alice\", \"age\": 30}\\' response = \\'\\' // Call the command to perform the POST request RequestPost(url, querystring, headers, body, response) // Return the request result via addResult addResult(response) In this example, the RequestPost() command will send a POST request to https://api.example.com/data with the provided query string, headers, and body. The server\\'s response will be stored in the response variable, and this variable will be returned via addResult(response). The result of the request will be included in the final response. ormCreateTable() The ormCreateTable() command creates a new table in a database using the specified ORM (Object-Relational Mapping). This command defines the columns of the table and their data types, and stores a reference to the created table in a destination variable. Parameters fields Type: value Description: A string containing the names of the table columns, separated by commas. Each column name should correspond to a field in the table. fieldsType Type: value Description: A string containing the data types for each column, separated by commas. The data types should be in the same order as the column names in fields. dbaseName Type: value Description: The name of the database where the table will be created. It should be a string indicating the target database. varTarget Type: variable Description: The variable in which the reference to the created table will be stored. It should be a variable that will receive the reference to the new table. Command Flow Define the Table: Uses the column names (fields) and their data types (fieldsType) to define the structure of the new table. Create the Table: Creates the table in the database specified by dbaseName using the provided definition. Store the Result: Saves the reference to the created table in the variable specified by varTarget. Example Usage Suppose you want to create a table called users in a database called myDatabase, with two columns: username of type VARCHAR and age of type INTEGER. // Define variables fields = \"username,age\" fieldsType = \"VARCHAR,INTEGER\" dbaseName = \"myDatabase\" tableReference = \\'\\' // Call the command to create the table ormCreateTable(fields, fieldsType, dbaseName, tableReference) // Return the reference to the created table via addResult addResult(tableReference) In this example, the ormCreateTable() command will create a table in the myDatabase database with the specified columns and data types. The reference to the new table will be stored in the tableReference variable, and this variable will be returned via addResult(tableReference). The output will include the reference to the created table. ormCheckTable() The ormCheckTable() command checks for the existence of a table in a specific database and stores the result in a destination variable. This command is useful for verifying if a table already exists before attempting further operations on it. Parameters dbaseName Type: value Description: The name of the database in which the table\\'s existence should be checked. It should be a string indicating the database to check. varTarget Type: variable Description: The variable in which the result of the check will be stored. It should be a variable that will receive a value indicating whether the table exists or not. Command Flow Check Existence: Accesses the database specified by dbaseName to verify if the requested table exists. Store the Result: Saves the result of the check in the variable specified by varTarget. The stored value will indicate whether the table exists (True or False). Example Usage Suppose you want to check if a table called users exists in a database called myDatabase. // Define variables dbaseName = \"myDatabase\" tableExists = \\'\\' // Call the command to check the existence of the table ormCheckTable(dbaseName, tableExists) // Return the result of the check via addResult addResult(tableExists) In this example, the ormCheckTable() command will check for the existence of the users table in the myDatabase database. The result of the check (whether the table exists or not) will be stored in the tableExists variable, and this variable will be returned via addResult(tableExists). The output will reflect whether the table exists (True) or not (False). ormAccessUpdate() The ormAccessUpdate() command updates records in a database table based on the provided selection criteria. This command modifies the values of specified fields in a database using the corresponding values from variables. Parameters fields Type: variable Description: A string containing the names of the fields to be updated. The field names should be separated by commas. fieldsValuesVariables Type: variable Description: A string containing the names of the variables holding the new values for the specified fields. The variable names should be separated by commas, in the same order as the fields in fields. dbase Type: variable Description: The name of the database where the table to be updated is located. It should be a variable containing the name of the database. selector Type: variable Description: A condition to select the records to be updated. It should be a string specifying the selection criteria in SQL format, such as id = 1. varTarget Type: variable Description: The variable in which the result of the update operation will be stored. It should be a variable that will receive a value indicating whether the update was successful or not. Command Flow Define Fields and Values: Uses the field names (fields) and the variables with the values to be updated (fieldsValuesVariables) to define which records should be modified and with what data. Select Records: Uses the condition provided in selector to identify the records to be updated. Update the Database: Performs the update in the database specified by dbase, applying the changes to the records that meet the selector condition. Store the Result: Saves the result of the update operation in the variable specified by varTarget. The stored value will indicate whether the update was successful (True) or failed (False). Example Usage Suppose you want to update the age field to 31 for the user with id equal to 1 in a database called myDatabase. // Define variables fields = \"age\" fieldsValuesVariables = \"newAge\" dbase = \"myDatabase\" selector = \"id = 1\" updateSuccess = \\'\\' // Define the variable holding the new value newAge = 31 // Call the command to update the record ormAccessUpdate(fields, fieldsValuesVariables, dbase, selector, updateSuccess) // Return the result of the update via addResult addResult(updateSuccess) In this example, the ormAccessUpdate() command will update the age field in the myDatabase database for the record where id = 1. The new value for age is 31, stored in the newAge variable. The updateSuccess variable will store the result of the operation (whether it was successful or not), and this variable will be returned via addResult(updateSuccess). ormAccessSelect() The ormAccessSelect() command retrieves records from a table in a database based on the provided selection criteria. This command selects the desired fields and stores the results in a target variable. Parameters fields Type: variable Description: A string containing the names of the fields to be retrieved. The field names should be separated by commas. dbase Type: variable Description: The name of the database from which records should be retrieved. It must be a variable containing the name of the database. selector Type: variable Description: A condition to select the records to be retrieved. It must be a string specifying the selection criteria in SQL format, such as id = 1. varTarget Type: variable Description: The variable in which the query results will be stored. It must be a variable that will receive a list of dictionaries, each representing a retrieved record. Command Flow Defining the Fields: Use the field names (fields) to specify which data should be retrieved. Selecting Records: Use the condition provided in selector to identify which records should be selected from the database. Retrieving Data: Access the database specified by dbase and retrieve the records that meet the selector condition, including only the specified fields. Storing the Result: Save the query results in the variable specified by varTarget. The stored value will be a list of dictionaries, where each dictionary represents a retrieved record with the requested fields. Example Usage Suppose you want to retrieve the username field for all users where age is greater than 25 from a database called myDatabase. // Define variables fields = \"username\" dbase = \"myDatabase\" selector = \"age > 25\" usersList = \\'\\' // Call the command to retrieve the records ormAccessSelect(fields, dbase, selector, usersList) // Return the query results via addResult addResult(usersList) In this example, the ormAccessSelect() command will retrieve the username field for all users in the myDatabase database where age is greater than 25. The results will be stored in the usersList variable, and this variable will be returned via addResult(usersList). The output will be a list of dictionaries, each representing a user whose username has been retrieved. ormAccessInsert() The ormAccessInsert() command inserts a new record into a database table using the provided values for the fields. This command defines the fields and their corresponding values, and stores the result of the operation in a target variable. Parameters fields Type: variable Description: A string containing the names of the fields into which the values will be inserted. The field names should be separated by commas. fieldsValuesVariables Type: variable Description: A string containing the names of the variables that hold the values to be inserted into the specified fields. The variable names should be separated by commas, in the same order as the fields in fields. dbase Type: variable Description: The name of the database where the table into which the new record should be inserted is located. It must be a variable containing the name of the database. varTarget Type: variable Description: The variable in which the result of the insertion operation will be stored. It must be a variable that will receive a value indicating whether the insertion was successful or not. Command Flow Defining the Fields and Values: Use the field names (fields) and the variables with the values to be inserted (fieldsValuesVariables) to define what data should be inserted. Inserting into the Database: Perform the insertion of the new record into the database specified by dbase, using the provided values. Storing the Result: Save the result of the insertion operation in the variable specified by varTarget. The stored value will indicate whether the insertion was successful (True) or failed (False). Example Usage Suppose you want to insert a new record into a table called users in a database called myDatabase, with values for username and age coming from the variables newUsername and newAge. // Define variables fields = \"username,age\" fieldsValuesVariables = \"newUsername,newAge\" dbase = \"myDatabase\" insertSuccess = \\'\\' // Define the variables with the new values newUsername = \"Alice\" newAge = 31 // Call the command to insert the new record ormAccessInsert(fields, fieldsValuesVariables, dbase, insertSuccess) // Return the result of the insertion via addResult addResult(insertSuccess) In this example, the ormAccessInsert() command will insert a new record into the myDatabase database in the users table. The values for username and age are provided by the newUsername and newAge variables. The insertSuccess variable will store the result of the operation (whether it was successful or not), and this variable will be returned via addResult(insertSuccess). The output will reflect whether the insertion was successful (True) or failed (False). ormAI() The ormAI() command uses an artificial intelligence model to convert a natural language query into an SQL statement, which is then executed against a database. This command processes a natural language query to generate an SQL statement that is executed on the table specified in the source parameter, and stores the result in a target variable. Parameters prompt Type: variable Description: A string in natural language that describes the query to be made. For example, \"get the value of the row with id 5\". source Type: variable Description: The name of the table on which the generated query should be executed. It must be a variable containing the name of the table in the database. TargetVariable Type: variable Description: The variable in which the result of the query will be stored. It must be a variable that will receive the result of the generated and executed SQL query. Command Flow Generating SQL Query: Use the artificial intelligence model to convert the prompt into an SQL statement. For example, if the prompt is \"get the value of the row with id 5\", the AI will generate the SQL query SELECT * FROM source WHERE id = 5;. Executing the Query: Execute the generated SQL statement on the table specified in source. Storing the Result: Save the result of the query execution in the variable specified by TargetVariable. The result will be the dataset retrieved by the executed SQL statement. Example Usage Suppose you want to retrieve all the data from the row with id equal to 5 from a table called users. // Define variables prompt = \"get the value of the row with id 5\" source = \"users\" queryResult = \\'\\' // Call the command to process the query ormAI(prompt, source, queryResult) // Return the query result via addResult addResult(queryResult) In this example, the ormAI() command will convert the prompt into an SQL query: SELECT * FROM users WHERE id = 5;. This query will be executed on the users table, and the results will be stored in the queryResult variable. The queryResult variable will be returned via addResult(queryResult). The output will be the dataset retrieved by the executed SQL statement. functionAI() The functionAI() command uses an artificial intelligence model to convert a natural language description of a function or process into a code implementation, which is then executed and returns the result. This command converts a description provided in prompt into a function that operates on the data of the table specified in source, and stores the result in a target variable. Parameters prompt Type: variable Description: A string in natural language that describes the process or function to be executed. For example, \"calculate the average of the salary column\". source Type: variable Description: The name of the table on which the generated function should be executed. It must be a variable containing the name of the table in the database. TargetVariable Type: variable Description: The variable in which the result of the executed function or process will be stored. It must be a variable that will receive the result of the generated and executed code. Command Flow Generating Code: Use the artificial intelligence model to convert the prompt into a code implementation. For example, if the prompt is \"calculate the average of the salary column\", the AI will generate the code necessary to calculate the average of that column. Executing the Code: Execute the generated code on the table specified in source. Storing the Result: Save the result of the code execution in the variable specified by TargetVariable. The result will be the calculated value or the dataset produced by the executed code. Example Usage Suppose you want to calculate the average of the salary column in a table called employees. // Define variables prompt = \"calculate the average of the salary column\" source = \"employees\" averageSalary = \\'\\' // Call the command to process the function functionAI(prompt, source, averageSalary) // Return the result of the function via addResult addResult(averageSalary) In this example, the functionAI() command will convert the prompt into a code implementation to calculate the average of the salary column in the employees table. The result of the calculation will be stored in the averageSalary variable, and this variable will be returned via addResult(averageSalary). The output will be the calculated average of the salary column.', 'metadata': {'source': '16_Appendix.txt'}, 'vector': [-0.039702903, 0.017190132, -0.014009416, -0.1452363, 0.039437953, -0.020370359, -0.029150667, -0.03774486, -0.06678115, -0.06484088, -0.027298493, -0.0010891099, 0.010132746, -0.013455071, -0.041074958, 0.07930499, 0.034428827, 0.018313963, 0.009516127, -0.0015133987, 0.03417455, 0.009549908, 0.011671974, 0.024897158, 0.009508864, -0.0051583676, -0.036886144, 0.033383287, -0.02599022, -0.040409096, 0.03560718, -0.023886561, -0.021370918, -0.023306822, -0.039439574, -0.017726561, 0.028686339, -0.02049644, 0.006298598, 0.013431575, -0.02520438, 0.005462283, 0.040144525, 0.032162577, 0.0063170064, -0.013935834, 0.007059241, 0.0077982307, 0.010300371, 0.025701197, -0.05310065, -0.048653312, 0.028384497, -0.024024975, -0.008992075, -0.0041092006, 0.03472944, -0.008161747, 0.026004413, 0.028261133, -0.08835855, 0.03492326, -0.03530129, -0.01226181, 0.023129417, -0.056344684, 0.019086713, 0.01546155, -0.094470575, -0.02431599, 0.017760681, -0.027378643, 0.0009395427, 0.036663767, 0.012917368, 0.0061905542, 0.0050698565, 0.03560879, 0.037987888, 0.03784389, -0.007454422, 0.09796489, 0.0339542, 0.016161785, -0.012975458, 0.009310099, -0.030505111, -0.017020259, 0.010338888, -0.030146124, -0.025574341, 0.039514128, -0.074965335, 0.018889189, 0.0034113901, -0.002360688, 0.0150245875, -0.005012618, -0.013048025, 0.004546758, 0.007003538, 0.0061951517, 0.015137956, -0.0037179897, -0.050722953, 0.014509888, -0.06479785, 0.03163316, -0.022280687, -0.0593293, -0.013102981, 0.021065624, 0.041934438, 0.024838412, -0.02679523, 0.006854262, -0.048258636, -0.021140488, 0.019576102, -0.011150647, 0.030550191, -0.018119428, 0.00966636, 0.004515762, 0.068132624, -0.0015152135, -0.02861639, -0.007897681, -0.00081447675, -0.04440533, 0.0065460075, -0.025981743, -0.026482526, -0.043789495, 0.026740521, 0.037868127, 0.009091795, -0.021526078, 0.052049704, 0.0044625816, -0.013074993, -0.018237801, -0.019083807, 0.007043864, -0.00074410107, 0.025129493, 0.0074128844, -0.007323252, 0.020967836, 0.04192252, 0.052729487, 0.004859457, -0.04230993, -0.010858134, 0.010552054, 0.023706056, -0.0067297476, -0.021875655, 0.011620913, 0.05582416, 0.02634304, -0.015499172, 0.027038334, -0.055393703, -0.019172648, 0.069978565, -0.082587056, -0.016525129, -0.03938283, -0.02219011, 0.007852201, -0.000983803, -0.0008903302, -0.02878714, 0.029890241, -0.019551829, -0.038424503, -0.029429844, 0.030493911, 0.00036449026, -0.017345699, -0.006040326, 0.030025454, 0.005275336, 0.006005995, 0.04072775, 0.022321057, -0.05554822, -0.0074271085, -0.02776552, -0.007549014, -0.029962922, -0.04690251, -0.028638473, -0.009716852, -0.02327715, -0.008092007, -0.009695801, -0.013022553, -0.010087434, -0.022100005, 0.011368015, 0.0051915953, 0.009499499, -0.03476719, -0.013183884, 0.026691107, 0.0008775753, -0.0118723735, -0.03786089, -0.01786233, 0.022451872, -0.008849239, 0.03022773, -0.0063368645, 0.036414124, 0.012627016, 0.01906224, -0.0075831804, 0.014854942, 0.035598017, 0.017847141, -0.022084294, 0.008013952, 0.022562364, -0.024394218, 0.019538136, 0.0007170978, -0.026430715, 0.0025892872, -0.0047437735, -0.061777823, 0.021535898, 0.0019277799, 0.037704118, -0.0077798665, -0.0037257767, -0.024742445, 0.041359913, 5.2249517e-05, -0.005751056, -0.02491888, -0.0032446783, 0.010945499, -0.044544842, 0.014367947, -0.022507085, 0.005468723, -0.02120074, 0.04102169, -0.0028675382, -0.06885525, -0.025140274, 0.039871164, 0.008988854, 0.029157935, 0.006525338, -0.01966548, 0.014281381, -0.0068388972, 0.047496676, -0.027939318, -0.035654638, 0.039098587, 0.04299096, 0.0047632167, -0.024081051, 0.006472607, -0.015919985, 0.0077847056, 0.009952997, 0.022607615, -0.00919714, -0.0040762466, 0.020132262, -0.017752571, 0.010926693, -0.11449698, 0.054794442, 0.02633236, -0.005112137, 0.022317152, 0.013954173, -0.06162731, 0.014852657, 0.04045936, 0.017419986, -0.026459713, -0.030377401, 0.0042604674, 0.07428042, -0.01324718, -0.029276853, 0.032459408, -0.03033221, -0.0002917617, -0.049732286, 0.025204474, 0.017305978, -0.093220025, 0.02833646, -0.011445124, -0.04057163, -0.0074899583, 0.022136053, -0.019103859, 0.021131923, -0.06674451, 0.02994043, -0.05103978, 0.034200124, 0.016669936, 0.0067069894, 0.025447764, -0.023587251, -0.032517884, -0.024883837, 0.020473257, 0.026713535, -0.020509424, -0.02309195, -0.06184902, 0.012079735, 0.010807406, -0.010276216, -0.024775252, 0.029793818, -0.021479312, 0.018509038, 0.06153581, 0.026576476, 0.08107666, 0.048984695, 0.024449352, 0.047189765, 0.019935705, 0.056272164, 0.010987547, 0.0031394125, -0.012580417, -0.027182397, 0.024794256, 0.0081475945, -0.052953187, -0.021919046, 0.00095664064, 0.015999878, 0.01819733, 0.020671861, 0.015891645, -0.046902467, 0.012734818, 0.018661916, -0.004627546, -0.011826606, -0.04270238, -0.00023367253, 0.0047948137, -0.041143134, -0.020798497, -0.05916228, -0.06555505, 0.022348398, 0.028979488, 0.005932356, 0.02191323, -0.043358274, -0.02695669, 0.017621012, -0.04685354, -0.04505407, -0.052050777, 0.01586746, -0.045628797, 0.061766382, 0.047046315, 0.023072382, -0.041395184, -0.029926622, 0.028120443, 0.009235117, -0.012161342, -0.026227627, 0.014887338, 0.024723645, -0.044661038, 0.0011893972, -0.08688496, 0.0058703185, -0.009766949, 0.034355123, 0.017866688, 0.029762352, -0.011105798, 0.04709442, 0.03759094, -0.080911286, 0.0084158415, 0.011380308, -0.005614524, 0.049931023, 0.014566823, -0.0925671, -0.0074746483, 0.025030227, 0.012588562, 0.006774051, -0.012246354, 0.0074982233, 0.00045021693, 0.046891533, 0.003036881, -0.017723305, -0.024087107, 0.046174854, -0.008819886, 0.073759474, -0.033943925, -0.013473338, 0.009750817, -0.032477666, 0.05142875, -0.06559079, -0.024460068, 0.027600333, -0.009069702, -0.090651646, -0.038170073, -0.015774895, 0.08903012, -0.031097677, 0.0016021302, -0.010743744, 0.01612136, -0.036288023, -0.004956529, 0.052992277, 0.023197968, -0.031888094, 0.013877262, -0.0285814, 0.014140907, 0.0037368527, -0.005691897, -0.0329823, -0.030314803, 0.007198144, 0.05160177, 0.01668373, 0.009715387, 0.059390053, -0.0121608935, 0.0083089685, -0.017934121, -0.024446689, -0.08131097, 0.024543816, -0.011211016, -0.029052801, 0.022018826, 0.0026544635, 0.036889832, -0.041628696, 0.0114266, -0.030235302, 0.026120253, 0.01719223, 0.013068864, 0.024856903, -0.016583074, 0.010391292, 0.037597384, -0.018741116, -0.022324208, 0.02737875, 0.03210724, -0.06537515, 0.054842368, -0.03347939, -0.021201842, -0.029775685, -0.04182818, 0.023264743, -0.038407896, 0.0936447, -0.029150888, 0.016469544, -0.042220134, -0.06824943, -0.023484953, 0.013745008, 0.030387867, -0.0073527354, -0.06447077, 0.014358709, 0.011612642, -0.013071298, -0.018539265, -0.07357233, 0.012307921, 0.008903877, -0.001287419, -0.013740811, -0.009797822, 0.013315894, -0.019266663, 0.029293822, -0.039154723, 0.022713734, 0.070848875, 0.05121022, -0.06855828, 0.015854787, 0.07449171, -0.022934234, -0.05942307, 0.009542187, 0.019527508, -0.06373181, -0.0011085167, -0.01029759, 0.0061131716, 0.034599293, -0.0034195143, -0.038537554, 0.07225469, -0.0027649126, 0.02905119, -0.01584631, 0.026627427, -0.037801675, -0.009364474, 0.031428188, -0.010610493, -0.010497033, 0.03772691, -0.0044978033, -0.005150089, -0.071093656, -0.008557253, -0.006303157, -0.023883283, -0.07845476, -0.01240736, 0.05087947, -0.017162971, -0.023080265, 0.066997096, -4.266711e-05, 0.03340145, 0.027169505, 0.026440201, 0.031994224, 0.0047178715, 0.017206516, -0.046349138, 0.081748635, -0.007673948, 0.046639122, 0.018994873, -0.02371742, 0.03436475, 0.01761117, -0.022515459, 0.00833733, -0.006395674, -0.019269323, 0.023743259, 0.015797686, 0.022121504, 0.09756869, 0.0048588375, -0.022993935, 0.013572953, 0.017472949, -0.047779404, 0.008800474, -0.00034692895, 0.017891025, -0.08700693, 0.025097873, 0.025627838, -0.0026330114, 0.02698174, -0.044119895, -0.017749634, 0.039483633, 0.037642345, 0.024217682, -0.0008440056, -0.023670055, -0.041858006, -0.022491183, -0.014264528, 0.06810273, -0.022788638, -0.0514295, -0.014474597, -0.038142484, 0.0034498645, -0.016267072, 0.047974233, 0.005190615, -0.019736268, -0.03385658, 0.02459441, -0.014492554, 0.0027776363, -0.023265181, 0.014866534, -0.06157372, 0.0046056034, -0.018946875, 0.053601414, 0.00053858676, 0.017966809, -0.002064094, 0.048580114, 0.012128104, -0.0521633, -0.009369715, 0.023266314, -0.0020971238, 0.084800914, 0.011818009, 0.011551578, -0.004124982, -0.034512825, -0.019994121, -0.018353747, -0.025430419, 0.021774026, -0.04971623, -0.0059473095, -0.00015113459, -0.0015216321, 0.013342011, -0.025931403, 0.03300981, -0.007732975, 0.0038511015, 0.019409308, 0.02879379, 0.0073551163, 0.020967394, 0.027092619, -0.018197274, 0.035021044, 0.028448524, -0.012711608, 0.056168016, 0.011215488, 0.034338474, -0.018443799, -0.040693186, -0.0045487043, -0.031486068, 0.017945966, 0.01013988, -0.06458554, 0.013845201, -0.018403305, 0.019526806, -0.06287935, 0.0029637592, 0.006473735, 0.059842546, -0.009342426, 0.075604565, -0.061237425, -0.041233934, -0.028139887, 0.004233155, 0.001025201, -0.0021212283, -0.014293806, -0.027144684, -0.01732994, -0.06112466, -0.0026487906, 0.008845121, -0.026307605, 0.04224633, -0.07131389, 0.007933779, -0.05592822, -0.061442107, 0.010764846, 0.020285934, -0.047234673, -0.042493824, -0.00093097665, 0.010716647, -0.0018781989, 0.002333077, 0.027189853, -0.012456768, -0.026445825, 0.0405139, 0.013311016, -0.0050854017, -0.02615381, -0.021289216, 0.04418361, 0.016350675, -0.04518289, -0.070366174, -0.0027679729, 0.006858079, -0.008551494, 0.016255692, -0.03266278, -0.008873505, -0.01469296, 0.028899537, -0.036210064, -0.03902186, 0.02077833, -0.008732604, -0.024326708, 0.023270724, -0.02210161, 0.052883595, 0.07379785, 0.0052933334, 0.011057377, 0.022750368, 0.020701244, 0.038804293, -0.023053514, -0.007865041, -0.019174851, 0.06364141, -0.019901318, 0.015394482, 0.011492721, 0.030514235, -0.043139387, 0.024660138, 0.009179754, 0.022923421, -0.0042092637, 0.00872298, -0.024717145, 0.0068298047, -0.007834015, 0.02660289, -0.053755596, 0.018989706, 0.013012048, 0.028277515, 0.0047775297, -0.001500632, 0.06554389, -0.017783776, 0.0030830652, 0.011365477, 0.039059684, 0.018950224, -0.01214549, 0.014308493, -0.034131423, -0.011344595, -0.01590005, 0.031398296, 0.014726236, -0.02402486, -0.04623476, -0.0035289377, -0.011696524, -0.0051782336, -0.018351099, 0.0034149473, 0.054386936, 0.010929215, -0.016662514, 0.0115319975, -0.014759543, -0.00056287355, 0.016727783, -0.014411386, -0.034596078, 0.0231742, -0.0042967456, -0.020462748, 0.03577359, -0.019742507, 0.011822434, 0.016921274, 0.047032814, 0.026515404, 0.019490043, 0.002486755, 0.03063758, -0.015055649, 0.06724879, 0.000452881, 0.019125622, -0.013094204, 0.01404332, 0.006821854, -0.0032318905, -0.033543654, -0.034571663, 0.010503876, -0.047595832, -0.006896212, 0.03476539, -0.011149105, -0.02725477, 0.04572672, 0.041165084, 0.0036698626, 0.016165828, -0.0071194675, -0.0017713092, -0.016280465, -0.029582907, -0.023784498, -0.016447483, -0.060652763, 0.0075208168, 0.005255004, 0.038306963, -0.050964065, -0.023563616, 0.033892855, -0.029150316, 0.019397348, 0.00374427, -0.015899466, -0.02593265, 0.07087217, 0.007219923, 0.02954154, 0.008945959, -0.023038125, -0.006816004, 0.0053607156, 0.02426702, 0.028545868, 0.0069276514, 0.0016854721, 0.057627004, -0.017131573, -0.036064193, -0.0116390865, -0.019773029, 0.009424699, -0.0028391413, 0.03615809, 0.02344167, 0.012906239, -0.00094042014, -0.04036995, 0.0057433345, -0.005478134, 0.032822937, -0.058528002, 0.03479009, -0.017048305, -0.011036985, -0.02061976, -0.013896508, -0.025761463, 0.05011847, -0.03123533, 0.012927523, -0.00029046534, 0.026886111, 0.022736272, 0.0025122084, 0.038903326, 0.0031975904, -0.033535764, -0.010709197, -0.016220527, 0.021799546, -0.013224086, 0.06868857, -0.077792704, -0.001691149, 0.023045458, 0.012668682, -0.02246876, -0.0333223, -0.002333343, 0.0025688778, -0.019462137, -0.031071285, 0.03240102, -0.0149816, 0.005819169, 0.041019686, -0.060966372, 0.012053123, 0.02862589, -0.007926375, -0.0013894434, -0.030140553, 0.039628796, -0.03724172, 0.0055819405, -0.016762359, -0.047134142, -0.0037999295, -0.0052805394, 0.010014968, -0.02146634, 0.018348172, -0.030097196, 0.02989976, -0.016593432, -0.0007707969, -0.012977745, 0.00043030264, 0.005490458, -0.0048912372, -0.0019364795, 0.023322014, -0.0091223, 0.013166024, 0.008295146, -0.0058268183, -0.047402713, -0.050977115, -0.0076478343, 0.018816432, -0.018382471, 0.014644228, 0.012465038, -0.016489992, 0.052135535, 0.036745235, 0.021209445, -0.0404902, 0.028337566, -0.04020283, -0.01906427, -0.0070829922, 0.008486779, -0.009212269, -0.0024181863, -0.019518787, 0.041754235, -0.0314876, 0.02130212, 0.032184128, 0.033774983, 0.011255984, -0.03331184, -0.042877987, -0.031158276, -0.023337511, 0.00032476234, -0.048343483, -0.023792155, -0.00870662, -0.015089235, 0.0106418645, -0.0031025694, -0.02201122, -0.00961874, 0.030339837, 0.019574575, -0.0037075537, 0.010810871, 0.027718684, 0.027177308, -0.04548726, 0.027364638, -0.026504643, 0.0011460863, 0.02794846, 0.01310881, 0.031843983, -0.03474562, -0.00849797, -0.024443412, 0.0010150858, -0.056300316, 0.0054863244, 0.017985053, 0.021389758, 0.028616145, -0.01635995, 0.001476917, 0.00910576, 0.0069813104, -0.04665775, 0.011993854, 0.00023349408, 0.012968996, -0.019698799, 0.008036461, 0.031426486, 0.016257027, -0.020568341, 0.025922453, -0.003570634, 0.022401987, 0.014476259, -0.015432437, -0.025837924, 0.012484829, 0.018356547, -0.01194616, 0.01329502, 0.005979102, 0.014245208, 0.013073029, 0.025284348, 0.039170485, -0.028053291, 0.02603721, -0.010109268, -0.008179804, 0.010241734, 0.008897759, -0.030655822, -0.018199952, -0.01446169, 0.021551099, 0.0046628015]}\n",
      "----------------------------------------\n",
      "ID: f350066a-aa46-424e-b05b-79f536938642\n",
      "Source: {'text': 'Function Declaration Introduction Functions in AVAP™ are reusable blocks of code that perform a specific task. Just like in Python, functions in AVAP™ allow for code modularization, improved readability, easier maintenance, and code reuse. Function Construction In AVAP™, similar to Python, functions are defined using the keyword def, followed by the function name and its parameters in parentheses. The function definition ends with a colon (:), followed by the block of code that forms the function body, indented with four spaces. Defining a function in AVAP™ def greet(name): return \"Hello, \" + name + \"!\" Calling the function message = greet(\"World\") print(message) Output Hello, World! Technical Features Parameters: Functions can accept zero or more parameters that are used as inputs to the function. Return Values: Functions can return a value using the return keyword. Scope: Functions in AVAP™ have their own scope, meaning that variables defined within a function are only visible within that function unless declared as global variables. Code Reusability: Functions allow for encapsulating and reusing blocks of code that perform specific tasks. Practical Example Below is a practical example illustrating the definition and invocation of a function in AVAP™: Definition of a Function to Calculate the Area of a Circle def calculate_circle_area(radius): return 3.14 * radius ** 2 Calling the Function circle_radius = 5 area = calculate_circle_area(circle_radius) print(\"The area of the circle is:\", area) Output: The area of the circle is: 78.5 Conclusions Functions are a fundamental part of programming in AVAP™, allowing for effective organization and modularization of code. By understanding how to define, construct, and call functions in AVAP™, developers can write clearer, more concise, and maintainable code, facilitating the development and management of applications.', 'metadata': {'source': '15_Function_declaration.txt'}, 'vector': [0.030155256, -0.03928725, -0.0049416986, -0.075051084, 0.03670794, 0.025239935, 0.008801507, 0.03736972, -0.04296645, -0.039372616, -0.032631077, -0.025015324, -0.013893777, -0.006079481, -0.013562438, 0.0010023251, 0.023487864, 0.08100672, -0.025938665, -0.05824456, -0.05949593, 0.02259107, -0.019599555, 0.04088429, -0.11222996, 0.007001158, 0.04572196, 0.038330913, -0.09899812, -0.012042089, -5.8447564e-05, -0.017349934, -0.080229826, 0.035739623, -0.053734303, -0.0062513547, -0.022882445, -0.1072512, 0.03735844, -0.046043944, -0.013993058, -0.01289581, 0.046930496, -0.004659469, -0.019029912, 0.024258468, -0.015743524, 0.021423336, 0.05416191, -0.03797541, 0.010645604, 0.042997323, 0.046341665, -0.04651464, 0.021201206, 0.022767575, -0.0007153418, 0.020408291, 0.012660175, 0.024790378, 0.014896842, 0.026379758, -0.031123152, 0.0066060596, -0.029903017, 0.049796414, 0.004653688, -0.00965509, -0.059423566, 0.013421443, 0.009924435, -0.032672785, -0.027107025, 0.038320962, 0.005526444, 0.024371317, 0.019021833, -0.019069469, -0.004258802, 0.013416187, -0.022249399, 0.059990734, 0.056342274, 0.02376775, -0.009330521, 0.033067003, -0.01778801, -0.0022496264, 0.026130226, -0.058245305, 0.092486046, -0.025161844, -0.039006658, 0.0072339186, 0.08218462, -0.014069749, -0.06751737, 0.004141688, -0.02185574, -0.037511177, -0.00026367465, 0.024538295, -0.040799107, 0.019535942, 0.025386395, 0.0155974, -0.028921286, 0.029508736, 0.02333701, -0.022984171, -0.00468175, -0.025562141, 0.026390718, 0.04092476, -0.02822741, -0.046718784, 0.020235643, 0.0025189836, -0.023208696, -0.025250021, 0.014611638, 0.0067555034, 0.050401244, 0.02033827, 0.024270141, -0.017081551, -0.034091055, 0.012611177, 0.0035646684, 0.010944517, 0.045170818, 0.0077512306, 0.0066124727, 0.005652814, -0.0147880735, 0.0106234625, 0.007338989, 0.03727028, 0.018064622, 0.023278212, -0.015162994, -0.02399791, -0.050601833, -0.018243324, 0.004350187, 0.040037178, -0.028147481, 0.041605256, -0.010256673, 0.008773386, 0.0027079943, -0.021960294, -0.04426577, 0.001557662, -0.012536781, -0.024837608, 0.014339619, -0.021126304, -0.016402954, 0.0170756, 0.03827774, 0.04117743, -0.029140761, -0.0017647842, 0.0017328149, 0.031130806, -0.03259548, -0.018271828, -0.040817466, -0.024473494, 0.006884299, 0.023466999, 0.012776239, -0.040205557, 0.0037115978, -0.023085784, -0.028141525, -0.041696217, -0.03392855, 0.0028079378, 0.017166402, 0.0017912622, 0.001823834, 0.01630905, 0.020470116, 0.010421967, -0.006111957, -0.007763037, -0.020040242, -0.0037326117, 0.01330681, -0.049192656, 0.02204428, -0.013021128, -0.016402746, -0.021332782, -0.01468403, -0.003180515, 0.026268665, -0.014194257, 0.0009053003, -0.016879858, -0.0054553966, -0.033617724, 0.00098997, -0.0062578483, 0.010277246, -0.03213862, -0.035497442, -0.024591666, -0.036121096, 0.027023304, -0.033160217, -0.0022141552, -0.0058646477, -0.016897477, -0.0025908398, 0.03712326, 0.024410862, 0.028989341, 0.03153096, 0.022441117, -0.0047937934, 0.02042274, 0.038829394, -0.030474229, -0.035146527, -0.013923615, -0.027309773, 0.023644308, 0.0269405, 0.0055370885, 0.02165839, 0.010886143, -0.0036424417, 0.030324778, -0.0035789611, 0.017088078, -0.015493576, 0.03976335, -0.013377119, -0.0054788734, 0.0015018063, -0.015337681, 0.0073896344, 0.010693791, -0.0056866845, -0.010304928, -0.01027255, 0.017186046, 0.011701072, 0.027218945, 0.029981155, 0.023402093, 0.001880506, -0.026102347, -0.013248786, 0.0013381633, 0.04083405, 0.025483176, 0.046406504, -0.00076708884, 0.019259224, 0.02860558, 0.019040009, 0.021533057, 0.028862258, -0.019455342, 0.00040680956, -0.019827768, 0.025512725, -0.00018075001, -0.0058635743, -0.026539493, 0.030671855, -0.025784602, 0.010605695, -0.01029273, 0.042160947, 0.027978206, 0.02387796, -0.02993472, -0.040339433, 0.00933108, -9.780686e-05, 0.018147103, -0.027904676, -0.048583873, -0.02619191, -0.020751124, 0.023147546, 0.06667952, -0.014876873, 0.02458186, 0.030849842, -0.012138391, 0.012279012, -0.020449707, 0.058602203, -0.026778422, 0.02164218, -0.0024076758, 0.0017554112, -0.011935828, -0.054920588, 0.031343304, 0.01633924, -0.004771368, 0.057067867, 0.05266294, 0.005593744, -0.014776415, -0.019934356, -0.026844766, -0.033485934, 0.019822571, 0.07343752, 0.033052694, 0.055053774, -0.04299207, 0.021603264, -0.005876241, 0.04187788, -0.07559393, 0.023511063, -0.021561498, 0.0043667755, 0.04530827, -0.006193184, -0.017416466, -0.033189718, 0.07849759, 0.014181828, -0.020983808, 0.0066261576, -0.037359115, 0.012201558, -0.016448803, 0.041910663, -0.04332912, -0.04210246, 0.042382903, 0.016208861, 0.020944031, -0.011195841, -0.013439763, 0.0011469553, 0.026339468, -0.005589442, -0.03212712, -0.051391188, 0.011423682, -0.011110342, 0.03355698, -0.0098839775, 0.0021078677, 0.044732235, 0.06846233, -0.027313903, -0.031628743, 0.026697936, 0.008965485, -0.0113923885, 0.028731199, -0.03881095, -0.05547471, -0.07216361, -0.06513335, 0.016914416, -0.00800015, -0.006813147, -0.028129168, 0.029784916, 0.06375307, 0.06067657, 0.05454716, 0.029895691, 0.010496673, -0.0008842179, 0.014935968, 0.027565157, 0.031892568, 0.028520819, 0.0027451294, -0.02345755, -0.07068226, 0.034424417, -0.057257004, 0.014835038, 0.05188847, 0.058124863, 0.02645863, 0.01208571, 0.017647186, -0.016677912, 0.0133355055, -0.042134218, 0.049939446, 5.035077e-05, 0.04531177, 0.08573228, -0.006845178, -0.038983587, 0.07906383, 0.034066375, 0.027583025, 0.016534291, 0.025969684, -0.0102451695, -0.007124003, 0.027749425, 0.042385828, 0.033706088, -0.012258893, 0.060342703, -0.0060949903, 0.054836363, -0.036545865, 0.0014267873, -0.015522635, -0.007849035, 0.03932086, -0.009374971, -0.006903923, -0.0035973818, -0.001006593, -0.051439434, 0.0070282575, 0.04303294, 0.027819829, -0.016867846, 0.04462184, 0.014026178, 0.035927627, -0.023392403, -0.0113237975, 0.033245895, 0.040410306, 0.0040894765, 0.034745265, -0.0079586245, -0.028353134, -0.026469614, 0.007070131, 0.0013683616, 0.03713572, -0.039075214, 0.05318641, -0.012431984, 0.0027638942, -0.011457442, 0.0049580615, -0.02901041, 0.083281405, 0.034637798, -0.027780794, -0.0040439013, -0.04662364, 0.011181269, 0.018284705, -0.008186394, 0.0140045555, 0.001779543, -0.0073487344, -0.028332854, 0.0057251584, 0.051382165, -0.042289276, 0.012923548, 0.017322173, 0.06544708, -0.002532979, -0.022006452, 0.011845951, -0.012126846, 0.002960653, -0.024789305, 0.042238887, -0.03325918, -0.025732974, 0.03164943, 0.01806816, 0.0077414555, 0.0065568793, 0.08141112, -0.011517264, -0.00812369, -0.037285436, -0.03229351, -0.016587252, 0.034283955, -0.0036613464, 0.030872587, -0.0050535235, 0.047720145, -0.023195036, 0.0043414556, 0.022044322, -0.029829165, 0.009196881, 0.024713393, -0.026569445, 0.044511545, 0.05441355, 0.0029288798, -0.017062625, 0.028220357, -0.041009285, 0.05916962, 0.03024033, 0.01520137, -0.05840598, 0.0068686563, 0.028327258, 0.006571053, -0.055796318, 0.02904877, 0.058636915, -0.018612392, 0.00065840036, -0.026330847, 0.04774865, 0.053974003, 0.016868643, -0.06483976, 0.03459795, 0.03332573, 0.04020681, 0.01620543, 0.022567268, -0.021468429, -0.032940406, -0.013202006, -0.04035177, 0.022047704, -0.0467276, -0.019165143, 0.024881262, 0.03776005, 0.03441125, 0.01856691, 0.055413403, -0.0022428501, 0.0065814084, -0.029196933, 0.02777755, -0.047718048, 0.013590573, -0.028553206, 0.0380096, 0.01810313, 0.023582285, 0.017264862, -0.043696504, -0.040432326, -0.0423632, 0.06376016, -0.0006623573, 0.0013593454, 0.020080151, 0.0066740476, 0.043130033, -0.004651187, -0.0148568805, -0.011298209, 0.00504091, -0.03093319, 0.046993162, -0.040008027, -0.020960601, 0.03257158, 0.031322654, -0.05034005, -0.0046406155, 0.0027474002, 0.029327577, -0.011322863, 0.045525495, -0.03771649, 0.045768008, 0.009117035, -0.04620634, 0.035255473, 0.029229533, 0.009195914, 0.015300772, -0.024364093, -0.05525551, 0.008747836, 0.013367524, -0.051436763, 0.015964948, 0.023863584, 0.005030914, 0.040709794, 0.028719317, -0.002475883, -0.043481566, -0.03778813, 0.0113164885, 0.01682162, 0.0028210485, -0.026819225, -0.010063911, -0.034975063, -0.009612615, 0.0006201359, 0.011085711, -0.010157531, -0.061583184, -0.015775848, 0.015572026, 0.05108643, 0.03950661, 0.038749106, -0.03967036, -0.0032359315, 0.0533924, 0.042524364, -0.04389652, 0.028260646, -0.00798886, 0.01438845, 0.03181299, 0.063461386, -0.045837995, -0.010618905, -0.017066427, -0.035368603, -0.014713219, -0.03652008, -0.05593544, -0.01968826, 0.041076712, -0.0035362057, -0.013698817, -0.007825797, 0.010487896, 0.035223264, -0.005055992, 0.009391616, 0.021817839, -0.010641303, -0.0046995454, 0.019602124, -0.036214665, -0.08824912, 0.04504682, 0.019275794, 0.00044985133, 0.072369225, 0.03928161, 1.7648107e-07, 0.050455526, -0.04493272, 0.01932744, 0.022358865, -0.00722781, 0.0011519016, 0.003682466, 0.03640218, -0.032372683, 0.016588248, -0.03141983, 0.0015121409, 0.031493194, 0.035143692, 0.019862471, -0.0044407942, -0.009790142, 0.0041978713, -0.052462336, -0.014019015, 0.023685545, 0.005179565, -0.030745026, 0.06451199, -0.029820638, 0.0099030305, 0.007385089, -0.028063154, -0.0013905648, 0.011179107, -0.05185422, 0.009740835, -0.049900457, -0.0029367302, 0.000989496, -0.01997845, -0.00991799, -0.07218309, 0.026459163, -0.027506728, -0.022012196, -0.06487705, -0.020369176, 0.0059439167, 0.009537645, 0.020594088, -0.024697889, -0.008866903, 0.008449812, 0.043881126, 0.02388993, 0.017566236, -9.1975526e-05, -0.0040805563, 0.03305319, -0.01729747, -0.022297537, -0.0063898205, 0.03103984, -0.02047116, -0.050466113, 0.01593733, 0.028261334, -0.007478932, -0.022247257, -0.046569068, -0.03285204, 0.023196274, -0.040634084, 0.028387569, -0.0066009806, -0.04506869, 0.018409746, -0.024850957, 0.045586854, -0.0075300816, 0.008070991, 0.07863616, 0.038285013, -0.008024216, -0.0020033796, 0.0064538545, 0.032640636, 0.012318933, 0.0096133305, 0.03208166, 0.046182867, -0.0012067466, -0.042054046, -0.045312647, -0.072630554, 0.012611182, -0.004003652, 0.040728457, -0.0077590733, -0.024099955, 0.021199588, 0.060131777, -0.008865115, 0.0054409844, 0.00029598686, 0.014679112, -0.0003393588, 0.026784929, 0.01249619, -0.0072240336, -0.053948887, 0.009483041, 0.019226873, -0.06462143, -0.030400535, -0.007004838, 0.010356832, 0.025271399, 0.017777244, -0.055796593, -0.048931614, 0.031545695, -0.006510619, 0.05179629, -0.007954793, 0.043935765, 0.010757447, 0.035529085, -0.018894292, -0.051571622, 0.048696734, -0.0018452903, -0.02670852, 0.012140799, -0.01957811, 0.03743682, -0.011525037, -0.025086477, -0.0056109047, -0.059111666, 0.038163193, -0.031234086, -0.035060022, 0.033731833, 0.017026167, -0.029144585, 0.06405434, -0.018570352, -0.013659859, -0.031205699, -0.0459882, -0.012307459, 0.0051833224, -0.04187066, 0.04544911, 0.014118893, -0.008576828, -0.009076952, -0.031763557, -0.04227943, 0.051079568, -0.016961692, 0.019381715, 0.031429205, 0.013254705, 0.014181811, -0.028945155, -0.005214347, -0.006724409, -0.03992553, 0.017831739, -0.0042642276, -0.06720497, -0.021126492, 0.004806047, -0.057244755, 0.005149155, 0.056021437, 0.0022569904, -0.02073708, -0.0233629, 0.014044398, -0.034740098, 0.031486157, 0.05286918, -0.008843519, -0.012821485, -0.08853849, 0.015108729, 0.014100069, -0.02010575, -0.039696045, 0.005448084, -0.033495214, 0.10387643, 0.027468361, 0.02946442, -0.026997192, 0.0030684557, -0.018286357, -0.0017257425, -0.0040940316, 0.040714603, -0.06686778, -0.0013063038, -0.03410825, 0.01725066, -0.012529395, -0.013245773, -0.012449455, 0.006220149, -0.07065509, 0.0287953, -0.04333638, -0.027019646, 0.030661043, -0.009316055, -0.027711617, 0.0014032339, -0.036663204, -0.0144842975, 0.0275105, 0.0065137865, 0.007169621, -0.004441007, 0.036793426, 0.017192734, -0.034049902, -0.027582912, -0.0075213085, 0.031855725, 0.014861011, -0.002795952, 0.03821626, -0.010287287, 0.004410911, -0.028490826, -0.016808053, -0.007763742, -0.049789093, -0.0028871633, -0.032853175, 0.002244833, -0.0606394, 0.0038453045, -0.09492208, 0.026328092, 0.07763264, 0.03380684, 0.0135728475, 0.009017218, 0.010663334, -0.009254972, 0.01630826, -0.04780938, -0.031134028, -0.0002409549, 0.014150238, 0.024258498, 0.037840586, 0.01913902, -0.024452431, -0.027270393, 0.007421944, 0.05528257, -0.00502768, 0.011941148, -0.03045703, 0.023860231, 0.027010193, 0.006228044, -0.06823753, 0.02047204, 0.024645118, 0.03358043, 0.00019648916, -0.0062695793, -0.03859167, 0.0009104353, -0.0018319229, -0.007392417, -0.021240724, 0.07908059, 0.0047804937, 0.033613477, 0.059656426, 0.0012395174, 0.029818827, -0.0060481853, -0.027909148, 0.00029005276, 0.023673385, -0.013429811, -0.010270175, -0.0059533045, 0.053880442, -0.014289428, 0.0040066973, 0.03153762, -0.014455268, 0.009899364, 0.011610735, -0.009500263, -0.0083027445, -0.025041383, -0.014185635, -0.020985404, -0.013238557, 0.01813701, 0.021385103, 0.031335093, 0.016958475, -0.034028072, -0.010673041, -0.04969079, 0.020083595, -0.018480645, 0.027189396, 0.036311943, 0.012172716, 0.0011316574, -0.026634505, 0.04522874, 0.0015499716, -0.0038907495, 0.011783632, -0.004685417, 0.008640505, 0.020469222, 0.008695038, -0.047726225, -0.024402354, 0.0074329865, -0.029635353, -0.0124995075, -0.023202658, 0.020722277, -0.012042963, 0.056396503, -0.01961322, -0.019722752, -0.019738466, -0.0147172185, 0.031258382, -0.016389845, 0.033472124, -0.00020763079, 0.016939998, 0.02706264, -0.0075364993, -0.0080580395, 0.04671185, 0.037455603, -0.008563327, -0.002491154, 0.03336085, 0.010047316, -0.023648733, 0.03570931, -0.050592653, 0.027328426, 0.013059499, -0.015938593, -0.013824988, 0.019901065, 0.003430466, -0.0119512575, 0.041975748, -0.004116053, 0.016503036, 0.04435776, -0.020606047, -0.0015135638, 0.040022016, -0.020174073]}\n",
      "----------------------------------------\n",
      "ID: 8ad1b1fa-a034-4b54-8e1f-c0984c73436c\n",
      "Source: {'text': 'Chapter 5: Data Types In this chapter, we will explore the data types available in AVAP™. Data types are fundamental in programming as they determine what kind of values can be stored in a variable and what operations can be performed with those values. Throughout this chapter, we will discuss the basic data types in AVAP™ and how they are used in program development. 1.1 Basic Data Types In AVAP™, like in Python, there are several basic data types: 1.1.1 Integers (int) Integers represent whole numbers without decimals. They can be positive, negative, or zero. In AVAP™, integers are defined using the int data type. integer_number = 10 1.1.2 Floating-Point Numbers (float) Floating-point numbers represent real numbers with decimals. In AVAP™, they are defined using the float data type. floating_number = 3.14 1.1.3 Strings (str) Strings represent text. In AVAP™, they are defined using the str data type. text_string = \"Hello, world!\" 1.1.4 Booleans (bool) Booleans represent truth or falsehood values. In AVAP™, they are defined using the bool data type. true_value = True false_value = False 1.2 Conversion Between Data Types In AVAP™, just like in Python, it is possible to convert between different data types using specific functions. Some common examples include: 1.2.1 Conversion to Integer To convert a value to an integer, the int() function is used. text = \"10\" number = int(text) 1.2.2 Conversion to Floating-Point To convert a value to a floating-point number, the float() function is used. text = \"3.14\" number = float(text) 1.2.3 Conversion to String To convert a value to a string, the str() function is used. number = 10 text = str(number) 1.3 Operations with Data Types In AVAP™, just like in Python, it is possible to perform operations with different data types. For example: # Operations with integers a = 10 b = 5 sum = a + b difference = a - b # Operations with floating-point numbers c = 3.5 d = 2.0 product = c * d division = c / d # Operations with strings text1 = \"Hello\" text2 = \"world\" concatenation = text1 + \" \" + text2 1.4 Summary Data types in AVAP™ are fundamental for program development. They allow for the storage and manipulation of different types of values, such as numbers, text, and truth values. With a solid understanding of data types and how they are used in program development, developers can create robust and functional applications in AVAP™.', 'metadata': {'source': '6_Data_Types.txt'}, 'vector': [0.0050861225, 0.024884647, -0.0052036555, -0.08794729, 0.055820044, 0.058454756, 0.025078095, 0.026101282, -0.06335566, 0.010449421, 0.007381293, 0.030721901, -0.027492281, -0.0047920244, -0.019825634, 0.009213891, -0.011966086, 0.04684206, -0.016209751, -0.04514895, 0.015680918, 0.036943898, 0.009590895, 0.05712704, -0.052875515, -0.027856704, -0.009170524, 0.0412912, -0.009281288, -0.048198532, -0.0042481055, -0.05935889, -0.062118813, 0.008307762, -0.049726896, -0.0069384975, 0.008438596, -0.013624108, 0.027430136, -0.034757063, -0.005724412, 0.0057493267, 0.017285027, 0.02579822, 0.00084337173, 0.0019010189, 0.06317638, -0.035411183, 0.0280281, -0.014432146, -0.021649826, 0.009903814, 0.011749369, -0.017125376, 0.027923865, 0.05234002, 0.03544218, -0.03916537, -0.010703122, -0.0015470105, -0.03389993, 0.04274213, -0.04164133, 0.010525247, -0.03284639, -0.0093605025, 0.011066697, 0.006560413, -0.05867405, -0.013480898, -0.0022711868, 0.01304742, -0.014759978, 0.02242556, 0.031765357, 0.025850259, 0.019900216, -0.053517047, -0.038100585, 0.07770884, 0.00397847, 0.055314895, -0.02395573, 0.021396408, -0.0043617217, 0.03508827, -0.03875523, -0.016107576, 0.026435677, -0.01048504, 0.027881064, -0.06765768, -0.05968668, 0.0122001385, -0.039026503, 0.007911485, -0.03798896, -0.035106357, 0.019149901, -0.00680782, 0.028379235, 0.007787196, -0.02816473, 0.09818503, -0.021849273, 0.03594649, -0.012468436, 0.013421943, 0.012696739, -0.016593795, -0.04311652, -0.019745529, 0.043132205, 0.032470223, -0.04543141, -0.002156324, 0.0119371405, -0.003252939, 0.035795018, 0.0067305895, -0.0020943251, 0.02004363, 0.04694335, 0.007863764, 0.02833897, 0.019617386, -0.029606773, -0.02556379, 0.01205787, 0.0038275293, 0.02613647, 0.034142897, -0.030020671, -0.01994953, -0.0132434005, 0.01867948, -0.018752031, 0.022981724, 0.040810306, -0.0066323266, -0.045281608, -0.017457066, 0.018341878, -0.01623631, 0.0031282497, 0.044220235, -0.014788515, 0.032369662, -0.02097746, 0.031788554, 0.002634911, -0.022687292, 0.011538663, -0.025166396, -0.02148181, -0.026030147, 0.029503407, -0.00625116, 0.0009347706, 0.018101733, -0.0005871905, 0.015512489, -0.006681853, -0.024801152, -0.007898147, -0.0040691984, -0.04680989, -0.022416843, -0.017678814, -0.0033050256, -0.000417082, 0.028681353, 0.011396988, -0.049628243, -0.008589944, 0.027148494, -0.04964247, -0.033050146, 0.0035463143, -0.0002425885, 0.014179214, -1.926377e-05, -0.0018417465, 0.0039992398, 0.018577607, 0.035309087, 0.008052299, -0.018353295, -0.020266298, -0.007951465, 0.029493649, -0.031073913, -0.0071094865, 0.008953797, -0.017387606, -0.02122025, -0.041093625, -0.007861396, 0.04231149, -0.007935494, -0.0013732405, -0.040667366, -0.013506479, -0.008845071, 0.004883016, -0.0321859, -0.039929405, -0.01109021, -0.020252403, -0.006027612, 0.06050371, 0.029471466, -0.030505218, -0.03582127, -0.016632542, 0.027448758, 0.025041578, 0.012677525, 0.0073697288, 0.0066818665, 0.022469992, 0.013875465, -0.023950774, 0.023428913, 0.054393984, -0.002882907, -0.025501322, -0.008533222, -0.028649531, 0.008222866, -0.009267455, 0.016435271, -0.023991374, -0.0073051127, 0.003558573, 0.02424305, 0.008949239, -0.0059423023, 0.02657569, 0.05789672, -0.022070633, 0.0006340732, 0.00823768, 0.01608652, 0.0019531269, -0.028154371, 0.01276956, 0.0084273275, -0.0037959188, -0.047931887, 0.026571063, 0.015461296, -0.013231408, 0.045948938, 0.023512937, -0.014708307, 0.0041982103, -0.034416325, 0.043577977, 0.017023042, 0.07290941, -0.005401869, 0.047771487, 0.026568789, -0.009769057, 0.009143165, 8.22696e-05, 0.023008147, -0.022748645, -0.00816075, 0.020184048, -0.002745004, 0.01785843, -0.013767451, 0.025208933, -0.014413479, 0.012372549, -0.027802425, 0.056056462, -0.005517175, 0.049994506, 0.008920763, 0.040551864, -0.016963076, 0.011864163, 0.016179243, 0.025951251, -0.026529204, -0.07004577, -0.006310832, 0.040397286, 0.022291683, -0.039036863, 0.03669996, -0.017077388, -0.049101263, -0.028597135, 0.021199502, -0.02091148, -0.030776862, -0.0052664503, 0.021035897, -0.045178633, -0.02544926, -0.073702246, 0.009987216, 0.05975105, -0.024812013, 0.03412371, 0.0037036452, 0.0012708959, -0.022213763, -0.02161078, -0.008323142, -0.0051903925, -0.025845718, 0.038955346, 0.01587902, 0.021248905, -0.04115112, 0.021552283, -0.0028472233, 0.01307073, -0.04223519, 0.021847444, -0.03854364, 0.00010399184, 0.054110564, 0.020962154, 0.023818728, 0.04356242, 0.055149212, -0.0006231755, -0.030484552, 0.02782391, 0.009558444, 0.01800645, -0.0012864557, 0.03554793, -0.03397679, -0.02850672, -0.008473637, 0.06601212, 0.06458723, -0.021742404, 0.01074574, -0.00028123878, 0.031753432, 0.02312839, -0.023604825, -0.0055771675, -0.031891562, 0.024237564, 0.015842905, -0.017570918, 0.023453109, 0.039297283, 0.07185786, -0.019076407, -0.032427594, 0.00130273, 0.0025581776, 0.006544169, 0.050960466, -0.0162216, -0.06339418, -0.055691734, -0.012010708, 0.05180514, 0.015026675, -0.002638957, -0.01873465, 0.0099736955, 0.060160678, 0.020719118, 0.03662894, 0.041125152, 0.0046201097, 0.03585571, 0.055960663, 0.03688414, -0.026453344, -0.03483351, -0.04554658, -0.037489656, -0.009874907, -0.0129315555, -0.043149017, -0.009835793, 0.02091579, 0.033815444, -0.032637794, 0.023220066, 0.017625548, -0.02133545, -0.025835006, -0.022165354, 0.04829345, -0.00653547, 0.064675644, 0.0845352, -0.029239828, 0.004322784, 0.03204913, 0.018195001, -0.0077156997, 0.032439906, 0.027255442, -0.019827725, 0.0073621124, 0.031597726, 0.036831543, 0.020800803, 0.013748837, 0.032645177, -0.03785538, 0.080670975, -0.026703162, -0.011395205, 0.021438383, -0.054148234, 0.0005371609, -0.008121752, -0.032640487, 0.018038, -0.013265813, -0.062166627, -0.015335329, -0.013704741, -0.016791003, -0.005514987, -0.0006982683, -0.013962725, 0.04342193, -0.08611591, -0.011551237, 0.026305225, 0.020090573, -0.030764531, 0.002629742, 0.012599192, 0.0041656876, 0.006746891, 0.03972225, -0.010888074, -0.0072866725, 0.0031149595, 0.043754652, -0.024400191, -0.01738529, -0.0073379544, -0.013382996, -0.007811577, 0.0365576, 0.07012127, -0.030218922, -0.048895933, -0.051202513, -0.015267895, 0.00022101983, -0.027577171, 0.026219212, -0.01090086, -0.04271806, -0.036668364, -0.009439776, 0.006895178, -0.043624036, 0.06562457, 0.0361054, 0.039440826, 0.020262469, -0.05069694, 0.014486623, -0.061499435, -0.037044015, -0.023031691, 0.04732977, -0.02493792, -0.034372393, -0.0007247394, 0.0061446247, 0.031865247, 0.024290403, 0.034488034, 0.015374787, 0.017828356, 0.0003229353, -0.014160181, 0.032341752, 0.05861198, 0.02019318, -0.008249335, -0.015914682, 0.027333898, -0.035035342, -0.038686197, -0.007029721, -0.082925215, 0.06446454, 0.03909321, -0.011679178, 0.048755422, 0.022826899, -0.002653401, -0.015932092, 0.016393552, -0.028905548, 0.028148765, 0.041298967, -0.023506584, -0.023331933, -0.008923221, 0.012167423, 0.0040892996, -0.00487641, 0.03579298, 0.013349494, -0.05577917, 0.02650582, -0.048991404, 0.06274414, 0.050069112, 0.04219694, -0.054428875, 0.04251771, 0.0013362095, -0.03903762, -0.0028177889, 0.012219943, -0.01608047, 8.055592e-05, 0.008192457, -0.027998326, 0.009581918, 0.031412967, -0.041969735, -0.026063219, 0.024480239, 0.015957111, -0.041203815, 0.0013992294, -0.028504208, -0.0069291955, -0.0037440755, 0.08228525, -0.034166496, 0.01413974, 0.020256152, -0.027964642, 0.012590538, 0.045403738, -0.009162211, -0.023298664, 0.03295407, 0.0050478843, -0.006055257, 0.0053243297, 0.039750654, 0.037646703, -0.008056253, -0.0065878937, 0.010784255, -0.058524065, 0.00499955, 0.008212064, -0.02682373, 0.063572966, -0.0024187332, -0.012296993, 0.074446626, 0.020946473, 0.0112367235, -0.017293729, 0.0032675182, 0.023282465, -0.028385032, 0.019011714, -0.009495798, -0.02199628, 0.010443812, -0.02290032, -0.0066013536, 0.023148427, 0.012338068, 0.02086466, 0.020868726, -0.01426093, -0.0041642315, 0.029683413, -0.011339025, -0.026102858, 0.0044618514, -0.002639227, 0.05596243, 0.021838617, 0.027189298, 0.0142137185, 0.0070722806, 0.045516673, -0.008955403, 0.024469279, -0.04408837, -0.025740135, -0.07952945, 0.009750661, -0.013057986, -0.039611623, -0.027411921, -0.05186746, -0.018903581, 0.0012799232, 0.015275353, 0.009913634, 0.0133413, -0.017077029, -0.052239414, -0.0029350522, 0.06957908, -0.03640493, 0.027093673, -0.060678918, 0.015594699, 0.042594858, 0.028058039, -0.00018767214, 0.003405598, -0.020179776, -0.040772762, -0.024951754, -0.008446754, -0.008178847, 0.022558141, 0.014887088, -0.034801528, -0.0038648045, 0.02373015, 0.017820174, 0.03925781, -0.096290156, 0.0294072, -0.0028609855, -0.0056637363, 0.02256144, 0.043471638, -0.0076500797, -0.024061428, 0.05314766, 0.0066665416, 0.020191425, 0.0016168151, 0.023706857, 0.004018806, 0.018768247, -0.046081737, 0.038337614, 0.04918778, -0.017155498, 0.0036105595, -0.016403155, 0.04822058, -0.048567392, 0.011524073, -0.039081182, -0.008703296, -0.016010627, 0.057961475, 0.011846263, 0.020715602, 0.042888176, 0.038551487, -0.022166587, 0.024734842, 0.020371374, 0.022380343, -0.05430074, 0.0044675623, -0.05530887, -0.009410087, 0.04237843, 0.011272931, 0.0063549983, 0.04616198, -0.011072313, 0.045929737, -0.023002261, -0.036539946, 0.016489713, 0.0026229953, -0.020359593, -0.037100002, 0.03700335, 0.022719266, -0.018148785, -0.0031314343, -0.015007651, 0.03910785, 0.027885696, 0.026081115, 0.0388545, 0.023614736, -0.00091952545, 0.036658548, 0.03461993, -0.0046787704, -0.037083965, 0.02254894, 0.022604512, -0.038392235, 0.016053377, 0.039809793, 0.06101866, -0.0056128763, 0.018753067, 0.032583207, -0.0013223798, -0.012044945, -0.00042869977, -0.0063579315, -0.049939167, 0.03447362, -0.04769579, 0.020837296, -0.031596042, -0.10081565, -0.0034214885, -0.00021648523, -0.0028732242, 0.01819347, -0.054694723, 0.0109519465, 0.047379714, -0.005348376, -0.04988642, 0.03009549, 0.060877357, 0.00792256, 0.0054009627, 0.034702357, 0.007827262, 0.016313557, -0.0043985336, -0.035644963, -0.021158725, 0.044966936, -0.017850468, 0.06526856, -0.028879374, -0.022172745, 0.029064983, 0.057302594, -0.025018038, -0.011504815, 0.03277451, -0.016090266, 0.035369936, 0.051615044, 0.049761366, -0.012136466, -0.038644042, 0.009396117, 0.03807133, 0.017067997, -0.02629822, 0.0064639864, 0.037261497, 0.019688541, 0.005679561, -0.05199552, -0.024115104, 0.0602119, -0.059226636, 0.021402108, 0.015494476, 0.027419072, 0.03266389, 0.050556432, -0.03713794, -0.018649183, 0.089412116, 0.028236352, 0.007418407, -0.01489025, 0.03791795, -0.00817484, 0.025109423, 0.01504866, 0.05966455, -0.041834388, 0.040032674, -0.042290576, -0.014434699, 0.042877123, 0.04383173, -0.011099976, 0.04760818, 0.016589887, -0.003831984, -0.034281664, -0.046365775, -0.014784072, 0.002272675, -0.023084765, -0.015785167, -0.00029118874, -0.032095235, 0.0438613, 0.0061587496, -0.034883, 0.011253557, -0.02197174, 0.00777882, 0.035129547, 0.015401454, -0.017476546, -0.018728523, -0.018870316, -0.024099752, -0.045187898, -0.0105779115, -0.004627782, -0.0074568633, -0.016629886, 0.011941152, -0.02349738, -0.029838258, 0.024757031, 0.0039752824, 0.04697505, -0.0003068599, 0.0041846195, -0.009687971, 0.02198662, 0.030288372, -0.0026498896, 0.012524469, -0.042190913, 0.037628736, -0.024362795, -0.013910182, 0.01739876, -0.003983681, -0.014289485, 0.06358052, -0.009195501, 0.04895401, 0.0037402327, -0.00036752436, -0.025460795, -0.054740008, -0.043300588, 0.07117939, -0.058759134, 0.01184859, 0.015844893, 0.06785846, -0.015706653, -0.017364206, 0.009318059, -0.0068377736, -0.061167248, 0.014697848, -0.01717377, 0.0049056304, -0.024242353, -0.0073356517, -0.060838565, 0.006913174, 0.0059441268, 0.0079245195, 0.037283085, 0.004732574, 0.024854405, 0.008123362, 0.01893667, 0.014004364, -0.03455906, -0.0064776107, 0.02707457, 0.0044331523, 0.0317363, 0.007023765, 0.016209843, -0.028090935, 4.4073045e-06, -0.0048834803, -0.04092852, 0.048065793, -0.0021105087, -0.033242617, -0.009576497, -0.017392516, -0.07199983, 0.017733475, -0.11444397, 0.030544458, -0.00019362774, 0.028181588, -0.03151271, -0.0025031725, 0.008315895, -0.021729806, 0.029463457, -0.0073934584, -0.012071082, 0.01653447, 0.030421784, 0.042889323, 0.031319853, -0.021869635, -0.05034547, 0.055828605, 0.056451112, 0.087477915, -0.019402446, -0.016649514, -0.042805888, 0.04071522, 0.03774154, -0.021343118, -0.04436867, 0.030539766, 0.00816489, 0.040487647, -0.040834807, -0.008451625, -0.03108282, -0.008966672, -0.009400548, 0.0054328586, -0.0025670012, 0.058368795, -0.0028369166, 0.022513295, 0.06474101, -0.028411027, 0.022343792, -0.031939145, 0.007520481, 0.05507534, 0.037745252, -0.026903765, 0.009665508, -0.015508426, 0.04851267, -0.009785228, -0.0234067, 0.018203432, 0.012515098, 0.019696558, -0.072586976, 0.017656969, -0.04481875, -0.024325324, -0.030550338, -0.023870595, -0.018401595, 0.0393317, 0.013136455, 0.005552139, 0.01722474, -0.05746902, -0.06549368, -0.03779969, -0.034846902, 0.015035311, 0.015513497, 0.04924703, -0.011585007, -0.0010931162, -0.03604137, 0.049784787, 0.014901396, 0.021290075, -0.031890348, -0.05693129, -0.004838208, -0.026601508, 0.018999156, -0.0007236006, 0.028709393, 0.01192669, 0.0050533875, -0.014481623, 0.026601983, 0.03051055, -0.019955834, 0.07372171, 0.02043125, -0.050078362, 0.030031998, 0.029711489, 0.06716074, 0.004261514, 0.023390304, 0.0021728994, 0.018375074, 0.009165964, -0.0318394, 0.01784525, 0.021480976, -0.034640018, -0.0119215045, 0.013939868, 0.012133415, 0.04788002, 0.008210029, 0.03360801, -0.018758792, 0.018503036, -0.0048985803, -0.04716943, -0.038677778, 0.00092281325, 0.053683817, -0.0010775173, 0.009219901, 0.010585746, 0.01556216, 0.00051131856, -0.03751068, -0.00544934, 0.018925572, -0.032354068]}\n",
      "----------------------------------------\n",
      "ID: 3d6c1b08-09c3-4a66-a0b8-f330b4cd3cfe\n",
      "Source: {'text': 'Chapter 12: addParam() Function Introduction The addParam() function in AVAP™ is a powerful tool used to add parameters to an API call in the query string. This parameter is assigned to a variable and acts as a bridge between the API call and the API itself, allowing smooth and efficient communication between both. Usage of addParam The addParam() function is used to add parameters to an API call in the query string. The basic syntax of this function is as follows: addParam(variable, value) Where variable is the name of the variable to be used as a parameter in the API call, and value is the value assigned to this variable. Example Usage Below is a practical example illustrating how to use the addParam() function in an API call: # API call with addParam() addParam(user, \"john_doe\") addParam(password, \"password123\") In this example, two parameters, user and password, are being added to an API call. The value of user is set to \"john_doe\" and the value of password is set to \"password123\". Internal Operation Internally, the addParam() function constructs the querystring for the API call by adding the specified parameters along with their corresponding values. This querystring is passed to the API, which uses it to process the request and return the appropriate response. Important Considerations It is important to ensure that the parameters added with addParam() are valid and correctly formatted according to the requirements of the API being called. Additionally, it is the developer\\'s responsibility to ensure that the values assigned to the parameters are secure and do not contain malicious data that could compromise system security. Conclusions The addParam() function in AVAP™ is an essential tool for constructing and managing API calls, facilitating communication between the client and the server. By understanding how this function works and how it is used in the context of an API call, developers can create more robust and secure applications that make the most of web services\\' potential.', 'metadata': {'source': '13_Api_inbound_interface.txt'}, 'vector': [-0.014918992, -0.022557871, -0.0041926643, -0.09854963, -0.013365604, -0.007524604, 0.028034786, 0.027096102, -0.049755435, -0.04276711, -0.05440502, -0.013103661, -0.062026165, -0.0055090175, -0.022453755, 0.027489068, -0.0021466303, 0.00466133, -0.0068760132, 0.024533937, -0.03300587, 0.041314248, 0.025298843, 0.092895456, -0.02494223, -0.029740332, 0.012185318, 0.022217693, -0.048212066, -0.02903748, 0.051573813, -0.02095791, -0.042907137, 0.016680365, -0.041617356, -0.0068688095, -0.028595617, -0.10964662, 0.021094598, 0.014456454, 0.021916742, -0.043640595, 0.0458954, 0.031963125, 0.013032869, -0.0030933272, 0.027301583, 0.01119258, 0.04203178, -0.012468209, 0.014990947, 0.027514813, 0.058644123, -0.029078111, -0.037401274, -0.015287819, 0.007303372, 0.04015069, -0.049624115, 0.017670842, -0.051674496, 0.044651672, -0.018035, -0.01754383, 0.012714666, 0.0005523406, -0.023500536, 0.0045260354, -0.058107767, 0.020207224, 0.008175617, -0.05149182, -0.0314524, 0.037045952, -0.0087762205, -0.005705574, 0.023605471, 0.039471637, 0.0011826352, 0.03150579, -0.03229777, 0.039719533, 0.062449638, 0.016102953, -0.009811813, 0.02672158, -0.014394005, -0.009194186, 0.048182372, -0.040686194, 0.052100826, 0.01980327, -0.07100881, 0.04263323, 0.04690351, -0.003209836, -0.06085951, 0.0034924173, -0.027153447, 0.0024131823, 0.029943781, 0.04704824, -0.014195541, 0.0060714902, 0.03236222, 0.035583157, -0.038040835, 0.02644248, -0.0008516186, -0.043951165, -0.02718478, -0.0024114582, 0.03488041, -0.013774699, -0.0064167515, -0.003577223, 0.022603469, 6.712057e-05, 0.0030783466, -0.035590623, 0.015864644, 0.00335643, 0.011875005, 0.023153907, 0.035830736, -0.005136499, -0.022340268, 0.0271902, 0.021252198, -0.004295413, 0.027930321, 0.03919019, -0.021478085, 0.049207658, -0.014174016, 0.040976055, 0.00680088, 0.030256506, 0.006061905, 0.009107442, -0.024221888, -0.040440466, -0.033758115, -0.011264248, 0.0033492043, 0.041761335, -0.04332622, 0.04491082, -0.018544436, -0.001226604, 0.023678625, 0.0036365553, -0.09641639, -0.010699593, -0.00027829743, 0.00904208, -0.008487724, -0.013434195, -0.015763363, 0.039307047, 0.018757064, 0.0264596, 0.002644004, -0.014357763, -0.024479786, 0.03197489, -0.050054274, -0.0057819537, -0.062466715, 0.0077056536, 0.023789821, 0.008848025, -0.007564147, -0.046355642, -0.017102439, -0.0103055015, -0.02775903, -0.015973208, 0.0038496063, -0.011555792, 0.020214293, -0.00855952, 0.009434322, 0.000251612, 0.0004677177, 0.026602833, -0.018137144, -0.015855327, -0.006161474, 0.015254896, 0.007978331, -0.041499984, -0.009010739, -0.009223861, -0.03534195, -0.013052761, -0.01487599, 0.0019915223, 0.009022723, 0.011248956, -0.0070007797, 0.029003317, 0.026366407, -0.012367208, -2.6942815e-05, 0.010849694, 0.003658068, -0.017983096, -0.016076623, -0.008243361, -0.02231432, 0.035361905, 0.0044361544, 0.0074580773, 0.0028263605, -0.022496978, -0.0185423, 0.04772308, -0.009945477, 0.008449877, 0.008414604, 0.023080856, -0.019161053, 0.008118806, 0.012139044, -0.029298117, 0.0025701027, 0.029421898, -0.009584123, 0.0069876164, -0.023263216, 0.022109935, 0.050358586, 0.012542614, -0.012966365, -0.0057085864, 0.0147403935, -0.047652073, -0.022376597, 0.039689127, -0.005558635, -0.028552532, 0.01891644, -0.029119413, -0.004207343, -0.0027390548, -0.025011474, 0.027120546, -0.0011838877, -0.013483702, 0.023143338, -0.0028289587, 0.010158124, -0.021182325, 0.011229068, 0.00659175, 0.002230406, -0.021077346, 0.051119335, 0.020108007, 0.026035314, 0.009614168, 0.02978029, 0.022102993, 0.008449217, 0.024620423, 0.019757595, 0.017920326, 0.004799794, 0.003842642, 0.026978558, 0.022557551, 0.0179642, -0.021806525, 0.030507803, -0.020618152, -0.018272461, -0.07093482, 0.03542826, -0.016698677, -0.00060149975, -0.009587626, -0.03328767, 0.030178506, 0.0053184777, 0.020249559, 0.026830433, -0.024524502, 0.023652555, 0.0024936872, 0.016463654, -0.006334785, -0.01997602, 0.03352406, 0.0030277579, 0.005297765, 0.00764146, -0.0053852717, 0.03851704, -0.05609841, -0.0027704623, -0.022344766, 0.0150637, 0.0049265106, 0.017752584, -0.01549685, 0.039669134, -0.02425188, 0.004682388, 0.044310506, 0.019178405, 0.003135265, 0.009449522, 0.015615537, -0.027285382, 0.024622558, -0.022370456, 0.030053431, 0.06104456, -0.027038239, 0.010092606, -0.046142977, 0.0106735, -0.048707403, 0.008846346, 0.003780973, 0.012256574, 0.00024406385, -0.0030516675, 0.00835023, 0.0037006612, 0.08341504, 0.016548151, -0.02983841, 0.05156637, -0.0101887435, 0.066785134, -0.027028007, 0.022837242, -0.05952696, -0.017669844, 0.0075978106, -0.0016569331, 0.013766683, 0.005978839, -0.021632778, 0.00894888, -0.025080986, -0.001254529, -0.009081008, -0.01794167, -0.014621677, 0.018376123, 0.02530533, -0.022989338, 0.011607697, 0.019435996, 0.039758433, -0.03237706, 0.010653278, 0.015069404, -0.020716807, -0.00079572067, 0.03734084, -0.04134584, -0.018953089, -0.048714735, -0.057770785, 0.02516693, -0.061504032, 0.01658821, -0.020865785, 0.05781325, 0.022042755, 0.04234367, 0.027675405, 0.016546583, -0.013774661, -0.03326088, 0.03561172, 0.011840493, -0.014193451, 0.0047254576, -0.012468496, 0.027135866, -0.03864041, 0.008289241, -0.025774091, 0.06465191, 0.08326552, 0.040323664, 0.06910676, 0.0040445966, -0.0012157484, 0.006515138, -0.010285089, -0.05671067, 0.044230316, 0.030844035, 0.03483478, 0.05303186, -0.009382395, -0.05844746, 0.09023413, 0.03870333, 0.037133947, 0.030705692, 0.026386794, 0.059991434, 0.019817477, 0.07563339, 0.0059929322, 0.04721103, 0.027915316, 0.0216726, -0.0014700632, 0.042061374, -0.035649978, 0.0008779011, -0.014568038, -0.016677944, 0.039402522, -0.016478866, 0.00094001606, 0.0016621503, 0.050222076, -0.034177724, -0.02639307, 0.038750086, 0.049515437, -0.0032924213, 0.025114108, 0.027095333, 0.028990516, -0.053283196, 0.028039271, 0.003856911, 0.04420448, 0.009553057, 0.016607508, 0.012885578, 0.02640724, 0.0053878347, -0.01200464, -0.04891438, 0.031635668, -0.014500976, 0.07083278, -0.025733732, -0.03545737, -0.031679325, 0.02361609, -0.019070236, 0.1004899, 0.053859267, -0.051572587, -0.04005581, -0.0015744831, 0.01914139, 0.049493857, 0.05788327, -0.0014212287, -0.02706375, 0.022846745, -0.042336356, -0.0024812925, 0.036517557, -0.013700334, 0.022030013, -0.036548864, 0.03702873, -0.011510319, -0.013980325, -0.027725678, 0.011244207, -0.029901002, -0.04903213, 0.04053887, -0.022986917, -0.0072517656, 0.034436796, 0.014318142, -0.025962144, 0.014054093, 0.09297667, 0.00672607, -0.03970686, -0.03161139, -0.02370834, -0.019792585, 0.019179655, 0.006251361, 0.05492726, -0.03630971, 0.024919543, -0.032175276, 0.02125085, -0.0253924, -0.021069724, 0.048614923, -0.023326686, -0.024651485, 0.039149094, 0.09075902, -0.009205177, -0.052117612, 0.008712437, -0.045181267, 0.0490031, 0.013536619, 0.031536233, -0.04352705, 0.020598639, 0.02626358, -0.026832169, -0.022355681, 0.033133674, 0.038579747, -0.04984558, -0.01384761, -0.03825849, -0.029704923, 0.028717464, 0.0009004753, -0.0402977, 0.014585804, 0.030713113, 0.03787941, 0.03354876, 0.04940399, -0.013440857, 0.020644175, -0.02158106, -0.07092499, -0.0011851966, -0.017583137, 0.00025038153, 0.0030110732, -0.008917382, 0.024870569, 0.026876764, -0.018704241, -0.07154393, 0.02369884, -0.022447474, -0.00012452944, -0.019082092, 0.026386911, -0.027347846, 0.03303918, 0.04084846, 0.02765206, 0.054878015, -0.03107018, 0.025133785, -0.067060396, 0.059228327, -0.0140795475, 0.034312073, -0.0043851812, 0.0060214237, 0.038129617, 0.022122117, 0.02815999, 0.006288408, -0.013954493, -0.08697014, 0.046899684, -0.0069620563, -0.018814148, 0.054864332, -0.0066401027, 0.004923061, -0.037585847, -0.013653993, -0.022713227, 0.027076062, 0.008306198, -0.020121971, -0.025206344, -0.0091875885, 0.015479391, 0.0060116258, 0.046102565, 0.003251641, 0.016183792, -0.010798278, -0.007764826, -0.010918779, -0.06566638, -0.054562535, -0.002877312, -0.013222608, -0.0074575073, 0.03371638, -0.014514157, 0.012165074, -0.024935126, -0.024704522, -0.013918111, 0.07346756, -0.005370234, -0.0071835225, -0.0012387553, 0.00696536, 0.0023060704, -0.048765283, -0.012482134, -0.015445747, -0.009648952, -0.03110918, -0.022807723, 0.0024710642, 0.041572616, -0.0082364, -0.0047149463, -0.030912628, 0.047848362, 0.008039121, -0.037129153, -0.0069397036, -0.005948769, 0.005439595, 0.05608189, 0.022283537, -0.00047643867, -0.035378233, 0.014674161, -0.02653418, -0.037210993, -0.0065059015, -0.06667416, -0.041636705, 0.006028631, 0.0002580769, 0.002794827, -0.00063258037, 0.014276113, 0.026116613, -0.007639091, 0.017707776, -0.0032106915, 0.008922555, 0.002593059, -0.0010877507, -0.008144929, -0.018814981, -0.001158552, 0.012827421, 0.001125149, 0.046047457, 0.062260527, 0.02229618, 0.0070595453, -0.05603061, 0.05740633, -0.02970271, 0.008898128, 0.040621307, 0.008200153, 0.03443644, -0.00235787, 0.03984357, -0.052416008, -0.07739166, 0.008859266, 0.03550948, -0.008862266, 0.033691026, -0.036984384, -0.0042104092, -0.06630653, 0.012228388, -0.005447225, 0.019981422, 0.010012056, 0.039692774, -0.013119643, -0.022720134, -0.005424776, -0.0256991, -0.016372534, 0.02398106, -0.020410283, -0.008614153, -0.069943756, -0.034575503, -0.006056428, -0.014079733, -0.011502213, -0.019873124, 0.019569706, 0.012628187, 0.01640531, 0.010103797, -0.015714198, -0.01990163, 0.01641984, 0.02292042, 0.024531085, 0.036142465, 0.034614198, 0.04011114, -0.0074573476, -0.008957951, 0.030244995, -0.007234288, 0.011076947, -0.0250621, 0.02266132, -0.012377088, -0.033906795, -0.05917857, -0.060703646, 0.028621085, 0.008348088, -0.058852393, 0.0055210236, -0.05345672, -0.044993594, 0.0038765462, 0.0013729341, 0.033612978, -0.005126985, -0.0032521791, -0.0101542575, 0.034948505, 0.025896726, -0.014054751, -0.009376967, 0.039858542, -0.0036119183, -0.02853897, 0.0043017063, -0.0133354375, 0.014162852, 0.068036914, -0.06662528, 0.01410735, 0.0047348244, 0.043506667, -0.00077930145, 0.00055739615, -0.05776577, -0.009715365, -0.04034385, 0.049907282, -0.034849215, -0.011259668, 0.022044979, 0.003729222, -0.016268294, -0.017852215, 0.03847744, 0.013951748, 0.0013942299, 0.05664176, 0.035608858, 0.028301608, -0.019744128, 0.022941155, -0.009567535, -0.026228802, -0.05497677, 0.044956703, 0.03814677, 0.04082511, -0.00073623995, -0.043183148, 0.0103326375, 0.02936727, -0.011994878, 0.022503702, -0.021692421, 0.026810555, -0.011968884, -0.035614453, -0.025291339, -0.055770293, 0.02481748, 0.007352356, -6.674037e-05, 0.028263142, -0.018122088, 0.029514594, -0.014897299, 0.0071886913, -0.0036355194, -0.038242154, 0.03740147, 0.00815219, -0.020030979, 0.021028232, 0.041806813, -0.054081775, 0.041533694, -0.025801565, 0.017701844, 0.009022894, -0.04237151, 0.0012535708, 0.0071700816, -0.006895838, 0.013689893, 0.044799294, -0.01938714, -0.049434368, -0.0068985582, 0.009709198, 0.049904875, -0.010446355, 0.040156487, 0.01878768, 0.007499771, 0.0022182013, -0.011266949, -0.06502211, -0.0005565724, -0.058209512, 0.0081412885, -0.039565206, -0.013454528, 0.03049878, -0.0067423093, -0.023813456, 0.010309428, 0.073437504, 0.01244909, 0.01200262, -0.009212238, -0.013997923, -0.010362088, 0.01789849, 0.048169356, 0.011631405, -0.079292394, -0.020758001, 0.004439436, 0.0048738034, 0.0084166145, -0.026716135, -0.0015009327, -0.022081828, 0.059288368, 0.026122143, 0.073904954, -0.013657086, 0.016789539, -0.0017908631, 0.021843258, 0.015834313, 0.06640056, -0.0152985845, 0.0402178, -0.036531888, 0.03738045, -0.014609875, 0.033929087, -0.087132126, 0.03603464, -0.041024704, 0.026550382, -0.028804349, -0.055697735, 0.030395014, 0.053941164, -0.035045736, 0.022747932, 0.010900386, 0.011436997, 0.02516562, 0.026077472, 0.01888027, 0.008165876, -0.0058505237, 0.0101118535, -0.093275525, -0.008086233, -0.018677976, 0.018229412, -0.00786677, -0.0067544277, 0.035364687, 0.02102241, -0.058238152, -0.011262999, -0.0020528003, 0.036930125, -0.0084191365, -0.040677257, -0.018305892, 0.011796732, -0.04130567, -0.00088127254, -0.078697495, 0.0666777, 0.06918971, 0.02976543, -0.04809369, -0.0039329133, 0.0059891692, -0.021959938, 0.0070440997, -0.06941749, -0.019460618, -0.06103547, 0.060004283, 0.010310087, 0.05278712, 0.023463923, -0.070487246, 0.008881908, -0.006712043, 0.0143932905, 0.057135712, -0.002393561, -0.01568809, 0.031151412, -0.035690878, 0.03874265, -0.042526927, 9.864588e-07, -0.039786518, 0.021134794, 0.035938162, -0.04090471, -0.030588351, 0.0636741, -0.015405616, -0.023591362, 0.017610854, 0.074284755, 0.03816324, 0.026497964, 0.003914878, -0.036638103, 0.039930943, -0.009674622, -0.047441505, -0.012896896, -0.031220518, 0.01802143, -0.04634909, 0.0035302944, 0.031613722, -0.031058995, -0.0085103875, 0.01627605, 0.00361562, 0.023962878, 0.04202353, -0.0048864707, -0.023349732, 0.03132024, -0.023991711, -0.030516509, -0.03139821, 0.00040695778, -0.0022955982, -0.04661657, 0.009047972, -0.019863538, -0.059353683, -0.010347856, 0.04266611, -0.036796227, 0.026760632, 0.030503966, 0.013375104, 0.023503171, -0.037199344, -0.010455127, 0.014829378, -0.00774162, 0.042834077, -0.012309782, -0.030232992, -0.0062290616, 0.00021755508, 0.014008724, -0.054221753, -0.013926505, 0.011722524, -0.02568032, 0.0014462973, 0.026971558, -9.4782044e-05, 0.042187206, -0.03664744, -0.062036913, 0.0046483036, -0.01355023, 0.026724, -0.004700607, -0.0014855418, 0.057337403, -0.022098495, 0.013346669, -0.022259206, 0.03432789, 0.03871079, 0.02766911, 0.015299164, 0.01162842, 0.023117578, 0.025684152, -0.033319395, 0.027805451, -0.039149195, -0.028748265, -0.009202867, 0.015884012, 0.038743157, -0.017282832, 0.011398235, -0.013434889, 0.0108295875, 0.021802159, -0.0019383982, -0.005488184, -0.03472228, -0.022864278, 0.045581594, -0.010096323]}\n",
      "----------------------------------------\n",
      "ID: b73163d5-b9ba-4fb1-94f9-e92c7328dcf5\n",
      "Source: {'text': \"Introduction Discovering a New Programming Language Welcome to the AVAP book, where you will delve into the fascinating world of an innovative and powerful programming language: AVAP™. In these pages, we will explore together the fundamental concepts, syntax, and unique features of AVAP™, and prepare you to master this new language and harness its full potential in your software development projects. Discovering AVAP AVAP™ is much more than just a programming language; it is a versatile tool designed to enhance creativity and efficiency in software development. With its clear and expressive syntax, AVAP™ allows developers to write code more quickly and concisely, without sacrificing the power and flexibility needed to create robust and scalable applications. What Makes AVAP Special? AVAP™ stands out due to several distinctive features that make it unique in the programming world: Integrated Virtualization: AVAP™ is designed from the ground up with the concept of virtualization in mind. Every aspect of the language is optimized to work in virtual environments, allowing developers to create immersive and scalable experiences. Powerful APIs: AVAP™ provides a comprehensive set of tools for interacting with external APIs and web services, making it easier to integrate advanced functionalities into your applications. Enhanced Productivity: With an intuitive syntax and advanced abstraction features, AVAP™ allows you to write less code to achieve more, thereby increasing your productivity and accelerating development time. What Will You Find in This Book? In this book, we will guide you through the basic and advanced concepts of AVAP™, providing practical examples, useful tips, and challenging exercises to help you master the language and become an expert AVAP™ developer. From installing and configuring the development environment to creating complete applications, this book will accompany you every step of the way towards mastering AVAP™. Are You Ready to Get Started? Then let’s not wait any longer! Dive into the pages of this book and get ready to embark on an exciting journey towards mastering AVAP™. Whether you are an experienced programmer looking for new tools or a curious beginner in the world of programming, this book has something for you. Let’s explore the fascinating world of AVAP™ together! The Virtuality Attribute in AVAP™ AVAP™ (Advance Virtual API Programming) is a dynamic programming language distinguished by its virtuality attribute, which enables the development of virtual APIs in a dynamic and flexible manner. This attribute is based on the fact that the language specifications do not reside in the language interpreter, allowing the final code to be constructed in real-time by the language server. 1.1 Virtuality Principle in AVAP The principle of virtuality in AVAP™ is based on several key aspects: 1.1.1 Language Specifications Decoupled from the Interpreter In AVAP™, language specifications are not compiled into the core of the language nor do they reside in the interpreter. This means that the interpreter is not tied to a specific implementation of the language, providing great flexibility and adaptability in code interpretation. 1.1.2 Dynamic Code Construction in Real-Time Thanks to the virtuality attribute, AVAP™ allows for dynamic code construction in real-time. This means that the final code to be interpreted by the language server can vary and mutate according to current needs, without the need for recompilation or redistribution. 1.1.3 Development of Dynamic Virtual APIs The virtuality attribute in AVAP™ enables the development of virtual APIs in a dynamic manner. This allows APIs to evolve, improve, and adapt to new security or functional needs in real-time, without affecting the clients utilizing the API endpoint. 1.2 Benefits of the Virtuality Attribute Flexibility: The ability to construct code in real-time provides significant flexibility in API development and management. Agility: The capacity to adapt and evolve without the need for precompilation or distributed updates allows for greater agility in software development. Simplified Maintenance: The development of dynamic virtual APIs simplifies the maintenance process, as changes do not need to be made to clients consuming those APIs. 1.3 Interaction with Artificial Intelligence One of the most innovative features of this language is its integration with artificial intelligence through OpenAI. This integration allows the language to automatically generate the necessary results through an interface with OpenAI once the programmer has a clear solution to a problem. This functionality not only speeds up development but also reduces the margin of error and improves efficiency. 1.4 Access to Databases The language also includes the capability to interact with databases using natural language, supported by artificial intelligence, currently version XXXXX through OpenAI. This feature allows for complex queries and data manipulation without deep knowledge of SQL, simplifying development and improving accessibility for programmers of all levels. With this guide, we hope to provide you with all the necessary information to make the most of this dynamic language's capabilities. From variable management to automated result generation and simplified database access, this language is designed to transform the way you develop APIs. 1.5 Conclusions The virtuality attribute in AVAP™ represents an innovative approach to virtual API development, allowing for greater flexibility, agility, and simplification in the software development and maintenance process. By decoupling language specifications from the interpreter and enabling dynamic code construction in real-time, AVAP™ offers a new paradigm in API design and management.\", 'metadata': {'source': '1_Introduction.txt'}, 'vector': [0.017766934, -0.002968915, -0.005218291, -0.071524836, 0.030852297, -0.00468716, 0.01676827, 0.08978321, -0.015683012, -0.06881455, -0.052428916, 0.011073458, -0.05196411, -0.0042061605, -0.027821561, 0.0039098966, -0.030060919, 0.090735584, -0.00630974, -0.00030319198, -0.029341083, 0.111224696, -0.006080628, 0.12804528, -0.088850275, 0.035064276, -0.0011255548, 0.013002957, -0.05517325, -0.030528445, -0.0563056, 0.0026250985, -0.072645634, -0.0132625, -0.0425089, -0.005214109, 0.0021403849, -0.023193348, 0.067711145, -0.014472851, 0.022299275, -0.06162686, 0.08660617, 0.03592876, 0.01824055, -0.07705014, 0.011118544, -0.016247127, 0.04204836, -0.034980346, -0.0534592, 0.034504768, 0.016221307, -0.0403034, -0.029875096, 0.030835899, 0.001239954, 0.0061795944, 0.014394566, 0.015087081, 0.0003432541, 0.06412725, -0.026996834, 0.034553934, -0.013568152, 0.05345857, 0.008672734, 0.0073954766, 0.04995512, -0.0020641494, -0.015083377, -0.018539356, -0.03078777, 0.0022606838, 0.031882636, 0.04923204, -0.009058653, -0.053181656, -0.037089042, 0.013167437, -0.0013833741, 0.028513724, 0.061970357, -0.005166677, -0.019851157, 0.023655014, -0.03470042, -0.031325653, 0.062733956, -0.040058903, 0.047809504, -0.066387616, -0.011479387, 0.0564552, 0.0052788416, 0.032990523, -0.06466219, -0.008934791, 0.010229042, -0.006952637, 0.04999632, 0.031127736, -0.020695359, 0.040114574, 0.035276137, 0.053554334, -0.01751301, 0.011837584, 0.0022776108, -0.020502923, -0.046498545, 0.011158481, 0.007432767, 0.013070228, -0.060002483, -0.027466306, -0.036807433, -0.003583164, 0.00443182, -0.010856168, 0.009268895, -0.0058511924, 0.03187204, 0.032033153, 0.034929182, 0.00824467, -0.02941753, -0.020695288, 0.013220941, 0.017593706, 0.041429423, 0.027657216, -0.007837725, -0.020321807, -0.028196698, -0.0007286808, 0.01659515, 0.020755181, 0.0139397895, 0.0137662385, -0.01529229, -0.041774035, -0.04028189, -0.030172007, 0.038345467, 0.04855051, -0.020269422, 0.0410043, -0.01592472, -0.0167361, 0.025792731, -0.025057083, -0.042474613, -0.017095484, 0.003572277, -0.026219672, 0.00438024, -0.016382737, -0.0011566452, -0.000309455, 0.0087173525, 0.028038198, -0.028188106, -0.0067229765, 0.002287763, 0.008383632, 0.027195925, -0.019742936, -0.027708724, -0.01390449, 0.015560993, 0.008546547, -0.0035157488, -0.029764911, -0.0059367837, -0.016176378, -0.019142145, 0.004149757, -0.0199737, 0.017903827, 0.020993909, -0.010563895, 0.005083811, 0.0014024104, 0.02381131, -0.022405576, -0.009204749, 0.006468821, -0.03329292, 0.037685893, 0.00010099519, -0.057357263, 0.0100705605, 0.0006650203, 0.018078025, -0.019010263, 0.020950947, -0.0063735526, 0.02958928, 0.0014289108, 0.017764913, -0.009506954, -0.008967674, -0.028548345, -0.007902902, 0.015585493, -0.015543472, -0.039538976, -0.015216542, -0.026698755, -0.041686412, 0.032928362, -0.020008167, -0.021018371, 0.028068999, 0.03125764, -0.00713448, 0.012013362, 0.009325464, 0.045541815, 0.026122397, 0.013742313, -0.050573792, 0.0034861853, -0.0116833225, -0.0054740603, -0.017028362, 0.022890754, -0.011596874, 0.009339596, -0.044572614, -0.00028857592, 5.4038246e-05, -0.00501391, -0.008043961, 0.009354798, -0.009000504, -0.021335725, -0.02158721, 0.057172865, -0.006057981, 0.0004326474, 0.026002135, -0.010612122, 0.017420163, -0.013258442, 0.005844393, -0.033846416, -0.025218638, -0.002175077, 0.003082134, -0.03756783, 0.019577907, 0.051039044, 0.017702105, -0.019172272, -0.0146516785, -0.010803881, 0.035306625, 0.041736044, 0.031072222, -0.0053491034, 0.03348848, 0.005082701, -0.012233091, 0.017515106, 0.043324307, 0.048628096, -0.011022677, -0.008687522, 0.04567945, -0.020803347, 0.01494783, 0.0014663854, 0.009722511, -0.00089289487, -0.01116042, -0.04453657, 0.059659272, 0.006693127, 0.002672319, -0.020468611, -0.02036169, 0.0034754123, -0.020799708, 0.020587385, 0.046394482, -0.016010659, 0.012656571, -0.013858255, -0.010017262, 0.029577436, 0.025602922, 0.0054493505, -0.012071785, -0.025927676, 0.00870691, -0.00707541, 0.01999324, -0.023208968, 0.038649727, 0.0020589626, -0.009748133, -0.021108339, -0.058995627, 0.00211194, 0.0150972055, -0.03973782, 0.0034769834, 0.071406476, 0.041350827, 0.03258414, -0.011706282, 0.0014554928, -0.02091967, 0.021168042, 0.022594469, 0.020266395, 0.051934563, -0.030797416, 0.035879187, 0.008325784, 0.024286782, -0.044635624, 0.0011803674, -0.015863996, -0.005734273, 0.050753728, 0.0058092647, -0.019151026, -0.021556612, 0.08396161, 0.015018494, -0.053636268, 0.0036884418, 0.001303457, -0.0072438316, 0.006569138, 0.04090843, -0.04425215, 0.00022020149, -0.003909112, 0.025287094, 0.027876165, -0.00541909, 0.027800823, 0.025665514, 0.02223605, -0.017587978, -0.028351407, -0.052645292, 0.01060733, 0.016224137, -0.008715138, -0.0029309408, -0.010510939, 0.025669364, 0.067972235, 0.011300614, -0.017356493, 0.03687022, 0.00029047803, 0.0018443273, -0.04007739, -0.0086294385, -0.01080673, -0.061146054, -0.061069384, 0.012943194, -0.009007244, -0.0134404, -0.043843705, -0.005487955, 0.065479755, 0.035357878, 0.050812725, -0.0049795047, -0.04574292, 0.008470436, 0.01186115, 0.01783333, -0.00793787, 0.027919255, 0.0034789783, 0.0076345694, -0.064815015, -0.007054313, -0.023231573, -0.025766104, 0.042803917, 0.050719056, 0.0084870765, -0.0066502327, -0.0028498955, 0.0050164233, -0.0304722, -0.03635295, 0.0021847028, -0.014611608, -0.0030837446, 0.056294464, 0.017109156, -0.008171604, 0.014783508, 0.014901236, 0.008704978, 0.011787175, 0.04659629, 0.0460959, 0.029006356, -0.029570432, 0.057622686, -0.0081387395, 0.006299372, 0.012994293, -0.009798252, 0.044581342, -0.012463953, 0.008802115, 0.025769258, 0.018966919, 0.050904464, -0.040247053, 0.018532654, 0.028152516, 0.008218743, -0.020702714, -0.00012415217, 0.031080194, -0.016174521, -0.027448302, 0.025641063, -0.02653755, 0.07470319, -0.000734503, 0.0042825164, 0.049639132, 0.019301893, 0.020636905, 0.027722972, 0.06791624, -0.0054536066, -0.055593424, 0.009404985, -0.008496087, 0.052247535, 0.024635483, 0.032524094, -0.019475598, -0.022176055, -0.042326763, -0.03089724, -0.03345062, 0.024990128, 0.02855316, -0.014175914, -0.028350264, -0.04060334, -0.017227309, 0.05010039, 0.0030635463, -0.015763633, -0.033457913, -0.023380384, -0.04376278, -0.017818354, 0.024339344, -0.019021079, 0.10537761, -0.02201327, 0.05278733, -0.0003367498, -0.00672388, 0.011623487, -0.051019523, -0.041050997, -0.04117448, 0.049353834, -0.04745145, -0.02070913, 0.06826454, 0.026431601, -0.033757407, 0.0065787523, 0.029138913, 0.031725604, 0.008367785, -0.015619891, -0.009150563, -0.034465965, -0.0035839735, 0.013982457, 0.013168854, -0.023727797, 0.008968952, -0.031370033, -0.010883226, -0.05320975, -0.04195051, 0.050074924, 0.052790113, 0.0017395884, 0.0060046343, -0.033536524, 0.0025039976, -0.048263017, 0.03659563, -0.032196216, 0.08590534, 0.027347032, 0.006504655, -0.035708807, 0.014318906, 0.02280329, -0.036115877, -0.03622668, 0.06794883, 0.010721289, -0.037216593, 0.008938703, 0.02869773, 0.013718542, 0.03903931, 0.007508707, -0.06865718, 0.06388811, 0.043030594, -0.0061605955, 0.023107672, 0.046731297, -0.050796814, 0.014955648, -0.022683492, -0.042014025, -0.06423561, -0.044268943, -0.034413278, -0.0004257293, 0.05624501, 0.032904312, -0.006117434, 0.0579067, 0.033579644, -0.02337522, -0.03220989, -0.0032533947, -0.047706395, 0.046112686, -0.013779866, 0.074439995, 0.070565395, 0.0070541003, 0.022230573, -0.042375214, 0.007790916, -0.041126397, -0.010421978, -0.00904667, -0.0030443703, 0.005508512, -0.007999003, 0.01152314, 0.010483455, 0.011034735, -0.00287125, -0.009178401, -0.010531455, 0.05590172, 0.01334783, -0.0015834087, 0.009951701, 0.037132982, 0.0058592176, -0.03475063, 2.0210819e-05, -0.004041799, 0.0049297567, 0.022712002, -0.000952725, -0.013769603, -0.00018606854, 0.003609358, -0.016218528, 0.05615536, 0.014741668, -0.00029007703, -0.0007430651, -0.050548267, 0.004983283, 0.026525041, -0.047746733, 0.02240874, -0.017233932, -0.023919461, 0.046302505, 0.0007974742, 0.0009692089, -0.028594857, -0.005865233, 0.0144917965, 0.0155861145, 0.0150843, -0.045606155, -0.00011750776, -0.06966318, -0.042272497, -0.03944814, -0.05403158, -0.029916143, -0.018776001, -0.0008539541, 0.014756492, 0.040628467, 0.052724738, 0.0024817132, -0.005660978, -0.029532718, 0.0070803417, 0.024841717, -0.008548293, -0.0076193474, -0.0018367693, -0.00248318, 0.0072873374, 0.008693145, -0.029626006, -0.0041807196, -0.06584665, -0.044270013, -0.033961575, 0.023175698, -0.016603572, -0.0044044545, 0.032381464, -0.07317782, 0.054718263, 0.0047928216, 0.03169965, 0.041540187, -0.0456909, 0.0070026354, 0.0195342, -0.012607627, 0.011961826, 0.017840555, 0.0079038525, -0.027075073, -0.035581604, 0.017616132, 0.03384997, 0.062049713, 0.043017298, 0.021035586, -0.00069207867, -0.024957696, -0.008855003, 0.034107033, 0.02781471, 0.020866685, 0.02909125, 0.020851132, -0.07703279, -0.022767939, 0.006419525, -0.007790093, -0.010313428, 0.034864545, 0.028795104, 0.04096621, 0.012857625, 0.021201728, -0.013637961, -0.032542348, 0.002132244, 0.025280152, -0.052721053, 0.011441327, -0.022169704, 0.022764351, 0.02130775, -0.036130436, -0.0014881585, 0.0435332, -0.019498087, 0.028943103, -0.062490005, -0.0027127338, 0.03124533, 0.007365, -0.028769925, -0.044669487, 0.006794398, -0.0010532675, -0.007064361, -0.024376769, -0.01023946, -0.0010407072, 0.018605592, 0.037068546, 0.046351265, 0.045374673, 0.03424022, -0.018515928, 0.0098811, 0.010932187, -0.004257533, 0.0034081622, 0.0070720264, -0.045279372, -0.008665767, 0.02104715, 0.00071515195, -0.054906182, -0.046262406, 0.039249793, -0.006050012, -0.004915018, -0.016460301, -0.03716378, 0.0023909817, 0.0186196, -0.014470465, 0.034088235, 0.019700134, -0.06900994, 0.010039685, -0.0026192036, 0.028581537, -0.016147837, -0.024804099, 0.017151127, 0.030668715, -0.006657694, -0.01380681, 0.033777386, 0.042444285, 0.04238604, 0.004869159, 0.002878227, 0.045383178, 0.043252196, -0.033645697, -0.0025432091, -0.022687864, -0.019065157, -0.018851984, 0.03792056, 0.033529967, -0.053964827, 0.024663266, 0.06395028, -0.0022239122, 0.012027663, 0.026859973, -0.040752918, -0.018160842, -0.004718923, 0.03276232, -0.02668263, -0.024029067, 0.02322952, -0.011625819, -0.016552871, -0.004096678, -0.013114982, 0.08001414, 0.0016588126, -0.026439818, -0.08184474, -0.016265223, 0.05273079, -0.022874095, 0.03079518, -0.010371146, 0.014767423, 0.033978548, 0.023393339, -0.02637807, -0.033619154, 0.052722286, -0.024718396, 0.01181669, 0.009923574, -0.02947578, -0.01980755, 0.007106952, 4.0721232e-05, 0.02202602, -0.022202846, 0.031295057, 0.0047689583, -0.032952774, 0.013337624, 0.021100683, 0.0010409439, 0.0049574478, -0.023750901, -0.008577198, -0.01753879, -0.059156574, 0.00023211313, -0.031908132, -0.059201997, 0.005032812, -0.0041195606, -0.052449014, -0.002958947, 0.00263462, 0.0010091319, 0.03673723, -0.01886915, 0.03065745, 0.033126682, 0.013974293, 0.012750057, 0.033051755, -0.02611361, 0.029224003, -0.052935094, -0.034403585, -0.015655385, -0.03724192, 0.009966977, 0.016929872, -0.013437673, -0.014169362, 0.016700106, -0.005811293, 0.009238607, -0.004397165, 0.019425895, -0.039955106, 0.0077706655, 0.005691103, -0.0037300868, 0.043597076, -0.11106051, 0.014127586, -0.04007428, -0.027099393, -0.011884931, 0.064991646, -0.025661606, 0.06948414, 0.01924076, 0.02461077, 0.036898416, 0.0054010125, -0.05004128, 0.0009415555, 0.03962393, 0.06392541, -0.031114656, 0.026776424, -0.046125554, 0.0378529, -0.02557205, 0.013669221, 0.0025895115, 0.0019483323, -0.03346283, 0.05832633, -0.020236459, -0.010052401, 0.0008301982, 0.04167632, -0.041532345, -0.016160911, 0.04103707, 0.029825453, 0.022353955, 0.055445146, -0.008214172, -0.014971775, 0.023581292, 0.025185449, -0.052399717, -0.021963412, -0.023081277, 0.007987478, 0.015696874, -0.0085657425, 0.03795373, -0.031787682, -0.034835633, 0.01502562, -0.008320767, 0.020206314, 0.002770307, -0.021486724, -0.043040894, 0.024813624, -0.049418043, -0.024827521, -0.09182892, 0.015517081, 0.036769092, 0.027288165, -0.00581217, -0.014499886, 0.01723395, -0.004608628, -0.010668007, -0.021221515, -0.037626904, -0.008836065, -0.017692667, 0.0013578028, 0.027531672, -0.017598763, -0.06154513, 0.050461616, 0.028091287, 0.01779263, -0.025909156, 0.0050250026, -0.016637044, 0.04251265, 0.06677812, 0.017770056, -0.041138496, 0.065767504, 0.009808695, 0.027181732, 0.0046958625, 0.017529195, -0.035066627, 0.010978037, -0.037412036, -0.009241236, 0.00365676, 0.020132609, -0.0016196696, 0.023478542, 0.028556395, -0.030563742, 0.007691573, 0.016102325, -0.0154579375, 0.0004553672, 0.012729662, 0.02710039, -0.02588043, -0.00947714, 0.03321199, -0.01122563, -0.009805774, 0.022926997, -0.013026295, 0.027223244, -0.005879469, -0.0031953147, -0.040946748, -0.023108477, -0.047457524, -0.035078447, -0.031546563, -0.004639264, -0.0059481454, -0.012770607, -0.008481642, -0.018244667, -0.065624885, -0.040257856, 0.00637146, -0.0027604443, 0.045619447, 0.027049528, 0.015919775, 0.027847974, -0.040392883, 0.05173548, -0.008765127, -0.00868104, 0.007743947, 0.02489818, -0.06345039, 0.0041726036, -0.044512924, -0.004684324, -0.04278509, -0.0031018676, 0.014154749, 0.00918675, -0.021221356, 0.050281078, 0.019861737, 0.09717439, 0.033736523, -0.040660277, 0.015333866, -0.010888943, 0.053961124, -0.04379024, 0.01980412, 0.0020458465, -0.05215751, 0.04961966, -0.009737034, 0.016724685, 0.01938063, 0.007019082, 0.011734665, 0.005113164, -0.011430564, 0.01797438, 0.017685244, 0.009037798, -0.01721235, 0.008899143, 0.0036819312, -0.03541622, -0.04947831, -0.0064232647, -0.0023698062, -0.020324972, 0.030890096, -0.017060842, -0.033809394, 0.033228073, -0.0044002677, 0.013328275, -0.0068590343, -0.05205625]}\n",
      "----------------------------------------\n",
      "ID: 045dcc40-ad39-4462-bf33-473d40f08183\n",
      "Source: {'text': 'Chapter 1: Dynamic Programming Language In this chapter, we will introduce AVAP™ as a dynamic programming language. A dynamic language is one whose behavior can be modified during the runtime of the program. AVAP™ shares many characteristics with other dynamic languages, making it a powerful and versatile tool for application development. 1.1 Features of AVAP™ as a Dynamic Language AVAP™ is characterized by its dynamic nature, which means it offers various features that allow flexibility and adaptability in program development. Below, we will detail some of these features: 1.1.1 Dynamic Typing In AVAP™, variable typing is dynamic, which means it is not necessary to explicitly declare the type of a variable before assigning it a value. This allows greater flexibility in data handling and simplifies code writing. # Example of dynamic typing x = 10 # x is an integer x = \"Hello\" # x is now a string 1.1.2 Automatic Memory Management AVAP™ uses an automatic garbage collector to manage memory dynamically. This means that developers do not have to worry about manually allocating and freeing memory, which simplifies the development process and reduces the likelihood of memory management-related errors. # Example of automatic memory management: list = [1, 2, 3, 4, 5] # There is no need to free the memory of the list after use 1.1.3 Runtime Interpreter: Dynamic Code Construction AVAP™ uses a runtime interpreter that goes beyond simply executing code line by line. Instead, the AVAP™ runtime interpreter is characterized by its ability to dynamically construct code during runtime, adding an element of virtuality to the execution process. Dynamic code construction means that the AVAP™ runtime interpreter can generate and modify code as the program executes. This allows for greater flexibility and adaptability in data manipulation and operation execution. A fundamental aspect of virtuality in dynamic code construction is that the language specifications are completely isolated from the runtime interpreter. This means that the interpreter is not tied to a specific language implementation, facilitating code portability and allowing for the transparent integration of new features and functionalities. In summary, the AVAP™ runtime interpreter not only executes code line by line but also dynamically constructs code during runtime, adding an additional level of virtuality and flexibility to the program execution process. 1.1.4 Flexibility in Programming AVAP™ offers a wide range of features that promote flexibility in programming. This includes support for higher-order functions, dynamic exception handling, and the ability to manipulate objects at runtime, among others. # Example of a higher-order function def operation(func, a, b): return func(a, b) def add(x, y): return x + y result = operation(add, 3, 5) # The add function is passed as an argument 1.2 Advantages of AVAP™ as a Dynamic Language As a dynamic programming language, AVAP™ offers several advantages, including: Greater flexibility and adaptability in program development. Faster writing and execution of code. Facilitates experimentation and exploration of solutions. Allows for rapid feedback during development. 1.3 Summary AVAP™ is a dynamic programming language that offers a wide range of features promoting flexibility, adaptability, and speed in application development. With its dynamic typing, automatic memory management, runtime interpreter, and programming flexibility, AVAP™ becomes a powerful and versatile tool for developers.', 'metadata': {'source': '2_Dynamic_Programming_Language.txt'}, 'vector': [0.015303728, -0.014688915, -0.0070324177, -0.070088945, 0.045747485, 0.016516026, -0.0056459424, 0.018683119, -0.0113677075, -0.058934398, -0.019218344, -0.027425187, -0.025527444, -0.0047561238, -0.018512418, 0.0037704967, -0.013881442, 0.031140933, -0.04161109, 0.004583773, -0.047703497, 0.088162765, -0.024283653, 0.094081335, -0.020238342, 0.041544266, 0.03222671, 0.020600833, -0.044878926, -0.011848996, -0.08064272, -0.0074139456, -0.051808197, 0.019798951, 0.0001240362, -0.008556607, 0.0052975235, 0.026394062, 0.038810737, -0.004672506, 0.03188258, -0.061080422, 0.06494972, 0.0066283704, 0.036096297, -0.093350545, -0.017002337, -0.0077129034, 0.050301567, -0.015679086, -0.06800454, 0.007406085, 0.03966411, -0.0045120018, -0.03481293, 0.024106935, -0.011860414, 0.04012812, 0.019041793, 0.005306147, -0.00985881, 0.03743972, -0.035618965, -0.0006141722, -0.013657832, 0.021575721, -0.006450648, -0.02223142, 0.014761066, 0.0058724037, -0.004851941, -0.068519615, -0.022900054, 0.006043996, 0.05058582, 0.06408119, 0.0026940976, -0.07989887, -0.043577418, 0.027575316, -0.018001603, 0.015521617, 0.026102148, 0.014914962, 0.030768005, 0.026471086, -0.015859755, -0.008104282, 0.0026040187, -0.020567227, 0.0077426773, -0.06842098, -0.018965347, 0.020495072, 0.025243953, 0.011122463, -0.07960768, 0.012031515, 0.01130854, 0.009458941, 0.031450715, -0.023521934, -0.047158714, 0.032810252, 0.058450878, 0.055686176, -0.013606038, 0.021048231, -0.0035829707, 0.0021296684, -0.016330142, -0.015306059, 0.017536903, 0.03598931, -0.0768297, -0.030191958, -0.00929925, -0.027013805, 0.035177458, -0.012526608, 0.01365972, 0.023495978, 0.036076315, -0.005473715, 0.02914858, 0.0026949772, -0.030800773, -0.032348003, 0.005090887, 0.009208718, 0.03822513, 0.0536312, 0.008937195, 0.0066209477, -0.030805985, 0.0043523884, 0.014284466, 0.019462718, 0.009393031, -0.0009606029, -0.030132797, -0.030381095, -0.04167818, -0.024802335, 0.013024924, 0.029707799, -0.0045529692, 0.032945007, -0.018745769, 0.0035035869, 0.028131759, -0.023772687, -0.013433641, -0.0017297018, -0.012591059, -0.017869655, 0.026855394, -0.014111026, 0.0009503807, -0.008288532, -0.0072661224, 0.018283362, 0.0034075228, -0.0057669925, 0.016707765, 0.0017150063, -0.010436003, -0.01244867, 0.0023159063, -0.014004872, 0.0076607307, 0.042461365, 0.0039126235, -0.028314928, 0.007555966, 0.0016253451, -0.037188035, 0.026783315, -0.0024360179, -0.012890293, 0.03234818, -0.007571686, 0.009091387, -0.014335088, 0.039178412, 0.0036100072, -0.0074639944, 0.016223975, -0.036928937, 0.019906584, 0.0032107478, -0.041941416, 0.010697715, -0.004211066, 0.015304645, -0.018313024, -0.017964253, -0.012355457, 0.025583634, -0.025567977, -0.0025320088, -0.016364912, -0.017545864, -0.030177137, -0.0066074813, -0.017240375, -0.031859074, -0.034271847, -0.009194552, -0.0059637707, -0.00053291855, 0.008077715, -0.020423898, -0.04518782, 0.039353155, 0.051295307, 0.009962042, -0.008456057, 0.0038901917, 0.032847248, 0.013016514, 0.005216174, -0.020059496, 0.017494792, -0.0023939307, -0.019305898, -0.012821861, 0.026236353, 0.017638521, -0.0040525417, 0.009208242, 0.023862042, 0.015925549, -0.01889575, 0.013821408, 0.027860576, -0.0014760771, 0.025023324, -0.023117, 0.023023842, 0.017457293, -0.033895157, 0.012730506, 0.0046083517, 0.02480571, -0.03002289, 0.02747502, -0.031811763, -0.014852159, 0.027481386, 0.006106404, -0.050688375, -0.024880784, 0.050828956, 0.03877, -0.019447383, -0.008960672, 0.0060749077, 0.017129654, 0.026190095, 0.053243548, 0.0017902191, 0.026833843, 0.031593513, -0.021100331, 0.007592922, 0.003944356, 0.028041273, 0.002426128, -0.025546012, 0.059285074, -0.010333884, 0.036583334, -0.0028808229, 0.008738594, 0.007187029, -0.007850731, -0.024209742, 0.06340575, 0.015029132, 0.043397322, -0.011571873, -0.042822137, -0.014720797, 0.003047328, 0.028121391, 0.047166068, -0.028201476, 0.019347398, -0.016801476, -0.06635083, 0.06757097, 0.008780663, 0.04034093, -0.060775105, -0.04052465, -0.014962062, -0.024192946, 0.03943582, -0.023904143, 0.07372568, 0.011581559, -0.019036977, -0.04277605, -0.06719505, 0.026488723, -0.005299537, -0.066530876, -0.0045919884, 0.056781203, 0.04042426, 0.013118453, -0.025003403, 0.010500181, -0.029370125, 0.0056025633, 0.03738784, 0.0036154746, 0.01747367, -0.043273464, 0.026829178, -0.009817999, 0.003210121, -0.06583692, 0.0055779777, 0.008177109, -0.009424323, 0.043540653, -0.012421772, -0.046496227, -0.0040072314, 0.056532525, 0.019033788, -0.027297778, -0.001384829, 0.01793215, -0.012483296, 0.013666371, 0.009043001, -0.02986521, 0.00203337, 0.030410994, 0.012163047, 0.00953919, -0.008171082, -0.036907572, 0.02508191, 0.055390194, -0.035032123, -0.033343717, -0.03636908, 0.021362726, -0.006881162, -0.0028285033, 0.01644191, -0.007160407, 0.057491492, 0.058178395, 0.0022441703, -0.00781493, 0.027262263, -0.01671289, -0.014132342, -0.005207534, 0.018317182, -0.029104326, -0.03241083, -0.059701882, 0.013455237, -0.016361093, -0.02178995, -0.04876512, 0.02556751, 0.046377327, 0.020555535, -0.0032925669, -0.004673421, -0.020766422, 0.036929853, 0.045330357, 0.058864057, -0.011072024, 0.02043823, -0.013687624, 0.057278793, -0.05807826, 0.022764761, -0.010035069, -0.017199699, 0.017987031, 0.034377363, -0.0020811718, 0.017003942, 0.013301523, 0.015534875, -0.04767112, -0.02493208, 0.016719606, -0.011561354, 0.023324553, 0.056460373, 0.008638943, 0.011957121, 0.03820734, 0.026494285, -0.0116814785, 0.02747954, 0.06640619, 0.003677947, 0.03061156, 0.004694406, 0.008141487, -0.01486344, 0.02214163, -0.00937983, -0.015343837, 0.045448426, -0.009971423, -0.014395418, 0.02851836, 0.012639326, 0.053349853, -0.0653802, 0.0035598455, 0.036986087, 0.0110882, -0.057915065, -0.0019483106, 0.04387294, -0.015208868, 0.0020204033, 0.002545946, -0.012020097, 0.06536543, -0.048623174, -0.035784796, 0.04265838, 0.024746282, 0.00015429496, 0.04441645, 0.00013886468, -0.0064543327, -0.037206095, -0.0014373484, -0.004092601, 0.054334834, 0.017120406, 0.04541789, -0.009898911, -0.04634856, 0.0054634158, -0.025590131, -0.05089295, 0.007727165, 0.06253024, -0.005555212, -0.007344527, -0.06199215, -0.014226017, 0.04406899, 0.01630429, -0.01808661, -0.0047678174, -0.025967514, -0.025382016, -0.013239026, 0.022137672, -0.0150931785, 0.123232946, -0.001807668, 0.028877934, 0.008580601, -0.048719216, 0.0073781735, -0.037079934, -0.056671895, -0.059513178, 0.044173095, -0.006858529, -0.01381496, 0.034756023, -0.00095208315, -0.005286009, -0.027428465, -0.0049003097, 0.0036410468, 0.0066414773, 0.020144742, -0.006115338, -0.040506978, -0.011283352, 0.0344038, -0.01017655, 0.0004445695, 0.0058515337, -0.027810251, -0.024857422, -0.061106447, -0.053376112, 0.032352027, 0.0466998, 0.026052922, 0.026764216, 0.01826567, -0.013568165, -0.043624137, 0.04604586, -0.037212506, 0.03475747, 0.039367847, -0.01594982, -0.020899836, 0.0055558677, 0.020297432, -0.017108042, -0.011587858, 0.08274238, -0.011320877, -0.052408222, 0.006954645, -0.0083742635, 0.023221815, 0.019806476, -0.00201651, -0.057109185, 0.07962062, 0.02948552, -0.0023873355, 0.008466329, 0.05812951, -0.03772618, -0.00089236774, -0.007342769, -0.030463237, -0.06666874, -0.028565546, -0.029046286, 0.0018348042, 0.058846213, -0.0020537926, -0.02253235, 0.028358521, 0.03495249, -0.027827363, -0.022486713, -0.02766945, -0.033717234, 0.02554749, -0.01108189, 0.10169432, 0.0521661, 0.03089838, -0.018662961, -0.047486365, 0.038755313, -0.04389303, -0.022130087, -0.025394548, 0.0005830965, 0.033534203, -0.0036596695, 0.03621292, 0.01975714, 0.01888679, -0.0052658385, -0.02776721, -0.013755325, 0.06881494, 0.036081642, 0.018035833, 0.06858142, 0.015060845, 0.010834996, 0.014169234, -0.0065491437, -0.03218323, 0.0051490734, 0.017567368, -0.0012004903, 0.015592225, 0.009129289, 0.01171598, 0.012618239, 0.015899135, 0.015288067, -0.012457521, -0.007265767, -0.059885845, -0.014245443, 0.016056957, -0.039319254, -0.0013864818, 0.014080618, -0.009095104, 0.07255771, -0.012187172, -0.010415471, -0.009559758, -0.025550472, -0.011332649, 0.0036651504, 0.011063678, -0.045865867, 0.019255849, -0.047127254, -0.03044713, -0.030794593, -0.07791019, -0.04469721, -0.046530124, 0.0057703317, 0.00051676575, 0.031661786, 0.035878208, 0.0121982265, -0.006133171, -0.03395583, -0.009931131, 0.034801647, -0.015390405, -0.009101873, -0.00054313894, -0.024649581, 0.018803095, 0.015961159, -0.034818374, -0.04026154, -0.05597492, -0.06641629, -0.0134507185, 0.017548557, 0.0005805982, -0.008500134, 0.017857684, -0.03184668, 0.04264524, -0.013054354, 0.033550642, 0.03978044, -0.049582236, -0.005757734, -0.0055458243, 0.017359529, 0.026115173, 0.026207507, -0.016200716, -0.019559603, -0.0027046925, 0.010461411, 0.026288347, 0.049860314, 0.05274072, 0.0039723446, 0.021507433, 0.0025097425, 0.012388268, 0.026329782, 0.012776274, 0.008891998, 0.021829268, -0.00562208, -0.0952588, 0.04286691, -0.035683256, 0.0056075063, 0.0003108289, 0.0330448, 0.021720456, 0.047879305, 0.03376301, 0.027251875, 0.0045662518, -0.040355053, 0.011665267, 0.016416136, -0.05008046, -0.013244381, -0.028493749, -0.009542338, -0.008994451, -0.050145164, -0.020921791, 0.055238344, 0.0019547353, 0.016179219, -0.054823868, -0.021742612, 0.01571588, 0.023602135, -0.008454306, -0.03464155, 0.006329876, -0.034722473, -0.0055236025, -0.044874784, -0.038641036, 0.025187196, 0.0063281474, -0.030037263, 0.02916789, 0.0062006074, 0.026383042, -0.00910666, 0.030411882, -0.0013129063, 0.010596166, 0.020913672, -0.03322917, -0.009418547, 0.014207422, 0.0063799126, -0.019536074, -0.014832371, -0.02181871, 0.019903263, 0.02846333, -0.011871512, -0.052331865, -0.02664794, 0.0539717, -0.008855197, -0.019644052, 0.031238616, 0.020743353, -0.09765782, 0.013625608, -0.022768598, 0.026151313, 0.0047175083, -0.06830097, -0.0077596414, -0.01544655, 0.002236857, -0.033075053, 0.008616988, -0.015852248, 0.04921252, 0.049743608, -0.027241178, 0.03227658, 0.0031717718, -0.033869304, 0.0037244759, -0.05911651, -0.0010198004, -0.003132495, 0.050009016, 0.038308933, -0.08036642, -0.0016802113, 0.041585784, -0.0014519668, 0.04895856, 0.0009316844, 0.017001688, -0.034115966, -0.014101474, 0.0049375426, 0.0023260098, -0.0032704468, 0.011341293, -0.01734465, 0.003589227, -0.0016742841, 0.0075864727, 0.037448607, 0.0026723414, -0.015786938, -0.056247998, -0.023777511, 0.016382067, 0.027341144, 0.040824927, -0.01929118, 0.007942731, 0.03675845, 0.008274278, -0.038487747, -0.026582336, 0.05490225, -0.018223833, -0.00017025362, 0.030091913, 0.030276576, -0.00965379, 0.021434912, 0.0081736855, 0.03249298, -0.005972392, 0.056064047, 0.027523944, -0.045587964, 0.023269063, 0.029493747, 0.041521247, 0.016910916, -0.0103279, -0.032069612, -0.02644077, -0.0411247, 0.0034278356, -0.04684479, -0.058708843, 0.03937308, -0.0039020856, -0.009716402, 0.0008868127, -0.02576359, 0.01642208, 0.000282013, -0.02327166, 0.04651164, 0.040434573, 0.028563479, 0.025223982, 0.052091006, -0.038183074, 0.050492305, -0.066633366, -0.024874788, 0.003462965, 0.016088808, -0.010498012, 0.03978564, -0.014469538, -0.04231804, 0.003737558, -0.0006975396, 0.018749867, -0.0047161495, -0.02340348, -0.04359046, -0.02108784, -0.002906824, 0.0045750933, 0.017999543, -0.08463851, 0.011840716, -0.05148442, 0.03044472, -0.0157342, 0.035421498, -0.048358537, 0.038675953, -0.0059195585, 0.020774059, 0.03633129, 0.049985636, -0.06939753, -0.012207035, 0.060257785, 0.016368318, -0.039482262, 0.05718185, -0.01625656, 0.05643877, -0.012406246, 0.00987375, 0.030837484, -0.0070057083, -0.0335009, 0.031043697, -0.0127219325, 0.015650434, -0.046792604, -0.022787001, -0.015533579, 0.018591423, 0.03311288, 0.027184742, -0.011945426, 0.03172492, 0.02504633, 0.008162914, 0.048513744, 0.018795142, -0.06856298, -0.019318484, -0.004709358, -0.011171533, -0.029957348, -0.016962405, 0.000950206, -0.008796117, -0.034750104, -0.005179505, 0.021464748, 0.045908086, -0.042193238, -0.02632119, -0.07162133, 0.032989886, -0.065839596, -0.0050638528, -0.09999905, 0.021946345, 0.059211515, 0.039448015, 0.0057137473, 0.0218733, 0.038911752, -0.0033008931, -0.013582024, -0.06861548, -0.0064925067, 0.009734268, -0.0040608053, 0.0017150705, 0.020419067, -0.0057394663, -0.0469666, 0.06577721, 0.028049113, 0.043737926, -0.009388046, 0.013958443, -0.054042865, 0.034769975, 0.046535205, 0.031944893, -0.03326335, 0.06919806, 0.021425664, -0.025896229, -0.009481961, 0.018496586, -0.019642176, -0.04250872, 0.007849062, -0.015651487, -0.0023495706, 0.02511605, -0.0023138619, 0.04197483, 0.01328601, -0.0644611, -0.013821406, 0.0022109717, 0.0016266798, 0.0008281513, 0.04388774, 0.038341735, -0.030112565, 0.009309364, 0.041038778, 0.01771259, 0.010082111, 0.012299931, -0.026332011, 0.040620763, -0.009327116, -0.02460141, -0.026402537, -0.052177552, -0.043022867, -0.03576927, -0.02726619, 0.0033386892, 0.0039057012, 0.021393709, 0.0048452173, 0.00045614294, -0.050557118, -0.061815813, -0.0054376107, 0.0044751232, 0.007855066, 0.022565754, 0.018297367, 0.00078663713, -0.027955255, 0.05512253, 0.0019984408, -0.0025273638, -0.004727909, 0.020352107, -0.030400537, 0.022048652, -0.042125437, -0.017927118, -0.018782567, -0.027093397, 0.0025958146, 0.012801258, -0.017075628, 0.022639554, 0.0020457008, 0.046830647, 0.06463128, -0.0444682, 0.044018496, 0.011584985, 0.033430554, -0.06778998, 0.02441947, -0.015937386, -0.009115009, 0.06437691, 0.0062128403, -0.006039575, 0.04169465, 0.010641609, 0.012941262, -0.034502044, -0.0069252546, -0.01900805, -0.015952377, -0.013635121, -0.028459722, 0.004469697, 0.012356502, -0.0279154, -0.026613412, 0.012146552, 0.03296246, -0.022070227, 0.009383059, 0.0021206941, -0.014405192, 0.017863944, 0.008319288, 0.009234704, 0.02161873, -0.021422787]}\n",
      "----------------------------------------\n",
      "ID: eb8dbd30-f582-4961-9f61-23ea26298f3b\n",
      "Source: {'text': 'How to Work with Comments Comments are a fundamental tool in any programming language, as they allow you to document code, make it easier to understand, and help keep it organized. In the AVAP™ programming language, comments are an integral part of the syntax and are used to add additional information to the source code without affecting its execution. Comments serve several purposes: Documentation: Comments can be used to explain what specific parts of the code do, which can be helpful for anyone reading or maintaining the code in the future. Clarification: They can clarify complex sections of code, making it easier for others (or yourself) to understand the logic and flow of the program. Organization: Comments can help organize code by separating different sections or explaining the purpose of various code blocks. Debugging: Comments can temporarily disable parts of code during debugging without deleting it, allowing you to test different scenarios. In AVAP™, you can use different types of comments to suit your needs. They can be single-line comments or multi-line comments, depending on the level of detail and context required. By incorporating comments into your code, you make it more maintainable and easier for others to follow, which is essential for collaborative projects and long-term code management. 3.1 Line Comments Line comments in AVAP™ are used to add brief annotations or explanations to a specific line of code. These comments begin with the // symbol and continue until the end of the line. Everything following // is considered a comment and is ignored by the compiler. // This is a line comment in AVAP™ int x = 5; // You can also add comments at the end of a line of code Line comments are useful for providing quick clarifications about the code and improving its readability. 3.2 Block Comments Block comments in AVAP™ are used to add comments that span multiple lines of code. These comments begin with /* and end with */. Everything between /* and */ is considered a comment and is ignored by the compiler. /* This is a block comment in AVAP™ that spans multiple lines of code. It is used to explain extensive sections of code or to temporarily disable entire blocks of code. */ Block comments are ideal for providing detailed explanations about complex sections of code or for temporarily disabling entire blocks of code during debugging. 3.3 Documentation Comments AVAP™ also supports documentation comments, which are used to automatically generate documentation from the source code. These comments begin with /// and are used to describe the functionality of classes, methods, variables, and other elements of the source code. /// This function adds two integers and returns the result. /// \\\\param a The first integer. /// \\\\param b The second integer. /// \\\\return The sum of the two numbers. int sum(int a, int b) return a + b; Documentation comments are essential for maintaining up-to-date and detailed documentation of the code, which facilitates its understanding and use by other developers. 3.4 Best Practices When using comments in AVAP™, it is important to follow some best practices: Use comments moderately and only when necessary to clarify the code. Keep comments updated as the code evolves. Write clear and concise comments that are easy for other developers to understand. Avoid redundant or unnecessary comments that do not provide useful information to the reader. 3.5 Summary Comments in AVAP™ are an essential tool for improving the readability and maintainability of source code. With line comments, block comments, and documentation comments, developers can add explanations, clarifications, and useful documentation to the code, making it easier to understand and collaborate within development teams.', 'metadata': {'source': '8_How_to_work_with_comments.txt'}, 'vector': [0.0061533665, -0.02382218, -0.004600608, -0.06576938, 0.0025913387, 0.0093747, 0.033494122, 0.012412626, -0.040674362, -0.037119653, 0.00945797, -0.016597819, 0.0060024625, -0.0044891154, -0.02193585, -0.007450198, 0.005754362, 0.049957026, 0.02498883, -0.029491011, -0.010970507, -0.01587771, -0.05639132, 0.0933612, -0.046688814, 0.009261474, 0.045062147, 0.046501834, -0.08870038, -0.0058306893, -0.03315074, -0.02623358, -0.057335977, -0.0034735927, -0.046540998, -0.0058283093, -0.056496166, -0.04292311, 0.06417314, -0.031143615, -0.020360142, -0.029870313, 0.06885781, 0.03602393, -0.037557244, -5.045185e-07, 0.0023039693, 0.0036173207, 0.043476187, -0.0055900267, -0.029604543, 0.043909423, 0.014582411, 0.0024939773, -0.045455873, 0.03473943, 0.02391065, 0.029462693, -0.0021916653, 0.010936731, 0.021020567, 0.035615783, 0.018206565, 0.044152785, -0.026670773, 0.026766269, 0.016149791, -0.022444965, -0.053848837, -0.016231328, -0.000762474, 0.036970966, -0.031730432, -0.0109445015, 0.014040568, 0.029081553, 0.0057698493, -0.008273791, -0.0065413155, 0.031071207, -0.020529458, 0.05412064, 0.07446586, 0.0017904934, -0.025299683, 0.04378055, -0.05141246, -0.03209819, 0.036020335, 0.010042062, 0.0064635356, -0.041040014, 0.0066573503, -0.050474945, 0.05372137, 0.0011538732, -0.04748415, -0.008815234, 0.009298244, -0.009241244, 0.014731531, -0.009931113, 0.035677448, 0.025602857, 0.005062579, 0.0024359797, -0.00095141307, 0.04403122, 0.03881543, -0.020058466, 0.014101488, 0.0017495003, 0.021888778, 0.056898672, -0.023473186, 0.04294675, 0.006134952, -0.023726543, 0.0099164685, -0.009522688, 0.0045403317, 0.025674747, 0.030412173, -0.0035414004, 0.016943567, -0.002608415, -0.02678173, -0.0028823826, -0.0133230835, 0.009504952, 0.0077793044, 0.02066019, -0.0037809778, -0.005807489, -0.0034704672, 0.0045545823, -0.012731723, 0.017511616, 0.044081993, -0.006549519, 0.0007518093, -0.025003932, -0.028320136, -0.031807624, 0.032796644, 0.033822335, -0.031663768, 0.026051134, -0.047637824, 0.036357842, 0.037512433, -0.045339026, 0.023340289, -0.025666319, -0.015926449, -0.05478087, 0.028046627, -0.002306336, 0.0113033205, -0.002338948, 0.03644738, 0.032487918, -0.026514117, -0.019983612, 0.004850986, -0.0184429, 0.00353294, -0.019097436, 0.015533875, -0.02120487, -0.0019940885, 0.024983764, -0.0054754596, -0.017561125, 0.0008685061, -0.032481134, -0.034843676, 0.010867015, -0.04567107, 0.0048642633, 0.011091585, -0.007455487, -0.00313852, 0.01301014, 0.02659405, 0.01787268, -0.009720606, -0.015272785, -0.022813767, 0.016448416, 0.013805425, -0.03707715, -0.023917874, 0.0025975923, -0.004594094, -0.037380002, -0.027554255, 0.011676615, 0.012266773, 0.0212276, 0.041332725, -0.03194356, 0.0013113429, -0.02611582, -0.014672491, 0.01027569, -0.0022563268, -0.0074382196, -0.0347809, 0.00030178583, 0.0024032788, -0.0016112851, -0.03828801, -0.019958256, 0.000937186, -0.010294482, -0.0010307282, 0.03319799, 0.02786577, 0.036869414, 0.01562099, 0.012727135, -0.014337163, -0.005028515, 0.039122365, -0.00045837916, 4.4991903e-05, -0.035290267, -0.040421363, 0.0021617142, -0.029878398, 0.07087152, 0.032350797, -0.024088515, 0.00030271846, 0.03398253, 0.026575902, -0.05563844, 0.010659356, 0.013508413, 0.019844111, -0.0071014343, -0.001553544, 0.010310801, -0.00061403157, -0.013930543, 0.014754276, 0.006592563, -0.027061477, 0.033630975, -0.038750302, 0.062914126, 0.043740593, -0.054949194, 0.028076071, -0.0394052, -0.011530586, -0.0018483696, 0.01415872, 0.02203571, 0.01838393, -0.010071206, 0.04799107, -0.007731235, -0.04331388, 0.0119904885, 0.014604155, 0.00025987584, -0.022049256, -0.03943263, 0.012430641, 0.007245075, 0.008974496, 0.0040049534, 0.018844355, 0.0010138951, 0.01789069, -0.016360817, 0.015732406, 0.007085289, 0.09480071, -0.035728414, 0.026138471, 0.02323675, 0.01291953, 0.011512062, 0.007821945, -0.017399672, -0.03171965, -0.0072276443, -0.008289787, 0.025099352, -0.048104692, 0.06892787, -0.010901518, -0.0391009, 0.025389744, 0.01775768, -0.03363628, 0.011270387, 0.009178277, 0.008245722, -0.02652701, 0.001902949, -0.03114601, 0.025040831, 0.022382451, -0.009456241, 0.0038706355, 0.039037567, 0.06482049, 0.018467342, -0.037497815, -0.0019306107, -0.023404015, 0.015462484, 0.08078661, -0.0060599297, 0.022605564, -0.0061177732, 0.02378127, -0.033222917, 0.018977271, -0.051754624, 0.0035631978, -0.0045739897, 0.00031211696, 0.0023147545, -0.033443533, 0.029042494, 0.015565687, 0.009006668, 0.009911152, -0.05526236, 0.00023033719, -0.032436304, -0.032991916, 0.015058684, 0.05255385, -0.034630325, 0.008083536, 0.006650178, 0.03252942, 0.022048287, -0.035752945, 0.026120361, 0.0001779672, 0.03032079, 0.0029832262, -0.042086735, -0.06431555, -0.0072307372, -0.008980752, 0.0019824835, 0.0038291705, 0.0067175217, 0.03382966, 0.04242919, -0.03099394, -0.04749739, 0.016655972, -0.020278571, 0.002135013, 0.0065442827, -0.0032852571, -0.06594056, -0.06029221, -0.03730627, 0.013564189, -0.021663805, 0.0019576955, 0.03618962, -0.0038370113, 0.0697043, 0.031410523, 0.07591022, 0.015950007, -0.06038614, 0.0038134365, 0.06843142, 0.04044146, 0.021025999, -0.0002964465, 0.010059193, 0.0014767278, -0.069074884, 0.006130374, -0.01702586, -0.034359433, 0.049263034, 0.07150808, -0.05894179, 0.0077917497, -0.0073894025, 0.010906315, -0.008824661, -0.04690061, 0.053272735, -0.022514863, -0.03996602, 0.02426593, -0.03773051, -0.033947192, 0.030095618, -0.0056047193, 0.011788266, -0.015648944, -0.014718978, -0.00028925732, -0.023808975, 0.010732124, 0.027514577, 0.034480877, 0.025551528, 0.006852797, -0.0103250425, 0.07236343, -0.0670474, 0.027991852, 0.043959558, 0.025728641, 0.050341565, -0.0034508263, -0.017240338, 0.01959008, 0.0063604787, 0.0025065213, 0.004257371, 0.0064829197, -0.022517297, 0.0010597375, 0.039799564, 0.019865384, 0.026185993, -0.044368096, -0.016837955, 0.041172523, 0.025751019, -0.023875302, 0.028199058, 0.018583104, 0.034553137, 0.020161206, -0.009166391, -0.0346921, 0.035826154, -0.023232156, 0.0418834, 0.025574137, -0.047821455, -0.0625883, -0.022258433, 0.0133250505, 0.049071446, 0.01633488, -0.038151156, -0.061246347, -0.080226734, -0.009294904, 0.014263257, 0.011852209, 0.020097012, 0.0050277538, -0.0548443, -0.027290102, 0.016011635, 0.02922932, -0.041059542, 0.026972357, -0.008885888, 0.06420837, 0.015373654, -0.00027489348, 0.0040079798, 0.0051765307, -0.018235926, -0.06644211, -0.006277745, -0.009994581, -0.02453076, -0.0042560766, 0.024202723, 0.035483744, -0.055066746, 0.015074998, 0.01325885, 0.030874055, 0.026024, -0.04500194, 0.0015445318, 0.032055046, -0.021743607, 0.04055939, -0.009739779, 0.08690026, -0.039025176, 0.011555949, -0.023002489, -0.025827434, 0.08106044, 0.03781929, 0.038029194, 0.044532556, 0.027273847, -0.039045315, -0.05863365, 0.003324467, -0.051841438, 0.025468847, 0.020350378, -0.0064759254, -0.064864226, 0.0072334954, -0.021238118, 0.03890675, -0.06630199, 0.009941344, 0.027618796, 0.024652442, -0.042248607, -0.00994384, 0.045915347, 0.015710304, 0.00066331413, -0.069736265, 0.021828001, 0.030295651, -0.008700676, 0.023064766, 0.03858796, -0.023921784, -0.05421782, 0.020703586, -0.070137374, -0.0263168, -0.012504904, -0.044321712, -0.033711575, 0.036366146, 0.06909892, -0.0032577256, 0.02088647, -0.00544192, 0.008787983, -0.040646996, -0.014684318, -0.04406632, 0.05037733, -0.002788577, 0.036401007, 0.080654904, 0.04086541, 0.010419378, -0.046923738, -0.012826293, -0.030268297, 0.048806418, -0.00688333, 0.009840226, -0.008858063, 0.055293113, 0.040078167, 0.03611122, 0.03420665, -0.0019166732, -0.027688302, -0.056735724, 0.052234363, -0.024842331, -0.036513776, 0.0058879904, 0.01583826, -0.0025126834, -0.02972881, -0.0072926735, -0.016388755, -0.021329865, 0.0032943867, -0.019865653, 0.028766066, -0.05088776, -0.046915606, 0.005871057, 0.024840407, 0.010900259, -0.029339444, -0.025835808, -0.015723662, -0.0012594247, 0.04407527, -0.06774296, 0.01927411, 0.0009124024, -0.016179398, 0.032164317, 0.004555494, 0.037808046, -0.029634006, -0.0065774503, 0.040995374, 0.004853903, 0.022183472, 0.012394937, 0.03406569, -0.03754112, -0.011845719, -0.016108539, -0.019580066, -0.020948257, -0.053824004, -0.01577908, 0.024245977, 0.05482628, -0.0008288978, 0.022487514, 0.00018980862, -0.025887104, -0.020341149, 0.01867874, -0.030992694, -0.04142213, -0.0044178143, -0.014326993, 0.02130476, 0.01682274, -0.0114223575, -0.059633013, -0.039659295, -0.025720512, -0.024355268, -0.04544387, -0.026383618, 0.0049193706, 0.08115514, -0.04242224, -0.0469701, 0.0035553735, 0.041960414, 0.0509109, -0.06990222, -0.0061133145, -0.013052641, -0.00020199412, 0.03406303, 0.010538718, -0.017143333, -0.02647118, 0.026820026, 0.011350172, 0.011128435, 0.040884905, 0.023777835, -0.0059171976, 0.050118983, -0.046620052, 0.023095502, 0.0038936948, -0.011110511, 0.023367818, 0.0014315345, 0.011539552, -0.06923139, 0.030534003, 0.007490687, 0.0022058773, 0.05483251, 0.04724571, -0.009418872, -0.0032845458, -0.008232655, -0.007051311, -0.027963858, -0.023623424, 0.03250308, 0.032023415, -0.022967257, 0.005680498, -0.045896456, 0.012395309, -0.00019330805, -0.040240925, -0.022955911, 0.052454285, -0.015596199, 0.021147134, -0.037611287, -0.047282226, -0.0035721802, 0.015495913, -0.0066542686, -0.031108622, -0.0075366115, 0.0023875306, -0.0050389767, -0.011925425, -0.043798536, -0.0018301591, 0.013714571, 0.018697387, -0.008617011, -0.005152321, 0.027049337, 0.0044802986, 0.01401461, 0.019246912, -0.0084168, -0.011813128, 0.027569737, -0.026393214, 0.012595201, 0.010290235, 0.035985142, -0.03184873, -0.021808175, 0.018192071, 0.011543495, -0.049890045, -0.01333021, -0.040522467, 0.0012581943, 0.023192195, -0.005558269, 0.032984316, -0.021391125, -0.04745229, 0.04238663, -0.0063879546, 0.048834387, -0.013066781, -0.009481659, 0.01462101, 0.030596308, -0.010577531, 0.05048751, 0.022823421, 0.008560588, 0.06894622, 0.0048531317, 0.044489253, 0.042830713, -0.0036786373, 0.004981521, -0.022139795, -0.07874627, 0.027808204, -0.0392583, 0.028454421, -0.030436296, 0.0035139176, 0.004658979, 0.025957448, 0.011743943, -0.016764162, 0.0036330682, -0.02789728, 0.0104292175, 0.039578956, 0.030557865, -0.032652073, -0.049128644, 0.0334945, 0.017886385, -0.0020148468, 0.0055923676, 0.0064777415, -0.0019228332, 0.015400328, -0.011851536, -0.029821467, -0.012184679, 0.03236632, -0.0044196933, 0.08109257, -0.0039072894, 0.02338429, 0.053373065, -0.011451708, 0.02731965, -0.010994212, 0.007791379, -0.01788963, 0.012657113, 0.0040755407, -0.038108274, -0.03334218, 0.02733949, -0.02694398, -0.011690289, -0.011354827, 0.040184073, -0.022710208, 0.01111954, 0.04626645, 0.021956628, -0.029855331, 0.014034398, -0.0023590797, 0.0047066626, -0.022685561, -0.046485975, -0.006236222, 0.0025788434, -0.0061947834, 0.00957637, -0.0073118256, 0.008886946, 0.024358982, -0.037173457, -0.0331717, 0.032800794, -0.07239202, 0.009443197, 0.01419174, 0.004397274, 0.047690485, -0.008540652, -0.070377566, 0.051606353, -0.020434724, -0.0069471016, -0.0071630776, 0.0052014603, -0.03128064, 0.09837795, -0.0028363361, -0.0102325, 0.023537926, -0.011190372, 0.02452439, -0.0032709474, 0.009725092, -0.06325605, -0.01346077, 0.029330522, 0.011916113, 0.020531926, -0.059270613, 0.034498848, -0.03713052, -0.034189545, 0.035525538, 0.039163604, -0.032928664, 0.060955245, 0.043731093, 0.052880973, -0.0034768004, 0.016873406, -0.02890229, 0.0030710984, -0.017580424, 0.03669172, -0.04978596, -0.027845, -0.0073783454, 0.040328298, -0.021874959, 0.014035554, -0.0095552355, 0.04918478, -0.038247816, -0.014860524, -0.05718319, -0.008987079, -0.013439861, 0.015097511, -0.013535492, -0.022316132, -0.0011781881, -0.018640148, -0.005529548, 0.045825068, -0.018800525, 0.01573136, 0.008749264, 0.022925023, -0.056190908, -0.059533767, -0.020725552, 0.0781197, 0.0026222954, -0.041020446, 0.038903903, -0.035939585, -0.0048489906, -0.018801581, -0.0053151944, 0.001009267, -0.031872064, -0.035050172, -0.020912679, -0.019371359, -0.03539113, -0.013698148, -0.107588805, 0.043068953, 0.024926681, 0.04358713, 0.026228065, -0.031085566, 0.012713039, -0.00777439, 0.0122419335, -0.06519324, -0.059968907, -0.018723885, -0.052076567, 0.05086537, 0.049299356, -0.03409528, -0.03669572, 0.01805165, 0.05299006, 0.0150266625, 0.010946909, 0.0010449353, -0.02479541, 0.05731488, 0.050623294, 0.019848311, -0.050551992, 0.057286948, -0.02760579, 0.023312232, 0.02145609, -0.028315222, -0.006950798, 0.03040707, -0.045245223, 0.016809503, -0.024458839, 0.09511818, -0.00467034, 0.021223381, 0.04283944, 0.021055538, -0.009872852, 0.012815319, -0.047668, 0.010002347, 0.044364735, 0.019495705, -0.00873729, -0.0009272871, 0.045833793, -0.015759425, 0.016306901, 0.022452878, 0.01813382, 0.018945802, -0.0039451094, 0.036225062, -0.083584264, -0.00788113, -0.025016619, 0.013494871, 0.0012880322, 0.039021336, 0.023021815, 0.0064814654, -0.014696643, -0.0059119104, 0.020904813, 0.005789215, -0.0027902804, -0.045501955, 0.01850706, 0.027820382, 0.037068013, 0.008437152, 0.015808169, 0.05099531, -0.01281674, 0.0046473886, 0.058470044, -0.033901986, -0.022688262, -0.062744014, 0.017848993, 0.0005757832, -0.06304463, -0.012264574, -0.002854046, -0.006955994, -0.032958265, 0.002896561, -0.024038102, 0.0263702, -0.0058138943, -0.040704183, 0.022967545, 0.0044530663, 0.04674441, -0.032474805, 0.03408614, -0.020612407, -0.029280689, 0.027121997, 0.0002880369, -0.009418642, 0.053855635, 0.011457529, -0.0009915929, 0.014228188, 0.0031226478, -0.016470205, 0.011490583, -0.01801357, -0.012730735, 0.014657671, -0.03681655, 0.0007545713, -0.030272646, 0.0016988771, 0.038174216, -0.011807131, 0.05816034, 0.0129152015, 0.006179117, -0.0110672265, 0.009008329, -0.0008630917, -0.0051564756, -0.060951658]}\n",
      "----------------------------------------\n",
      "ID: 4063929b-eb45-4c5f-8d6d-e66f4f3aa176\n",
      "Source: {'text': 'Chapter 2: Notation in AVAP™ Introduction Notation in AVAP™ refers to the conventions and rules used to write and format code in the AVAP™ programming language. Notation is essential to ensure code readability and comprehension, as well as to establish a coherent and consistent syntax across all projects. General Conventions In AVAP™, several general notation conventions are followed, similar to those used in other programming languages like Python. Some of these conventions include: Indentation: Code is structured through indentation, using white spaces or tabs to indicate the hierarchy and structure of the code. It is recommended to use four spaces for each level of indentation. Case Sensitivity: AVAP™ is case-sensitive, meaning that identifiers, variable names, and keywords must be consistently written using the same capitalization format throughout the code. Comments: Comments are used to document the code and explain its functionality. Single-line comments begin with the // symbol, while multi-line comments start with /* and end with */. Specific Notation Rules In addition to general conventions, AVAP™ follows specific notation rules for different elements of the language, including: Variables: Variable names should be descriptive and meaningful, using lowercase letters and underscores to separate words if necessary for readability (e.g., variable_name). Functions: Function names should follow the same conventions as variables, with the addition of parentheses to indicate function parameters (e.g., function_name(parameter1, parameter2)). Constants: Constants are typically written in uppercase letters with underscores separating words (e.g., EXAMPLE_CONSTANT). The descriptions of lexical analysis and syntax use a modified Backus–Naur form (BNF) grammar notation. This uses the following style of definition: <program> ::= <statement_list> <statement_list> ::= <statement> | <statement> <statement_list> <statement> ::= <global_assignment> | <local_assignment> | <command> <global_assignment> ::= \"addVar(\" <string_value> \",\" <variable_name> \")\" <local_assignment> ::= <variable_name> \"=\" <value> <string_value> ::= \"\"\" <string_content> \"\"\" <string_content> ::= <string_part> | <string_part> <string_content> <string_part> ::= <text> | <variable_reference> <text> ::= <character> | <character> <text> <variable_reference> ::= \" <variable_name> \" <variable_name> ::= <letter> | <letter> <variable_name> <value> ::= <string_value> | <number> | <expression> <number> ::= <digit> | <digit> <number> <expression> ::= <value> | <value> <operator> <value> <operator> ::= \"+\" | \"-\" | \"*\" | \"/\" <command> ::= <any_valid_command_syntax> <character> ::= any character except `\" ` and `\\\\` <letter> ::= \"a\" | \"b\" | \"c\" | \"d\" | \"e\" | \"f\" | \"g\" | \"h\" | \"i\" | \"j\" | \"k\" | \"l\" | \"m\" | \"n\" | \"o\" | \"p\" | \"q\" | \"r\" | \"s\" | \"t\" | \"u\" | \"v\" | \"w\" | \"x\" | \"y\" | \"z\" | \"A\" | \"B\" | \"C\" | \"D\" | \"E\" | \"F\" | \"G\" | \"H\" | \"I\" | \"J\" | \"K\" | \"L\" | \"M\" | \"N\" | \"O\" | \"P\" | \"Q\" | \"R\" | \"S\" | \"T\" | \"U\" | \"V\" | \"W\" | \"X\" | \"Y\" | \"Z\" | \"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" | \"_\" <digit> ::= \"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" Explanation: <program>: A program is a list of statements. <statement_list>: A list of statements can be a single statement or a statement followed by another list of statements. <statement>: A statement can be a global assignment, a local assignment, or a command. <global_assignment>: A global assignment follows the format addVar(\\'value\\', variable_name). <local_assignment>: A local assignment follows the Python syntax variable_name = value. <string_value>: A string value is enclosed in double quotes and contains string content. <string_content>: The content of a string can be a string part or a string part followed by more string content. <string_part>: A string part can be literal text or a variable reference. <text>: Text is a series of characters. <variable_reference>: A variable reference follows the format $ variable . <variable_name>: A variable name can be a letter or a combination of letters. <value>: A value can be a string value, a number, or an expression. <number>: A number can be a digit or a series of digits. <expression>: An expression can be a value or a combination of two values with an operator. <operator>: An operator can be +, -, *, or /. <command>: A command can be any valid command syntax. <character>: A character can be any character except double quotes and the backslash. <letter>: A letter can be an alphabetical character, a digit, or an underscore. <digit>: A digit is a number from 0 to 9. This BNF notation covers the assignment of global and local variables, as well as variable substitution in strings. Practical Example // Definition of a variable example_variable = 10 // Definition of a function example_function(parameter): // Function body result = parameter * 2 return result // Function call result = example_function(example_variable) In this example, notation conventions are used to define a variable, a function, and to call the function with a parameter. Conclusions Notation in AVAP™ is a fundamental part of software development in the language. By following clear and consistent notation conventions, developers can write and maintain code more effectively, contributing to the readability, understanding, and maintainability of the code in projects of any size and complexity. With this understanding of notation in AVAP™, developers can write clean and structured code that is easy to understand and maintain over time.', 'metadata': {'source': '3_Notation.txt'}, 'vector': [0.03260325, -0.011527067, -0.010148858, -0.09855471, -0.010034021, 0.039920196, -0.014055019, 0.052825727, -0.034062326, -0.09471918, -0.002670474, -0.051534288, 0.007583804, -0.008095353, -0.03194542, 0.022428408, -0.01334198, 0.034169894, -0.017119125, -0.016480377, -0.035121873, 0.0016443926, -0.0065076873, 0.087040514, -0.047736175, -0.00016110842, 0.04534349, 0.033895116, -0.06268896, -0.07103516, -0.0024907514, -0.015033167, -0.077313654, 0.0016950113, -0.065159366, -0.008484824, -0.02118377, -0.05429452, 0.057443183, -0.0179187, -0.0093781, 0.014565308, 0.0066628903, 0.049008925, -0.041552033, -0.010825369, -0.013101311, 0.013930458, 0.034251776, -0.0058558052, -0.046323616, 0.025959894, 0.043237127, -0.043834556, -0.006920746, 0.030235233, -0.002977434, 0.007881828, 0.01960424, -0.015212159, 0.005637023, 0.05425596, 0.016054822, 0.009634054, -0.033026505, 0.04889708, 0.0327784, -0.008145775, -0.039494473, -0.02119673, 0.008975842, -0.0010110423, 0.005361514, 0.019668281, 0.018156584, 0.030728754, 0.028323844, -0.015972374, -0.016546668, 0.0466093, 0.021250613, 0.055551592, 0.0032223961, -0.0036526327, 0.002105325, 0.07348506, -0.04058602, -0.050780427, 0.023924125, 0.014337694, 0.029807474, -0.03147031, 0.0038488167, -0.0031606224, 0.029711207, -0.02017881, -0.053577207, 0.03191024, 0.03846485, 0.0012407086, 0.019560354, 0.01570889, 0.021851612, 0.08189304, -0.004165026, 0.022356352, -0.00027309998, 0.008818782, 0.028874928, 0.001750267, -0.0075350762, -0.0028928786, 0.068240255, 0.05075767, -0.014296257, -0.040878084, 0.0077008996, -0.001832209, -0.014674838, -0.02522607, 0.019342098, -0.0045334897, 0.041718997, 0.027888244, -0.0049985647, -0.010166519, -0.046164416, -0.004306291, 0.00075498264, 0.02804136, 0.035650004, 0.050417896, -0.0074818693, -0.04316641, -0.016569337, -0.023277905, 0.007355255, -0.003693414, 0.04501324, -0.016926616, 0.022472361, -0.029413054, -0.0031139506, -0.057646822, 0.01088421, 0.039057538, -0.028713403, 0.021730667, 0.0019503202, 0.04120096, 0.032487087, -0.04605929, 0.0147803575, 0.0010386091, -0.011735156, -0.009915691, 0.016986536, -0.009668628, 0.029529475, 0.033154182, 0.015795145, 0.04807601, -0.016601764, -0.036369264, 0.00915361, 0.011202548, -0.028913831, -0.011796225, -0.045864396, 0.025132166, -0.0025371825, 0.017137824, 0.020037482, -0.031310495, -0.010405725, -0.00429087, -0.04948402, 0.022538783, -0.004313092, -0.013791032, -0.0002877067, -0.01473176, 0.03843141, 0.009260165, 0.026332624, 0.07584602, -0.022567004, -0.024442052, -0.021318324, 0.006890542, -0.0009053493, -0.030956373, -0.018364972, 0.0035226094, 0.0034161557, -0.012399794, 0.032200966, -0.022131378, 0.032602213, -0.00058836926, 0.016182903, -0.033926412, -0.0015090192, -0.025866264, -0.017065706, 0.0029256567, -0.01452476, -0.011430755, -0.047611136, -0.01616585, 0.010860902, 0.046001337, -0.03879958, -0.02087176, 0.00014654404, -0.005308946, -0.018706573, 0.03765261, 0.020073159, 0.03344016, 0.028360032, 0.02588438, -0.028537223, 0.014040088, 0.084174804, 0.010593269, -0.02244254, -0.034902476, -0.0398515, 0.011086919, -0.044130147, 0.05332342, 0.021129422, -0.014143211, -0.006993502, 0.065955825, 0.021135803, 0.037402354, -0.031153908, 0.010560403, -0.021380825, -0.005441976, 0.013680056, -0.017784124, -0.017079366, -0.01169119, 0.011190389, 0.0061705145, -0.04017434, 0.01765495, 0.012110276, 0.0076948754, -0.0039841826, -0.019309063, 0.017969867, -0.0044180388, 0.0072205467, -0.011328012, 0.03990648, 0.015738105, 0.006418765, -0.02401211, 0.02078652, 0.015136071, 0.009802614, 0.027893893, 0.00016733962, 0.0029257357, -0.017043881, -0.015453346, 0.015571229, -0.010525368, 0.03692103, 0.0020703133, 0.031821065, -0.07153644, 0.0061164345, -0.05760185, 0.0087244995, -0.0062232194, 0.045347866, -0.03051562, -0.017600758, -0.0056590494, -0.014040148, 0.026461981, 0.017489325, -0.033880975, -0.028307334, -0.052171186, -0.02834443, 0.016270723, -0.036607377, 0.0064710067, -0.037704162, -0.058100145, 0.013729837, 0.021546705, 0.00023787832, 0.015517943, 0.043848168, 0.013678663, 0.026061345, 0.0017722766, -0.076824084, 0.010149777, 0.062244855, -0.052157357, 0.030122722, 0.09568177, 0.054922145, -0.004590025, -0.024974767, -6.3531195e-05, -0.0067502703, 0.015664075, 0.037100635, 0.030022163, 0.027697822, -0.02111992, -0.0019509955, -0.013173101, 0.025839668, -0.06175278, 0.049624987, -0.004005284, 0.026295047, 0.05658547, 0.0108404625, 0.03517636, 0.01999257, 0.031745393, -0.041987203, -0.050158244, -0.01774573, -0.01630459, -0.009569418, -0.016697142, 0.035708986, -0.055381984, -0.020930192, 0.006754305, 0.037615478, 0.045292698, -0.0012848537, 0.011789474, 0.024361992, 0.028062994, 0.017168183, -0.02805419, -0.050247524, 0.010526574, 0.03719205, 0.019899428, -0.014289484, 0.0035723266, -0.030480204, 0.06488981, -0.010226189, -0.054938633, 0.016969444, -0.0033954536, 0.017275538, 0.011109686, -0.035100073, -0.03595521, -0.075363204, -0.03699378, 0.02073874, -0.043296896, 0.0022046105, -0.004093617, -0.011218507, 0.031653076, 0.060263637, 0.06456114, 0.0052122357, -0.020141559, 0.0002343085, 0.009173939, 0.03703994, 0.014578327, 0.022714332, 0.010597664, 0.024236133, -0.063687, 0.011846595, -0.047387343, -0.020605585, 0.027137384, 0.023523983, -0.04533925, 0.012447451, -0.0024188068, 0.0046756626, 0.04411197, -0.08025741, 0.021633834, -0.008982896, -0.022018371, 0.033304937, -0.012325551, -0.009247437, 0.045055687, 0.01123385, 0.021193596, 0.0005117245, 0.047353633, -0.0099404985, 0.0012296274, 0.01125652, 0.025306523, 0.02908593, 0.042245667, 0.024043988, -0.009476396, 0.08109632, -0.0141551625, -0.038435202, -0.0028868015, -0.009735687, 0.05847499, -0.027204327, 0.029398985, 0.029268395, -0.013864126, -0.015451736, -0.019097632, -0.0033379872, 0.01679942, 0.02430124, 0.014736258, -0.021716043, 0.047137264, -0.073978715, 0.005340375, 0.038202748, 0.02475722, -0.005805493, 0.034377143, 0.025720013, 0.018398162, 0.017507773, -0.004669672, -0.05381791, 0.047730613, -0.012029035, 0.06545125, -0.010090362, -0.020662777, -0.033109862, -0.016021438, 0.021114472, 0.053679325, 0.054745574, -0.032315765, -0.011115874, -0.05445898, -0.030501084, -0.010950408, -0.06729551, 0.017072927, -0.01999926, -0.007876755, -0.04832745, -0.011467895, 0.029626373, -0.010242978, 0.043643232, 0.002731233, 0.019900242, 0.012649239, 0.017264009, -0.0014377845, -0.0037004438, -0.036034033, -0.0129687665, -0.03897937, -0.023199746, -0.043455668, -0.009618475, -0.005900304, -0.01584023, -0.060277198, 0.052454606, 0.042475585, 0.0297155, -0.045243062, -0.03899319, 0.05989159, 0.032185446, -0.033013746, 0.035477825, -0.0022587602, 0.049176216, -0.012426442, -0.006707423, 0.00029700846, -0.07790536, 0.031133885, -0.009445115, -0.021357859, 0.050089568, 0.028462736, 0.034238547, -0.02350887, 0.0064047594, -0.06444962, 0.0444853, 0.026570164, -0.02233364, -0.045339838, 0.03387446, 0.020664262, -0.00053380686, -0.065437175, 0.014748514, -0.0013487212, -0.032882683, -0.00851615, -0.004223762, 0.055229917, 0.035589475, 0.017814081, -0.08277672, -0.013216327, 0.016457813, 0.024474138, 0.05071809, -0.0064819916, -0.023232328, -0.016624654, -0.008402518, -0.024743149, 0.019825952, 0.007661175, 0.008417292, -0.016566046, 0.03088822, 0.03556764, 0.0035391396, 0.0003165945, 0.02694752, -0.0033183547, -0.0024501204, 0.033293735, -0.051369537, 0.07458418, -0.0030891257, 0.027232276, 0.02787512, 0.055417433, 0.03334014, 0.005043112, 0.0073901764, -0.023942627, -0.0010229663, -0.0077816234, 0.029966548, -0.012548174, -0.0019416992, 0.026693908, 0.038855404, 0.019525962, -0.027452504, 0.009658581, -0.04923367, 0.0419495, 0.011935101, 0.015430496, 0.036603894, 0.009900675, 0.0019381111, -0.019890202, -0.062712766, -0.032813426, -0.0030014322, 0.03286709, -0.048230316, 0.02677263, -0.021054182, -0.051183674, 0.037647136, 0.065212704, 0.009703586, -0.035526227, -0.0014879728, -0.005322411, 0.025283935, -0.0026441556, -0.0435876, -0.02999974, -0.028560568, -0.022477072, 0.03455154, 0.02600764, -0.022380678, 0.0022415095, -0.041512284, 0.017381199, -0.02212429, 0.054415867, -0.021697171, 0.0058900733, -0.086955905, -0.026572866, 0.0037317285, -0.023508135, -0.020536385, -0.013372892, 0.00129532, 0.0014778707, 0.062716216, 0.062201355, 0.003588668, -0.017519245, -0.03904984, 0.024962274, 0.02662909, -0.004550261, -0.007760553, 0.025070101, -0.02442417, 0.04562389, 0.00035647646, 0.0067187413, -0.017589232, 0.005148655, -0.028263824, 0.0069728703, 0.0070916633, -0.04453808, -0.016661659, 0.034260925, -0.037211936, -0.039993685, 0.006180577, 0.0115104625, 0.04156953, -0.046589352, -0.034318622, 0.009725029, 0.0074592177, 0.018011164, 0.028113041, 0.012965066, -0.03436546, -9.066934e-05, 0.028961364, -0.007935113, 0.014371614, 0.024723206, 0.0098717315, 0.005893184, -0.03503144, 0.0012367897, -0.012240536, -0.024630982, 0.027250268, -0.017941527, 0.00053570815, -0.056635577, 0.008477985, -0.048792336, -0.031825088, 0.0027248391, 0.03869718, 0.032278337, 0.010257766, 0.004806155, -0.019544663, -0.059699506, -0.029372402, 0.045540426, -0.008225331, -0.014768598, 0.005458517, -0.019342775, 0.04213652, 0.030155256, -0.038229324, -0.014060962, 0.039203465, -0.03875944, 0.027653681, -0.053118568, -0.037828192, -0.00012259811, 0.01657034, 0.014427241, -0.022862177, 0.012906222, -0.0322653, -0.032969072, -0.032132138, -0.016036574, -0.009604901, 0.040869985, 0.027320664, 0.015429451, 0.02495046, -0.0021237603, 0.004841582, -0.0068527604, 0.037164737, -0.0063696066, 0.007450815, -0.023597945, -0.007925895, 0.01961298, 0.024434622, 0.037163388, -0.0065356847, -0.0045658424, 0.0354157, 0.018650701, -0.045858536, 0.00029524704, -0.04297592, 0.024069972, 0.019060276, -0.01949864, 0.016895633, -0.003683343, -0.0603301, -0.0072266445, -0.017603282, 0.045325156, 0.0074399556, -0.037301514, 0.010944315, 0.041487165, 0.020850683, 0.012074084, 0.051812537, 0.024167381, 0.04718228, -0.003582201, 0.0028771372, 0.060810104, -0.021239627, 0.0034611076, -0.019948613, -0.09853075, 0.018976578, -0.013857469, 0.045784257, 0.023543173, -0.014678934, 0.0010983779, 0.03312088, -0.025221279, 0.016176045, 0.0005643981, -0.0012821405, 0.014501056, -0.01743923, 0.017629294, -0.044957146, -0.03440199, 0.052707046, 0.007949125, -0.021563444, -0.036433585, -0.010549953, 0.00018516746, 0.048672795, -0.010196502, -0.017761456, -0.0069317855, 0.031222077, 0.006638018, 0.04425534, 0.026779706, 0.015401828, 0.004210349, -0.009686532, 0.013527391, -0.03360792, 0.018398141, -0.009235633, -0.022193413, 0.0043427683, -0.030679153, -0.0138149345, 0.0014308018, 2.3508108e-05, 0.0065470925, -0.009901406, 0.03338835, -0.05078655, -0.031033706, 0.046388883, 0.03256314, -0.013275296, 0.018215522, -0.033468913, -0.022512523, -0.04019648, -0.052774347, -0.053109378, 0.023904154, -0.009078225, 0.021472218, -0.010193464, -0.014593458, 0.03877919, -0.01620877, -0.021406224, 0.019410029, -0.011831813, 0.044985004, 0.032957368, -0.02205006, -0.010696215, -0.051523484, -0.03658789, -0.02973403, -0.038396306, 0.0062335324, -0.031509534, -0.0009335861, -0.012385695, 0.04664985, -0.030962953, 0.02102727, 0.039004046, -0.028224636, 0.018295866, -0.022984553, -0.0030642664, -0.0028808604, 0.03967102, 0.019231934, 0.009864487, 0.026274566, -0.070785746, 0.036488816, -0.048615094, -0.03221096, -0.0018173244, 0.014536726, -0.032417927, 0.072469294, 0.02702557, 0.027083287, 0.0066350917, -0.024199799, 0.00063619774, -0.026243992, -0.027744701, 0.06352269, -0.07963065, -0.015856447, -0.030384721, 0.024572033, 0.01858993, 0.0049247695, -0.0276999, 0.036133576, -0.053810228, 0.042228572, -0.057093535, -0.0148176225, -0.028011018, 0.023687232, -0.02645368, -0.009715509, 0.021670323, -0.020195311, 0.018133894, 0.03904217, -0.00782928, -0.0026369554, 0.018047864, 0.015996853, -0.09485931, -0.01947027, -0.006351915, 0.029514631, -0.0084304875, 0.024759935, 0.037301667, -0.035909235, 0.017028514, -0.027249886, -0.0088915415, 0.00970595, -0.042626638, -0.014388785, -0.03582462, 0.0068147085, -0.04245516, -0.00032516834, -0.1192875, 0.038502846, 0.0653915, 0.052199584, 0.037934214, -0.045790892, -0.015916128, -0.041329224, -0.00503862, -0.024923155, -0.016973685, -0.006449008, 0.004741802, 0.032211736, 0.03219887, -0.02946129, -0.015006781, 0.016903067, 0.05032086, 0.033353116, -0.008943008, -0.006891797, 0.004768043, 0.020296669, -0.0037934193, 0.035546876, -0.057600815, 0.06479212, -0.007952106, 0.046892937, 0.014465882, -0.0014899224, -0.044810098, 0.039369684, -0.010917209, -0.04873866, -0.012146907, 0.057221226, 0.0073737325, 0.060649227, 0.06543941, -0.014735513, 0.02075135, 0.0146515025, -0.008466784, -0.013433315, 0.00787383, 0.0034050753, 0.0008215897, 0.0066124117, 0.05764367, -0.001642071, 0.031215115, 0.0069432976, 0.028483948, 0.027930137, -0.0385796, -0.008875803, -0.065087356, -0.03944398, -0.022440303, -0.0018958881, 0.00840425, 0.0026746953, 0.031765528, 0.028543457, -0.017165223, -0.017177852, -0.04432447, -0.040906273, -0.008903003, 0.0055197915, 0.019022983, -0.019261597, 0.019588629, 0.0080660675, -0.031435557, 0.03924968, -0.017003879, -0.0054648514, 0.011900752, 0.0028108284, 0.005300403, -0.05278074, 0.0057931626, 0.008101685, -0.01565823, -0.02436573, -0.015774727, -0.0408891, -0.02878664, 0.015166259, -0.02181192, 0.014914362, -0.018565968, -0.086136796, 0.0014634585, -0.016393447, 0.047236547, -0.031429663, 0.051720798, 0.022103155, 0.015487204, 0.024050457, 0.011268803, 0.0029323634, 0.030376315, -0.010478816, 0.008606645, 0.0027055321, 0.030166853, 0.009342805, -0.003792997, 0.026217785, -0.044176605, 0.0224734, -0.012766564, 0.00350197, -0.03894683, 0.020918569, 0.044947613, -0.008581198, 0.055710357, 0.011543465, 0.018393433, 0.03912101, 0.04724668, -0.0072111567, 0.026192863, -0.040173996]}\n",
      "----------------------------------------\n"
     ]
    }
   ],
   "source": [
    "response = es.search(\n",
    "    index=ELASTICSEARCH_DOCS_INDEX,\n",
    "    body={\n",
    "        \"query\": {\"match_all\": {}},\n",
    "        \"size\": 10 \n",
    "    }\n",
    ")\n",
    "\n",
    "for hit in response[\"hits\"][\"hits\"]:\n",
    "    print(\"ID:\", hit[\"_id\"])\n",
    "    print(\"Source:\", hit[\"_source\"])\n",
    "    print(\"-\" * 40)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d823650e",
   "metadata": {},
   "source": [
    "# Retrive"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "5732a27d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content='Execution Model in AVAP 4.1. Structure of a Program A program in AVAP is built from code blocks that execute linearly. A block is a section of the AVAP program text that executes as a unit. Code blocks in AVAP include: A script file. The body of a function. An import statement for additional files. Each line of code in AVAP is considered a block and executes sequentially. There is no interactive execution, deferred execution, or object classes. 4.2. Names and Bindings 4.2.1. Name Binding Names in AVAP refer to values and are introduced through name binding operations. The following constructs bind names: Formal parameters of functions. Function definitions. Assignment expressions. Name binding is performed using the addVar(value, variable) function, which assigns the value to the specified variable. There are no class declarations or complex targets in AVAP. Only functions and direct assignments to variables are valid code blocks. 4.2.2. Name Resolution A scope defines the visibility of a name in a code block. In AVAP, if a variable is defined in a code block, its scope includes that block. The scope of a variable within a function extends to the entire function block. When a name is used in a code block, it is resolved using the nearest enclosing scope. If the name is not found in the current scope, a NameError exception is raised. If a name binding operation occurs anywhere within a code block, all uses of the name within that block are treated as references to the current block. This means that variables must be defined before their use within the same block. In AVAP, there are no global or nonlocal declarations. All names are resolved within the scope in which they are defined. There is no dynamic code execution with eval or exec, so all bindings must be static and known at code writing time. 4.3. Importing Files In AVAP, it is possible to import the contents of other code files. The import file.avap statement inserts the contents of the specified file at the exact point where the import statement appears. This process is linear and sequential, meaning that the imported content is executed as if it were part of the original file. It is crucial that the necessary functions are defined before they are called. If a function is not defined before its call, a NameError exception will be raised. Example of import usage: avap // Content of the file main.avap addVar(10, x) import functions.avap myFunction(x) // Content of the file functions.avap def myFunction(y): addVar(y + 5, result) print(result) 4.4. Exceptions Exceptions in AVAP allow for the handling of errors or exceptional conditions. An exception is raised when an error is detected; it can be handled by the surrounding code block or by any code block that directly or indirectly invoked the block where the error occurred. The AVAP interpreter raises an exception when it detects a runtime error. An AVAP program can also explicitly raise an exception using the raise statement. Exception handlers are specified with the try ... except statement. Example of exception handling: try: addVar(10 / 0, result) except ZeroDivisionError: print(\"Cannot divide by zero.\") In this example, if a division by zero occurs, a ZeroDivisionError exception is raised and handled by the except block. This structure ensures that AVAP programs execute in a sequential and predictable manner, without advanced dynamic or deferred execution features, maintaining simplicity and clarity in name binding and import handling. 5. The Import System in AVAP AVAP code in one file gains access to code in another file through the import process. The import statement is the only way to invoke the import machinery in AVAP. The import statement inserts the contents of the specified file at the exact point where the import statement appears in the original file. There are no other ways to invoke the import system in AVAP. When an import statement is executed, the contents of the imported file are processed as if they were part of the original file, ensuring that all functions and variables from the imported file are available in the context of the original file. If the specified file is not found, a FileNotFoundError is raised. Example of using the import statement in AVAP: Content of file main.avap addVar(10, x) import functions.avap myFunction(x) Content of file functions.avap def myFunction(y): addVar(y + 5, result) print(result) In this example, the content of functions.avap is inserted into main.avap at the point of the import statement, ensuring that myFunction is defined before being called. 5.1. Import Rules Position of Import: The import statement must be placed at the exact location where the content of the imported file is to be included. The content of the imported file is executed linearly along with the original file. Import Error: If the file specified in the import statement is not found, a FileNotFoundError is raised. Scope of Imports: The functions and variables from the imported file are added to the local scope of the original file at the point of import. This means they can be accessed as if they were defined in the same file. 5.2. Limitations and Considerations No Packages: Unlike other languages, AVAP does not have a hierarchical package system. Each file is imported independently and treated as an autonomous unit. Sequential Execution: Execution in AVAP is sequential and does not allow lazy or deferred execution. Therefore, all functions and variables must be defined before use, and the content of imported files must be in the correct order. No Conditional Import: The import statement in AVAP does not support conditions. The specified file will always be imported at the point of the statement, regardless of any conditions. 5.3. Advanced Example Consider the following example where multiple files are imported: Content of the file main.avap addVar(5, a) import utilities.avap import operations.avap addVar(utilities.increment(a), b) addVar(operations.multiply(b, 2), c) print(c) Content of the file utilities.avap def increment(x): return x + 1 Content of the file operations.avap def multiply(x, y): return x * y In this example, utilities.avap and operations.avap are imported into main.avap at the specified points, allowing the increment and multiply functions to be used in main.avap. 6. Expressions in AVAP This chapter explains the meaning of expression elements in AVAP. 6.1. Arithmetic Conversions When describing an arithmetic operator in AVAP and using the phrase \"numeric arguments are converted to a common type,\" it means that the operator\\'s implementation for built-in types works as follows: If either of the arguments is a complex number, the other is converted to complex. Otherwise, if either of the arguments is a floating-point number, the other is converted to floating-point. Otherwise, both must be integers, and no conversion is needed. Additional rules may apply for certain operators. 6.2. Atoms Atoms are the most basic elements of expressions in AVAP. The simplest atoms are identifiers or literals. Forms enclosed in parentheses, brackets, or braces are also syntactically categorized as atoms. The syntax for atoms is: atom ::= identifier | literal | enclosure enclosure ::= parenth_form | list_display | dict_display | set_display | generator_expression 6.2.1. Identifiers (Names) An identifier that appears as an atom is a name. When the name is bound to an object, evaluating the atom yields that object. When a name is not bound, an attempt to evaluate it raises a NameError exception. Private Name Mangling When an identifier that occurs literally in a class definition begins with two or more underscores and does not end with two or more underscores, it is considered a private name of that class. Private names are transformed into a longer form before code is generated for them. The transformation inserts the class name, with the initial underscores removed and a single underscore inserted, in front of the name. 6.2.2. Literals AVAP supports string and bytes literals, as well as various numeric literals: literal ::= stringliteral | bytesliteral | integer | floatnumber | imagnumber Evaluating a literal produces an object of the given type (string, bytes, integer, floating-point number, complex number) with the given value. All literals correspond to immutable data types. 6.2.3. Parenthesized Forms A parenthesized form is an optional list of expressions enclosed in parentheses: parenth_form ::= \"(\" [starred_expression] \")\" A parenthesized expression produces whatever the expression list produces: if the list contains at least one comma, it produces a tuple; otherwise, it produces the single expression that makes up the list of expressions. 6.2.4. Comprehensions for Lists, Sets and Dictionaries To construct a list, set, or dictionary, AVAP provides special syntax called \"comprehension,\" each in two flavors: The contents of the container are listed explicitly. They are computed using a set of loop and filtering instructions, called a \"comprehension.\" Common syntax elements for comprehensions are: comprehension ::= assignment_expression comp_for comp_for ::= \"for\" target_list \"in\" or_test [comp_iter] comp_iter ::= comp_for | comp_if comp_if ::= \"if\" or_test [comp_iter] A comprehension consists of a single expression followed by at least one for clause and zero or more for or if clauses. In this case, the elements of the new container are those produced by considering each for or if clause as a block, nested from left to right, and evaluating the expression to produce an element each time the innermost block is reached. 6.2.5. List Displays In AVAP, lists are generated and handled differently. To construct a list, the command variableToList(variable, list) is used, and an item from the list is retrieved with itemFromList(list, index, variable_to_store_item). To get the number of elements in the list, getListLen(list, var_to_store_list_length) is used. The syntax for list displays is: list_display ::= \"[\" [starred_list | comprehension] \"]\" A list display produces a new list object, whose content is specified by a list of expressions or a comprehension. When a list of expressions is provided, its elements are evaluated from left to right and placed in the list object in that order. 6.2.6. Set Displays A set display is denoted by curly braces and is distinguished from dictionary displays by the absence of colon characters separating keys and values: set_display ::= \"{\" (starred_list | comprehension) \"}\" A set display produces a new mutable set object, whose content is specified by a sequence of expressions or a comprehension. 6.2.7. Dictionary Displays In AVAP, objects are created and managed using specific commands. An object is created with AddvariableToJSON(key, value, object_variable), and a key from the object is retrieved with variableFromJSON(object_variable, key, var_to_store_key_value). The syntax for dictionary displays is: dict_display ::= \"{\" [dict_item_list | dict_comprehension] \"}\" dict_item_list ::= dict_item (\",\" dict_item)* [\",\"] dict_item ::= expression \":\" expression | \"**\" or_expr dict_comprehension ::= expression \":\" expression comp_for A dictionary display produces a new dictionary object. If a comma-separated sequence of dictionary items is provided, they are evaluated from left to right to define the dictionary entries. Slices A slice selects a range of elements in a sequence object (e.g., a string, tuple, or list). Slices can be used as expressions or as targets in assignments or statements. The syntax for a slice is as follows: slicing ::= primary \"[\" slice_list \"]\" slice_list ::= slice_item (\",\" slice_item)* [\",\"] slice_item ::= expression | proper_slice proper_slice ::= [lower_bound] \":\" [upper_bound] [ \":\" [stride] ] lower_bound ::= expression upper_bound ::= expression stride ::= expression There is ambiguity in the formal syntax here: anything that looks like a list expression also looks like a list slice, so any subscription might be interpreted as a slice. Instead of complicating the syntax further, this is disambiguated by defining that in this case, the interpretation as a subscription takes precedence over the interpretation as a slice (this is the case if the list slice does not contain a proper slice). The semantics for a slice are as follows. The primary is indexed (using the same __getitem__() method as in a normal subscription) with a key constructed from the slice list, as follows. If the slice list contains at least one comma, the key is a tuple that contains the conversion of the slice elements; otherwise, the conversion of the single slice element is the key. The conversion of a slice element that is an expression is that expression. The conversion of a proper slice is a slice object whose start, stop, and step attributes are the values of the expressions given as the lower bound, upper bound, and step, respectively, substituting None for missing expressions. Calls A call invokes a callable object (e.g., a function) with a possibly empty series of arguments: call ::= primary \"(\" [argument_list [\",\"] | comprehension] \")\" argument_list ::= positional_arguments [\",\" starred_and_keywords] [\",\" keywords_arguments] | starred_and_keywords [\",\" keywords_arguments] | keywords_arguments positional_arguments ::= positional_item (\",\" positional_item)* positional_item ::= assignment_expression | \"*\" expression starred_and_keywords ::= (\"*\" expression | keyword_item) (\",\" \"*\" expression | \",\" keyword_item)* keywords_arguments ::= (keyword_item | \"**\" expression) (\",\" keyword_item | \",\" \"**\" expression)* keyword_item ::= identifier \"=\" expression An optional trailing comma may be present after positional and keyword arguments but does not affect the semantics. The primary must evaluate to a callable object (user-defined functions, built-in functions, built-in object methods, class objects, class instance methods, and any object with a __call__() method are callable). All argument expressions are evaluated before attempting the call. Please refer to the Function Definitions section for the syntax of formal parameter lists. If keyword arguments are present, they are first converted into positional arguments as follows. First, a list of unfilled slots is created for the formal parameters. If there are N positional arguments, they are placed in the first N slots. Then, for each keyword argument, the identifier is used to determine the corresponding slot. If the slot is already filled, a TypeError exception is raised. Otherwise, the argument is placed in the slot, filling it (even if the expression is None, it fills the slot). When all arguments have been processed, any slots that are still empty are filled with the default value from the function definition. If there are unfilled slots for which no default value is specified, a TypeError exception is raised. Otherwise, the list of filled slots is used as the argument list for the call. Implementation Details in AVAP In AVAP, variables are stored as strings, and lists and objects are managed using specific commands: Lists: To generate a list, use variableToList(variable, list). To retrieve an item from the list, use itemFromList(list, index, variable_to_store_item). To get the number of items in the list, use getListLen(list, var_to_store_list_length). Objects (dictionaries): An object is created with AddvariableToJSON(key, value, object_variable). To retrieve a key from the object, use variableFromJSON(object_variable, key, var_to_store_key_value). Usage Example Creation and management of lists: // Creating a list variableToList(\"item1\", \"myList\") variableToList(\"item2\", \"myList\") variableToList(\"item3\", \"myList\") // Retrieving an item from the list itemFromList(\"myList\", 1, \"myVariable\") // Getting the length of the list getListLen(\"myList\", \"listLength\") Creation and management of objects (dictionaries): // Creating an object AddvariableToJSON(\"key1\", \"value1\", \"myObject\") AddvariableToJSON(\"key2\", \"value2\", \"myObject\") // Retrieving a value by key from the object variableFromJSON(\"myObject\", \"key1\", \"myVariable\") In this way, lists and objects in AVAP can be manipulated using the specific functions provided for working with variables stored as strings. Binary Arithmetic Operations Binary arithmetic operations have the conventional levels of precedence. Some of these operations also apply to certain non-numeric types. Aside from the exponentiation operator, there are two levels: one for multiplicative operators and another for additive ones: m_expr ::= u_expr | m_expr \"*\" u_expr | m_expr \"@\" m_expr | m_expr \"//\" u_expr | m_expr \"/\" u_expr | m_expr \"%\" u_expr a_expr ::= m_expr | a_expr \"+\" m_expr | a_expr \"-\" m_expr The * (multiplication) operator produces the product of its arguments. The arguments can both be numbers, or one argument must be an integer and the other a sequence. In the first case, the numbers are converted to a common type and then multiplied. In the second case, sequence repetition occurs; a negative repetition factor produces an empty sequence. The @ (matrix multiplication) operator is intended for matrix multiplication. No built-in type in Python implements this operator. The / (division) and // (floor division) operators produce the quotient of their arguments. Numeric arguments are converted to a common type. Division between integers produces a floating-point number, while floor division between integers results in an integer; the result is that of a mathematical division with the “floor” function applied to the result. Division by zero raises a ZeroDivisionError. The % (modulus) operator produces the remainder of the division of the first argument by the second. Numeric arguments are converted to a common type. A zero argument on the right raises a ZeroDivisionError. Arguments can be floating-point numbers, e.g., 3.14 % 0.7 is equal to 0.34 (since 3.14 is equal to 4 * 0.7 + 0.34). The modulus operator always produces a result with the same sign as its second operand (or zero); the absolute value of the result is strictly smaller than the absolute value of the second operand. The floor division and modulus operators are connected by the following identity: x == (x // y) * y + (x % y). Floor division and modulus are also connected by the built-in function divmod(): divmod(x, y) == (x // y, x % y). In addition to performing the modulus operation on numbers, the % operator is also overloaded by string objects for old-style string formatting (also known as interpolation). The syntax for string formatting is described in the Python Library Reference, section Old-Style String Formatting. The floor division operator, the modulus operator, and the divmod() function are not defined for complex numbers. Instead, convert to a floating-point number using the abs() function if appropriate. The + (addition) operator produces the sum of its arguments. The arguments must both be numbers or both be sequences of the same type. In the first case, the numbers are converted to a common type and then added. In the second case, the sequences are concatenated. The - (subtraction) operator produces the difference between its arguments. Numeric arguments are converted to a common type. Shift Operations Shift operations have lower precedence than arithmetic operations: shift_expr ::= a_expr | shift_expr (\"<<\" | \">>\") a_expr These operators accept integers as arguments. They shift the first argument left or right by the number of bits specified by the second argument. A right shift by n bits is defined as an integer floor division by pow(2, n). A left shift by n bits is defined as a multiplication by pow(2, n). Binary Bitwise Operations Each of the three binary bitwise operations has a different level of precedence: and_expr ::= shift_expr | and_expr \"&\" shift_expr xor_expr ::= and_expr | xor_expr \"^\" and_expr or_expr ::= xor_expr | or_expr \"|\" xor_expr * The & operator produces the bitwise AND of its arguments, which must be integers. * The ^ operator produces the bitwise XOR (exclusive OR) of its arguments, which must be integers. * The | operator produces the bitwise OR (inclusive OR) of its arguments, which must be integers. Comparisons Unlike C, all comparison operations in Python have the same priority, which is lower than any arithmetic, shift, or bitwise operation. Also, unlike C, expressions like a < b < c have the conventional mathematical interpretation: comparison ::= or_expr (comp_operator or_expr)* comp_operator ::= \"<\" | \">\" | \"==\" | \">=\" | \"<=\" | \"!=\" | \"is\" [\"not\"] | [\"not\"] \"in\" Comparisons produce boolean values: True or False. Comparisons can be arbitrarily chained, e.g., x < y <= z is equivalent to x < y and y <= z, except that y is evaluated only once. Formally, if a, b, c, ..., y, z are expressions and op1, op2, ..., opN are comparison operators, then a op1 b op2 c ... y opN z is equivalent to a op1 b and b op2 c and ... y opN z, except that each expression is evaluated at most once. Note that a op1 b op2 c does not imply any comparison between a and c, so, for example, x < y > z is perfectly legal. Value Comparisons The operators <, >, ==, >=, <=, and != compare the values of two objects. The objects do not need to be of the same type. The chapter Objects, Values, and Types states that objects have a value (in addition to type and identity). The value of an object is a rather abstract notion in Python: For example, there is no canonical method to access the value of an object. Furthermore, there is no requirement that the value of an object must be constructed in a particular way, e.g., composed of all its data attributes. Comparison operators implement a particular notion of what an object\\'s value is. The default behavior for equality comparison (== and !=) is based on object identity. Therefore, comparison of instances with the same identity results in equality, and comparison of equality of instances with different identities results in inequality. No default comparison order (<, >, <=, >=) is provided; an attempt generates a TypeError. The following list describes the comparison behavior of the most important built-in types: Numbers: Built-in numeric types (int, float, complex) and types from the standard library (fractions.Fraction and decimal.Decimal) can be compared with themselves and among their types, with the restriction that complex numbers do not support order comparisons. Within the limits of the involved types, they are compared mathematically correctly without loss of precision. None and NotImplemented: They are singletons. PEP 8 advises that comparisons for singletons should be done with is or is not, never with equality operators. Binary Sequences: Instances of bytes or bytearray compare lexicographically using the numeric values of their elements. Character Strings: Instances of str compare lexicographically using Unicode code points (the result of the built-in ord() function) or their characters. Sequences: Instances of tuple, list, or range can only be compared within their types, with the restriction that ranges do not support order comparisons. Equality comparisons between these types result in inequality, and order comparisons between these types generate TypeError. They compare lexicographically using comparison of their corresponding elements. Mappings: Instances of dict compare equal if and only if they have the same (key, value) pairs. Sets: Instances of set or frozenset can be compared with each other and among their types. They define order comparison operators with the intention of checking subsets and supersets. Other Built-in Types: Most other built-in types do not have comparison methods implemented, so they inherit the default comparison behavior. User-defined classes that customize their comparison behavior should follow some consistency rules, if possible: Equality comparison should be reflexive. Comparison should be symmetric. Comparison should be transitive. If any of these conditions are not met, the resulting behavior is undefined. Simple Statements In AVAP, a simple statement consists of a single logical line. Multiple simple statements can be placed on a single line, separated by semicolons. The syntax for simple statements is: simple_stmt ::= expression_stmt | assert_stmt | assignment_stmt | augmented_assignment_stmt | annotated_assignment_stmt | pass_stmt | del_stmt | return_stmt | yield_stmt | raise_stmt | break_stmt | continue_stmt | import_stmt | future_stmt | global_stmt | nonlocal_stmt | type_stmt Here’s a brief overview of each type of simple statement: Expression Statement (expression_stmt): Executes an expression, which can be used for operations or calling functions. Assert Statement (assert_stmt): Used for debugging purposes to test conditions. Assignment Statement (assignment_stmt): Assigns values to variables or data structures. Augmented Assignment Statement (augmented_assignment_stmt): Performs an operation on a variable and assigns the result back to the variable (e.g., x += 1). Annotated Assignment Statement (annotated_assignment_stmt): Used for assigning values with annotations (e.g., type hints). Pass Statement (pass_stmt): A placeholder that does nothing; used for syntactic requirements. Del Statement (del_stmt): Deletes variables, items, or attributes. Return Statement (return_stmt): Exits a function and optionally returns a value. Yield Statement (yield_stmt): Produces a value from a generator function. Raise Statement (raise_stmt): Raises exceptions for error handling. Break Statement (break_stmt): Exits the closest enclosing loop. Continue Statement (continue_stmt): Skips the current iteration of the closest enclosing loop. Import Statement (import_stmt): Imports modules or specific components from modules. Future Statement (future_stmt): Enables features from future versions of Python. Global Statement (global_stmt): Declares variables as global within a function. Nonlocal Statement (nonlocal_stmt): Declares variables as non-local, affecting scope in nested functions. Type Statement (type_stmt): Declares or checks types (e.g., type hints). Each simple statement performs a specific task and contributes to the overall functionality of the AVAP program. Expression Statements Expression statements are used (mostly interactively) to compute and write a value, or (usually) to call a method (a function that does not return a meaningful result; in Python, methods return the value None). Other uses of expression statements are allowed and occasionally useful. The syntax for an expression statement is: expression_stmt ::= starred_expression An expression statement evaluates the list of expressions (which can be a single expression). In interactive mode, if the value is not None, it is converted to a string using the built-in function repr(), and the resulting string is written to the standard output on a line by itself (except if the result is None, in which case the called procedure produces no output). Assignment Statements Assignment statements in AVAP are used to (re)assign names to values and to modify attributes or elements of mutable objects. Here is the syntax: assignment_stmt ::= (target_list \"=\")+ (starred_expression | yield_expression) target_list ::= target (\",\" target)* [\",\"] target ::= identifier | \"(\" [target_list] \")\" | \"[\" [target_list] \"]\" | attributeref | subscription | slicing | \"*\" target Here\\'s a breakdown of how assignment statements work: Assignment Operation: An assignment statement evaluates the list of expressions and assigns the single resulting object to each of the target lists, from left to right. Recursive Definition: The assignment operation is defined recursively depending on the form of the target list. Target List: If the target list is a single object without ending in a comma, the object is assigned to that target. If the list contains a target prefixed with an asterisk, the object must be iterable with at least as many elements as targets, minus one. Elements before the starred target are assigned to the respective targets, and the remaining elements are assigned to the starred target. Single Target: If the target is an identifier (name), it is bound to the object in the current local namespace. For other targets, names are bound in the global or enclosing namespace, depending on `nonlocal`. Attribute Reference: If the target is an attribute reference, the primary expression is evaluated. It must produce an object with assignable attributes. Subscription: If the target is a subscription, the primary expression is evaluated to produce a mutable sequence or mapping object, which is then used to assign the value. Slice: If the target is a slice, the primary expression is evaluated, and the sequence object is requested to replace the slice with the assigned sequence elements. In summary, assignment statements in AVAP are crucial for assigning values to variables and modifying data structures effectively. Return Statement The return statement in AVAP is used to return the value of a desired variable from a function. Here is the syntax: return(variable_to_return): Here is an overview of how the return statement works: Function Context: The return statement can only occur within a function definition, not inside a nested class definition. Variable Evaluation: If a variable is provided, it is evaluated. If no variable is specified, None is used by default. Function Exit: The return statement exits the current function call and returns the specified value. Interaction with try-finally: When the return statement is executed within a try statement that has a finally clause, the finally clause is executed before the function exits. Generator Functions: In generator functions, the return statement indicates the end of the generator. It causes a StopIteration exception to be raised, with the returned value (if any) used to construct the StopIteration exception and set as the StopIteration.value attribute. The return statement is a fundamental part of functions and generators, allowing for the output of values and proper function termination. Raise Statement In AVAP, the raise statement is used to throw an exception. The syntax for the raise statement is as follows: raise [expression [\"from\" expression]] If no expressions are present, raise re-raises the currently handled exception, also known as the active exception. If there is no active exception, a RuntimeError is raised indicating that it is an error. Otherwise, raise evaluates the first expression as the exception object. It must be a subclass or an instance of BaseException. If it is a class, the exception instance is obtained when needed by creating an instance of the class without arguments. The type of the exception is the instance of the exception class, and the value is the instance itself. The from clause is used for exception chaining: if provided, the second expression must be another class or instance of exception. If the second expression is an exception instance, it will be attached to the raised exception as the __cause__ attribute (which is modifiable). If the expression is an exception class, the class will be instantiated and the resulting exception instance will be attached to the raised exception as the __cause__ attribute. If the raised exception is not handled, both exceptions will be printed. startLoop() try: print(1 / 0) except Exception as exc: raise RuntimeError(\"Something went wrong\") from exc endLoop() A mechanism works implicitly if a new exception is raised while an exception is already being handled. An exception may be handled by an except or finally clause, or a with statement. The previous exception is then attached as the new exception’s __context__ attribute: startLoop() try: print(1 / 0) except: raise RuntimeError(\"Something went wrong\") from None endLoop() Exception chaining can be explicitly suppressed by specifying None in the from clause: startLoop() try: print(1 / 0) except: raise RuntimeError(\"Something went wrong\") from None endLoop() Break Statement In AVAP, the break statement is used to terminate the closest enclosing loop. The syntax for the break statement is as follows: break When a break statement is encountered, it causes the loop to exit immediately, regardless of the loop\\'s condition or any remaining iterations. This effectively transfers control to the statement following the loop. The break statement is typically used within for or while loops to provide a way to exit the loop prematurely based on a certain condition. for i in range(10): if i == 5: break print(i) print(\"Loop ended\") In this example, the loop will terminate when i equals 5, and \"Loop ended\" will be printed. The numbers 0 through 4 will be printed before the loop is exited. Break Statement The break statement in AVAP is used to terminate the closest enclosing loop. Here is an overview of its behavior: Usage Context: The break statement can only occur within a for or while loop. It cannot be nested within a function or class definition inside that loop. Loop Termination: It terminates the closest enclosing loop and skips the optional else clause if the loop has one. Loop Control Target: If a for loop is terminated by break, the loop control target retains its current value. Interaction with try-finally: When break is executed within a try statement with a finally clause, the finally clause is executed before actually exiting the loop. The break statement is essential for controlling loop execution, allowing for early exit from loops and proper handling of loop cleanup. Continue Statement In AVAP, the continue statement is used to proceed with the next iteration of the closest enclosing loop. The syntax for the continue statement is as follows: continue The continue statement can only syntactically occur nested within a for or while loop, but not within a function or class definition inside that loop. When continue is used within a loop that is also handling exceptions with a try statement containing a finally clause, the finally clause is executed before the next iteration of the loop begins. for i in range(10): try: if i % 2 == 0: continue print(i) finally: print(\"In finally clause\") print(\"Loop ended\") In this example, the continue statement will skip the current iteration when i is even, but before moving to the next iteration, the finally clause will print \"In finally clause.\" For odd numbers, the loop will print the number and then \"In finally clause.\" After the loop finishes, \"Loop ended\" will be printed. Import Statement In AVAP, the import statement is used to import an entire code file and define names in the local namespace. The syntax for the import statement is as follows: import file.avap The import statement in AVAP imports an entire code file and makes it available in the local namespace. No alias is assigned to the imported file; the file is simply referred to by its name. For example: # In the \\'module.avap\\' file example_variable = 10 # In the main file import module.avap print(module.avap.example_variable) # Will print 10 In this example, the main file imports the module.avap file and can access the example_variable defined in that file using the module.avap syntax. Compound Statements In AVAP, compound statements contain (groups of) other statements; these affect or control the execution of those other statements in some way. In general, compound statements span multiple lines, though in simpler representations a complete compound statement might be contained within a single line. if statements implement traditional flow control constructs. match specifies matching patterns for variable values. Function and class definitions are also syntactically compound statements. A compound statement consists of one or more \"clauses.\" A clause consists of a header and a \"suite.\" The clause headers of a particular compound statement are all at the same level of indentation. Each clause header begins with a uniquely identifying keyword and ends with a colon. A suite is a group of statements controlled by a clause. A suite can be one or more simple statements separated by semicolons on the same line as the header, following the colon of the header, or it can be one or more statements indented on subsequent lines. Only the latter form of a suite can contain nested compound statements. Control Flow Structures in AVAP In AVAP, control flow structures include conditional statements and loops, which allow you to control the flow of execution based on conditions and iterate over a range of values. If Statements The syntax for an if statement in AVAP is: if (variable, variableValue, comparator, expression): code to execute This structure checks if the condition (variable compared to variableValue with the given comparator) is true, and if so, executes the block of code. Loops The syntax for a loop in AVAP is: startLoop(variable, from, to) code to execute endLoop() This structure initiates a loop where the variable iterates from the \\'from\\' value to the \\'to\\' value, executing the code block for each iteration. The if Statement The if statement in AVAP is used for conditional execution. The syntax is as follows: if (variable, variableValue, comparator, expression): code to execute This statement evaluates the condition specified by the variable, variableValue, comparator, and expression. It selects exactly one of the suites (blocks of code) by evaluating the expressions one by one until a true condition is found. The corresponding suite is then executed. If all conditions are false, no suites are executed. The try Statement The try statement in AVAP specifies exception handlers and/or cleanup code for a block of statements. The syntax is as follows: try(): code to execute except(): code to execute The try block contains code that might raise an exception. The except block contains code to handle exceptions raised by the try block. If an exception occurs, control is transferred to the except block. If no exception occurs, the except block is skipped. Additional information about exceptions can be found in the section Exceptions, and information about using the raise statement to throw exceptions can be found in the section The raise Statement. Patterns in AVAP In AVAP, patterns provide a powerful way to match and destructure values. Patterns can be used in match statements to perform complex value comparisons and deconstructions. Here is a description of the available patterns and how they are used: Literal Patterns: Match specific literal values such as numbers, strings, or booleans. For example: match value: case 10: # Code to execute if value is 10 case \"hello\": # Code to execute if value is \"hello\" Variable Patterns: Capture the value of a variable. This allows you to use the matched value in the corresponding case block: match value: case x: # Code to execute, x will be assigned the value Sequence Patterns: Match sequences like lists or tuples. You can also use the * operator to capture remaining elements: match value: case [1, 2, *rest]: # Code to execute, rest will capture any additional elements Mapping Patterns: Match dictionaries or similar mappings by specifying keys and their corresponding patterns: match value: case \"key\": 42: # Code to execute if the dictionary has \"key\" with value 42 Class Patterns: Match instances of classes. You can also match specific attributes within the instance: match value: case MyClass(attr1=42): # Code to execute if value is an instance of MyClass with attr1 equal to 42 Patterns in AVAP offer a flexible approach for handling different kinds of data structures and values, making it easier to write expressive and maintainable code. OR Patterns An OR pattern in AVAP allows you to specify multiple patterns separated by vertical bars (|). The OR pattern attempts to match each of its subpatterns with the subject value in order. If any of the subpatterns match, the OR pattern is considered successful. If none of the subpatterns match, the OR pattern fails. or_pattern ::= \"|\".closed_pattern+ Here\\'s how you can use OR patterns in practice: match value: case 1 | 2 | 3: # Code to execute if value is 1, 2, or 3 case \"hello\" | \"world\": # Code to execute if value is \"hello\" or \"world\" case _: # Code to execute if value does not match any of the above In this example: The first case will match if value is either 1, 2, or 3. The second case will match if value is either \"hello\" or \"world\". The last case is a catch-all pattern that will execute if none of the previous patterns match. OR patterns provide a concise way to handle multiple possible values or types, simplifying pattern matching and making your code more readable. AS Patterns An AS pattern in AVAP is used to bind an OR pattern to a name. This allows you to match a value with an OR pattern and simultaneously capture it under a specified name for further use. The syntax for an AS pattern is: as_pattern ::= or_pattern \"as\" capture_pattern When an AS pattern is used, if the OR pattern succeeds, the subject is bound to the name specified by the capture pattern, and the AS pattern itself succeeds. Here\\'s an example of how to use AS patterns: match value: case 1 | 2 | 3 as x: print(f\"Matched a number: x\") case \"hello\" | \"world\" as greeting: print(f\"Matched a greeting: greeting\") case _: print(\"No match\") In this example: The first case matches if value is 1, 2, or 3. The matched value is bound to the name x, which is then used in the print statement. The second case matches if value is \"hello\" or \"world\". The matched value is bound to the name greeting, which is then used in the print statement. The last case is a catch-all pattern that executes if none of the previous patterns match. AS patterns are useful for capturing matched values under a name while using OR patterns, allowing for more flexible and readable pattern matching in your code. Literal Patterns In AVAP, literal patterns are used to match specific literal values, such as numbers, strings, or boolean values. The syntax for a literal pattern is: literal_pattern ::= signed_number | strings | \"None\" | \"True\" | \"False\" A literal pattern only succeeds if the value of the subject is equal to the specified literal value. Here are examples of literal patterns and their usage: match value: case 42: print(\"Matched the number 42\") case \"hello\": print(\"Matched the string \\'hello\\'\") case None: print(\"Matched None\") case True: print(\"Matched True\") case False: print(\"Matched False\") case _: print(\"No match\") In this example: case 42: matches if value is exactly 42. case \"hello\": matches if value is the string \"hello\". case None: matches if value is None. case True: matches if value is True. case False: matches if value is False. case _: is a catch-all pattern that executes if none of the previous patterns match. Literal patterns are useful for matching specific, known values and are a fundamental part of pattern matching in AVAP. Capture Patterns In AVAP, capture patterns are used to bind the subject\\'s value to a name. The syntax for a capture pattern is: capture_pattern ::= NAME Capture patterns always succeed and bind the value of the subject to the specified name. Here’s how you might use capture patterns in AVAP: match value: case x: print(f\"Captured value: x\") In this example: case x: captures whatever value is in value and binds it to the name x. The pattern always succeeds. Capture patterns are useful when you want to extract and use the value of the subject within your code, regardless of what that value is. Wildcard Patterns In AVAP, wildcard patterns are used to match any value without binding it to a name. The syntax for a wildcard pattern is: wildcard_pattern ::= \\'_\\' Wildcard patterns always succeed and do not create any bindings. They are useful when you want to ignore the value of the subject and only care about whether it matches a certain pattern. Here’s how you might use wildcard patterns in AVAP: match value: case _: print(\"Matched any value\") In this example: case _: matches any value and does not bind it to a name. The pattern always succeeds, and the code within this case will be executed regardless of the value. Wildcard patterns are particularly useful when you need to handle a broad range of possibilities and are only interested in whether a value fits a general condition, not in the value itself. Value Patterns In AVAP, value patterns are used to match specific values. The syntax for a value pattern is: value_pattern ::= attr Value patterns only succeed if the subject\\'s value matches the specified value. They are useful when you want to perform actions based on an exact value. Here’s how you might use value patterns in AVAP: match value: case 42: print(\"Matched the value 42\") case \"hello\": print(\"Matched the string \\'hello\\'\") case _: print(\"Matched something else\") In this example: case 42: matches the value 42 specifically. case \"hello\": matches the string \"hello\" specifically. case _: matches any other value not covered by the previous cases. Value patterns are ideal for scenarios where you need to check for specific values and respond accordingly. They provide precise control over the matching process. Group Patterns In AVAP, group patterns are used to group multiple patterns together. The syntax for a group pattern is: group_pattern ::= \"(\" pattern \")\" Group patterns are useful when you want to combine patterns or when patterns need to be evaluated together. They have the same effect as the pattern they contain but allow for more complex pattern structures. Here’s an example of how to use group patterns in AVAP: match value: case (42 | 43): print(\"Matched either 42 or 43\") case (name, age) if age > 18: print(f\" is an adult\") case _: print(\"Matched something else\") In this example: case (42 | 43): uses a group pattern to match either the value 42 or 43. case (name, age) if age > 18: uses a group pattern to match a tuple and includes an additional condition on the age. case _: matches any other value not covered by the previous cases. Group patterns are ideal for creating more complex matching scenarios where patterns need to be combined or grouped together. Sequence Patterns In AVAP, sequence patterns are used to match elements within sequences like lists or tuples. The syntax for sequence patterns is: sequence_pattern ::= \"[\" [maybe_sequence_pattern] \"]\" | \"(\" [open_sequence_pattern] \")\" Sequence patterns can match elements of sequences based on specific rules. Here’s how they work: List Patterns: Use square brackets [ ] to match lists. You can include patterns for the elements within the list. case [a, b, c]: print(\"Matched a list with three elements\") Tuple Patterns: Use parentheses ( ) to match tuples. Similarly, you can specify patterns for the tuple elements. case (x, y): print(\"Matched a tuple with two elements\") Sequence patterns allow for flexible and powerful matching of sequence types. They can match sequences of various lengths and structures by defining the pattern for each element. Here’s an example of using sequence patterns in a match statement: match value: case [1, 2, 3]: print(\"Matched a list with elements 1, 2, 3\") case (a, b, c) if a + b == c: print(\"Matched a tuple where a + b equals c\") case _: print(\"Matched something else\") In this example: case [1, 2, 3]: matches a list with exactly the elements 1, 2, and 3. case (a, b, c) if a + b == c: matches a tuple and includes a condition to check if a + b equals c. case _: matches any other value not covered by the previous cases. Mapping Patterns In AVAP, mapping patterns are used to match mapping elements, such as dictionaries. Here is the syntax and behavior of mapping patterns: mapping_pattern ::= { [items_pattern] } Mapping Patterns are designed to match elements within mappings, such as dictionaries. They use specific rules to determine if a pattern matches the given mapping. Syntax: Mapping patterns are enclosed in curly braces { ... }. The items_pattern specifies the pattern for the mapping items. Matching Rules: The rules for matching mapping patterns include checking for key-value pairs in the mapping and ensuring they align with the specified pattern. Usage: Mapping patterns are useful for destructuring dictionaries and other mapping types in a concise manner. Mapping patterns enhance pattern matching capabilities by allowing for specific and flexible matching of dictionary elements. Class Patterns In AVAP, class patterns are used to match instances of specific classes. Here is a detailed overview: class_pattern ::= name \"(\" [pattern_arguments \",\"?] \")\" Pattern Syntax: A class pattern specifies the class name followed by a parenthesized list of pattern_arguments. The pattern matches instances of the specified class. Matching Instances: The pattern will match if the subject is an instance of the specified class and the pattern_arguments (if any) match according to the rules defined for the pattern. Usage: Class patterns are useful for deconstructing objects based on their class and extracting values from them, enabling more precise pattern matching. These patterns provide a way to work with objects based on their class type and structure, facilitating more sophisticated pattern matching and value extraction.'),\n",
       " Document(metadata={'source': '4_Lexics.txt'}, page_content='Introduction Lexical analysis is the first step in the process of compiling or interpreting a program in AVAP™. It involves breaking down the source code into lexical components or \"tokens,\" which are the smallest units of meaning in the language. These tokens include keywords, identifiers, operators, punctuation symbols, and literals. Lexical Components in AVAP™ The lexical components in AVAP™ are similar to those in other programming languages like Python. Some of the most common lexical components in AVAP™ include: Keywords: These are reserved words that have a special meaning in the language and cannot be used as variable or function names. Examples of keywords in AVAP™ include if, else, for, while, return, among others. Identifiers: These are names given to variables, functions, and other elements of the program by the programmer. Identifiers must follow certain formatting rules and cannot match keywords. For example, variable, example_function, result are examples of identifiers in AVAP™. Operators: These are symbols used to perform operations in the program. Examples of operators in AVAP™ include +, -, *, /, =, ==, !=, among others. Literals: These represent constant values in the program, such as integers, floating-point numbers, text strings, and boolean values. Examples of literals in AVAP™ include 10, 3.14, \"text\", True, False, among others. Punctuation Symbols: These are special characters used to separate elements of the code and define the structure of the program. Examples of punctuation symbols in AVAP™ include (), , [], ,, :, ;, among others. Lexical Analysis Process The lexical analysis process in AVAP™ consists of several steps: Scanning: The source code is read sequentially, and the lexical components are identified. Regular expressions are used to recognize patterns corresponding to keywords, identifiers, operators, etc. Tokenization: The identified lexical components are converted into tokens, which are objects representing each component with its associated type and value. Token Generation: The generated tokens are passed to the next step of the compilation or interpretation process for syntactic and semantic analysis. Keywords Keywords in AVAP are reserved words that have specific meanings and cannot be used as identifiers. The keywords in AVAP are: randomString ormAI functionAI stampToDatetime getTimeStamp getRegex getDateTime encodeMD5 encodeSHA256 getQueryParamList getListLen ormCheckTable ormCreateTable end else if endLoop startLoop ormAccessInsert ormAccessSelect variableToList RequestPost RequestGet addResult AddvariableToJSON addParam variableFromJSON itemFromList addVar function return Practical Example Below is a practical example that illustrates lexical analysis in AVAP™: // Function definition function_example(parameter): result = parameter * 2 return result // Function call value = function_example(10) In this example, the lexical analysis would identify the following tokens: function_example: Function identifier. (, ): Punctuation symbols. parameter, result, value: Variable identifiers. =, *, 2: Operators. 10: Integer literal. Conclusions Lexical analysis is a crucial step in the compilation or interpretation of a program in AVAP™. By breaking down the source code into tokens, it lays the foundation for subsequent syntactic and semantic analysis, allowing the program to be correctly understood and executed by the interpreter or compiler. With a clear understanding of lexical analysis in AVAP™, developers can write clean and structured code, facilitating the software development process in the language.'),\n",
       " Document(metadata={'source': '14_Working_with_libraries.txt'}, page_content='Function Libraries Introduction Includes are a fundamental feature in AVAP™ that allow for the efficient organization and reuse of code in software development projects. Just like in other programming languages, includes in AVAP™ enable the incorporation of functionalities from other files or libraries into the current file. This capability provides a number of significant advantages that make the development and maintenance of projects more efficient and effective. Purpose of Includes The primary purpose of includes in AVAP™ is to promote modularity and code reuse. By dividing code into separate modules or files and then including them in main files as needed, developers can write and maintain code in a more organized and structured manner. This facilitates the management of large and complex projects, as well as collaboration between development teams. Advantages of Using Includes Code Reuse: Includes allow for the reuse of functions, variables, and other code definitions in multiple parts of a project, reducing code duplication and promoting consistency and coherence in development. Facilitates Maintainability: By dividing code into smaller, more specific modules, it is easier to identify, understand, and modify parts of the code without affecting other parts of the project. This eases software maintenance over time. Promotes Modularity: The ability to include files selectively as needed encourages code modularity, which simplifies understanding and managing complex projects by breaking them down into smaller, manageable components. Improves Readability and Organization: The use of includes helps organize code in a logical and structured manner, improving readability and facilitating navigation through different parts of the project. Syntax of Includes In AVAP™, the syntax for including a file is similar to that of other languages like C. The keyword include is used followed by the name of the file to be included. There are two main ways to include files in AVAP™: Local Include: Used to include project-specific files located in the same directory or in subdirectories relative to the current file. The file name is specified within quotes. Example: include \"file_name.avap\" System Include: Used to include standard or system library files located in predefined or configured paths on the system. The file or library name is specified between angle brackets (< and >). Example: include <library_name.avap> Operation When an include is found in an AVAP™ file, the interpreter searches for the specified file and incorporates it into the current file at compile time. This means that all the code contained in the included file will be available for use in the current file. Common Uses Including Standard Libraries: Standard libraries that provide common functions and utilities can be included to simplify application development. Including Definition Files: Files containing definitions of variables, constants, or data structures used in multiple parts of the project can be included. Including Specific Functionality Modules: Modules providing additional features for the project, such as file handling, text processing, or data manipulation, can be included. Practical Example Suppose we have a file named utils.avap that contains utility functions we want to use in our main project. We can include this file in our main project as follows: include \"utils.avap\" // We can now use the functions defined in utils.avap With this understanding of the value and advantages of using includes in AVAP™, we will explore in detail their operation and practical application in project development. Practical Example Suppose we have a file named utils.avap that contains utility functions we want to use in our main project. We can include this file in our main project as follows: include \"utils.avap\" // We can now use the functions defined in utils.avap With this understanding of the value and advantages of using includes in AVAP™, we will explore in detail their operation and practical application in project development. Function Libraries Function Products In AVAP™, there are a series of function libraries grouped by categories called Function Products that complement the base AVAP™ language and leverage the power of AVS servers for distribution. Through Function Products, developers can extend the functionality of AVAP™ by incorporating specialized libraries tailored to different needs and applications. Function Products provide a way to access advanced features and capabilities not available in the core language, offering a robust framework for building complex and scalable solutions. These libraries are designed to integrate seamlessly with AVAP™, enhancing the development process and enabling more efficient and effective project execution.'),\n",
       " Document(metadata={'source': '9_Expressions_in_avap.txt'}, page_content=\"Expressions in AVAP™ Introduction Expressions in AVAP™ are combinations of values, variables, operators, and function calls that can be evaluated to produce a result. Just like in Python, expressions in AVAP™ can be simple or complex, and they can contain a variety of elements that manipulate and process data. Types of Expressions In AVAP™, as in Python, there are several types of expressions that can be used to perform different operations and calculations. Some of the most common types of expressions include: Arithmetic: Perform mathematical operations such as addition, subtraction, multiplication, and division. Logical: Evaluate logical conditions and return boolean values, such as True or False. Comparative: Compare two values and return a result based on their relationship, such as equality, inequality, greater than, less than, etc. Assignment: Assign a value to a variable. Function Calls: Invoke functions and methods to perform specific tasks. Operators In AVAP™, as in Python, expressions can include a variety of operators that perform specific operations on data. Some of the most common operators include: Arithmetic: +, -, *, /, %, etc. Logical: and, or, not. Comparative: ==, !=, >, <, >=, <=, etc. Assignment: =, +=, -=, *=, /=, etc. Working with Lists Lists are a very versatile data structure in AVAP™ that allows you to store collections of elements of different types. Expressions in AVAP™ can involve operations and manipulations of lists, such as accessing individual elements, concatenation, searching, deletion, and more. // Definition of a list my_list = [1, 2, 3, 4, 5] // Accessing individual elements first_element = my_list[0] // Output: 1 // Concatenation of lists another_list = [6, 7, 8] combined_list = my_list + another_list // Output: [1, 2, 3, 4, 5, 6, 7, 8] // Length of a list length = len(my_list) // Output: 5 // Searching in a list is_present = 5 in my_list // Output: True // Removing elements my_list.remove(3) // Removes the element 3 from the list Practical Example Below is a practical example that illustrates the use of expressions in AVAP™ with lists: // Definition of a list of numbers numbers = [1, 2, 3, 4, 5] // Calculation of the sum of the elements total = sum(numbers) // Output: 15 // Checking if a number is present in the list is_present = 6 in numbers // Output: False Conclusions Expressions in AVAP™ are a fundamental part of programming, allowing for a wide variety of data operations and manipulations. By understanding the different types of expressions and operators, as well as working with data structures such as lists, developers can write clear and effective code that meets the program's requirements.\"),\n",
       " Document(metadata={'source': '3_Notation.txt'}, page_content='Chapter 2: Notation in AVAP™ Introduction Notation in AVAP™ refers to the conventions and rules used to write and format code in the AVAP™ programming language. Notation is essential to ensure code readability and comprehension, as well as to establish a coherent and consistent syntax across all projects. General Conventions In AVAP™, several general notation conventions are followed, similar to those used in other programming languages like Python. Some of these conventions include: Indentation: Code is structured through indentation, using white spaces or tabs to indicate the hierarchy and structure of the code. It is recommended to use four spaces for each level of indentation. Case Sensitivity: AVAP™ is case-sensitive, meaning that identifiers, variable names, and keywords must be consistently written using the same capitalization format throughout the code. Comments: Comments are used to document the code and explain its functionality. Single-line comments begin with the // symbol, while multi-line comments start with /* and end with */. Specific Notation Rules In addition to general conventions, AVAP™ follows specific notation rules for different elements of the language, including: Variables: Variable names should be descriptive and meaningful, using lowercase letters and underscores to separate words if necessary for readability (e.g., variable_name). Functions: Function names should follow the same conventions as variables, with the addition of parentheses to indicate function parameters (e.g., function_name(parameter1, parameter2)). Constants: Constants are typically written in uppercase letters with underscores separating words (e.g., EXAMPLE_CONSTANT). The descriptions of lexical analysis and syntax use a modified Backus–Naur form (BNF) grammar notation. This uses the following style of definition: <program> ::= <statement_list> <statement_list> ::= <statement> | <statement> <statement_list> <statement> ::= <global_assignment> | <local_assignment> | <command> <global_assignment> ::= \"addVar(\" <string_value> \",\" <variable_name> \")\" <local_assignment> ::= <variable_name> \"=\" <value> <string_value> ::= \"\"\" <string_content> \"\"\" <string_content> ::= <string_part> | <string_part> <string_content> <string_part> ::= <text> | <variable_reference> <text> ::= <character> | <character> <text> <variable_reference> ::= \" <variable_name> \" <variable_name> ::= <letter> | <letter> <variable_name> <value> ::= <string_value> | <number> | <expression> <number> ::= <digit> | <digit> <number> <expression> ::= <value> | <value> <operator> <value> <operator> ::= \"+\" | \"-\" | \"*\" | \"/\" <command> ::= <any_valid_command_syntax> <character> ::= any character except `\" ` and `\\\\` <letter> ::= \"a\" | \"b\" | \"c\" | \"d\" | \"e\" | \"f\" | \"g\" | \"h\" | \"i\" | \"j\" | \"k\" | \"l\" | \"m\" | \"n\" | \"o\" | \"p\" | \"q\" | \"r\" | \"s\" | \"t\" | \"u\" | \"v\" | \"w\" | \"x\" | \"y\" | \"z\" | \"A\" | \"B\" | \"C\" | \"D\" | \"E\" | \"F\" | \"G\" | \"H\" | \"I\" | \"J\" | \"K\" | \"L\" | \"M\" | \"N\" | \"O\" | \"P\" | \"Q\" | \"R\" | \"S\" | \"T\" | \"U\" | \"V\" | \"W\" | \"X\" | \"Y\" | \"Z\" | \"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" | \"_\" <digit> ::= \"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" Explanation: <program>: A program is a list of statements. <statement_list>: A list of statements can be a single statement or a statement followed by another list of statements. <statement>: A statement can be a global assignment, a local assignment, or a command. <global_assignment>: A global assignment follows the format addVar(\\'value\\', variable_name). <local_assignment>: A local assignment follows the Python syntax variable_name = value. <string_value>: A string value is enclosed in double quotes and contains string content. <string_content>: The content of a string can be a string part or a string part followed by more string content. <string_part>: A string part can be literal text or a variable reference. <text>: Text is a series of characters. <variable_reference>: A variable reference follows the format $ variable . <variable_name>: A variable name can be a letter or a combination of letters. <value>: A value can be a string value, a number, or an expression. <number>: A number can be a digit or a series of digits. <expression>: An expression can be a value or a combination of two values with an operator. <operator>: An operator can be +, -, *, or /. <command>: A command can be any valid command syntax. <character>: A character can be any character except double quotes and the backslash. <letter>: A letter can be an alphabetical character, a digit, or an underscore. <digit>: A digit is a number from 0 to 9. This BNF notation covers the assignment of global and local variables, as well as variable substitution in strings. Practical Example // Definition of a variable example_variable = 10 // Definition of a function example_function(parameter): // Function body result = parameter * 2 return result // Function call result = example_function(example_variable) In this example, notation conventions are used to define a variable, a function, and to call the function with a parameter. Conclusions Notation in AVAP™ is a fundamental part of software development in the language. By following clear and consistent notation conventions, developers can write and maintain code more effectively, contributing to the readability, understanding, and maintainability of the code in projects of any size and complexity. With this understanding of notation in AVAP™, developers can write clean and structured code that is easy to understand and maintain over time.')]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "base_retriever = db.as_retriever(\n",
    "    search_type=\"similarity\",\n",
    "    search_kwargs={\"k\": 5}\n",
    "    ) \n",
    "\n",
    "docs = base_retriever.invoke(\"What reserved words does AVAP have?\")\n",
    "docs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8706506f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[(Document(metadata={'source': '6_Data_Types.txt'}, page_content=' c = 3.5 d = 2.0 product = c * d division = c / d # Operations with strings text1 = \"Hello\" text2 = \"world\" concatenation = text1 + \" \" + text2 1.4 Summary Data types in AVAP™ are fundamental for program development. They allow for the storage and manipulation of different types of values, such as numbers, text, and truth values. With a solid understanding of data types and how they are used in program development, developers can create robust and functional applications in AVAP™.'),\n",
       "  0.8841502),\n",
       " (Document(metadata={'source': '5_Data_Model.txt'}, page_content='Introduction The data model in AVAP™ defines how data is organized and manipulated within the language. Similar to Python, AVAP™ uses a flexible and dynamic data model that allows for working with a wide variety of data types and data structures. Data Types In AVAP™, just like in Python, data types are categories that represent different kinds of values that can be stored and manipulated in a program. Some of the most common data types in AVAP™ include: Integers (int): Represent whole numbers, positive or negative, without a fractional part. Floating-point numbers (float): Represent numbers with both integer and fractional parts. Strings (str): Represent sequences of Unicode characters. Booleans (bool): Represent truth values, either True or False. Lists (list): Ordered and mutable collections of elements. Tuples (tuple): Ordered and immutable collections of elements. Dictionaries (dict): Unordered collections of key-value pairs. Sets (set): Unordered collections of unique elements. Data Structures In addition to individual data types, AVAP™ provides various data structures that allow for more complex organization and manipulation of data: Lists: Created using square brackets [ ] and can contain any data type, including other lists. Tuples: Created using parentheses ( ) and are immutable, meaning they cannot be modified once created. Dictionaries: Created using curly braces and store key-value pairs, where each key is unique within the dictionary. Sets: Created using curly braces and contain unique elements, meaning there are no duplicates in a set. Data Structures In addition to individual data types, AVAP™ provides various data structures that allow for more complex organization and manipulation of data: Lists: Created using square brackets [ ] and can contain any data type, including other lists. Tuples: Created using parentheses ( ) and are immutable, meaning they cannot be modified once created. Dictionaries: Created using curly braces and store key-value pairs, where each key is unique within the dictionary. Sets: Created using curly braces and contain unique elements, meaning there are no duplicates in a set. Practical Example Below is a practical example that illustrates the use of the data model in AVAP™: # Definition of a list example_list = [1, 2, 3, 4, 5] # Accessing individual elements print(example_list[0]) # Output: 1 # Slicing to get a sublist sublist = example_list[2:4] print(sublist) # Output: [3, 4'),\n",
       "  0.86322045),\n",
       " (Document(metadata={'source': '5_Data_Model.txt'}, page_content=' to get a sublist sublist = example_list[2:4] print(sublist) # Output: [3, 4] # List methods example_list.append(6) print(example_list) # Output: [1, 2, 3, 4, 5, 6] Conclusions The data model in AVAP™ provides a flexible and dynamic structure for working with data in the language. By understanding the available data types, data structures, operations, and methods, developers can write efficient and effective code that manipulates and processes data effectively.'),\n",
       "  0.85278803),\n",
       " (Document(metadata={'source': '6_Data_Types.txt'}, page_content='Chapter 5: Data Types In this chapter, we will explore the data types available in AVAP™. Data types are fundamental in programming as they determine what kind of values can be stored in a variable and what operations can be performed with those values. Throughout this chapter, we will discuss the basic data types in AVAP™ and how they are used in program development. 1.1 Basic Data Types In AVAP™, like in Python, there are several basic data types: 1.1.1 Integers (int) Integers represent whole numbers without decimals. They can be positive, negative, or zero. In AVAP™, integers are defined using the int data type. integer_number = 10 1.1.2 Floating-Point Numbers (float) Floating-point numbers represent real numbers with decimals. In AVAP™, they are defined using the float data type. floating_number = 3.14 1.1.3 Strings (str) Strings represent text. In AVAP™, they are defined using the str data type. text_string = \"Hello, world!\" 1.1.4 Booleans (bool) Booleans represent truth or falsehood values. In AVAP™, they are defined using the bool data type. true_value = True false_value = False 1.2 Conversion Between Data Types In AVAP™, just like in Python, it is possible to convert between different data types using specific functions. Some common examples include: 1.2.1 Conversion to Integer To convert a value to an integer, the int() function is used. text = \"10\" number = int(text) 1.2.2 Conversion to Floating-Point To convert a value to a floating-point number, the float() function is used. text = \"3.14\" number = float(text) 1.2.3 Conversion to String To convert a value to a string, the str() function is used. number = 10 text = str(number) 1.3 Operations with Data Types In AVAP™, just like in Python, it is possible to perform operations with different data types. For example: # Operations with integers a = 10 b = 5 sum = a + b difference = a - b # Operations with floating-point numbers c = 3.5 d = 2.0 product = c * d division = c / d # Operations with'),\n",
       "  0.8510835),\n",
       " (Document(metadata={'source': '9_Expressions_in_avap.txt'}, page_content='Expressions in AVAP™ Introduction Expressions in AVAP™ are combinations of values, variables, operators, and function calls that can be evaluated to produce a result. Just like in Python, expressions in AVAP™ can be simple or complex, and they can contain a variety of elements that manipulate and process data. Types of Expressions In AVAP™, as in Python, there are several types of expressions that can be used to perform different operations and calculations. Some of the most common types of expressions include: Arithmetic: Perform mathematical operations such as addition, subtraction, multiplication, and division. Logical: Evaluate logical conditions and return boolean values, such as True or False. Comparative: Compare two values and return a result based on their relationship, such as equality, inequality, greater than, less than, etc. Assignment: Assign a value to a variable. Function Calls: Invoke functions and methods to perform specific tasks. Operators In AVAP™, as in Python, expressions can include a variety of operators that perform specific operations on data. Some of the most common operators include: Arithmetic: +, -, *, /, %, etc. Logical: and, or, not. Comparative: ==, !=, >, <, >=, <=, etc. Assignment: =, +=, -=, *=, /=, etc. Working with Lists Lists are a very versatile data structure in AVAP™ that allows you to store collections of elements of different types. Expressions in AVAP™ can involve operations and manipulations of lists, such as accessing individual elements, concatenation, searching, deletion, and more. // Definition of a list my_list = [1, 2, 3, 4, 5] // Accessing individual elements first_element = my_list[0] // Output: 1 // Concatenation of lists another_list = [6, 7, 8] combined_list = my_list + another_list // Output: [1, 2, 3, 4, 5, 6, 7, 8] // Length of a list length = len(my_list) // Output: 5 // Searching in a list is_present = 5 in my_list // Output: True // Removing elements my_list.remove(3) // Removes the element 3 from the list Practical Example Below is a practical example that illustrates the use of expressions in AVAP™ with lists: // Definition of a list of numbers numbers = [1,'),\n",
       "  0.81852615),\n",
       " (Document(metadata={'source': '1_Introduction.txt'}, page_content=\" to provide you with all the necessary information to make the most of this dynamic language's capabilities. From variable management to automated result generation and simplified database access, this language is designed to transform the way you develop APIs. 1.5 Conclusions The virtuality attribute in AVAP™ represents an innovative approach to virtual API development, allowing for greater flexibility, agility, and simplification in the software development and maintenance process. By decoupling language specifications from the interpreter and enabling dynamic code construction in real-time, AVAP™ offers a new paradigm in API design and management.\"),\n",
       "  0.8182055),\n",
       " (Document(metadata={'source': '9_Expressions_in_avap.txt'}, page_content=\" that illustrates the use of expressions in AVAP™ with lists: // Definition of a list of numbers numbers = [1, 2, 3, 4, 5] // Calculation of the sum of the elements total = sum(numbers) // Output: 15 // Checking if a number is present in the list is_present = 6 in numbers // Output: False Conclusions Expressions in AVAP™ are a fundamental part of programming, allowing for a wide variety of data operations and manipulations. By understanding the different types of expressions and operators, as well as working with data structures such as lists, developers can write clear and effective code that meets the program's requirements.\"),\n",
       "  0.81674373),\n",
       " (Document(metadata={'source': '3_Notation.txt'}, page_content='Chapter 2: Notation in AVAP™ Introduction Notation in AVAP™ refers to the conventions and rules used to write and format code in the AVAP™ programming language. Notation is essential to ensure code readability and comprehension, as well as to establish a coherent and consistent syntax across all projects. General Conventions In AVAP™, several general notation conventions are followed, similar to those used in other programming languages like Python. Some of these conventions include: Indentation: Code is structured through indentation, using white spaces or tabs to indicate the hierarchy and structure of the code. It is recommended to use four spaces for each level of indentation. Case Sensitivity: AVAP™ is case-sensitive, meaning that identifiers, variable names, and keywords must be consistently written using the same capitalization format throughout the code. Comments: Comments are used to document the code and explain its functionality. Single-line comments begin with the // symbol, while multi-line comments start with /* and end with */. Specific Notation Rules In addition to general conventions, AVAP™ follows specific notation rules for different elements of the language, including: Variables: Variable names should be descriptive and meaningful, using lowercase letters and underscores to separate words if necessary for readability (e.g., variable_name). Functions: Function names should follow the same conventions as variables, with the addition of parentheses to indicate function parameters (e.g., function_name(parameter1, parameter2)). Constants: Constants are typically written in uppercase letters with underscores separating words (e.g., EXAMPLE_CONSTANT). The descriptions of lexical analysis and syntax use a modified Backus–Naur form (BNF) grammar notation. This uses the following style of definition: <program> ::= <statement_list> <statement_list> ::= <statement> | <statement> <statement_list> <statement> ::= <global_assignment> | <local_assignment> | <command> <global_assignment> ::= \"addVar(\" <string_value> \",\" <variable_name> \")\" <local_assignment> ::= <variable_name> \"=\" <value> <string_value> ::= \"\"\" <string_content> \"\"\" <string_content> ::= <string_part> | <string_part> <string_content> <string_part> ::= <text> | <variable_reference> <text> ::= <character> | <character> <text> <variable_reference> ::= \" <variable_name> \" <variable_name> ::= <letter> | <letter> <variable_name> <value> ::='),\n",
       "  0.7956854),\n",
       " (Document(metadata={'source': '7_Working_With_Variables.txt'}, page_content=\" and initialize a global variable at the same time using the following syntax: global variable_name=value Where: variable_name is the name of the variable to be declared. value is the initial value to be assigned to the variable, which automatically defines the variable's type. 2.4 Summary Working with variables in AVAP™ is essential for developing efficient and scalable applications. Variables allow for storing and manipulating data during program execution, which facilitates calculations and communication between different parts of the program. With a solid understanding of variable types and the different ways to declare them in AVAP™, developers can create robust and functional applications.\"),\n",
       "  0.7866018),\n",
       " (Document(metadata={'source': '16_Appendix.txt'}, page_content='. This command processes a natural language query to generate an SQL statement that is executed on the table specified in the source parameter, and stores the result in a target variable. Parameters prompt Type: variable Description: A string in natural language that describes the query to be made. For example, \"get the value of the row with id 5\". source Type: variable Description: The name of the table on which the generated query should be executed. It must be a variable containing the name of the table in the database. TargetVariable Type: variable Description: The variable in which the result of the query will be stored. It must be a variable that will receive the result of the generated and executed SQL query. Command Flow Generating SQL Query: Use the artificial intelligence model to convert the prompt into an SQL statement. For example, if the prompt is \"get the value of the row with id 5\", the AI will generate the SQL query SELECT * FROM source WHERE id = 5;. Executing the Query: Execute the generated SQL statement on the table specified in source. Storing the Result: Save the result of the query execution in the variable specified by TargetVariable. The result will be the dataset retrieved by the executed SQL statement. Example Usage Suppose you want to retrieve all the data from the row with id equal to 5 from a table called users. // Define variables prompt = \"get the value of the row with id 5\" source = \"users\" queryResult = \\'\\' // Call the command to process the query ormAI(prompt, source, queryResult) // Return the query result via addResult addResult(queryResult) In this example, the ormAI() command will convert the prompt into an SQL query: SELECT * FROM users WHERE id = 5;. This query will be executed on the users table, and the results will be stored in the queryResult variable. The queryResult variable will be returned via addResult(queryResult). The output will be the dataset retrieved by the executed SQL statement. functionAI() The functionAI() command uses an artificial intelligence model to convert a natural language description of a function or process into a code implementation, which is then executed and returns the result. This command converts a description provided in prompt into a function that operates on the data of the table specified in source, and stores the result in a target variable. Parameters prompt Type: variable Description: A string in natural language that describes the process or function to be executed. For example,'),\n",
       "  0.78568983),\n",
       " (Document(metadata={'source': '2_Dynamic_Programming_Language.txt'}, page_content='Chapter 1: Dynamic Programming Language In this chapter, we will introduce AVAP™ as a dynamic programming language. A dynamic language is one whose behavior can be modified during the runtime of the program. AVAP™ shares many characteristics with other dynamic languages, making it a powerful and versatile tool for application development. 1.1 Features of AVAP™ as a Dynamic Language AVAP™ is characterized by its dynamic nature, which means it offers various features that allow flexibility and adaptability in program development. Below, we will detail some of these features: 1.1.1 Dynamic Typing In AVAP™, variable typing is dynamic, which means it is not necessary to explicitly declare the type of a variable before assigning it a value. This allows greater flexibility in data handling and simplifies code writing. # Example of dynamic typing x = 10 # x is an integer x = \"Hello\" # x is now a string 1.1.2 Automatic Memory Management AVAP™ uses an automatic garbage collector to manage memory dynamically. This means that developers do not have to worry about manually allocating and freeing memory, which simplifies the development process and reduces the likelihood of memory management-related errors. # Example of automatic memory management: list = [1, 2, 3, 4, 5] # There is no need to free the memory of the list after use 1.1.3 Runtime Interpreter: Dynamic Code Construction AVAP™ uses a runtime interpreter that goes beyond simply executing code line by line. Instead, the AVAP™ runtime interpreter is characterized by its ability to dynamically construct code during runtime, adding an element of virtuality to the execution process. Dynamic code construction means that the AVAP™ runtime interpreter can generate and modify code as the program executes. This allows for greater flexibility and adaptability in data manipulation and operation execution. A fundamental aspect of virtuality in dynamic code construction is that the language specifications are completely isolated from the runtime interpreter. This means that the interpreter is not tied to a specific language implementation, facilitating code portability and allowing for the transparent integration of new features and functionalities. In summary, the AVAP™ runtime interpreter not only executes code line by line but also dynamically constructs code during runtime, adding an additional level of virtuality and flexibility to the program execution process. 1.1.4 Flexibility in Programming AVAP™ offers a wide range of features that promote flexibility in programming. This includes support for higher-order'),\n",
       "  0.7848966),\n",
       " (Document(metadata={'source': '1_Introduction.txt'}, page_content='Introduction Discovering a New Programming Language Welcome to the AVAP book, where you will delve into the fascinating world of an innovative and powerful programming language: AVAP™. In these pages, we will explore together the fundamental concepts, syntax, and unique features of AVAP™, and prepare you to master this new language and harness its full potential in your software development projects. Discovering AVAP AVAP™ is much more than just a programming language; it is a versatile tool designed to enhance creativity and efficiency in software development. With its clear and expressive syntax, AVAP™ allows developers to write code more quickly and concisely, without sacrificing the power and flexibility needed to create robust and scalable applications. What Makes AVAP Special? AVAP™ stands out due to several distinctive features that make it unique in the programming world: Integrated Virtualization: AVAP™ is designed from the ground up with the concept of virtualization in mind. Every aspect of the language is optimized to work in virtual environments, allowing developers to create immersive and scalable experiences. Powerful APIs: AVAP™ provides a comprehensive set of tools for interacting with external APIs and web services, making it easier to integrate advanced functionalities into your applications. Enhanced Productivity: With an intuitive syntax and advanced abstraction features, AVAP™ allows you to write less code to achieve more, thereby increasing your productivity and accelerating development time. What Will You Find in This Book? In this book, we will guide you through the basic and advanced concepts of AVAP™, providing practical examples, useful tips, and challenging exercises to help you master the language and become an expert AVAP™ developer. From installing and configuring the development environment to creating complete applications, this book will accompany you every step of the way towards mastering AVAP™. Are You Ready to Get Started? Then let’s not wait any longer! Dive into the pages of this book and get ready to embark on an exciting journey towards mastering AVAP™. Whether you are an experienced programmer looking for new tools or a curious beginner in the world of programming, this book has something for you. Let’s explore the fascinating world of AVAP™ together! The Virtuality Attribute in AVAP™ AVAP™ (Advance Virtual API Programming) is a dynamic programming language distinguished by its virtuality attribute, which enables the development of virtual APIs in a dynamic and flexible manner. This attribute is based on the fact that the language specifications do not reside in the language interpreter, allowing the final code'),\n",
       "  0.7842491),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' from the object variableFromJSON(\"myObject\", \"key1\", \"myVariable\") In this way, lists and objects in AVAP can be manipulated using the specific functions provided for working with variables stored as strings. Binary Arithmetic Operations Binary arithmetic operations have the conventional levels of precedence. Some of these operations also apply to certain non-numeric types. Aside from the exponentiation operator, there are two levels: one for multiplicative operators and another for additive ones: m_expr ::= u_expr | m_expr \"*\" u_expr | m_expr \"@\" m_expr | m_expr \"//\" u_expr | m_expr \"/\" u_expr | m_expr \"%\" u_expr a_expr ::= m_expr | a_expr \"+\" m_expr | a_expr \"-\" m_expr The * (multiplication) operator produces the product of its arguments. The arguments can both be numbers, or one argument must be an integer and the other a sequence. In the first case, the numbers are converted to a common type and then multiplied. In the second case, sequence repetition occurs; a negative repetition factor produces an empty sequence. The @ (matrix multiplication) operator is intended for matrix multiplication. No built-in type in Python implements this operator. The / (division) and // (floor division) operators produce the quotient of their arguments. Numeric arguments are converted to a common type. Division between integers produces a floating-point number, while floor division between integers results in an integer; the result is that of a mathematical division with the “floor” function applied to the result. Division by zero raises a ZeroDivisionError. The % (modulus) operator produces the remainder of the division of the first argument by the second. Numeric arguments are converted to a common type. A zero argument on the right raises a ZeroDivisionError. Arguments can be floating-point numbers, e.g., 3.14 % 0.7 is equal to 0.34 (since 3.14 is equal to 4 * 0.7 + 0.34). The modulus operator always produces a result with the same sign as its second operand (or zero); the absolute value of the result is strictly smaller than the absolute value of the second operand. The floor division and modulus operators are connected by the following identity: x == (x // y) * y + (x % y). Floor division and modulus are also connected by the built-in function divmod(): divmod(x, y) == (x // y, x'),\n",
       "  0.7838706),\n",
       " (Document(metadata={'source': '2_Dynamic_Programming_Language.txt'}, page_content=' Flexibility in Programming AVAP™ offers a wide range of features that promote flexibility in programming. This includes support for higher-order functions, dynamic exception handling, and the ability to manipulate objects at runtime, among others. # Example of a higher-order function def operation(func, a, b): return func(a, b) def add(x, y): return x + y result = operation(add, 3, 5) # The add function is passed as an argument 1.2 Advantages of AVAP™ as a Dynamic Language As a dynamic programming language, AVAP™ offers several advantages, including: Greater flexibility and adaptability in program development. Faster writing and execution of code. Facilitates experimentation and exploration of solutions. Allows for rapid feedback during development. 1.3 Summary AVAP™ is a dynamic programming language that offers a wide range of features promoting flexibility, adaptability, and speed in application development. With its dynamic typing, automatic memory management, runtime interpreter, and programming flexibility, AVAP™ becomes a powerful and versatile tool for developers.'),\n",
       "  0.782992),\n",
       " (Document(metadata={'source': '16_Appendix.txt'}, page_content=' Parameters prompt Type: variable Description: A string in natural language that describes the process or function to be executed. For example, \"calculate the average of the salary column\". source Type: variable Description: The name of the table on which the generated function should be executed. It must be a variable containing the name of the table in the database. TargetVariable Type: variable Description: The variable in which the result of the executed function or process will be stored. It must be a variable that will receive the result of the generated and executed code. Command Flow Generating Code: Use the artificial intelligence model to convert the prompt into a code implementation. For example, if the prompt is \"calculate the average of the salary column\", the AI will generate the code necessary to calculate the average of that column. Executing the Code: Execute the generated code on the table specified in source. Storing the Result: Save the result of the code execution in the variable specified by TargetVariable. The result will be the calculated value or the dataset produced by the executed code. Example Usage Suppose you want to calculate the average of the salary column in a table called employees. // Define variables prompt = \"calculate the average of the salary column\" source = \"employees\" averageSalary = \\'\\' // Call the command to process the function functionAI(prompt, source, averageSalary) // Return the result of the function via addResult addResult(averageSalary) In this example, the functionAI() command will convert the prompt into a code implementation to calculate the average of the salary column in the employees table. The result of the calculation will be stored in the averageSalary variable, and this variable will be returned via addResult(averageSalary). The output will be the calculated average of the salary column.'),\n",
       "  0.78244317),\n",
       " (Document(metadata={'source': '8_How_to_work_with_comments.txt'}, page_content='How to Work with Comments Comments are a fundamental tool in any programming language, as they allow you to document code, make it easier to understand, and help keep it organized. In the AVAP™ programming language, comments are an integral part of the syntax and are used to add additional information to the source code without affecting its execution. Comments serve several purposes: Documentation: Comments can be used to explain what specific parts of the code do, which can be helpful for anyone reading or maintaining the code in the future. Clarification: They can clarify complex sections of code, making it easier for others (or yourself) to understand the logic and flow of the program. Organization: Comments can help organize code by separating different sections or explaining the purpose of various code blocks. Debugging: Comments can temporarily disable parts of code during debugging without deleting it, allowing you to test different scenarios. In AVAP™, you can use different types of comments to suit your needs. They can be single-line comments or multi-line comments, depending on the level of detail and context required. By incorporating comments into your code, you make it more maintainable and easier for others to follow, which is essential for collaborative projects and long-term code management. 3.1 Line Comments Line comments in AVAP™ are used to add brief annotations or explanations to a specific line of code. These comments begin with the // symbol and continue until the end of the line. Everything following // is considered a comment and is ignored by the compiler. // This is a line comment in AVAP™ int x = 5; // You can also add comments at the end of a line of code Line comments are useful for providing quick clarifications about the code and improving its readability. 3.2 Block Comments Block comments in AVAP™ are used to add comments that span multiple lines of code. These comments begin with /* and end with */. Everything between /* and */ is considered a comment and is ignored by the compiler. /* This is a block comment in AVAP™ that spans multiple lines of code. It is used to explain extensive sections of code or to temporarily disable entire blocks of code. */ Block comments are ideal for providing detailed explanations about complex sections of code or for temporarily disabling entire blocks of code during debugging. 3.3 Documentation Comments AVAP™ also supports documentation comments, which are used to automatically generate documentation from the source code. These comments begin with /// and are used to describe the functionality of classes'),\n",
       "  0.78227246),\n",
       " (Document(metadata={'source': '7_Working_With_Variables.txt'}, page_content=\"Working with Variables In this chapter, we will explore in detail working with variables in AVAP™. Variables are fundamental elements in programming as they allow us to store and manipulate data within a program. Throughout this chapter, we will examine the importance of variables, the types of local and global variables, as well as the different ways to declare them in AVAP™. 2.1 Importance of Variables Variables play a crucial role in programming, as they allow us to store and manipulate data during the execution of a program. They enable the storage of temporary or permanent values, perform calculations, and facilitate communication between different parts of the program. 2.2 Types of Variables in AVAP™ In AVAP™, there are two main types of variables: local and global. 2.2.1 Local Variables Local variables are those that are declared within a function or block of code and are only available within that scope. They have a limited scope, and their lifespan is restricted to the execution time of the block in which they are declared. Local variables are used to store temporary or intermediate data needed to perform calculations or execute operations within a function. 2.2.2 Global Variables Global variables are those that are declared outside of any function or block of code and are available throughout the entire program. They have a global scope, and their lifespan lasts for the full duration of the program's execution. Global variables are used to store data that needs to be accessible from multiple parts of the program or that needs to retain its value over time. 2.3 Declaration of Variables in AVAP™ In AVAP™, variables can be declared in several ways: 2.3.1 addVar() Function The addVar() function is used to declare global variables within the scope of an API. Its syntax is as follows: addVar(variable_name, value) Where: variable_name is the name of the variable to be declared. value is the initial value to be assigned to the variable (optional). 2.3.2 Direct Declaration Local and global variables can also be declared directly without using the global statement, simply by assigning a value: variable_name = value Where: variable_name is the name of the variable to be declared. value is the initial value to be assigned to the variable. 2.3.3 Direct Initialization It is also possible to declare and initialize a global variable at the same time using the following syntax: global variable_name=value Where: variable_name is the name\"),\n",
       "  0.7818943),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' defined before being called. 5.1. Import Rules Position of Import: The import statement must be placed at the exact location where the content of the imported file is to be included. The content of the imported file is executed linearly along with the original file. Import Error: If the file specified in the import statement is not found, a FileNotFoundError is raised. Scope of Imports: The functions and variables from the imported file are added to the local scope of the original file at the point of import. This means they can be accessed as if they were defined in the same file. 5.2. Limitations and Considerations No Packages: Unlike other languages, AVAP does not have a hierarchical package system. Each file is imported independently and treated as an autonomous unit. Sequential Execution: Execution in AVAP is sequential and does not allow lazy or deferred execution. Therefore, all functions and variables must be defined before use, and the content of imported files must be in the correct order. No Conditional Import: The import statement in AVAP does not support conditions. The specified file will always be imported at the point of the statement, regardless of any conditions. 5.3. Advanced Example Consider the following example where multiple files are imported: Content of the file main.avap addVar(5, a) import utilities.avap import operations.avap addVar(utilities.increment(a), b) addVar(operations.multiply(b, 2), c) print(c) Content of the file utilities.avap def increment(x): return x + 1 Content of the file operations.avap def multiply(x, y): return x * y In this example, utilities.avap and operations.avap are imported into main.avap at the specified points, allowing the increment and multiply functions to be used in main.avap. 6. Expressions in AVAP This chapter explains the meaning of expression elements in AVAP. 6.1. Arithmetic Conversions When describing an arithmetic operator in AVAP and using the phrase \"numeric arguments are converted to a common type,\" it means that the operator\\'s implementation for built-in types works as follows: If either of the arguments is a complex number, the other is converted to complex. Otherwise, if either of the arguments is a floating-point number, the other is converted to floating-point. Otherwise, both must be integers, and no conversion is needed. Additional rules may apply for certain operators. 6.2. Atoms Atoms are'),\n",
       "  0.78031325),\n",
       " (Document(metadata={'source': '4_Lexics.txt'}, page_content='Introduction Lexical analysis is the first step in the process of compiling or interpreting a program in AVAP™. It involves breaking down the source code into lexical components or \"tokens,\" which are the smallest units of meaning in the language. These tokens include keywords, identifiers, operators, punctuation symbols, and literals. Lexical Components in AVAP™ The lexical components in AVAP™ are similar to those in other programming languages like Python. Some of the most common lexical components in AVAP™ include: Keywords: These are reserved words that have a special meaning in the language and cannot be used as variable or function names. Examples of keywords in AVAP™ include if, else, for, while, return, among others. Identifiers: These are names given to variables, functions, and other elements of the program by the programmer. Identifiers must follow certain formatting rules and cannot match keywords. For example, variable, example_function, result are examples of identifiers in AVAP™. Operators: These are symbols used to perform operations in the program. Examples of operators in AVAP™ include +, -, *, /, =, ==, !=, among others. Literals: These represent constant values in the program, such as integers, floating-point numbers, text strings, and boolean values. Examples of literals in AVAP™ include 10, 3.14, \"text\", True, False, among others. Punctuation Symbols: These are special characters used to separate elements of the code and define the structure of the program. Examples of punctuation symbols in AVAP™ include (), , [], ,, :, ;, among others. Lexical Analysis Process The lexical analysis process in AVAP™ consists of several steps: Scanning: The source code is read sequentially, and the lexical components are identified. Regular expressions are used to recognize patterns corresponding to keywords, identifiers, operators, etc. Tokenization: The identified lexical components are converted into tokens, which are objects representing each component with its associated type and value. Token Generation: The generated tokens are passed to the next step of the compilation or interpretation process for syntactic and semantic analysis. Keywords Keywords in AVAP are reserved words that have specific meanings and cannot be used as identifiers. The keywords in AVAP are: randomString ormAI functionAI stampToDatetime getTimeStamp getRegex getDateTime encodeMD5 encodeSHA256 getQueryParamList getListLen ormCheckTable ormCreateTable end else if endLoop startLoop ormAccessInsert'),\n",
       "  0.7802766),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=', built-in functions, built-in object methods, class objects, class instance methods, and any object with a __call__() method are callable). All argument expressions are evaluated before attempting the call. Please refer to the Function Definitions section for the syntax of formal parameter lists. If keyword arguments are present, they are first converted into positional arguments as follows. First, a list of unfilled slots is created for the formal parameters. If there are N positional arguments, they are placed in the first N slots. Then, for each keyword argument, the identifier is used to determine the corresponding slot. If the slot is already filled, a TypeError exception is raised. Otherwise, the argument is placed in the slot, filling it (even if the expression is None, it fills the slot). When all arguments have been processed, any slots that are still empty are filled with the default value from the function definition. If there are unfilled slots for which no default value is specified, a TypeError exception is raised. Otherwise, the list of filled slots is used as the argument list for the call. Implementation Details in AVAP In AVAP, variables are stored as strings, and lists and objects are managed using specific commands: Lists: To generate a list, use variableToList(variable, list). To retrieve an item from the list, use itemFromList(list, index, variable_to_store_item). To get the number of items in the list, use getListLen(list, var_to_store_list_length). Objects (dictionaries): An object is created with AddvariableToJSON(key, value, object_variable). To retrieve a key from the object, use variableFromJSON(object_variable, key, var_to_store_key_value). Usage Example Creation and management of lists: // Creating a list variableToList(\"item1\", \"myList\") variableToList(\"item2\", \"myList\") variableToList(\"item3\", \"myList\") // Retrieving an item from the list itemFromList(\"myList\", 1, \"myVariable\") // Getting the length of the list getListLen(\"myList\", \"listLength\") Creation and management of objects (dictionaries): // Creating an object AddvariableToJSON(\"key1\", \"value1\", \"myObject\") AddvariableToJSON(\"key2\", \"value2\", \"myObject\") // Retrieving a value by key from the object variableFromJSON(\"myObject\", \"key1\", \"myVariable\") In this way, lists and objects'),\n",
       "  0.7789953),\n",
       " (Document(metadata={'source': '16_Appendix.txt'}, page_content=' with four digits (e.g., 2024) %m: Month with two digits (01 to 12) %d: Day of the month with two digits (01 to 31) %H: Hour in 24-hour format (00 to 23) %M: Minutes (00 to 59) %S: Seconds (00 to 59) For example, to interpret the string \"2024-08-25 14:30:00\", the format %Y-%m-%d %H:%M:%S would be used. It can be a direct value or a variable containing the format. TimeDelta Type: var Description: An optional value representing a time adjustment (positive or negative) applied to the timestamp after conversion. This value can be provided directly or through a variable and is expressed in seconds. TargetVariable Type: var Description: The variable where the resulting timestamp from the conversion will be stored. Unlike the other parameters, this must be a variable and not a direct value. Usage Example // Direct call with values: getTimeStamp(\\'2024-08-25 14:30:00\\', \\'%Y-%m-%d %H:%M:%S\\', 3600, generatedTimestamp) // Call using variables: date = \\'2024-08-25 14:30:00\\' format = \\'%Y-%m-%d %H:%M:%S\\' adjustment = 3600 getTimeStamp(date, format, adjustment, generatedTimestamp) In the first example, the date and time string \"2024-08-25 14:30:00\" is converted to a timestamp, applying a 3600-second (1-hour) adjustment, and the result is stored in the variable generatedTimestamp. In the second example, variables are used to define the date, format, and adjustment. getRegex() The getRegex() command searches for matches in a source string using a regular expression (regex) pattern and stores the result in a target variable. This command is useful for extracting specific parts of a string that match a defined pattern, such as email addresses, phone numbers, or any other structure defined by a regex. Parameters SourceVariable Type: variable Description: The variable containing the source string in'),\n",
       "  0.77863014),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content='Execution Model in AVAP 4.1. Structure of a Program A program in AVAP is built from code blocks that execute linearly. A block is a section of the AVAP program text that executes as a unit. Code blocks in AVAP include: A script file. The body of a function. An import statement for additional files. Each line of code in AVAP is considered a block and executes sequentially. There is no interactive execution, deferred execution, or object classes. 4.2. Names and Bindings 4.2.1. Name Binding Names in AVAP refer to values and are introduced through name binding operations. The following constructs bind names: Formal parameters of functions. Function definitions. Assignment expressions. Name binding is performed using the addVar(value, variable) function, which assigns the value to the specified variable. There are no class declarations or complex targets in AVAP. Only functions and direct assignments to variables are valid code blocks. 4.2.2. Name Resolution A scope defines the visibility of a name in a code block. In AVAP, if a variable is defined in a code block, its scope includes that block. The scope of a variable within a function extends to the entire function block. When a name is used in a code block, it is resolved using the nearest enclosing scope. If the name is not found in the current scope, a NameError exception is raised. If a name binding operation occurs anywhere within a code block, all uses of the name within that block are treated as references to the current block. This means that variables must be defined before their use within the same block. In AVAP, there are no global or nonlocal declarations. All names are resolved within the scope in which they are defined. There is no dynamic code execution with eval or exec, so all bindings must be static and known at code writing time. 4.3. Importing Files In AVAP, it is possible to import the contents of other code files. The import file.avap statement inserts the contents of the specified file at the exact point where the import statement appears. This process is linear and sequential, meaning that the imported content is executed as if it were part of the original file. It is crucial that the necessary functions are defined before they are called. If a function is not defined before its call, a NameError exception will be raised. Example of import usage: avap // Content of the file main.av'),\n",
       "  0.77859366),\n",
       " (Document(metadata={'source': '14_Working_with_libraries.txt'}, page_content='Function Libraries Introduction Includes are a fundamental feature in AVAP™ that allow for the efficient organization and reuse of code in software development projects. Just like in other programming languages, includes in AVAP™ enable the incorporation of functionalities from other files or libraries into the current file. This capability provides a number of significant advantages that make the development and maintenance of projects more efficient and effective. Purpose of Includes The primary purpose of includes in AVAP™ is to promote modularity and code reuse. By dividing code into separate modules or files and then including them in main files as needed, developers can write and maintain code in a more organized and structured manner. This facilitates the management of large and complex projects, as well as collaboration between development teams. Advantages of Using Includes Code Reuse: Includes allow for the reuse of functions, variables, and other code definitions in multiple parts of a project, reducing code duplication and promoting consistency and coherence in development. Facilitates Maintainability: By dividing code into smaller, more specific modules, it is easier to identify, understand, and modify parts of the code without affecting other parts of the project. This eases software maintenance over time. Promotes Modularity: The ability to include files selectively as needed encourages code modularity, which simplifies understanding and managing complex projects by breaking them down into smaller, manageable components. Improves Readability and Organization: The use of includes helps organize code in a logical and structured manner, improving readability and facilitating navigation through different parts of the project. Syntax of Includes In AVAP™, the syntax for including a file is similar to that of other languages like C. The keyword include is used followed by the name of the file to be included. There are two main ways to include files in AVAP™: Local Include: Used to include project-specific files located in the same directory or in subdirectories relative to the current file. The file name is specified within quotes. Example: include \"file_name.avap\" System Include: Used to include standard or system library files located in predefined or configured paths on the system. The file or library name is specified between angle brackets (< and >). Example: include <library_name.avap> Operation When an include is found in an AVAP™ file, the interpreter searches for the specified file and incorporates it into the current file at compile time. This means that all the code contained in the included file will be available for use in the current file. Common Uses Including Standard Libraries: Standard libraries'),\n",
       "  0.77731425),\n",
       " (Document(metadata={'source': '14_Working_with_libraries.txt'}, page_content=' the code contained in the included file will be available for use in the current file. Common Uses Including Standard Libraries: Standard libraries that provide common functions and utilities can be included to simplify application development. Including Definition Files: Files containing definitions of variables, constants, or data structures used in multiple parts of the project can be included. Including Specific Functionality Modules: Modules providing additional features for the project, such as file handling, text processing, or data manipulation, can be included. Practical Example Suppose we have a file named utils.avap that contains utility functions we want to use in our main project. We can include this file in our main project as follows: include \"utils.avap\" // We can now use the functions defined in utils.avap With this understanding of the value and advantages of using includes in AVAP™, we will explore in detail their operation and practical application in project development. Practical Example Suppose we have a file named utils.avap that contains utility functions we want to use in our main project. We can include this file in our main project as follows: include \"utils.avap\" // We can now use the functions defined in utils.avap With this understanding of the value and advantages of using includes in AVAP™, we will explore in detail their operation and practical application in project development. Function Libraries Function Products In AVAP™, there are a series of function libraries grouped by categories called Function Products that complement the base AVAP™ language and leverage the power of AVS servers for distribution. Through Function Products, developers can extend the functionality of AVAP™ by incorporating specialized libraries tailored to different needs and applications. Function Products provide a way to access advanced features and capabilities not available in the core language, offering a robust framework for building complex and scalable solutions. These libraries are designed to integrate seamlessly with AVAP™, enhancing the development process and enabling more efficient and effective project execution.'),\n",
       "  0.7722157),\n",
       " (Document(metadata={'source': '4_Lexics.txt'}, page_content='SHA256 getQueryParamList getListLen ormCheckTable ormCreateTable end else if endLoop startLoop ormAccessInsert ormAccessSelect variableToList RequestPost RequestGet addResult AddvariableToJSON addParam variableFromJSON itemFromList addVar function return Practical Example Below is a practical example that illustrates lexical analysis in AVAP™: // Function definition function_example(parameter): result = parameter * 2 return result // Function call value = function_example(10) In this example, the lexical analysis would identify the following tokens: function_example: Function identifier. (, ): Punctuation symbols. parameter, result, value: Variable identifiers. =, *, 2: Operators. 10: Integer literal. Conclusions Lexical analysis is a crucial step in the compilation or interpretation of a program in AVAP™. By breaking down the source code into tokens, it lays the foundation for subsequent syntactic and semantic analysis, allowing the program to be correctly understood and executed by the interpreter or compiler. With a clear understanding of lexical analysis in AVAP™, developers can write clean and structured code, facilitating the software development process in the language.'),\n",
       "  0.77103543),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' (del_stmt): Deletes variables, items, or attributes. Return Statement (return_stmt): Exits a function and optionally returns a value. Yield Statement (yield_stmt): Produces a value from a generator function. Raise Statement (raise_stmt): Raises exceptions for error handling. Break Statement (break_stmt): Exits the closest enclosing loop. Continue Statement (continue_stmt): Skips the current iteration of the closest enclosing loop. Import Statement (import_stmt): Imports modules or specific components from modules. Future Statement (future_stmt): Enables features from future versions of Python. Global Statement (global_stmt): Declares variables as global within a function. Nonlocal Statement (nonlocal_stmt): Declares variables as non-local, affecting scope in nested functions. Type Statement (type_stmt): Declares or checks types (e.g., type hints). Each simple statement performs a specific task and contributes to the overall functionality of the AVAP program. Expression Statements Expression statements are used (mostly interactively) to compute and write a value, or (usually) to call a method (a function that does not return a meaningful result; in Python, methods return the value None). Other uses of expression statements are allowed and occasionally useful. The syntax for an expression statement is: expression_stmt ::= starred_expression An expression statement evaluates the list of expressions (which can be a single expression). In interactive mode, if the value is not None, it is converted to a string using the built-in function repr(), and the resulting string is written to the standard output on a line by itself (except if the result is None, in which case the called procedure produces no output). Assignment Statements Assignment statements in AVAP are used to (re)assign names to values and to modify attributes or elements of mutable objects. Here is the syntax: assignment_stmt ::= (target_list \"=\")+ (starred_expression | yield_expression) target_list ::= target (\",\" target)* [\",\"] target ::= identifier | \"(\" [target_list] \")\" | \"[\" [target_list] \"]\" | attributeref | subscription | slicing | \"*\" target Here\\'s a breakdown of how assignment statements work: Assignment Operation: An assignment statement evaluates the list of expressions and assigns the single resulting object to each of the target lists, from left to right. Recursive Definition: The assignment operation is defined recursively depending on the form of the target list. Target List: If the target list is a single object without ending in a comma, the object is assigned to that target. If the'),\n",
       "  0.7708783),\n",
       " (Document(metadata={'source': '1_Introduction.txt'}, page_content=\" manner. This attribute is based on the fact that the language specifications do not reside in the language interpreter, allowing the final code to be constructed in real-time by the language server. 1.1 Virtuality Principle in AVAP The principle of virtuality in AVAP™ is based on several key aspects: 1.1.1 Language Specifications Decoupled from the Interpreter In AVAP™, language specifications are not compiled into the core of the language nor do they reside in the interpreter. This means that the interpreter is not tied to a specific implementation of the language, providing great flexibility and adaptability in code interpretation. 1.1.2 Dynamic Code Construction in Real-Time Thanks to the virtuality attribute, AVAP™ allows for dynamic code construction in real-time. This means that the final code to be interpreted by the language server can vary and mutate according to current needs, without the need for recompilation or redistribution. 1.1.3 Development of Dynamic Virtual APIs The virtuality attribute in AVAP™ enables the development of virtual APIs in a dynamic manner. This allows APIs to evolve, improve, and adapt to new security or functional needs in real-time, without affecting the clients utilizing the API endpoint. 1.2 Benefits of the Virtuality Attribute Flexibility: The ability to construct code in real-time provides significant flexibility in API development and management. Agility: The capacity to adapt and evolve without the need for precompilation or distributed updates allows for greater agility in software development. Simplified Maintenance: The development of dynamic virtual APIs simplifies the maintenance process, as changes do not need to be made to clients consuming those APIs. 1.3 Interaction with Artificial Intelligence One of the most innovative features of this language is its integration with artificial intelligence through OpenAI. This integration allows the language to automatically generate the necessary results through an interface with OpenAI once the programmer has a clear solution to a problem. This functionality not only speeds up development but also reduces the margin of error and improves efficiency. 1.4 Access to Databases The language also includes the capability to interact with databases using natural language, supported by artificial intelligence, currently version XXXXX through OpenAI. This feature allows for complex queries and data manipulation without deep knowledge of SQL, simplifying development and improving accessibility for programmers of all levels. With this guide, we hope to provide you with all the necessary information to make the most of this dynamic language's capabilities. From variable management to automated result\"),\n",
       "  0.7676957),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' Sequences: Instances of bytes or bytearray compare lexicographically using the numeric values of their elements. Character Strings: Instances of str compare lexicographically using Unicode code points (the result of the built-in ord() function) or their characters. Sequences: Instances of tuple, list, or range can only be compared within their types, with the restriction that ranges do not support order comparisons. Equality comparisons between these types result in inequality, and order comparisons between these types generate TypeError. They compare lexicographically using comparison of their corresponding elements. Mappings: Instances of dict compare equal if and only if they have the same (key, value) pairs. Sets: Instances of set or frozenset can be compared with each other and among their types. They define order comparison operators with the intention of checking subsets and supersets. Other Built-in Types: Most other built-in types do not have comparison methods implemented, so they inherit the default comparison behavior. User-defined classes that customize their comparison behavior should follow some consistency rules, if possible: Equality comparison should be reflexive. Comparison should be symmetric. Comparison should be transitive. If any of these conditions are not met, the resulting behavior is undefined. Simple Statements In AVAP, a simple statement consists of a single logical line. Multiple simple statements can be placed on a single line, separated by semicolons. The syntax for simple statements is: simple_stmt ::= expression_stmt | assert_stmt | assignment_stmt | augmented_assignment_stmt | annotated_assignment_stmt | pass_stmt | del_stmt | return_stmt | yield_stmt | raise_stmt | break_stmt | continue_stmt | import_stmt | future_stmt | global_stmt | nonlocal_stmt | type_stmt Here’s a brief overview of each type of simple statement: Expression Statement (expression_stmt): Executes an expression, which can be used for operations or calling functions. Assert Statement (assert_stmt): Used for debugging purposes to test conditions. Assignment Statement (assignment_stmt): Assigns values to variables or data structures. Augmented Assignment Statement (augmented_assignment_stmt): Performs an operation on a variable and assigns the result back to the variable (e.g., x += 1). Annotated Assignment Statement (annotated_assignment_stmt): Used for assigning values with annotations (e.g., type hints). Pass Statement (pass_stmt): A placeholder that does nothing; used for syntactic requirements. Del Statement (del_stmt): Deletes variables, items, or attributes. Return Statement (return_stmt): Exits a function and optionally returns'),\n",
       "  0.7652852),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' might use wildcard patterns in AVAP: match value: case _: print(\"Matched any value\") In this example: case _: matches any value and does not bind it to a name. The pattern always succeeds, and the code within this case will be executed regardless of the value. Wildcard patterns are particularly useful when you need to handle a broad range of possibilities and are only interested in whether a value fits a general condition, not in the value itself. Value Patterns In AVAP, value patterns are used to match specific values. The syntax for a value pattern is: value_pattern ::= attr Value patterns only succeed if the subject\\'s value matches the specified value. They are useful when you want to perform actions based on an exact value. Here’s how you might use value patterns in AVAP: match value: case 42: print(\"Matched the value 42\") case \"hello\": print(\"Matched the string \\'hello\\'\") case _: print(\"Matched something else\") In this example: case 42: matches the value 42 specifically. case \"hello\": matches the string \"hello\" specifically. case _: matches any other value not covered by the previous cases. Value patterns are ideal for scenarios where you need to check for specific values and respond accordingly. They provide precise control over the matching process. Group Patterns In AVAP, group patterns are used to group multiple patterns together. The syntax for a group pattern is: group_pattern ::= \"(\" pattern \")\" Group patterns are useful when you want to combine patterns or when patterns need to be evaluated together. They have the same effect as the pattern they contain but allow for more complex pattern structures. Here’s an example of how to use group patterns in AVAP: match value: case (42 | 43): print(\"Matched either 42 or 43\") case (name, age) if age > 18: print(f\" is an adult\") case _: print(\"Matched something else\") In this example: case (42 | 43): uses a group pattern to match either the value 42 or 43. case (name, age) if age > 18: uses a group pattern to match a tuple and includes an additional condition on the age. case _: matches any other value not covered by the previous cases. Group patterns are ideal for creating more complex matching scenarios where patterns need to be combined or grouped together. Sequence Patterns'),\n",
       "  0.7639557),\n",
       " (Document(metadata={'source': '15_Function_declaration.txt'}, page_content='Function Declaration Introduction Functions in AVAP™ are reusable blocks of code that perform a specific task. Just like in Python, functions in AVAP™ allow for code modularization, improved readability, easier maintenance, and code reuse. Function Construction In AVAP™, similar to Python, functions are defined using the keyword def, followed by the function name and its parameters in parentheses. The function definition ends with a colon (:), followed by the block of code that forms the function body, indented with four spaces. Defining a function in AVAP™ def greet(name): return \"Hello, \" + name + \"!\" Calling the function message = greet(\"World\") print(message) Output Hello, World! Technical Features Parameters: Functions can accept zero or more parameters that are used as inputs to the function. Return Values: Functions can return a value using the return keyword. Scope: Functions in AVAP™ have their own scope, meaning that variables defined within a function are only visible within that function unless declared as global variables. Code Reusability: Functions allow for encapsulating and reusing blocks of code that perform specific tasks. Practical Example Below is a practical example illustrating the definition and invocation of a function in AVAP™: Definition of a Function to Calculate the Area of a Circle def calculate_circle_area(radius): return 3.14 * radius ** 2 Calling the Function circle_radius = 5 area = calculate_circle_area(circle_radius) print(\"The area of the circle is:\", area) Output: The area of the circle is: 78.5 Conclusions Functions are a fundamental part of programming in AVAP™, allowing for effective organization and modularization of code. By understanding how to define, construct, and call functions in AVAP™, developers can write clearer, more concise, and maintainable code, facilitating the development and management of applications.'),\n",
       "  0.7633964),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=', and no conversion is needed. Additional rules may apply for certain operators. 6.2. Atoms Atoms are the most basic elements of expressions in AVAP. The simplest atoms are identifiers or literals. Forms enclosed in parentheses, brackets, or braces are also syntactically categorized as atoms. The syntax for atoms is: atom ::= identifier | literal | enclosure enclosure ::= parenth_form | list_display | dict_display | set_display | generator_expression 6.2.1. Identifiers (Names) An identifier that appears as an atom is a name. When the name is bound to an object, evaluating the atom yields that object. When a name is not bound, an attempt to evaluate it raises a NameError exception. Private Name Mangling When an identifier that occurs literally in a class definition begins with two or more underscores and does not end with two or more underscores, it is considered a private name of that class. Private names are transformed into a longer form before code is generated for them. The transformation inserts the class name, with the initial underscores removed and a single underscore inserted, in front of the name. 6.2.2. Literals AVAP supports string and bytes literals, as well as various numeric literals: literal ::= stringliteral | bytesliteral | integer | floatnumber | imagnumber Evaluating a literal produces an object of the given type (string, bytes, integer, floating-point number, complex number) with the given value. All literals correspond to immutable data types. 6.2.3. Parenthesized Forms A parenthesized form is an optional list of expressions enclosed in parentheses: parenth_form ::= \"(\" [starred_expression] \")\" A parenthesized expression produces whatever the expression list produces: if the list contains at least one comma, it produces a tuple; otherwise, it produces the single expression that makes up the list of expressions. 6.2.4. Comprehensions for Lists, Sets and Dictionaries To construct a list, set, or dictionary, AVAP provides special syntax called \"comprehension,\" each in two flavors: The contents of the container are listed explicitly. They are computed using a set of loop and filtering instructions, called a \"comprehension.\" Common syntax elements for comprehensions are: comprehension ::= assignment_expression comp_for comp_for ::= \"for\" target_list \"in\" or_test [comp_iter] comp_iter ::= comp_for | comp_if comp_if ::= \"if\" or_test [comp'),\n",
       "  0.76281095),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' suites (blocks of code) by evaluating the expressions one by one until a true condition is found. The corresponding suite is then executed. If all conditions are false, no suites are executed. The try Statement The try statement in AVAP specifies exception handlers and/or cleanup code for a block of statements. The syntax is as follows: try(): code to execute except(): code to execute The try block contains code that might raise an exception. The except block contains code to handle exceptions raised by the try block. If an exception occurs, control is transferred to the except block. If no exception occurs, the except block is skipped. Additional information about exceptions can be found in the section Exceptions, and information about using the raise statement to throw exceptions can be found in the section The raise Statement. Patterns in AVAP In AVAP, patterns provide a powerful way to match and destructure values. Patterns can be used in match statements to perform complex value comparisons and deconstructions. Here is a description of the available patterns and how they are used: Literal Patterns: Match specific literal values such as numbers, strings, or booleans. For example: match value: case 10: # Code to execute if value is 10 case \"hello\": # Code to execute if value is \"hello\" Variable Patterns: Capture the value of a variable. This allows you to use the matched value in the corresponding case block: match value: case x: # Code to execute, x will be assigned the value Sequence Patterns: Match sequences like lists or tuples. You can also use the * operator to capture remaining elements: match value: case [1, 2, *rest]: # Code to execute, rest will capture any additional elements Mapping Patterns: Match dictionaries or similar mappings by specifying keys and their corresponding patterns: match value: case \"key\": 42: # Code to execute if the dictionary has \"key\" with value 42 Class Patterns: Match instances of classes. You can also match specific attributes within the instance: match value: case MyClass(attr1=42): # Code to execute if value is an instance of MyClass with attr1 equal to 42 Patterns in AVAP offer a flexible approach for handling different kinds of data structures and values, making it easier to write expressive and maintainable code. OR Patterns An OR pattern in AVAP allows you to specify multiple patterns separated by vertical bars (|). The OR pattern attempts to match each of its subpatterns with'),\n",
       "  0.7594725),\n",
       " (Document(metadata={'source': '16_Appendix.txt'}, page_content=', or any other structure defined by a regex. Parameters SourceVariable Type: variable Description: The variable containing the source string in which to search for regex pattern matches. This string is the text on which the regex search will be applied. rePattern Type: variable Description: The variable containing the regular expression (regex) pattern that defines what to search for in the source string. This pattern should follow standard regex rules, allowing the specification of sequences of characters to identify in the source string. TargetVariable Type: variable Description: The variable where the search result will be stored. Depending on the context and the pattern used, the result could be the first match found, all matches, or even specific groups within the match. Usage Example // Direct call with values: sourceText = \"Email: user@example.com and phone: 123-456-7890\" pattern = r\"\\\\b\\\\d{3}-\\\\d{3}-\\\\d{4}\\\\b\" getRegex(sourceText, pattern, phoneNumber) // Call using variables: sourceText = \"Visit our website at https://www.example.com for more information.\" regexPattern = r\"https?://\\\\S+\" getRegex(sourceText, regexPattern, foundURL) In the first example, a phone number in the format 123-456-7890 is searched in the sourceText string and the result is stored in the phoneNumber variable. In the second example, a URL is extracted from the sourceText string using a regex that identifies URL patterns, and the result is stored in the foundURL variable. getDateTime() The getDateTime() command retrieves the current date and time, formats it according to a specified format, applies an optional time adjustment, and converts it to a specific time zone before storing the result in a target variable. It is useful for obtaining and manipulating the current date and time in different formats and time zones. Parameters Format Type: var Description: A format string that defines how the resulting date and time should be presented. This string follows the date and time formatting conventions used in Python. Some of the most common symbols include: %Y: Year with four digits (e.g., 2024) %m: Month with two digits (01 to 12) %d: Day of the month with two digits (01 to 31) %H: Hour in 24-hour format (00 to 23)'),\n",
       "  0.75704193),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content='\" or_test [comp_iter] comp_iter ::= comp_for | comp_if comp_if ::= \"if\" or_test [comp_iter] A comprehension consists of a single expression followed by at least one for clause and zero or more for or if clauses. In this case, the elements of the new container are those produced by considering each for or if clause as a block, nested from left to right, and evaluating the expression to produce an element each time the innermost block is reached. 6.2.5. List Displays In AVAP, lists are generated and handled differently. To construct a list, the command variableToList(variable, list) is used, and an item from the list is retrieved with itemFromList(list, index, variable_to_store_item). To get the number of elements in the list, getListLen(list, var_to_store_list_length) is used. The syntax for list displays is: list_display ::= \"[\" [starred_list | comprehension] \"]\" A list display produces a new list object, whose content is specified by a list of expressions or a comprehension. When a list of expressions is provided, its elements are evaluated from left to right and placed in the list object in that order. 6.2.6. Set Displays A set display is denoted by curly braces and is distinguished from dictionary displays by the absence of colon characters separating keys and values: set_display ::= \"{\" (starred_list | comprehension) \"}\" A set display produces a new mutable set object, whose content is specified by a sequence of expressions or a comprehension. 6.2.7. Dictionary Displays In AVAP, objects are created and managed using specific commands. An object is created with AddvariableToJSON(key, value, object_variable), and a key from the object is retrieved with variableFromJSON(object_variable, key, var_to_store_key_value). The syntax for dictionary displays is: dict_display ::= \"{\" [dict_item_list | dict_comprehension] \"}\" dict_item_list ::= dict_item (\",\" dict_item)* [\",\"] dict_item ::= expression \":\" expression | \"**\" or_expr dict_comprehension ::= expression \":\" expression comp_for A dictionary display produces a new dictionary object. If a comma-separated sequence of dictionary items is provided, they are evaluated from left to right to define the dictionary entries. Slices A slice selects a range of elements in a sequence object (e.g., a string, tuple, or list). Slices can be used as expressions or'),\n",
       "  0.7570067),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' = 10 # In the main file import module.avap print(module.avap.example_variable) # Will print 10 In this example, the main file imports the module.avap file and can access the example_variable defined in that file using the module.avap syntax. Compound Statements In AVAP, compound statements contain (groups of) other statements; these affect or control the execution of those other statements in some way. In general, compound statements span multiple lines, though in simpler representations a complete compound statement might be contained within a single line. if statements implement traditional flow control constructs. match specifies matching patterns for variable values. Function and class definitions are also syntactically compound statements. A compound statement consists of one or more \"clauses.\" A clause consists of a header and a \"suite.\" The clause headers of a particular compound statement are all at the same level of indentation. Each clause header begins with a uniquely identifying keyword and ends with a colon. A suite is a group of statements controlled by a clause. A suite can be one or more simple statements separated by semicolons on the same line as the header, following the colon of the header, or it can be one or more statements indented on subsequent lines. Only the latter form of a suite can contain nested compound statements. Control Flow Structures in AVAP In AVAP, control flow structures include conditional statements and loops, which allow you to control the flow of execution based on conditions and iterate over a range of values. If Statements The syntax for an if statement in AVAP is: if (variable, variableValue, comparator, expression): code to execute This structure checks if the condition (variable compared to variableValue with the given comparator) is true, and if so, executes the block of code. Loops The syntax for a loop in AVAP is: startLoop(variable, from, to) code to execute endLoop() This structure initiates a loop where the variable iterates from the \\'from\\' value to the \\'to\\' value, executing the code block for each iteration. The if Statement The if statement in AVAP is used for conditional execution. The syntax is as follows: if (variable, variableValue, comparator, expression): code to execute This statement evaluates the condition specified by the variable, variableValue, comparator, and expression. It selects exactly one of the suites (blocks of code) by evaluating the expressions one by one until a true condition is found. The corresponding suite is then'),\n",
       "  0.75475293),\n",
       " (Document(metadata={'source': '12_Loop_statement.txt'}, page_content='10711669922, result: { counter:5 } } This result confirms that the execution was successful (status:true) and that the final value of counter is 5. In summary, the loop statement in AVAP™ provides an efficient way to execute a block of code repeatedly within a specified range. By automating tasks that require repetition, such as processing a list of items or generating sequential numbers, this statement becomes a fundamental tool for programming in AVAP™.'),\n",
       "  0.7539623),\n",
       " (Document(metadata={'source': '3_Notation.txt'}, page_content=' local assignment follows the Python syntax variable_name = value. <string_value>: A string value is enclosed in double quotes and contains string content. <string_content>: The content of a string can be a string part or a string part followed by more string content. <string_part>: A string part can be literal text or a variable reference. <text>: Text is a series of characters. <variable_reference>: A variable reference follows the format $ variable . <variable_name>: A variable name can be a letter or a combination of letters. <value>: A value can be a string value, a number, or an expression. <number>: A number can be a digit or a series of digits. <expression>: An expression can be a value or a combination of two values with an operator. <operator>: An operator can be +, -, *, or /. <command>: A command can be any valid command syntax. <character>: A character can be any character except double quotes and the backslash. <letter>: A letter can be an alphabetical character, a digit, or an underscore. <digit>: A digit is a number from 0 to 9. This BNF notation covers the assignment of global and local variables, as well as variable substitution in strings. Practical Example // Definition of a variable example_variable = 10 // Definition of a function example_function(parameter): // Function body result = parameter * 2 return result // Function call result = example_function(example_variable) In this example, notation conventions are used to define a variable, a function, and to call the function with a parameter. Conclusions Notation in AVAP™ is a fundamental part of software development in the language. By following clear and consistent notation conventions, developers can write and maintain code more effectively, contributing to the readability, understanding, and maintainability of the code in projects of any size and complexity. With this understanding of notation in AVAP™, developers can write clean and structured code that is easy to understand and maintain over time.'),\n",
       "  0.75335693),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' AS patterns are useful for capturing matched values under a name while using OR patterns, allowing for more flexible and readable pattern matching in your code. Literal Patterns In AVAP, literal patterns are used to match specific literal values, such as numbers, strings, or boolean values. The syntax for a literal pattern is: literal_pattern ::= signed_number | strings | \"None\" | \"True\" | \"False\" A literal pattern only succeeds if the value of the subject is equal to the specified literal value. Here are examples of literal patterns and their usage: match value: case 42: print(\"Matched the number 42\") case \"hello\": print(\"Matched the string \\'hello\\'\") case None: print(\"Matched None\") case True: print(\"Matched True\") case False: print(\"Matched False\") case _: print(\"No match\") In this example: case 42: matches if value is exactly 42. case \"hello\": matches if value is the string \"hello\". case None: matches if value is None. case True: matches if value is True. case False: matches if value is False. case _: is a catch-all pattern that executes if none of the previous patterns match. Literal patterns are useful for matching specific, known values and are a fundamental part of pattern matching in AVAP. Capture Patterns In AVAP, capture patterns are used to bind the subject\\'s value to a name. The syntax for a capture pattern is: capture_pattern ::= NAME Capture patterns always succeed and bind the value of the subject to the specified name. Here’s how you might use capture patterns in AVAP: match value: case x: print(f\"Captured value: x\") In this example: case x: captures whatever value is in value and binds it to the name x. The pattern always succeeds. Capture patterns are useful when you want to extract and use the value of the subject within your code, regardless of what that value is. Wildcard Patterns In AVAP, wildcard patterns are used to match any value without binding it to a name. The syntax for a wildcard pattern is: wildcard_pattern ::= \\'_\\' Wildcard patterns always succeed and do not create any bindings. They are useful when you want to ignore the value of the subject and only care about whether it matches a certain pattern. Here’s how you might use wildcard patterns in AVAP: match value: case _: print(\"Matched any value\") In this example: case'),\n",
       "  0.7511871),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' its call, a NameError exception will be raised. Example of import usage: avap // Content of the file main.avap addVar(10, x) import functions.avap myFunction(x) // Content of the file functions.avap def myFunction(y): addVar(y + 5, result) print(result) 4.4. Exceptions Exceptions in AVAP allow for the handling of errors or exceptional conditions. An exception is raised when an error is detected; it can be handled by the surrounding code block or by any code block that directly or indirectly invoked the block where the error occurred. The AVAP interpreter raises an exception when it detects a runtime error. An AVAP program can also explicitly raise an exception using the raise statement. Exception handlers are specified with the try ... except statement. Example of exception handling: try: addVar(10 / 0, result) except ZeroDivisionError: print(\"Cannot divide by zero.\") In this example, if a division by zero occurs, a ZeroDivisionError exception is raised and handled by the except block. This structure ensures that AVAP programs execute in a sequential and predictable manner, without advanced dynamic or deferred execution features, maintaining simplicity and clarity in name binding and import handling. 5. The Import System in AVAP AVAP code in one file gains access to code in another file through the import process. The import statement is the only way to invoke the import machinery in AVAP. The import statement inserts the contents of the specified file at the exact point where the import statement appears in the original file. There are no other ways to invoke the import system in AVAP. When an import statement is executed, the contents of the imported file are processed as if they were part of the original file, ensuring that all functions and variables from the imported file are available in the context of the original file. If the specified file is not found, a FileNotFoundError is raised. Example of using the import statement in AVAP: Content of file main.avap addVar(10, x) import functions.avap myFunction(x) Content of file functions.avap def myFunction(y): addVar(y + 5, result) print(result) In this example, the content of functions.avap is inserted into main.avap at the point of the import statement, ensuring that myFunction is defined before being called. 5.1. Import Rules Position of Import: The import statement must be placed at the exact'),\n",
       "  0.7491877),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' previous cases. Group patterns are ideal for creating more complex matching scenarios where patterns need to be combined or grouped together. Sequence Patterns In AVAP, sequence patterns are used to match elements within sequences like lists or tuples. The syntax for sequence patterns is: sequence_pattern ::= \"[\" [maybe_sequence_pattern] \"]\" | \"(\" [open_sequence_pattern] \")\" Sequence patterns can match elements of sequences based on specific rules. Here’s how they work: List Patterns: Use square brackets [ ] to match lists. You can include patterns for the elements within the list. case [a, b, c]: print(\"Matched a list with three elements\") Tuple Patterns: Use parentheses ( ) to match tuples. Similarly, you can specify patterns for the tuple elements. case (x, y): print(\"Matched a tuple with two elements\") Sequence patterns allow for flexible and powerful matching of sequence types. They can match sequences of various lengths and structures by defining the pattern for each element. Here’s an example of using sequence patterns in a match statement: match value: case [1, 2, 3]: print(\"Matched a list with elements 1, 2, 3\") case (a, b, c) if a + b == c: print(\"Matched a tuple where a + b equals c\") case _: print(\"Matched something else\") In this example: case [1, 2, 3]: matches a list with exactly the elements 1, 2, and 3. case (a, b, c) if a + b == c: matches a tuple and includes a condition to check if a + b equals c. case _: matches any other value not covered by the previous cases. Mapping Patterns In AVAP, mapping patterns are used to match mapping elements, such as dictionaries. Here is the syntax and behavior of mapping patterns: mapping_pattern ::= { [items_pattern] } Mapping Patterns are designed to match elements within mappings, such as dictionaries. They use specific rules to determine if a pattern matches the given mapping. Syntax: Mapping patterns are enclosed in curly braces { ... }. The items_pattern specifies the pattern for the mapping items. Matching Rules: The rules for matching mapping patterns include checking for key-value pairs in the mapping and ensuring they align with the specified pattern. Usage: Mapping patterns are useful for destructuring dictionaries and other mapping types in a concise manner. Mapping patterns enhance pattern matching capabilities by allowing for specific and flexible matching of dictionary elements'),\n",
       "  0.74736416),\n",
       " (Document(metadata={'source': '13_Api_inbound_interface.txt'}, page_content='Chapter 12: addParam() Function Introduction The addParam() function in AVAP™ is a powerful tool used to add parameters to an API call in the query string. This parameter is assigned to a variable and acts as a bridge between the API call and the API itself, allowing smooth and efficient communication between both. Usage of addParam The addParam() function is used to add parameters to an API call in the query string. The basic syntax of this function is as follows: addParam(variable, value) Where variable is the name of the variable to be used as a parameter in the API call, and value is the value assigned to this variable. Example Usage Below is a practical example illustrating how to use the addParam() function in an API call: # API call with addParam() addParam(user, \"john_doe\") addParam(password, \"password123\") In this example, two parameters, user and password, are being added to an API call. The value of user is set to \"john_doe\" and the value of password is set to \"password123\". Internal Operation Internally, the addParam() function constructs the querystring for the API call by adding the specified parameters along with their corresponding values. This querystring is passed to the API, which uses it to process the request and return the appropriate response. Important Considerations It is important to ensure that the parameters added with addParam() are valid and correctly formatted according to the requirements of the API being called. Additionally, it is the developer\\'s responsibility to ensure that the values assigned to the parameters are secure and do not contain malicious data that could compromise system security. Conclusions The addParam() function in AVAP™ is an essential tool for constructing and managing API calls, facilitating communication between the client and the server. By understanding how this function works and how it is used in the context of an API call, developers can create more robust and secure applications that make the most of web services\\' potential.'),\n",
       "  0.7450229),\n",
       " (Document(metadata={'source': '12_Loop_statement.txt'}, page_content=\"StartLoop() Statement The loop statement in AVAP™ allows you to execute a block of code repeatedly until a specific condition is met. Below is a detailed explanation of its syntax and functionality. 7.1 Syntax of the Loop Statement The full syntax of the loop statement in AVAP™ is as follows: startLoop(control, start, end) // Code block to repeat endLoop() This syntax consists of three main parts: control: This is the loop control variable used to track the progress of the loop. It is initialized with the starting value of the loop and is incremented with each iteration until it reaches the end value. start: This is the starting value of the loop. The loop begins at this value. end: This is the ending value of the loop. The loop terminates when the control variable reaches this value. 7.2 Functioning of the Loop Statement The loop statement in AVAP™ follows this execution process: The control variable control is initialized with the starting value specified in start. The loop condition is evaluated: while the value of control is less than or equal to the end value end, the code block within startLoop() is executed. If the value of control exceeds the end value, the loop terminates, and execution continues after endLoop(). In each iteration of the loop, the code block within startLoop() is executed, and the control variable control is automatically incremented by one. Once the control variable reaches or exceeds the end value end, the loop terminates, and execution continues after endLoop(). 7.3 Example of Use Below is an example of using the loop statement in AVAP™, along with a detailed explanation of each part of the code: // Loop Sample Use // Initialize the variable 'variable' with the value 5. addVar(variable,5) // Start the loop with the control variable 'control', ranging from 1 to 5. startLoop(control,1,5) // In each iteration of the loop, assign the current value of 'control' to the variable 'counter'. addVar(counter,$control) endLoop() // Add the final value of 'counter' to the API result. addResult(counter) 7.4 Result and Conclusions After executing the above code, the result returned by the API is as follows: { status , elapsed:0.01605510711669922, result: { counter:5 } } This result confirms that the\"),\n",
       "  0.7441738),\n",
       " (Document(metadata={'source': '16_Appendix.txt'}, page_content='ValuesVariables Type: variable Description: A string containing the names of the variables that hold the values to be inserted into the specified fields. The variable names should be separated by commas, in the same order as the fields in fields. dbase Type: variable Description: The name of the database where the table into which the new record should be inserted is located. It must be a variable containing the name of the database. varTarget Type: variable Description: The variable in which the result of the insertion operation will be stored. It must be a variable that will receive a value indicating whether the insertion was successful or not. Command Flow Defining the Fields and Values: Use the field names (fields) and the variables with the values to be inserted (fieldsValuesVariables) to define what data should be inserted. Inserting into the Database: Perform the insertion of the new record into the database specified by dbase, using the provided values. Storing the Result: Save the result of the insertion operation in the variable specified by varTarget. The stored value will indicate whether the insertion was successful (True) or failed (False). Example Usage Suppose you want to insert a new record into a table called users in a database called myDatabase, with values for username and age coming from the variables newUsername and newAge. // Define variables fields = \"username,age\" fieldsValuesVariables = \"newUsername,newAge\" dbase = \"myDatabase\" insertSuccess = \\'\\' // Define the variables with the new values newUsername = \"Alice\" newAge = 31 // Call the command to insert the new record ormAccessInsert(fields, fieldsValuesVariables, dbase, insertSuccess) // Return the result of the insertion via addResult addResult(insertSuccess) In this example, the ormAccessInsert() command will insert a new record into the myDatabase database in the users table. The values for username and age are provided by the newUsername and newAge variables. The insertSuccess variable will store the result of the operation (whether it was successful or not), and this variable will be returned via addResult(insertSuccess). The output will reflect whether the insertion was successful (True) or failed (False). ormAI() The ormAI() command uses an artificial intelligence model to convert a natural language query into an SQL statement, which is then executed against a database. This command processes a natural language query to generate an SQL statement that is executed on the table specified in the source parameter,'),\n",
       "  0.74376106),\n",
       " (Document(metadata={'source': '16_Appendix.txt'}, page_content='01 to 31) %H: Hour in 24-hour format (00 to 23) %M: Minutes (00 to 59) %S: Seconds (00 to 59) For example, the format \"%Y-%m-%d %H:%M:%S\" will present the date and time as 2024-08-25 14:30:00. It can be a direct value or a variable containing the desired format. TimeDelta Type: var Description: An optional value representing a time adjustment (positive or negative) applied to the current date and time before conversion. This value can be provided directly or through a variable and is expressed in seconds. TimeZone Type: var Description: The time zone to which the date and time should be converted. This value can be a time zone identifier provided directly or through a variable. Some common time zones include: \"UTC\": Coordinated Universal Time \"America/New_York\": U.S. Eastern Time (EST/EDT) \"America/Los_Angeles\": U.S. Pacific Time (PST/PDT) \"Europe/London\": London Time (GMT/BST) \"Europe/Madrid\": Madrid Time (CET/CEST) \"Asia/Tokyo\": Tokyo Time (JST) \"Australia/Sydney\": Sydney Time (AEST/AEDT) You can use any time zone recognized by the pytz library in Python, which includes most time zones worldwide. TargetVariable Type: var Description: The variable in which the resulting date and time from the operation will be stored. Unlike the other parameters, this must be a variable and not a direct value. Usage Example // Direct call with values: getDateTime(\\'%Y-%m-%d %H:%M:%S\\', 3600, \\'UTC\\', currentTime) // Call using variables: format = \\'%Y-%m-%d %H:%M:%S\\' adjustment = 3600 timeZone = \\'America/New_York\\' getDateTime(format, adjustment, timeZone, currentDateTime) In the first example, the current date and time are retrieved, adjusted by 3600 seconds (1 hour), converted to UTC, and stored in the variable currentTime. In the second example, variables are used to define the format, time adjustment, and time zone, with the result stored in the currentDateTime variable. encodeMD'),\n",
       "  0.7433524),\n",
       " (Document(metadata={'source': '16_Appendix.txt'}, page_content='00 to 59) For example, the format %Y-%m-%d %H:%M:%S converts a timestamp into a string like 2024-08-25 14:30:00. It can be a direct value or a variable containing the desired format. TimeDelta Type: var Description: An optional value representing a time adjustment (positive or negative) applied to the timestamp before conversion. This value can be provided directly or through a variable and is expressed in seconds. TargetVariable Type: var Description: The variable where the resulting date and time from the conversion will be stored. Unlike the other parameters, this must be a variable and not a direct value. Usage Example // Direct call with values: stampToDatetime(1692966600, \\'%Y-%m-%d %H:%M:%S\\', 3600, convertedDatetime) // Call using variables: timestamp = 1692966600 format = \\'%Y-%m-%d %H:%M:%S\\' adjustment = 3600 stampToDatetime(timestamp, format, adjustment, convertedDatetime) In the first example, a timestamp is converted to a date and time in the format \"%Y-%m-%d %H:%M:%S\", applying a 3600-second (1-hour) adjustment, and the result is stored in the variable convertedDatetime. In the second example, variables are used to define the timestamp, format, and adjustment. getTimeStamp() The getTimeStamp() command converts a date and time string, given in a specific format, to a timestamp value. Additionally, it allows for an optional time adjustment before storing the result in a target variable. This command is useful for converting human-readable date and time representations to a numeric timestamp format, which can be used in calculations or time comparisons. Parameters DateString Type: var Description: A string representing a date and time. This string must follow the format specified in the Format parameter. It can be a direct value or a variable containing the date string. Format Type: var Description: A format string that defines how to interpret the date and time string (DateString). This string follows Python\\'s conventions for formatting and parsing dates and times. Some common symbols include: %Y: Year with four digits (e.g., 2024) %m: Month with two digits (01 to '),\n",
       "  0.7418493),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=': If the target list is a single object without ending in a comma, the object is assigned to that target. If the list contains a target prefixed with an asterisk, the object must be iterable with at least as many elements as targets, minus one. Elements before the starred target are assigned to the respective targets, and the remaining elements are assigned to the starred target. Single Target: If the target is an identifier (name), it is bound to the object in the current local namespace. For other targets, names are bound in the global or enclosing namespace, depending on `nonlocal`. Attribute Reference: If the target is an attribute reference, the primary expression is evaluated. It must produce an object with assignable attributes. Subscription: If the target is a subscription, the primary expression is evaluated to produce a mutable sequence or mapping object, which is then used to assign the value. Slice: If the target is a slice, the primary expression is evaluated, and the sequence object is requested to replace the slice with the assigned sequence elements. In summary, assignment statements in AVAP are crucial for assigning values to variables and modifying data structures effectively. Return Statement The return statement in AVAP is used to return the value of a desired variable from a function. Here is the syntax: return(variable_to_return): Here is an overview of how the return statement works: Function Context: The return statement can only occur within a function definition, not inside a nested class definition. Variable Evaluation: If a variable is provided, it is evaluated. If no variable is specified, None is used by default. Function Exit: The return statement exits the current function call and returns the specified value. Interaction with try-finally: When the return statement is executed within a try statement that has a finally clause, the finally clause is executed before the function exits. Generator Functions: In generator functions, the return statement indicates the end of the generator. It causes a StopIteration exception to be raised, with the returned value (if any) used to construct the StopIteration exception and set as the StopIteration.value attribute. The return statement is a fundamental part of functions and generators, allowing for the output of values and proper function termination. Raise Statement In AVAP, the raise statement is used to throw an exception. The syntax for the raise statement is as follows: raise [expression [\"from\" expression]] If no expressions are present, raise re-raises the currently handled exception, also known as the active exception. If there is'),\n",
       "  0.74044895),\n",
       " (Document(metadata={'source': '10_Execution_model_in_avap.txt'}, page_content=' terminate when i equals 5, and \"Loop ended\" will be printed. The numbers 0 through 4 will be printed before the loop is exited. Break Statement The break statement in AVAP is used to terminate the closest enclosing loop. Here is an overview of its behavior: Usage Context: The break statement can only occur within a for or while loop. It cannot be nested within a function or class definition inside that loop. Loop Termination: It terminates the closest enclosing loop and skips the optional else clause if the loop has one. Loop Control Target: If a for loop is terminated by break, the loop control target retains its current value. Interaction with try-finally: When break is executed within a try statement with a finally clause, the finally clause is executed before actually exiting the loop. The break statement is essential for controlling loop execution, allowing for early exit from loops and proper handling of loop cleanup. Continue Statement In AVAP, the continue statement is used to proceed with the next iteration of the closest enclosing loop. The syntax for the continue statement is as follows: continue The continue statement can only syntactically occur nested within a for or while loop, but not within a function or class definition inside that loop. When continue is used within a loop that is also handling exceptions with a try statement containing a finally clause, the finally clause is executed before the next iteration of the loop begins. for i in range(10): try: if i % 2 == 0: continue print(i) finally: print(\"In finally clause\") print(\"Loop ended\") In this example, the continue statement will skip the current iteration when i is even, but before moving to the next iteration, the finally clause will print \"In finally clause.\" For odd numbers, the loop will print the number and then \"In finally clause.\" After the loop finishes, \"Loop ended\" will be printed. Import Statement In AVAP, the import statement is used to import an entire code file and define names in the local namespace. The syntax for the import statement is as follows: import file.avap The import statement in AVAP imports an entire code file and makes it available in the local namespace. No alias is assigned to the imported file; the file is simply referred to by its name. For example: # In the \\'module.avap\\' file example_variable = 10 # In the main file import module.avap print(module.avap.example_variable) # Will print 1'),\n",
       "  0.7393567),\n",
       " (Document(metadata={'source': '11_Conditional_statements.txt'}, page_content=\"IF-THEN-ELSE Statement The IF-THEN-ELSE statement in AVAP™ allows for decision-making based on specific conditions and executes different blocks of code depending on the outcome of those conditions. Below is a detailed explanation of its syntax and functionality. 6.1 Syntax of the IF-THEN-ELSE Statement The basic syntax of the IF-THEN-ELSE statement in AVAP™ is as follows: IF(condition, true_value, operator) // Block of code if the condition is true ELSE // Block of code if the condition is false END() condition: This is an expression that evaluates to either true or false. true_value: This is the value assigned if the condition is true. operator: This is the operator used to compare the condition with the true value. 6.2 Functioning of the IF-THEN-ELSE Statement The IF-THEN-ELSE statement evaluates the given condition and, if it is true, executes the block of code within the IF(). If the condition is false, it executes the block of code within the ELSE(). Below is the description of each part of the IF-THEN-ELSE statement using the provided example: // IF, ELSE and END Sample Use addVar(selector,'yes') IF(selector,'yes','=') addVar(result,1) ELSE() addVar(result,0) END() addResult(result) The variable selector is initialized with the value 'yes'. The statement IF(selector,'yes','=') evaluates whether the value of selector is equal to 'yes'. In this case, the condition is true. Inside the IF() block, addVar(result,1) is executed, which assigns the value 1 to the result variable. Since the condition of the IF() is true, the code block inside the ELSE() is not executed. The statement addResult(result) adds the value of the result variable to the API result. 6.3 Result The result returned by the API after executing the above code is as follows: { status , elapsed:0.008270740509033203, result: { result:1 } } This result indicates that the execution was successful (status:true) and that the value of result is 1. 6.4 Conclusions The IF-THEN-ELSE statement in AVAP™ provides an efficient way to make decisions based on specific conditions. Similar to other programming languages, it allows for executing different blocks of code based on the outcome\"),\n",
       "  0.73884356),\n",
       " (Document(metadata={'source': '8_How_to_work_with_comments.txt'}, page_content=' are used to automatically generate documentation from the source code. These comments begin with /// and are used to describe the functionality of classes, methods, variables, and other elements of the source code. /// This function adds two integers and returns the result. /// \\\\param a The first integer. /// \\\\param b The second integer. /// \\\\return The sum of the two numbers. int sum(int a, int b) return a + b; Documentation comments are essential for maintaining up-to-date and detailed documentation of the code, which facilitates its understanding and use by other developers. 3.4 Best Practices When using comments in AVAP™, it is important to follow some best practices: Use comments moderately and only when necessary to clarify the code. Keep comments updated as the code evolves. Write clear and concise comments that are easy for other developers to understand. Avoid redundant or unnecessary comments that do not provide useful information to the reader. 3.5 Summary Comments in AVAP™ are an essential tool for improving the readability and maintainability of source code. With line comments, block comments, and documentation comments, developers can add explanations, clarifications, and useful documentation to the code, making it easier to understand and collaborate within development teams.'),\n",
       "  0.7380718),\n",
       " (Document(metadata={'source': '16_Appendix.txt'}, page_content=\"Appendix Function Glossary randomString() The randomString() command generates a random string based on a specified pattern and stores it in a target variable. It is especially useful when random strings are needed to conform to a specific format, such as passwords or identifiers. Parameters Pattern Type: var Description: A regular expression (regex) pattern that defines the characters and structure of the string to be generated. It can be a direct value or a variable containing the pattern. For example, [a-zA-Z0-9] will generate a string that includes uppercase letters, lowercase letters, and numbers. Length Type: var Description: An integer value specifying the length of the random string to be generated. It can be a direct value or a variable containing the desired length. This value determines how many characters the resulting string will have. TargetVariable Type: var Description: The variable where the generated string will be stored. This variable should be used later in the program. Unlike the other parameters, this must be a variable and not a direct value. Usage Example // Direct call with values: randomString('[a-zA-Z0-9]', 8, generatedPassword) // Call using variables: pattern = '[a-zA-Z0-9]' length = 8 randomString(pattern, length, generatedPassword) stampToDatetime() The stampToDatetime() command converts a timestamp value to a date and time according to a specified format, applying a possible time difference, and stores the result in a target variable. It is useful for manipulating and formatting time values into different representations. Parameters timestamp Type: var Description: A value representing a timestamp, which can be provided directly or through a variable. This value is the starting point for conversion to a date and time format. Format Type: var Description: A format string that defines how the resulting date and time should be presented. This string follows the same conventions used in Python for formatting dates and times. Common symbols include: %Y: Year with four digits (e.g., 2024) %m: Month with two digits (01 to 12) %d: Day of the month with two digits (01 to 31) %H: Hour in 24-hour format (00 to 23) %M: Minutes (00 to 59) %S: Seconds (00 to 59) For example, the format %Y-%m-%d %H:%M:%S converts\"),\n",
       "  0.7080479)]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "embeddings = OllamaEmbeddings(base_url=OLLAMA_URL, model=OLLAMA_EMB_MODEL_NAME)\n",
    "\n",
    "vector_store = ElasticsearchStore(\n",
    "    client=es,\n",
    "    index_name=ELASTICSEARCH_DOCS_INDEX,\n",
    "    embedding=embeddings,\n",
    "    query_field=\"text\",\n",
    "    vector_query_field=\"vector\",\n",
    ")\n",
    "\n",
    "results = vector_store.similarity_search_with_score(\n",
    "    query=\"What data types does AVAP have?\",\n",
    "    k=50\n",
    ")\n",
    "\n",
    "results"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "assistance-engine",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
