dodanie
This commit is contained in:
parent
9ebf8d4c2a
commit
ebd23d8fa8
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.venv/
|
||||
.idea/
|
||||
20
main.py
Normal file
20
main.py
Normal file
@ -0,0 +1,20 @@
|
||||
from flask import Flask, request, jsonify
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
# Strona główna
|
||||
@app.route("/")
|
||||
def home():
|
||||
return "AI Pathl Test działa!"
|
||||
|
||||
# Endpoint testowy np. dla promptów AI
|
||||
@app.route("/test", methods=["POST"])
|
||||
def test_ai():
|
||||
data = request.json
|
||||
prompt = data.get("prompt", "")
|
||||
# Na razie tylko echo promptu
|
||||
response = {"response": f"Otrzymałem Twój prompt: {prompt}"}
|
||||
return jsonify(response)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port=6000)
|
||||
Loading…
Reference in New Issue
Block a user