forked from phoenix-oss/llama-stack-mirror
fix security update
This commit is contained in:
parent
8943b283e9
commit
b174effe05
14 changed files with 45 additions and 41 deletions
|
@ -6,12 +6,12 @@
|
|||
|
||||
import streamlit as st
|
||||
|
||||
from llama_stack.distribution.ui.modules.api import llama_stack_api
|
||||
from llama_stack.distribution.ui.modules.api import LlamaStackApi
|
||||
|
||||
# Sidebar configurations
|
||||
with st.sidebar:
|
||||
st.header("Configuration")
|
||||
available_models = llama_stack_api.client.models.list()
|
||||
available_models = LlamaStackApi().client.models.list()
|
||||
available_models = [model.identifier for model in available_models if model.model_type == "llm"]
|
||||
selected_model = st.selectbox(
|
||||
"Choose a model",
|
||||
|
@ -103,7 +103,7 @@ if prompt := st.chat_input("Example: What is Llama Stack?"):
|
|||
else:
|
||||
strategy = {"type": "greedy"}
|
||||
|
||||
response = llama_stack_api.client.inference.chat_completion(
|
||||
response = LlamaStackApi().client.inference.chat_completion(
|
||||
messages=[
|
||||
{"role": "system", "content": system_prompt},
|
||||
{"role": "user", "content": prompt},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue