Yangong
commited on
Commit
·
18f8b2c
1
Parent(s):
9d65a16
fix: remove useless test code (#3122)
Browse files### What problem does this PR solve?
remove useless test code
### Type of change
- [X] Refactoring
- api/apps/conversation_app.py +0 -3
- api/apps/sdk/session.py +0 -3
api/apps/conversation_app.py
CHANGED
@@ -141,9 +141,6 @@ def list_convsersation():
|
|
141 |
@validate_request("conversation_id", "messages")
|
142 |
def completion():
|
143 |
req = request.json
|
144 |
-
# req = {"conversation_id": "9aaaca4c11d311efa461fa163e197198", "messages": [
|
145 |
-
# {"role": "user", "content": "上海有吗?"}
|
146 |
-
# ]}
|
147 |
msg = []
|
148 |
for m in req["messages"]:
|
149 |
if m["role"] == "system":
|
|
|
141 |
@validate_request("conversation_id", "messages")
|
142 |
def completion():
|
143 |
req = request.json
|
|
|
|
|
|
|
144 |
msg = []
|
145 |
for m in req["messages"]:
|
146 |
if m["role"] == "system":
|
api/apps/sdk/session.py
CHANGED
@@ -76,9 +76,6 @@ def update(tenant_id,chat_id,session_id):
|
|
76 |
@token_required
|
77 |
def completion(tenant_id,chat_id):
|
78 |
req = request.json
|
79 |
-
# req = {"conversation_id": "9aaaca4c11d311efa461fa163e197198", "messages": [
|
80 |
-
# {"role": "user", "content": "上海有吗?"}
|
81 |
-
# ]}
|
82 |
if not req.get("session_id"):
|
83 |
conv = {
|
84 |
"id": get_uuid(),
|
|
|
76 |
@token_required
|
77 |
def completion(tenant_id,chat_id):
|
78 |
req = request.json
|
|
|
|
|
|
|
79 |
if not req.get("session_id"):
|
80 |
conv = {
|
81 |
"id": get_uuid(),
|