Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
56cbc91
Refactor for multi index in redis
mdciri Feb 5, 2026
a0fe349
Copilot terraform skills
uolter Feb 6, 2026
24ad7a4
[CAI-747] add parser app (#1996)
anemone008 Feb 5, 2026
542cd2c
[CAI-748] Add Puppeteer (#1999)
anemone008 Feb 6, 2026
e779b68
Update scripts to accept structured documents to create a dedicated i…
mdciri Feb 9, 2026
15b8b95
Update github action accordingly to python script
mdciri Feb 9, 2026
f096b08
Update chatbot create index workflow to accept input types
mdciri Feb 9, 2026
062d3b7
Update documents to read structured data into llamaindex documents
mdciri Feb 6, 2026
af6dc9c
Update apps/chatbot-index/src/modules/settings.py
mdciri Feb 10, 2026
7128817
Update apps/chatbot-index/src/modules/documents.py
mdciri Feb 10, 2026
17badb0
Update .github/actions/chatbot/action.yaml
mdciri Feb 10, 2026
f50a388
Fix the input and output types
mdciri Feb 10, 2026
0df9e63
Update structured llamaindex documents id
mdciri Feb 10, 2026
338efd6
Add assertion for the inputs
mdciri Feb 10, 2026
d1a8d4d
Update .changeset/eager-colts-smile.md
mdciri Feb 10, 2026
57d348f
Update apps/chatbot-index/src/modules/create_vector_index.py
mdciri Feb 10, 2026
4b315f0
Update document to safe load jsons
mdciri Feb 10, 2026
01ed416
Merge branch 'CAI-741-refactor-for-new-index' of github.com:pagopa/de…
mdciri Feb 10, 2026
dc9663a
Merge branch 'main' into CAI-741-refactor-for-new-index
mdciri Feb 10, 2026
74d9b35
Update cleaning redis when creating index given an index id
mdciri Feb 10, 2026
8966f99
Update .github/workflows/chatbot_create_index.yaml
mdciri Feb 10, 2026
6025cc3
Sobstitute s3 client with s3 resource
mdciri Feb 10, 2026
7a2232a
Update apps/chatbot-index/src/modules/vector_index.py
mdciri Feb 10, 2026
e2547c5
Update apps/chatbot-index/src/modules/documents.py
mdciri Feb 10, 2026
15187d3
Update apps/chatbot-index/src/modules/codec.py
mdciri Feb 10, 2026
bc02597
Update documents json loads
mdciri Feb 10, 2026
149725b
fix docker compose
batdevis Feb 11, 2026
ac5bd1f
Merge branch 'CAI-741-refactor-for-new-index' of github.com:pagopa/de…
batdevis Feb 11, 2026
4f70244
Add to the github workflow and action the index-id to create as env var
mdciri Feb 11, 2026
c3f2e8b
Merge branch 'CAI-741-refactor-for-new-index' of github.com:pagopa/de…
mdciri Feb 11, 2026
cda13ba
Update class name to be more generic
mdciri Feb 11, 2026
779967b
Update class name to be more generic
mdciri Feb 11, 2026
14e0a75
Merge branch 'main' into CAI-741-refactor-for-new-index
mdciri Feb 11, 2026
873f81e
Update workflow inputs
mdciri Feb 11, 2026
34dbc95
Update create-index service in compose.yaml
mdciri Feb 11, 2026
f3271e0
Update dockerfile and scripts
mdciri Feb 11, 2026
5b91eff
Update codec return
mdciri Feb 11, 2026
6c65f57
fix s3 init on create index
batdevis Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eager-colts-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chatbot-index": minor
---

Create index now also considers structured data
23 changes: 22 additions & 1 deletion .github/actions/chatbot/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: chatbot
description: Create Chatbot LLamaindex Vector Index

inputs:
api:
description: 'Whether to create vector index using api data'
required: true
default: 'true'
aws_region:
description: 'The AWS region selected'
required: false
Expand All @@ -11,6 +15,22 @@ inputs:
description: the name of the chatbot lambda function
required: true
default: ''
dynamic:
description: 'Whether to create vector index using dynamic data'
required: true
default: 'true'
index_id:
description: 'The indexID to create'
required: true
default: 'devportal-index'
static:
description: 'Whether to create vector index using static data'
required: true
default: 'true'
structured:
description: 'Whether to create vector index using structured data'
required: true
default: 'false'

runs:
using: "composite"
Expand Down Expand Up @@ -42,4 +62,5 @@ runs:
shell: bash
run: |
cd apps/chatbot-index
PYTHONPATH=. poetry run python src/modules/create_vector_index.py
export CHB_INDEX_ID=${{ inputs.index_id }}
PYTHONPATH=. poetry run python src/modules/create_vector_index.py ${{ inputs.static == 'true' && ' --static' || '' }} ${{ inputs.dynamic == 'true' && ' --dynamic' || '' }} ${{ inputs.api == 'true' && ' --api' || '' }} ${{ inputs.structured == 'true' && ' --structured' || '' }} --clean-redis
33 changes: 33 additions & 0 deletions .github/workflows/chatbot_create_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,34 @@ on:
- dev
- uat
- prod
api:
description: 'Consider API documentation for index creation'
type: boolean
required: true
default: true
dynamic:
description: 'Consider dynamic documentation for index creation'
type: boolean
required: true
default: true
static:
description: 'Consider static documentation for index creation'
type: boolean
required: true
default: true
structured:
description: 'Consider structured documentation for index creation'
type: boolean
required: true
default: false
index_id:
type: choice
description: 'The indexID to create'
required: true
default: devportal-index
options:
- devportal-index
- cittadino-index

# Allows external webhook trigger
repository_dispatch:
Expand Down Expand Up @@ -81,4 +109,9 @@ jobs:
- name: Chatbot Vector Index
uses: ./.github/actions/chatbot
with:
api: ${{ github.event.inputs.api && 'true' || 'false'}}
chatbot_lambda_name: ${{ vars.CHATBOT_LAMBDA_NAME }}
dynamic: ${{ github.event.inputs.dynamic && 'true' || 'false' }}
index_id: ${{ github.event.inputs.index_id }}
static: ${{ github.event.inputs.static && 'true' || 'false' }}
structured: ${{ github.event.inputs.structured && 'true' || 'false' }}
1 change: 0 additions & 1 deletion apps/chatbot-index/config/params.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
vector_index:
index_id: discovery-index
chunk_size: 1024
chunk_overlap: 20
12 changes: 11 additions & 1 deletion apps/chatbot-index/docker/create_index.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM python:3.12.4-slim-bullseye
ARG DEBIAN_FRONTEND=noninteractive

ENV PYTHONPATH=/app
ENV LAMBDA_TASK_ROOT=/app
ENV PYTHONPATH=$LAMBDA_TASK_ROOT

RUN apt-get update && \
apt-get install -y \
Expand All @@ -12,6 +13,10 @@ RUN apt-get update && \
unzip \
jq

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install

COPY ./docker/chrome-installer.sh ./chrome-installer.sh
RUN chmod +x ./chrome-installer.sh && \
./chrome-installer.sh && \
Expand All @@ -25,3 +30,8 @@ COPY pyproject.toml $LAMBDA_TASK_ROOT
COPY poetry.lock $LAMBDA_TASK_ROOT
RUN poetry config virtualenvs.create false
RUN poetry install --only main

COPY ./src ${LAMBDA_TASK_ROOT}/src
COPY ./config ${LAMBDA_TASK_ROOT}/config
COPY ./scripts ${LAMBDA_TASK_ROOT}/scripts
COPY ./docker/files/s3 ${LAMBDA_TASK_ROOT}/files/s3
Loading
Loading