from fastapi import FastAPI, HTTPException from pydantic import BaseModel import openai import os # Initialize FastAPI app app = FastAPI() # Set your OpenAI API key openai.api_key = os.getenv("OPENAI_API_KEY") class ChatRequest(BaseModel): message: str user_id: str @app.post("/chat") async def chat_with_bot(request: ChatRequest): try: response = openai.ChatCompletion.create( model="gpt-4", messages=[{"role": "user", "content": request.message}] ) reply = response["choices"][0]["message"]["content"] return {"response": reply} except Exception as e: raise HTTPException(status_code=500, detail=str(e))
top of page

school massage therapist Avaible

Oct 1, 2023

Amom student clinic LMT available to book

Amom student clinic LMT available to book .

we open Saturday to book !

bottom of page