microsoft / promptflow

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

fix: improve merge token logic to account for nested dicts #3825

Open darrelhong opened 1 month ago

darrelhong commented 1 month ago

Description

This PR fixes #3806 as it appears the the tokens object may contain nested objects. Added a function to handle merging nested dicts

All Promptflow Contribution checklist:

General Guidelines and Best Practices

Testing Guidelines

darrelhong commented 1 month ago

@microsoft-github-policy-service agree

chanedwin commented 2 weeks ago

this might solve issues - https://github.com/microsoft/promptflow/issues/3834 and https://github.com/microsoft/promptflow/issues/3806 facing this issue as well

2024-11-03 21:55:24 +0800   30919 execution          ERROR    1/1 flow run failed, indexes: [0], exception of index 0: Execution failure in 'generate_creative_rewrites': (TypeError) unsupported operand type(s) for +: 'dict' and 'dict'

using promptflow==1.16.1 and openai ==1.44.1

github-actions[bot] commented 5 days 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 4 days ago

SDK CLI Global Config Test Result fix/merge-tokens

0 tests   0 ✅  0s ⏱️ 0 suites  0 💤 0 files    0 ❌

Results for commit 8727276e.

github-actions[bot] commented 4 days ago

Executor E2E Test Result fix/merge-tokens

0 tests   0 ✅  0s ⏱️ 0 suites  0 💤 0 files    0 ❌

Results for commit 8727276e.

github-actions[bot] commented 4 days ago

Executor Unit Test Result fix/merge-tokens

0 tests   0 ✅  0s ⏱️ 0 suites  0 💤 0 files    0 ❌

Results for commit 8727276e.