[Bug]: Auto Prompt Tuning - Graphrag mode error: could not resolve response
Do you need to file an issue?
- [x] I have searched the existing issues and this bug is not already filed.
- [x] My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
- [x] I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.
Describe the bug
When I directly run "graphrag" or "python -m graphrag prompt-tune" in the terminal, an error occurs.
graphrag prompt-tune --config settings.yaml --selection-method all --no-discover-entity-types
I can be certain that there is nothing wrong with my configuration. The reason is that I was able to run successfully by using the command poetry run poe prompt_tune.
AssertionError: could not resolve response (should never happen)
I attempted to replace the api_base with the local address for monitoring, but found that no requests were sent.
The program has been running normally using the poetry method.
Steps to reproduce
No response
Expected Behavior
No response
GraphRAG Config Used
# Paste your config here
Logs and screenshots
No response
Additional Information
- GraphRAG Version: 2.2.1
- Operating System: Mac OS M
- Python Version: python3.12
- Related Issues:
I'm running into the same bug with prompt-tune. Even with the example text and running graphrag prompt-tune --root ./ragtest --config ./ragtest/settings.yaml ends in the same error.
This is the full traceback from the error: output_prompt-tune.txt
I'm trying with below command but same error with prompt-tune:
python -m graphrag prompt-tune --root ./ragtest --logger rich --selection-method random
same problem
I got the same error
experiencing same issue
I think it's the problem with openai version.
I had the same issue when using openai==1.78.1, I downgraded it to 1.73.0 and it works for me. Hope it helps.
same problem but hienpham15's method has solved this error thank you
same problem but hienpham15's method has solved this error thank you @hienpham15
Same issue for me on openai=1.78.1. Downgrading to 1.73 fixed it.