Open Omcodes23 opened 7 months ago
okay, but you better take your token outta there becuause someone could hack into your account, BlazeX (for example i can impersonate you when for example you're talking to Taffy, and yes i just did that to scare you to not do it gain, there are people you will do something far worse) and instead of just pasting your code in, wrap in in ```, so it will look like this:
if idiot:
print("idiot")
from flask import Flask, jsonify, request from characterai import PyCAI
app = Flask(name)
@app.route('/', methods=['GET', 'POST']) def home(): if request.method == 'GET': data = "hello world" return jsonify({'data': data})
@app.route('/chat/', methods=['GET'])
def disp(msg):
token = '34f5788ba1f0cfcb8b8f03437c732bad6e0abd2a'
client = PyCAI(token)
print()
@app.route('/chat', methods=['POST']) def chat(): if request.method == 'POST' and 'msg' in request.json: msg = request.json['msg'] token = "34f5788ba1f0cfcb8b8f03437c732bad6e0abd2a" client = PyCAI(token)
if name == 'main': app.run(debug=False,host='0.0.0.0')
?????????????????????????????????????????????????????? this code works fine on local machine but not working in the browser or any hosting service can you please tell me what's the error