From 2d64e1d4980627625153c8c90e555af2faf7f65e Mon Sep 17 00:00:00 2001 From: Bryce Willey Date: Wed, 27 May 2026 11:54:00 -0400 Subject: [PATCH] Remove references to `tools.suffolklitlab.org` Mostly just confirming to myself that the weaver doesn't do anything with that server (which is being shut down). All of the params it's used with are deprecated no-ops as of FormFyxer 1.0.0 (from October 2025). --- README.md | 65 +++++++++---------- .../ALWeaver/data/questions/assembly_line.yml | 3 - .../data/questions/template_validation.yml | 6 -- docassemble/ALWeaver/interview_generator.py | 9 +-- 4 files changed, 32 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 0408eb21..91c0094a 100644 --- a/README.md +++ b/README.md @@ -29,30 +29,30 @@ Read more on our [documentation page](https://suffolklitlab.org/docassemble-Asse * https://github.com/SuffolkLitLab/docassemble-ThemeTemplate * https://github.com/SuffolkLitLab/EfileProxyServer -## Documentation - -https://suffolklitlab.org/docassemble-AssemblyLine-documentation/ - -## ALWeaver API - -When installed on a docassemble server, ALWeaver exposes a custom Flask API: - -- `POST /al/api/v1/weaver` (primary) -- `GET /al/api/v1/weaver/jobs/{job_id}` (async job polling) -- `DELETE /al/api/v1/weaver/jobs/{job_id}` (async job cleanup) -- `GET /al/api/v1/weaver/openapi.json` (OpenAPI spec) -- `GET /al/api/v1/weaver/docs` (human-readable docs) - -The API uses docassemble's API key authentication via `api_verify()`. -The `POST` endpoint defaults to synchronous behavior, and supports optional -asynchronous execution with `mode=async` (or `async=true`). - -To enable async mode, add this module to your docassemble configuration: - -```yaml -celery modules: - - docassemble.ALWeaver.api_weaver_worker -``` +## Documentation + +https://suffolklitlab.org/docassemble-AssemblyLine-documentation/ + +## ALWeaver API + +When installed on a docassemble server, ALWeaver exposes a custom Flask API: + +- `POST /al/api/v1/weaver` (primary) +- `GET /al/api/v1/weaver/jobs/{job_id}` (async job polling) +- `DELETE /al/api/v1/weaver/jobs/{job_id}` (async job cleanup) +- `GET /al/api/v1/weaver/openapi.json` (OpenAPI spec) +- `GET /al/api/v1/weaver/docs` (human-readable docs) + +The API uses docassemble's API key authentication via `api_verify()`. +The `POST` endpoint defaults to synchronous behavior, and supports optional +asynchronous execution with `mode=async` (or `async=true`). + +To enable async mode, add this module to your docassemble configuration: + +```yaml +celery modules: + - docassemble.ALWeaver.api_weaver_worker +``` ## History @@ -71,15 +71,10 @@ Nharika Singh ### Using auto drafting mode -As of June 2023, the Weaver includes auto drafting mode. - -To use the automatic field grouping feature of auto drafting mode, -you need to install either: - -1. The `en_core_web_lg` model on your server, or -2. An API token for tools.suffolklitlab.org. +To use auto-drafting mode, you can get an Open AI API Key and set it in +your docassemble configuration. -You can request an API token by emailing massaccess@suffolklitlab.org. If you -prefer to install your own copy of the `en_core_web_lg` model, you can -access it the first time you select to use auto drafting mode when logged -in as an administrator. +```yaml +open ai: + key: ... +``` diff --git a/docassemble/ALWeaver/data/questions/assembly_line.yml b/docassemble/ALWeaver/data/questions/assembly_line.yml index b2d617af..b9071510 100644 --- a/docassemble/ALWeaver/data/questions/assembly_line.yml +++ b/docassemble/ALWeaver/data/questions/assembly_line.yml @@ -521,9 +521,6 @@ code: | jur=str( get_config("assembly line", {}).get("pdf relabel jurisdiction", "MA") ), - tools_token=get_config("assembly line", {}).get( - "tools.suffolklitlab.org api key" - ), openai_api=get_config("open ai", {}).get("key"), ) if isinstance(stats, dict) and isinstance(stats.get("fields"), list): diff --git a/docassemble/ALWeaver/data/questions/template_validation.yml b/docassemble/ALWeaver/data/questions/template_validation.yml index d8d89a18..3958cb58 100644 --- a/docassemble/ALWeaver/data/questions/template_validation.yml +++ b/docassemble/ALWeaver/data/questions/template_validation.yml @@ -200,9 +200,6 @@ code: | jur="MA", normalize=1, rewrite=1, - tools_token=get_config("assembly line", {}).get( - "tools.suffolklitlab.org api key" - ), ) document.commit() process_field_normalization = True @@ -223,9 +220,6 @@ code: | jur="MA", normalize=1, rewrite=1, - tools_token=get_config("assembly line", {}).get( - "tools.suffolklitlab.org api key" - ), ) temp_new_pdf.commit() diff --git a/docassemble/ALWeaver/interview_generator.py b/docassemble/ALWeaver/interview_generator.py index d96d75ae..8507e372 100644 --- a/docassemble/ALWeaver/interview_generator.py +++ b/docassemble/ALWeaver/interview_generator.py @@ -3206,16 +3206,11 @@ def auto_group_fields(self): try: field_grouping = formfyxer.cluster_screens( [field.variable for field in self.all_fields.custom()], - tools_token=get_config("assembly line", {}).get( - "tools.suffolklitlab.org api key", None - ), ) if not field_grouping: field_grouping = self._null_group_fields() - except: - log( - f"Auto field grouping failed. Tried using tools.suffolklitlab.org api key {get_config('assembly line',{}).get('tools.suffolklitlab.org api key', None)}" - ) + except Exception as ex: + log(f"Auto field grouping failed. {ex}") field_grouping = self._null_group_fields() self.field_grouping = field_grouping self.questions.auto_gather = False