Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RenatoSGR opened this issue May 15, 2024 · 8 comments
Open

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

RenatoSGR opened this issue May 15, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@RenatoSGR
Copy link

RenatoSGR commented May 15, 2024

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.

@RenatoSGR RenatoSGR added the bug Something isn't working label May 15, 2024
@brynn-code brynn-code changed the title [BUG] [BUG] Serving UI doesn't return flow result May 16, 2024
@brynn-code
Copy link
Contributor

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
Copy link
Author

RenatoSGR commented May 21, 2024

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
Copy link
Contributor

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

@brynn-code
Copy link
Contributor

Update: we have reproduced the bug, investigating.,

@RenatoSGR
Copy link
Author

RenatoSGR commented May 21, 2024

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
Copy link
Contributor

@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
Copy link
Author

Hi @brynn-code it works like you said.

For now this will unblock me for sure.

Thanks

brynn-code added a commit that referenced this issue May 24, 2024
…work (#3333)

# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.
Reason: Flow name was calculated with relative path which could be empty
string in the build scenario and then caused chat UI can't show the
result.
Related: #3279 
Should be included in promptflow 1.12.0

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.

---------

Signed-off-by: Brynn Yin <biyi@microsoft.com>
@brynn-code
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants