ZekeWang commited on
Commit
054e266
·
verified ·
1 Parent(s): b7f197f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,7 +41,7 @@ def generate_response():
41
  messages = messages[1:]
42
 
43
  payload = json.dumps({
44
- 'model': 'NBG-plus',
45
  'messages': messages,
46
  'max_tokens': 4096,
47
  'temperature': 0.7,
@@ -65,7 +65,7 @@ def stream_response(resp):
65
  if len(line) == 0:
66
  continue
67
  r = json.loads(line[6:])
68
- content = r['modelServerData']['choices'][0]['delta']['content']
69
  yield content[last_length:]
70
  last_length = len(content)
71
 
 
41
  messages = messages[1:]
42
 
43
  payload = json.dumps({
44
+ 'model': 'nanbeige2-turbo-0611',
45
  'messages': messages,
46
  'max_tokens': 4096,
47
  'temperature': 0.7,
 
65
  if len(line) == 0:
66
  continue
67
  r = json.loads(line[6:])
68
+ content = r['choices'][0]['delta']['content']
69
  yield content[last_length:]
70
  last_length = len(content)
71