add a AI chatbot, rename course names

This commit is contained in:
BuffTechTalk
2025-01-10 14:29:06 -06:00
parent 9a28b3eaba
commit ab0e64777e
30 changed files with 430 additions and 76 deletions

View File

@@ -15,14 +15,14 @@ st.markdown("<h1 style='text-align: center; color: #451002;'>BuffBot🦬</h1>",
# st.subheader()
st.info("Powered by llama3.2:1b model via [Ollama](https://ollama.com/library/llama3.2:1b)!")
with st.expander("See Source Code"):
with open(__file__, "r") as f:
st.code(f.read(), language="python")
with open(__file__, "r") as f:
st.code(f.read(), language="python")
# Load API credentials from config.json
with open('chatbot_config.json') as config_file:
with open('app_config.json') as config_file:
config = json.load(config_file)
api_base_url = config["ollama_api_url"]
api_key = config["ollama_api_key"]
api_base_url = config["ollama"]["api_url"]
api_key = config["ollama"]["api_key"]
client = OpenAI(api_key=api_key, base_url=api_base_url)