microsoft / promptflow

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

Fix Serialize Iterator for chat history in Interactive and Extension #3725

Closed khoangothe closed 1 month ago

khoangothe commented 2 months ago

Description

Reopen (#3662 ) since the error still persists when I check. See #3645
The output of type IteratorProxy needs to be resolved for string to be put in history (I followed print_chat_output check). When I added this check --interactive can now see history normally.

All Promptflow Contribution checklist:

General Guidelines and Best Practices

Testing Guidelines

khoangothe commented 2 months ago

Appreciate if reviews, feedbacks or further investigations are needed for this bugs

github-actions[bot] commented 2 months ago

Hi, thank you for your interest in helping to improve the prompt flow experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment.

github-actions[bot] commented 1 month ago

Hi, thank you for your contribution. Since there has not been recent engagement, we are going to close this out. Feel free to reopen if you'd like to continue working on these changes. Please be sure to remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

21-10-4 commented 1 month ago
(reflextion) .... $ pf flow test --flow new-chat-flow-created-at-2024-10-11  --interactive
Prompt flow service has started...
==========================================================
Welcome to chat flow, new_chat_flow_created_at_2024_10_11.
Press Enter to send your message.
You can quit with ctrl+C.
==========================================================
User: 你好
You can view the trace detail from the following URL:
http://127.0.0.1:23333/v1.0/ui/traces/?#collection=new-chat-flow-created-at-2024-10-11&uiTraceId=0x6581a1fbfa1b7b7936179c06571e8a0f
Bot: 你好,很高兴与你交流。今天有什么想和我分享的事情吗?
User: 我总是觉得非常孤单
You can view the trace detail from the following URL:
http://127.0.0.1:23333/v1.0/ui/traces/?#collection=new-chat-flow-created-at-2024-10-11&uiTraceId=0xcf3def115f54b5cb2bc84bce18a0a96f
Bot: 能够感受到孤单的感觉是很重要的,能否分享一下你在什么情况下最常感到孤单呢?
User:  我没有朋友,我好希望分享生活中的小事情,但找不到人
You can view the trace detail from the following URL:
http://127.0.0.1:23333/v1.0/ui/traces/?#collection=new-chat-flow-created-at-2024-10-11&uiTraceId=0x4eaaab767f56c259b2f8cdcbf498b5d8
Bot: 能理解你的感受,孤独感确实很难忍受。你能说说在期望与别人分享时,有哪些具体的事情让你感到特别渴望吗?
User:  我很想找人一起逛公园,鼓起勇气问了几个人,但她们都拒绝了我
You can view the trace detail from the following URL:
http://127.0.0.1:23333/v1.0/ui/traces/?#collection=new-chat-flow-created-at-2024-10-11&uiTraceId=0x308ef0dbd1e6d7185428705cc509d394
Bot: <promptflow.tracing._trace.TracedIterator object at 0x7f525af1fdc0>
User:

error still appears: <promptflow.tracing._trace.TracedIterator object at 0x7f525af1fdc0>. my code environment: image