softchris-patch-4
chris 1 week ago
parent 07cdbf1979
commit af31aeecc3

@ -1,3 +1,7 @@
# Chat project
Shows how to use AI
This chat project shows how to build a Chat Assistant using GitHub Models.
Here's what the finished project looks like:
![Chat app](./assets/screenshot.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

@ -5,15 +5,19 @@ from llm import call_llm
from flask_cors import CORS
app = Flask(__name__)
CORS(app)
CORS(app) # * example.com
@app.route("/", methods=["GET"])
def index():
return "Welcome to the Chat API!"
return "Welcome to this lesson"
@app.route("/test", methods=["GET"])
def test():
return "Test"
@app.route("/hello", methods=["POST"])
def hello():
# get message from request body
# get message from request body { "message": "do this taks for me" }
data = request.get_json()
message = data.get("message", "")

@ -12,7 +12,7 @@
<div style="display:flex;align-items:center;gap:12px;">
<div class="logo">🤖</div>
<div>
<h1>Stellar AI Chat</h1>
<h1>My company</h1>
<p class="subtitle">Dark-mode chat UI — powered by the backend AI</p>
</div>
</div>

Loading…
Cancel
Save