akhaliq HF Staff commited on
Commit
fa1dfe4
·
1 Parent(s): 621875e

refactor: remove explicit output definition and update chat return type hint

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,8 +13,8 @@ client = OpenAI(
13
  }
14
  )
15
 
16
- @app.api(outputs=["text"])
17
- def chat(message: str, history_json: list):
18
  # history_json should be a list of dictionaries like [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]
19
  messages = history_json + [{"role": "user", "content": message}]
20
 
 
13
  }
14
  )
15
 
16
+ @app.api()
17
+ def chat(message: str, history_json: list) -> str:
18
  # history_json should be a list of dictionaries like [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]
19
  messages = history_json + [{"role": "user", "content": message}]
20