Spaces:
Running
Running
Removed StreamlitCallbackHandler - not needed yet
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import streamlit as st
|
|
2 |
from openai import OpenAI
|
3 |
import os
|
4 |
import sys
|
5 |
-
from langchain.callbacks import StreamlitCallbackHandler
|
6 |
from dotenv import load_dotenv, dotenv_values
|
7 |
load_dotenv()
|
8 |
|
@@ -132,8 +131,6 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
|
|
132 |
|
133 |
# Display assistant response in chat message container
|
134 |
with st.chat_message("assistant"):
|
135 |
-
st_callback = StreamlitCallbackHandler(st.container())
|
136 |
-
|
137 |
stream = client.chat.completions.create(
|
138 |
model=model_links[selected_model],
|
139 |
messages=[
|
|
|
2 |
from openai import OpenAI
|
3 |
import os
|
4 |
import sys
|
|
|
5 |
from dotenv import load_dotenv, dotenv_values
|
6 |
load_dotenv()
|
7 |
|
|
|
131 |
|
132 |
# Display assistant response in chat message container
|
133 |
with st.chat_message("assistant"):
|
|
|
|
|
134 |
stream = client.chat.completions.create(
|
135 |
model=model_links[selected_model],
|
136 |
messages=[
|