add a AI chatbot, rename course names
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user