Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
110 changes: 0 additions & 110 deletions compose/local/django/Dockerfile.llama

This file was deleted.

2 changes: 1 addition & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
}

# LLAMA
LLAMA_ENABLED = env.bool("LLAMA_ENABLED", default=False)
LLAMA_ENABLED = env.bool("LLAMA_ENABLED", default=True)
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing LLAMA_ENABLED default from False to True makes the llama model mandatory for all deployments. This is a significant behavioral change that:

  1. Requires the llama model file to be present in all environments
  2. May impact existing deployments that don't have llama configured
  3. Should be clearly documented in deployment/upgrade instructions

Consider whether this should be an opt-in change rather than changing the default, or ensure proper deployment documentation is updated.

Suggested change
LLAMA_ENABLED = env.bool("LLAMA_ENABLED", default=True)
LLAMA_ENABLED = env.bool("LLAMA_ENABLED", default=False)

Copilot uses AI. Check for mistakes.
MODEL_LLAMA = "llama-3.2-3b-instruct-q4_k_m.gguf"

#Aumento en el límite de campos
Expand Down
Binary file added fixtures/Artigo 5.docx
Binary file not shown.
Binary file added fixtures/e14790.docx
Binary file not shown.
Binary file added fixtures/e740.docx
Binary file not shown.
77 changes: 0 additions & 77 deletions llama.local.yml

This file was deleted.

2 changes: 1 addition & 1 deletion reference/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ReferenceStatus(models.IntegerChoices):
class Reference(CommonControlField, ClusterableModel):
mixed_citation = models.TextField(_("Mixed Citation"), null=False, blank=True)

status = models.IntegerField(
estatus = models.IntegerField(
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field name change from status to estatus appears inconsistent with the model name ReferenceStatus and the translation _("Reference status"). This creates confusion as the field name suggests Spanish while the related choices class and translation key use English. Consider either:

  1. Keeping the field name as status to match the choices class name
  2. Or changing both to use consistent Spanish naming (e.g., ReferenceEstatus choices class)
Suggested change
estatus = models.IntegerField(
status = models.IntegerField(

Copilot uses AI. Check for mistakes.
_("Reference status"),
choices=ReferenceStatus.choices,
blank=True,
Expand Down
2 changes: 1 addition & 1 deletion reference/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def form_valid(self, form):
if linea: # Evitar procesar líneas vacías
new_reference = Reference.objects.create(
mixed_citation=linea,
status=1, # Estatus predeterminado
estatus=1, # Estatus predeterminado
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field rename from status=1 to estatus=1 is a breaking change that requires a database migration. Ensure that a migration file has been created and tested to handle this field rename, otherwise existing database records will be inaccessible.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aqui foi trocado para estatus=1, mas o restante do app ainda usa status (e as migrações criam status). Isso vai falhar ao criar o objeto via Wagtail. Sugestão: usar status=ReferenceStatus.CREATING (ou equivalente) ou alinhar a renomeação do campo com migration + atualização completa do código.

Suggested change
estatus=1, # Estatus predeterminado
status=1, # Estatus predeterminado

Copilot uses AI. Check for mistakes.
creator=self.request.user, # Usuario asociado
)
Comment on lines 26 to 30
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates references with a hard-coded estatus=1. Since ReferenceStatus exists and is used elsewhere, prefer using the enum value (e.g., ReferenceStatus.CREATING) to avoid magic numbers and keep behavior stable if the enum changes.

Copilot uses AI. Check for mistakes.
get_reference.delay(new_reference.id)
Expand Down
11 changes: 10 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,13 @@ google-generativeai==0.3.2

# Docx
# ------------------------------------------------------------------------------
python-docx==1.1.2
python-docx==1.1.2

# huggingface-hub
# ------------------------------------------------------------------------------
huggingface_hub==0.26.1 # https://pypi.org/project/huggingface-hub/

# Python Bindings for llama.cpp
# ------------------------------------------------------------------------------
llama-cpp-python==0.3.14 # https://llama-cpp-python.readthedocs.io/en/latest/
Comment on lines +55 to +61
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huggingface_hub is not the pip package name (PyPI uses huggingface-hub). As written, installs will fail with “No matching distribution found”. Rename the requirement entry back to huggingface-hub==0.26.1 (the import module is huggingface_hub, but the distribution name uses a hyphen).

Copilot uses AI. Check for mistakes.

4 changes: 0 additions & 4 deletions requirements/extra-llama.txt

This file was deleted.

Loading