neo_jimmy / src /parameters.py
MilanM's picture
Update src/parameters.py
b6ea4c2 verified
raw
history blame
1.08 kB
import os
model_id = str(os.getenv("MODEL_ID")) or "meta-llama/llama-3-2-90b-vision-instruct"
wx_api_key = str(os.getenv("WX_API_KEY"))
wx_project_id = str(os.getenv("WX_PROJECT_ID"))
wx_url = str(os.getenv("WX_URL")) or "https://eu-de.ml.cloud.ibm.com"
system_prompt = str(os.getenv("SYSTEM_PROMPT")) or ""
params = {
"temperature": float(os.getenv("TEMPERATURE")) or 0.7,
"max_tokens": int(os.getenv("MAX_TOKENS")) or 4096,
"top_p": float(os.getenv("TOP_P")) or 1.0,
"stop": (
str(os.getenv("STOP_SEQUENCES")).split(",")
if os.getenv("STOP_SEQUENCES")
else ["</s>", "<|end_of_text|>", "<|endoftext|>"]
),
# "frequency_penalty": os.getenv("FREQUENCY_PENALTY") or 0.5,
# "presence_penalty": os.getenv("PRESENCE_PENALTY") or 0.3,
}
display_chat_history = bool(os.getenv("DISPLAY_CHAT_HISTORY")) or True
stream_outputs = bool(os.getenv("STREAM_OUTPUTS")) or True
app_password = str(os.getenv("APP_PASSWORD",""))
info_tag = str(os.getenv("INFO_TAG", "App skeleton designed and developed by Milan Mrdenovic © IBM Norway 2025"))