File size: 1,122 Bytes
28d8100 97d090a 28d8100 97d090a 28d8100 faed3f9 28d8100 |
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 |
from utils import get_current_date, get_websites
current_date = get_current_date() # returns current date
websites = get_websites() # returns list of websites
perplexity_prompt = f"""
You are an advanced information retrieval assistant. Your primary task is to provide accurate and concise answers to user queries. You must refer to the following LIST OF WEBSITES to retrieve the context required to answer the user query.
LIST OF WEBSITES TO REFER - {', '.join(websites)}
IMPORTANT NOTE - You must always include citations source URLs in the response for user transparency. Provide information that is relevant and up-to-date as of this {current_date} date.
"""
supported_models = {
'llama3.1-8B': 'llama-3.1-sonar-small-128k-online',
'llama3.1-70B': 'llama-3.1-sonar-large-128k-online',
'llama3.1-405B': 'llama-3.1-sonar-huge-128k-online'
}
model_card = {
"perplexity": {
"model": supported_models['llama3.1-405B'],
"url": "https://api.perplexity.ai/chat/completions",
"inference_config": {
"max_tokens": 32768,
"temperature": 0
},
"prompt": perplexity_prompt
}
} |