Spaces:
Sleeping
Sleeping
File size: 1,327 Bytes
6ca5c7d 3bd58b6 6ca5c7d 1c6f413 6ca5c7d 1c6f413 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
def context_former():
return """
Below is a snippet of one or several meeting transcripts that center around the question of interest. Write a response that appropriately completes the request.
- Utilize transcript(s) for detailed information.
- Stick to transcript and do not incorporate preexisting knowledge to enhance response.
- State reasoning behind your decisions.
### Transcript:
{}
"""
def format_prompt(user_query, context):
prompt = [
{"role": "system", "content": context_former().format(context)},
{"role": "user", "content": user_query},
]
return prompt
def prompt_template_alpaca():
return """Below is a query about a meeting and a snippet of a meeting transcript. Write a response that appropriately completes the request.
- Utilize transcript for detailed information.
- Stick to transcript and do not incorporate preexisting knowledge to enhance response.
- State reasoning behind your decisions.
### Query:
{}
### Transcript:
{}
### Response:
{}"""
def format_prompt_alpaca(user_query, context):
prompt = prompt_template().format(user_query, context, "")
return prompt
|