Spaces:
Runtime error
Runtime error
File size: 690 Bytes
6ee47c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from typing import List
class Prompt:
def get_prompt(self, message:str, info_list: List) -> str:
prompt = f"As a user, I want to ask you the following legal question:\n{message}\n\n"
if info_list:
prompt += "Here are some relevant legal cases and information you should consider:\n"
for i, info in enumerate(info_list):
prompt += f"case {i+1}:\n{info['title']}\n{info['text']}\n"
prompt += "\nBased on the provided information, please respond in Persian(Farsi) with a concise legal analysis.\
Ensure that your response is as summarized and clear as possible. (one paragraph)"
return prompt |