Commit Graph

85 Commits

Author SHA1 Message Date
renovate[bot] 437fc0f049 ⬆️(dependencies) update django to v5.2.12 [SECURITY] 2026-03-10 13:39:31 +01:00
Stephan Meijer 71744cc264 ⬆️(ci) upgrade GitHub Actions workflow steps to latest versions
Update all GitHub Actions to their latest major versions for improved
performance, security patches, and Node.js runtime compatibility.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2026-02-27 13:26:44 +01:00
Quentin BEY 195722b988 🔥(github) drop unused deploy workflow
We don't use it, and production should never be deployed this way.
2026-02-27 13:19:24 +01:00
renovate[bot] 35e308f26d ⬆️(dependencies) update django to v5.2.11 [SECURITY] 2026-02-27 13:08:12 +01:00
Stephan Meijer d676516e86 👷(docker) add arm64 platform support for image builds
Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2026-02-19 22:42:48 +01:00
Charles Englebert 2c090551c0 Filter on path (#53)
* (backend) add path filter

allow search filters on path for Docs compatibility

* (backend) test

I improve existing and add new tests
2026-02-09 16:45:18 +01:00
Charles Englebert 033bd42bc4 Revert "(backend) add path filter (#48)" (#52)
This reverts commit 28a3a10c05.
2026-02-09 16:38:05 +01:00
Charles Englebert 28a3a10c05 (backend) add path filter (#48)
* (backend) add path filter

allow search filters on path for Docs compatibility

* (backend) test

I improve existing and add new tests

* (backend) add search_type params

We want to control the type of search to use at run time
to feature flag Docs users with full-test or with hybrid
search.

I am adding a search_type params on the search route.

* 🚨(backend) linters

fiiiiiiiiiix liiiiiinters
2026-02-09 16:18:32 +01:00
Charles Englebert 05aebf564a (backend) allow delete documents by tags (#45)
* (backend) allow delete documents by tags

the assistant does not know the ids. It needs to be able to detele
documents by tags.

* ♻️(backend) refactor

I refactor to have a better code.

* 🚨(backend) various fixes

I am fixing things for review.
2026-01-20 10:36:03 +01:00
Quentin BEY f8b87cc1c2 👷(opensearch) wait for service to be up before tests
Now we are using `uv` the tests start while the service is
not yet ready... We need to check the service readiness.
2026-01-18 23:22:14 +01:00
Quentin BEY b76dd37d76 🔧(backend) ignore .venv in compile messages command
We have to change the ignored files used in the compoilemessages
command. uv is using .venv directory and not venv
2026-01-18 22:57:58 +01:00
Quentin BEY c4ffcbea84 🔥(backend) remove setup.py
uv is supporting PEP 517, setup.py file calling setuptools is not needed
anymore.
2026-01-18 22:57:58 +01:00
Quentin BEY ce8869af2f 🔧(actions) migrate from pip to uv
Migreate usage of pip to uv in github actions. How python is setup is
also changed. Doing like this, we will just have to upgrade the python
version requirement in the pyproject file
2026-01-18 22:57:58 +01:00
Quentin BEY b72779aed2 🏗️(core) migrate from pip to uv
We want to migrate our projects from pip to uv to take the benefits of
the lock file and have reproducible installations.
A first uv.lock file is comitted and the Dockerfile and compose are
modified to work with uv
2026-01-18 22:57:58 +01:00
Charles Englebert b0a14c4c37 (backend) add deletion endpoint (#31)
* (backend) add tags field for result filtering (#29)

* 🚨(backend) remove dead files

I left files I should have removed

* (backend) add tags field

I add a tag field in the index and a filtering.
A tag is keyword that can be applied to a document.
A document can have several tags.
Tags allow filtering related documents.
The Conversations app needs tags for its rag tool.

* (backend) enhance document indexing with error handling and changelog

I enhance document indexing with error handling and changelog

* 📝(backend) improve docstrings and Changelog

Docstrings and Changelog had to be improved.
This commit improves them.

* 🐛(backend) prevent information lick

return user message with less info and log error

* 🚨(backend) return undeleted document IDs

We need better responses in case of unexpected behaviour.
I enhance document deletion API by returning undeleted
document IDs
2026-01-15 17:21:42 +01:00
Charles Englebert 1822ee407a Adapt to conversation (#30)
* (backend) enhance document indexing with error handling and changelog

I enhance document indexing with error handling and changelog

* (backend) adapt to conversation RAG

the document rag tool of conversation expect a content
and a dedicated service with token access is needed.
I am also adding loggers.

* 🚨(backend) fix tests

demo tests are broken. Here is the fix.
2026-01-15 15:17:34 +01:00
Quentin BEY 69374eb789 🎨(pylint) fix issues after update and __init__ add
Fix the pylint errors after the two previous commits.
2026-01-14 14:55:05 +01:00
Quentin BEY bdd7cce492 🐛(global) add missing __init__ files
Module init files where missing in several places. This
prevented pylint to analyse files.
2026-01-14 13:42:50 +01:00
renovate[bot] b813e6d6c2 ⬆️(dependencies) update python dependencies 2026-01-14 13:42:23 +01:00
Quentin BEY a3b090216c 🔧(settings) update production configuration for HSTS
This is based on Docs project settings.
2026-01-13 23:56:22 +01:00
Quentin BEY 7afed6a9b3 🚑️(embedding) remove typo in bearer token header
I guess this has nothing to do here...
2026-01-12 22:00:14 +01:00
Quentin BEY 65d83b12ed 🧑‍💻(github) fix the pull request template
Add missing empty space for proper checkbox display
2026-01-12 21:47:41 +01:00
Quentin BEY e56d5f1720 🐛(settings) fix embedding timeout type (str -> int)
`Value` type is a string, not an integer, this bug prevents any
environment variable definition fot the timeout.
2026-01-12 21:43:57 +01:00
Quentin BEY 77c6233a90 🧑‍💻(admin) add Sentry selftest
Add a simple Sentry message exception to check the
Sentry configuration.
2026-01-12 11:08:13 +01:00
dependabot[bot] c55fb696a2 ⬆️(django) bump from 5.2.6 to 5.2.9
Bumps [django](https://github.com/django/django) from 5.2.6 to 5.2.9.
- [Commits](https://github.com/django/django/compare/5.2.6...5.2.9)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-09 22:35:46 +01:00
Quentin BEY ff8a3310a0 🧑‍💻(admin) add vibe coded selftest page
Allow devops team to have a quick insight if DB connections
are properly set.

This is a temporary commit and will be rewritten in a proper way
later (work was already started for "people" project).
2026-01-09 22:28:00 +01:00
Quentin BEY 8e3672670c 🧑‍💻(admin) add create_search_pipeline button
This provides a simple way to insure the pipeline existence
without having to run a management command.
2026-01-09 21:12:59 +01:00
Quentin BEY c2ef4af6b4 🐛(sentry) normalize the setting and update code
This commit makes the Sentry setting to be like other
project (ie without the DJANGO_ prefix) and update
deprecated scope definition.
2026-01-09 20:46:21 +01:00
Jacques ROUSSEL 7cc4954782 📦️(helm) improve helm chart
In order to be able to deploy on OPI cluster, we need to be able to
specify pod security context and container security context.
2026-01-08 17:27:04 +01:00
Charles Englebert 614928ba42 (backend) add tags field for result filtering (#29)
* 🚨(backend) remove dead files

I left files I should have removed

* (backend) add tags field

I add a tag field in the index and a filtering.
A tag is keyword that can be applied to a document.
A document can have several tags.
Tags allow filtering related documents.
The Conversations app needs tags for its rag tool.

* (backend) enhance document indexing with error handling and changelog

I enhance document indexing with error handling and changelog

* 📝(backend) improve docstrings and Changelog

Docstrings and Changelog had to be improved.
This commit improves them.
2025-12-16 19:38:17 +01:00
Charles Englebert 8e491074ac multi-embedding and chuncking (#25)
* (backend) add evaluate-search-engine command

I want to automize the search evaluation. This new command
computes performance metrics.

* (backend) improve evaluation

I add more data to my evaluations.

* 📝(backend) add changelog

add changelog and various fixes.

* (backend) add evaluation data from service-public.fr

I need better data with longer content to work on chuncking

* (backend) handle multi-embedding

I breack document content into peaces and embed each peace separatly.
Search is them based on the mest match.

* 📝(docs) add documentation

I add documentation about chunking

* 🚨(backend) fix things

thigs were broken. I fixed this.

* 📝(backend) documentation

I document the documentation of it

* 🚨(backend) fix rebase

the rebase has messed things up. I fixed those things.

* ♻️(backend) refactor language code handling and improve test cases

I fix things to fix things

* ♻️(backend) refactor

I am doing refactoooooooooooor
2025-12-08 15:34:42 +01:00
Charles Englebert 8b4566bd46 Handle Multi-language (#24)
* (backend) add evaluate-search-engine command

I want to automize the search evaluation. This new command
computes performance metrics.

* (backend) improve evaluation

I add more data to my evaluations.

* 📝(backend) add changelog

add changelog and various fixes.

* (backend) improve full text

I introduce two analyszers to improve the full text search.

* 📝(backend) add changelog

I update the changelog

* 🧪(backend) fix tests and linters

I fix tests and linters

* ♻️(backend) various fixes

I fix a buch of small things

* 🔧(backend) define settings

I define settings to remove magic numbers

* (backend) copy evaluation

I copy the evaluation command

* (backend) index multi-language

I index in multi-language

* (backend) flatten the data structure

I changed my mind. I want a flat structure.

* ♻️(backend) handle search

the search must be updated so everything works

* 🧪(backend) more tests

I add more tests so the feature is tested more

* 📝(backend) docuemntation

I docuemnt so the feature is documented

* ♻️(backend) various fixes

I did many mistakes. There are now fixed.

* 🚨(backend) fix things

things were a bit broken but I ixed them

* (backend) detect language

I change the logic.
I detect the language instead of receiving it as queryparams

* 🚨(backend) fix things

things are broken and I fixe them here

* 📝(backend) better documentation

I improve the documentation a little bit

* 🧪(backend) test

more test is better. I add tests.

* 🚨(backend) fix things

fiiiiiiiiiiiiiiiiiiiiiiiix things

* ♻️(backend) simplify language_code

we do not need language variations

* ♻️(backend) fix things

things are broken. now they are fixed.
2025-12-08 10:08:22 +01:00
Charles Englebert 2333223c1c Evaluate (#22)
* (backend) add evaluate-search-engine command

I want to automize the search evaluation. This new command
computes performance metrics.

* (backend) improve evaluation

I add more data to my evaluations.

* 📝(backend) add changelog

add changelog and various fixes.

* (backend) add more data

I add more data to evaluation

* (backend) add index management flags

I add --keep-index and --force-reindex flags

* ♻️(backend) remove dependences from test/utils

I remove dependences from test/utils

* 📝(backend) documenting

I add documentation of the command

* ♻️(backend) break unique documents file into text files

I change the data structure of the documents

* 🚨(backend) fix things

things were broken but here I fix them

* ♻️(backend) evaluation app

I move the command to an evaluation app

* 🧪(backend) add tests

I add test on the command

* 🚨(backend) fix thing

thinghs must be fixed.
2025-12-02 09:35:33 +01:00
Fabre Florian 377efbaa46 (backend) fixup test of prefix for service index name
Fix documentation & cache issues in tests

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-11-13 10:40:28 +01:00
Fabre Florian 624da64dcb (backend) prefix for service index name
Service opensearch index is now defined by the property 'index_name' and
prefixed by the new setting OPENSEARCH_INDEX_PREFIX (default: 'find').
Fix parallel execution of tests.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-11-12 14:43:05 +01:00
Fabre Florian fdabd556ef (backend) add development service for drive
The create_demo command will now create a 'drive' service for development
purpose.
Add setup documentation.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-11-12 11:04:50 +01:00
Fabre Florian 3a69b59973 🔧(compose) rename docker network 'lasuite-net'
Rename 'lasuite-net' as 'lasuite' to match with Drive configuration

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-11-12 10:09:39 +01:00
Charles Englebert 3ec95c9edf Semantic search (#17)
* (backend) add trivial vector embedding

add a trivial vector embedding with constant [0.0, 0.0]

* 🙈(core) gitignore

ignore files related to sqlite and pdb

* (backend) introduce hybrid search

handle full-text along with seamntic search

* (backend) install basic embedding model

I need an embedding to performe semantic search.
I need a simple model from hugging face.

* (backend) embbed the text

embed the text of the query and the document.

* 🐛(backend) fix filters and refactor view

filter were broken by previous commits.
This fixes them.

* ♻️(backend) refactor pipeline creation

pipeline had to be refactored.
This refactors it.

* (backend) improve filtering

filtering were done once after hybrid computation.
For efficiency it should be done of each
subquery.

* 🔧(setting) move variables to settings

NLP_SEARCH_PIPELINE_ID and HYBRID_SEARCH_WEIGHTS is moved
to setting file so user can param Find.

* (backend) use albert api

we choose to rely on Albert API instead of installing
a model in local. It is less effort to maintain.

* ♻️(backend) hide EMBEDDING_API_KEY

EMBEDDING_API_KEY should not be visible.

* (backend) move opensearch functions to a service

user of find should be able to disable seamntic search.
If it is not properly setted it is also turned off
without impatcing full-text search.

* 🧪(backend) test

add test so the app is tested.

* 📝(backend) add documentation

add documentation so the app is documented.

* ♻️(backend) remove local model

the local model is no longer useful.
Its file must be removed.

* 🧪(backend) one more test

The app must be tested more. This tests the app more.

* (bakckend) handle k value

k value must be handled so the user can have a control
over the number of results.

* ♻️(backend) clean branch

beanch had to be cleaned bery very much

* 🔧(infra) define EMBEDDING_API_KEY

EMBEDDING_API_KEY must be hiden. This hide EMBEDDING_API_KEY

* 🚨(backend) fix linters

linters must be fixed. This commit fixes them.

* 📝(core) add changelog

changelog must be updated. This updates the changelog.

* 🐛(backend) fix linters more

linters had to be fixed more. This fixes linters more.

* 🐛(backend) fix tests

test must be fixed. This fixes the tests.

* ♻️(backend) improve variable managment

variable managment must be improve. This improve variable managment.

* ♻️(backend) remove embedding from schemas

embedding must be removed from schemas. This removes embedding from shemas.

* (backend) add reindex_with_embedding command

We must be able to enable hybrid search if it was disabled
or chnage the embedding model. To do so we must reindex all
documents with a new embedding. reindex_with_embedding does that.

* (backend) add create_pipeline command

We must be able to create the command pipeline once and
not check at all request.

* 🧪(backend) tests

I add a test and fix other tests

* 🚨(backend) linters

linters must be fixed. This fixes linters.

* (backend) remove pagination

Semantic search has an impact of pagination.
Pagination will be perfomed in services consuming Find API (Doc, Drive etc...)

* (backend) improve  reindexing

we want to handle error case and model change. I introduce a
embedding_model field to keep track of the embedding state.

* 🧪(backend) test more

the command must be tested more. This tests the command more.

* 🧪(backend) test concurent update do not lead do data loss

updates on a document mught be done by a user while reindexing.
I check the latest data is not lost. using if_seq_no and if_primary_term
is not only not useful but whould require reruning the command.

* (backend) improve reindexing again

reindexing must preserve the latest updates.
I reintroduce the no_seq update field.

* ♻️(backend) various small improvments

I make various small improvments.
2025-11-10 11:57:23 +01:00
Fabre Florian 11846238f2 🔧(backend) skip token claims validation in development mode
The previous commit has allowed to run Docs and Find projects
stacks together with a tweak : Find must use the keycloak OIDC
endpoints of Docs on the 'nginx' domain for ResourceServer authentication
and introspection.

This configuration broke the OIDC token claims validation because the iss
from the token of the 'impress' user is 'localhost' and not 'nginx'.

We fix it by using the same endpoint : http://localhost:8083/realms/impress

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-10-30 14:59:54 +01:00
Fabre Florian 4a3e8cc553 🔧(backend) better indexer view return value
In bulk mode the indexer view now returns 201 instead of 207
Remove unused nodejs docker.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-10-30 14:59:54 +01:00
Fabre Florian 96d7effbe6 📝(backend) add documentation
Add documentation for env & Find+Docs configuration in dev mode
Add documentation for release

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-10-30 14:59:54 +01:00
Fabre Florian 4902bb1e9c 🔧(backend) setup Find app dockers to work with Docs
Populate a service configuration "docs" for development.
Move OIDC endpoints to the "impress" realm to allow introspection
of Docs tokens.
Upgrade version of dependencies (fix some security issues).

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-10-30 14:59:54 +01:00
Fabre Florian 268b34356f (backend) improve unit tests
Add tests for schema validation
Use strict list comparison in some search access control tests

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-10-30 14:59:54 +01:00
Fabre Florian db5cc54f67 (backend) setup search api view as OIDC resource server
New fulltext search view for indexed documents with OIDC authentication
Extract token information through introspection to get the audience & user info
Limit access to documents :
 - public & authenticated with linkreach to the user
 - owned by the user
Check intersection between the allowed services linked to the
audience/client_id and the requested ones.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-10-30 14:59:54 +01:00
Fabre Florian f93515d70b (views) be a bit more permissive for indexable document content
In indexation view, raise a validation error only when both the
title & content of a document are empty.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-10-30 14:59:54 +01:00
Samuel Paccoud - DINUM c9b04e0281 (views) add tests for access control for an authenticated user
The implementation is partial and fakes resource server but we can
already test the filtering logic in OpenSearch.
2025-10-30 14:59:54 +01:00
Samuel Paccoud - DINUM e463b3daba ♻️(schema) stop forcing users to be uuid (represented by a sub)
The list of users allowed to access a document is a sub and is
not guaranteed to be a UUID.
2025-10-30 14:59:54 +01:00
Samuel Paccoud - DINUM 0bceab930c ♻️(views) split views in 2 urls: /index and /search
We need to make a POST to search documents so that we can post a
list of documents the current user has already "visited" This is
necessary to limited the number of documents we return among the
ones available to any authenticated or anonymous user.
2025-10-30 14:59:54 +01:00
Samuel Paccoud - DINUM 64687d3045 (schema) add fields to the document
We need to index the tree structure information as well as an
active field that can be set to False when the item is deleted on
the remote service. We could delete the item from our search index
but it is safer to keep all documents synchronized and not only
those which are not deleted.
2025-10-30 14:59:54 +01:00
Samuel Paccoud - DINUM 0b472720bf (backend) allow passing list of indices via the query string
The client should be able to choose on which indices, among those
to which it has access (check to be added later), the query should
run.
2025-10-30 14:59:54 +01:00