-
Notifications
You must be signed in to change notification settings - Fork 905
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] Promptflow Error unsupported operand type(s) for +: 'dict' and 'dict #3896
Comments
@DrGriff hi! Do you use images in prompt? I have the same issue with same setup as you, but it seems like promptflow is failing due to error you mentioned only when image is in the prompt. I've tried default LLM with vision tool (in preview), it also cause flow to fail (I have custom python tool that calls Open AI). However when promptflow is composed with only text LLMs tools (no images), error is not observed (even when such tools are chained). |
No, I don't use images in prompts. |
I have the same bug, but in my case this error happens randomly, or I don't found any pattern, I cover in a try except block where makes a retry. |
It's happening consistently, but only in the manner I describe. So if I make one call via the Client then it succeeds. But a second call, even with a brand new client, results in failure. Tip: I'm making the call to my LLM within a Python block, so have been able to solve this by not using the SDK client and instead call the LLM via an HTTP call and handle the JSON response directly. |
It is happening while using Azure OpenAI API in my case. When I use local models via LLM studio this issue is not present. Code has not been changed, but we built new images. After investigation this is related to number of tokens calculation:
parent_value and token_value sometimes are not integers. |
#3751 has discussion and recommendations for the same thing |
Upgrading all promptflow packages to the Jan 6th release, promptflow 1.17.0, fixed the issue for me. The fix is in the release notes. |
The issue with 1.17 is marshmallow which needs to be fixed to the 3.22.0 |
Upgrading to |
Describe the bug
I am using Prompt Flow (in VS Code and Azure) and am getting an issue where my call to the
AzureOpenAI
client results in an error when calling myclient.chat.completions.create(....)
. The error is:How To Reproduce the bug
The error occurs third step
client.chat.completions.create(...)
methodclient.chat.completions.create(...)
method again and it returns the following:I followed the advice given in:
Expected behavior
This was working perfectly on 2024-12-22 and has since stopped working with no changes to my code. The expected behaviour is that this should still be working. Based on the link given above, it's affecting a lot of people!
Screenshots
I think the above explanation gives everything you need.
Running Information(please complete the following information):
pf -v gives:
But I did down-grade this iteratively to 1.15.0 and still the problem exists.
Operating System when running in VS Code is Windows 10.
Python 3.12.2
Additional context
Like others, I'm dead in the water until this is fixed.
The text was updated successfully, but these errors were encountered: