Open WebUI only shows URL not image
Hi I've created 2 x containers in proxmox 1 - Open Webui 2 - FastSDCPU
i've followed the documentation to add FastSD CPU to Open WebUI: a - started ./start-mcpserver.sh b - added server to "External Tools" http://server_ip:8000 (connection successful) c - changed "function calling" to "native" d - enabled the Tool selection in the "send a message" field
when i ask for an image to be created, i get the following:
{ "prompt": "a woman with red hair" } "The generated image available at the URL http://localhost:8000/results/c2ff39c3-e7b3-4c01-966b-5634a997061b-1.jpg"
if i browse to that URL but change the "localhost" to the server IP where FastSD CPU is, i can see the image. how do i make it so that the correct Server IP URL is pulled back?
actually... i've found the fix for this. under /fastsdcpu/src/backend/api/mcp_server.py
change the following field:
# url = request.url_for("results", path=image_names[0]) - Claude D>
url = f"http://localhost:{SERVER_PORT}/results/{image_names[0]}"
image_url = f"The generated image available at the URL {url}"
return image_url
to:
url = f"http://{host}:{SERVER_PORT}/results/{image_names[0]}"
this now works internally and pulls the image back.
i'll now work on getting this working externally
Thank you