Spaces:
Sleeping
Sleeping
HEADER_MD = """# π¬ BaseChat: Chat with Base LLMs with URIAL | |
[π Paper](https://arxiv.org/abs/2312.01552) | [π Website](https://allenai.github.io/re-align/) | [π» GitHub](https://github.com/Re-Align/urial) | π Contact: [Yuchen Lin](https://yuchenlin.xyz/) | |
**Talk with __BASE__ LLMs which are not fine-tuned at all. The used URIAL prompt is [here](https://github.com/Re-Align/URIAL/blob/main/urial_prompts/inst_1k_v4.help.txt.md).** | |
""" | |
js_code_label = """ | |
function addApiKeyLink() { | |
// Select the div with id 'api_key' | |
const apiKeyDiv = document.getElementById('api_key'); | |
// Find the span within that div with data-testid 'block-info' | |
const blockInfoSpan = apiKeyDiv.querySelector('span[data-testid="block-info"]'); | |
// Create the new link element | |
const newLink = document.createElement('a'); | |
newLink.href = 'https://api.together.ai/settings/api-keys'; | |
newLink.textContent = ' View your keys here.'; | |
newLink.target = '_blank'; // Open link in new tab | |
newLink.style = 'color: #007bff; text-decoration: underline;'; | |
// Create the additional text | |
const additionalText = document.createTextNode(' (new account will have free credits to use.)'); | |
// Append the link and additional text to the span | |
if (blockInfoSpan) { | |
// add a br | |
apiKeyDiv.appendChild(document.createElement('br')); | |
apiKeyDiv.appendChild(newLink); | |
apiKeyDiv.appendChild(additionalText); | |
} else { | |
console.error('Span with data-testid "block-info" not found'); | |
} | |
} | |
""" | |