Skip to content

footnote_prompt_response_rag_module

FootnotePromptResponseRagModule

Bases: PromptResponseRagModule

Source code in griptape/engines/rag/modules/response/footnote_prompt_response_rag_module.py
@define(kw_only=True)
class FootnotePromptResponseRagModule(PromptResponseRagModule):
    def default_system_template_generator(self, context: RagContext, artifacts: list[TextArtifact]) -> str:
        return J2("engines/rag/modules/response/footnote_prompt/system.j2").render(
            text_chunk_artifacts=artifacts,
            references=utils.references_from_artifacts(artifacts),
            before_system_prompt="\n\n".join(context.before_query),
            after_system_prompt="\n\n".join(context.after_query),
        )

default_system_template_generator(context, artifacts)

Source code in griptape/engines/rag/modules/response/footnote_prompt_response_rag_module.py
def default_system_template_generator(self, context: RagContext, artifacts: list[TextArtifact]) -> str:
    return J2("engines/rag/modules/response/footnote_prompt/system.j2").render(
        text_chunk_artifacts=artifacts,
        references=utils.references_from_artifacts(artifacts),
        before_system_prompt="\n\n".join(context.before_query),
        after_system_prompt="\n\n".join(context.after_query),
    )