File size: 839 Bytes
8d924c8 |
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 |
from langchain.prompts import PromptTemplate
def prompt_sector(position: str, prompts: classmethod) -> dict:
""" Select the prompt template based on the position """
if position == 'Data Analyst':
PROMPT = PromptTemplate(
template= prompts.da_template, input_variables=["context", "question"]
)
chain_type_kwargs = {"prompt": PROMPT}
if position == 'Software Engineer':
PROMPT = PromptTemplate(
template= prompts.swe_template, input_variables=["context", "question"]
)
chain_type_kwargs = {"prompt": PROMPT}
if position == 'Marketing':
PROMPT = PromptTemplate(
template= prompts.marketing_template, input_variables=["context", "question"]
)
chain_type_kwargs = {"prompt": PROMPT}
return chain_type_kwargs
|