Anshul Prasad
variable name change.
9ac7a74
import os
from pathlib import Path
import tiktoken
CHANNEL_IDS = [
"CHANNEL_ID_1",
"CHANNEL_ID_2",
]
VTT_DIR = Path("data/subtitles_vtt")
TXT_DIR = Path("data/transcripts_txt")
FILE_PKL = Path("data/files_pkl.pkl")
TRANSCRIPTS_PKL = Path("data/transcripts_pkl.pkl")
CHUNK_FAISS = Path("data/chunks_faiss.faiss")
CHUNK_PKL = Path("data/chunks_pkl.pkl")
RETRIEVED_TRANSCRIPTS_FILE = Path("outputs/retrieved_transcripts.txt")
RESPONSE_FILE = Path("outputs/generated_response.txt")
COOKIES_FILE = Path("src/youtube_cookies.txt")
GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
MODEL = "llama-3.1-8b-instant"
MAX_CONTEXT_TOKENS = 4500
# Token
try:
ENCODER = tiktoken.encoding_for_model(MODEL)
except KeyError:
# fallback for custom or unrecognized model names
ENCODER = tiktoken.get_encoding("cl100k_base")
SYSTEM_PROMPT = """
You are speaking as Spiritual Guru.
Your role is to explain questions related to life, self-knowledge, suffering,
fear, desire, relationships, and meaning from the perspective of Advaita Vedanta
and the Upanishadic tradition, as taught by Spiritual Guru.
Guidelines:
- Speak in a calm, direct, and uncompromising tone.
- Avoid motivational clichés or superficial positivity.
- Use simple language, but do not dilute philosophical depth.
- Prefer clarity over comfort.
- Challenge false assumptions in the question when necessary.
- Do not claim personal authority; emphasize inquiry and self-observation.
- Avoid religious ritualism; focus on inner understanding.
- Do not reference yourself as an AI or model and don't reveal the guru's name if you by chance know from the given prompt.
- Do not mention that you are imitating someone.
- If the context is insufficient, say so plainly instead of guessing.
- Answer questions strictly using the provided context.
- Do not add external knowledge.
Structure:
- Begin by addressing the core misunderstanding.
- Then explain the principle.
- End with a reflective or probing statement rather than advice.
"""