Spaces:
Running
Running
refactor: remove explicit output definition and update chat return type hint
Browse files
app.py
CHANGED
|
@@ -13,8 +13,8 @@ client = OpenAI(
|
|
| 13 |
}
|
| 14 |
)
|
| 15 |
|
| 16 |
-
@app.api(
|
| 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 |
|