.tools/ailly/README.md
./extract_snippets.sh or requesting one from DavidSouther.ailly.py and plugin.mjsailly.py--language argument, and make sure the source language folder is there. Optionally, set the default for your run.--service argument, and the same. Optionally, set the default.example folder path on or around line 100.plugin.mjsBest.Ensure your account has Bedrock model access to Titan Embeddings G1 - Text and Claude (and maybe Claude Instant) in the region(s) you will be running.
python3 .tools/ailly/ailly.py --language [language] --service [service]
Optionally: --verbose --npx-check --additional-prompt ...
If successful, the generated code will be in a .scouts folder in the example.
The ailly.py script coordinates aws-doc-sdk-examples project & folder structure into a command line invocation for Ailly. This will use every file in the subfolder as an input to an LLM (default Claude on Bedrock), with a custom prompt and output in .scouts/[target_language] of the source service folder.
The prompt has three parts:
Several blocks of code found using RAG, as implemented in plugin.mjs. Ailly orchestrates the run overall, and plugin.mjs handles aws-sdk-code-examples specific RAG details.
The source input file
A final text prompt: f"Translate the final block of code from {source} to {target} programming language. {instructions}". {instructions} is the value from --additional-prompt to ailly.py.