GianJSX commited on
Commit
fcf9453
1 Parent(s): e3fe6c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -58,7 +58,7 @@ def handle_vision_call(msg, image_history):
58
  image_history.clear()
59
  return stream
60
 
61
- @traceable(run_type="llm", name="gpt 4 turbo call")
62
  async def gpt_call(message_history: list = []):
63
  client = OpenAI()
64
 
@@ -70,7 +70,7 @@ async def gpt_call(message_history: list = []):
70
 
71
  return stream
72
 
73
-
74
  def gpt_vision_call(image_history: list = []):
75
  client = OpenAI()
76
 
@@ -92,6 +92,7 @@ def start_chat():
92
  cl.user_session.set("image_history", [{"role": "system", "content": "You are a helpful assistant."}])
93
 
94
  @cl.on_message
 
95
  async def on_message(msg: cl.Message):
96
  message_history = cl.user_session.get("message_history")
97
  image_history = cl.user_session.get("image_history")
 
58
  image_history.clear()
59
  return stream
60
 
61
+ @traceable(run_type="llm", name="gpt 3 turbo call")
62
  async def gpt_call(message_history: list = []):
63
  client = OpenAI()
64
 
 
70
 
71
  return stream
72
 
73
+ @traceable(run_type="llm", name="gpt 4 turbo vision call")
74
  def gpt_vision_call(image_history: list = []):
75
  client = OpenAI()
76
 
 
92
  cl.user_session.set("image_history", [{"role": "system", "content": "You are a helpful assistant."}])
93
 
94
  @cl.on_message
95
+ @traceable(run_type="chain", name="message")
96
  async def on_message(msg: cl.Message):
97
  message_history = cl.user_session.get("message_history")
98
  image_history = cl.user_session.get("image_history")