|
from utils import get_current_date, get_websites |
|
|
|
current_date = get_current_date() |
|
websites = get_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 |
|
} |
|
} |