microsoft / promptflow

Build high-quality LLM apps - from prototyping, testing to production deployment and monitoring.
https://microsoft.github.io/promptflow/
MIT License
8.43k stars 725 forks source link

[BUG] Serving UI doesn't return flow result #3279

Open RenatoSGR opened 2 weeks ago

RenatoSGR commented 2 weeks ago

Describe the bug When running a docker container with the current version of promptflow, the flow is running well, but the frontend app created by the promptflow not showing any answer. The docker container logs are showing the correct flow and answer, but not the frontend.

I needed to use this commit version of promptflow for indez.js and index.html to see everything working properly:

How To Reproduce the bug Steps to reproduce the behavior, how frequent can you experience the bug:

  1. index.js -> https://raw.githubusercontent.com/microsoft/promptflow/ffa78b411ccedd42e95bb412d2d2e83afa6addc0/src/promptflow/promptflow/_sdk/_serving/static/index.js
  2. index.html -> https://raw.githubusercontent.com/microsoft/promptflow/ffa78b411ccedd42e95bb412d2d2e83afa6addc0/src/promptflow/promptflow/_sdk/_serving/static/index.html

Expected behavior Frontend app working properly and showing the question and answer of the promptflow

Screenshots

image image image

Additional context As I said, if I run the old version of index.js and index.html, it works smoothly without this issue.

brynn-code commented 1 week ago

Hi @RenatoSGR, thanks for reaching us, could you please provide the promptflow version you are using? We tried with latest promptflow package seems it works well. image

RenatoSGR commented 1 week ago

Hi @brynn-code this is my versions:

pf --version { "promptflow": "1.10.1", "promptflow-core": "1.10.1", "promptflow-devkit": "1.10.1", "promptflow-tracing": "1.10.1" }

Some colleagues also facing the same issue when inside of a container. It anwser on the logs, but not on the frontend like yours.

That behavior that you're showing, I can replicate but running locally without a container.

The Dockerfile generated by promptflow extension:

FROM docker.io/continuumio/miniconda3:latest

WORKDIR /

COPY ./flow/requirements.txt /flow/requirements.txt

RUN apt-get update && apt-get install -y runit gcc

RUN conda create -n promptflow-serve python=3.9.16 pip=23.0.1 -q -y && \ conda run -n promptflow-serve \ pip install -r /flow/requirements.txt && \ conda run -n promptflow-serve pip install keyrings.alt && \ conda run -n promptflow-serve pip install gunicorn==20.1.0 && \ conda run -n promptflow-serve pip install 'uvicorn>=0.27.0,<1.0.0' && \ conda run -n promptflow-serve pip cache purge && \ conda clean -a -y

COPY ./flow /flow

EXPOSE 8080

COPY ./connections/* /connections/

RUN rm -rf /var/runit COPY ./runit /var/runit

RUN chmod -R +x /var/runit COPY ./start.sh / CMD ["bash", "./start.sh"]


brynn-code commented 1 week ago

Got it, so the point is container, we will try to repro it.

brynn-code commented 1 week ago

Update: we have reproduced the bug, investigating.,

RenatoSGR commented 1 week ago

Thanks, keep in mind my first comment where I provide the working index.js and index.html (from a previous commit, with less features like + new chat on the left pane)

brynn-code commented 1 week ago

@RenatoSGR Hi, we are fixing this issue, but we find a workaround for this issue, maybe you could have a try to see if this can unblock you:

  1. Click the + New chat before send the input message
  2. Send the message.
RenatoSGR commented 1 week ago

Hi @brynn-code it works like you said.

For now this will unblock me for sure.

Thanks

brynn-code commented 1 week ago

Hi, the fix of this bug has been merged, it will be included in the promptflow 1.12.0.