Leverage Chains from LangChain to selectively apply transformations
- Add the
--transformation=<name>
param to allow selectively applying transformations through the cli. - Add a transformation step before
AnalyseCodeChunk
that applies the specified transformations to the prompt.- The transformations are applied in the specified order.
Example:
python promptlib/eval_codebase.py \
--runner DirectRunner \
--project unreview-poc-390200e5 \
--region us-central1 \
--temp_location "gs://unreview-dataflow/tmp/" \
--save_main_session \
--input_bq_table unreview-poc-390200e5:gl_gitlab_codebase.content_v1 \
--output_bq_table unreview-poc-390200e5:gl_gitlab_codebase.2023-08-28_bcardoso_langchain_t1_parameterized_t5 \
--throttle_sec 0.01 \
--num_samples_per_file 5 \
--language python \
--transformation imports \
--transformation prompt_with_file_name_and_language
Closes #33 (closed)
Edited by Bruno Cardoso