DevsDoCode commited on
Commit
16034c0
·
verified ·
1 Parent(s): 9d8d47a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -30,8 +30,10 @@ def generate():
30
  temperature = float(request.args.get('temperature', 0.7)) # Optional parameter with default value
31
 
32
  if query:
33
- # response = openrouter.generate(query, model=model, system_prompt=system_prompt, temperature=temperature, max_tokens=max_tokens)
34
- return jsonify([{'response': "DEMO API IS OFFLINE. CONTACT `DEVS DO CODE`"}, {'developer_info': api_info.developer_info}]), 200
 
 
35
 
36
  else:
37
  return jsonify(api_info.error_message), 400
 
30
  temperature = float(request.args.get('temperature', 0.7)) # Optional parameter with default value
31
 
32
  if query:
33
+ response = openrouter.generate(query, model=model, system_prompt=system_prompt, temperature=temperature, max_tokens=max_tokens)
34
+ return jsonify([{'response': response}, {'developer_info': api_info.developer_info}]), 200
35
+
36
+ # return jsonify([{'response': "DEMO API IS OFFLINE. CONTACT `DEVS DO CODE`"}, {'developer_info': api_info.developer_info}]), 200
37
 
38
  else:
39
  return jsonify(api_info.error_message), 400