Spaces:
Runtime error
Runtime error
from generator.prompt_builder_all import build_prompt as build_prompt_all | |
def build_prompt_all(query, law_docs, exam_docs): | |
# law_docs / exam_docs: list of reranked document strings | |
law_str = "\n\n".join(law_docs) | |
exam_str = "\n\n".join(exam_docs) | |
system_msg = "λΉμ μ 곡μΈμ€κ°μ¬ μν λ¬Έμ μΆμ μ λ¬Έκ°μ λλ€." | |
guidance = "μλλ κ΄λ ¨ λ²λ Ήκ³Ό κΈ°μΆλ¬Έμ μ λλ€:\n" | |
prompt = f"""{system_msg}\n\n{guidance} | |
[λ²λ Ή μ 보] | |
{law_str} | |
[κΈ°μΆλ¬Έμ μ 보] | |
{exam_str} | |
[μ§λ¬Έ] | |
{query} | |
[μ§μμ¬ν] | |
- μ ννκ³ λͺ ννκ² λ΅λ³νμΈμ.""" | |
return prompt | |