uncloseai.com/src/config.js
Russell Ballestrini 17e3883bff fix(translation): correct syntax and logic in translation modal
- Reverted the broken openTranslateModal function to a working state.
- Re-implemented the logic to correctly inject the <base> tag for relative paths and to ensure the translation notice is displayed correctly.
- Ran biome to format the code and ensure there are no syntax errors.
2025-07-01 18:23:02 -04:00

40 lines
1.8 KiB
JavaScript

// Configuration and endpoints for uncloseai.js
export const TTS_API_URL = "https://speech.ai.unturf.com/v1/audio/speech";
export const MEGAPARCE_API_URL = "https://megaparce.ai.unturf.com/v1/file";
export const API_KEY = "dummy-api-key";
export const MODEL = "adamo1139/Hermes-3-Llama-3.1-8B-FP8-Dynamic"; // default model (always available)
// System message configuration - implementors can customize this
export const SYSTEM_MESSAGE_BASE =
"You are Hermes, a large language model from Nous Research, embedded as an AI assistant on this webpage. Your primary task is to help users understand and interact with the content of this specific page, while also being capable of assisting with any other topics, coding, creative tasks, or questions they may have. You should be conversational, helpful, and knowledgeable about the webpage content as well as general topics. Always strive to provide accurate, useful responses.";
// Optional additional system message content - can be set by implementor
export let SYSTEM_MESSAGE_APPEND = "";
// Function to set additional system message content
export function setSystemMessageAppend(appendText) {
SYSTEM_MESSAGE_APPEND = appendText;
}
// Function to get the complete system message
export function getSystemMessage() {
return SYSTEM_MESSAGE_APPEND
? `${SYSTEM_MESSAGE_BASE}\n\n${SYSTEM_MESSAGE_APPEND}`
: SYSTEM_MESSAGE_BASE;
}
// Dynamic Endpoints Configuration for Chat API
export const VLLM_ENDPOINTS = [
{ id: "hermes.ai.unturf.com", url: "https://hermes.ai.unturf.com/v1" },
{ id: "hermes2.ai.unturf.com", url: "https://hermes2.ai.unturf.com/v1" },
];
// Global state
export let lastTTSInput = "";
export let lastTTSResult = null;
export function setLastTTS(input, result) {
lastTTSInput = input;
lastTTSResult = result;
}