-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Power BI Dataset Agent Issue #4325
Comments
Hi, Received response from @xiangyan99 in forum azure-sdk-for-python that bug in langchain: https://github.com/hwchase17/langchain/blob/master/langchain/utilities/powerbi.py TokenCredential is only defined in TYPE_CHECKING. |
Having the same issue. |
in utilities>powerbi.py Request the team to look into it |
Also having this issue - not sure if there is/should be a separate integ test for the powerbi tool |
@satishgunjal I opened a PR for this that should resolve this issue. In addition to the TYPE_CHECKING issue, the notebook code should be using
|
Hi ! ConfigError: field "credential" not yet prepared so type is still a ForwardRef, you might need to call PowerBIDataset.update_forward_refs(). It seems like the issue was resolved by i still have it on my side. |
It looks like parts of this change were reverted back in an update #5062
@hwchase17, is there a way to handle the import in a different way? My initial fix in #4983 used a try-except instead, since azure is not a required dependency. It looks like the type checking condition breaks the powerbi tool with the error mentioned by @JRlis |
Hi! We are still facing this issue. Do we have any updates/fixes/bypasses about it? |
Hi, this issue is still happening:
|
Here is the code to solve this issue !pip install powerbiclient from powerbiclient.authentication import DeviceCodeLoginAuthentication llm = AzureOpenAI(temperature=0, deployment_name="gpt-35-turbo", model_name="gpt-35-turbo",) agent_executor = create_pbi_agent( agent_executor.run('How many rows are in HR Employees') |
Thanks a lot, it works this way! |
It works this way indeed. Thanks a lot @lewisdba ! |
Ok, for me it really works. But, i am coding a product for my boss. I need an automatic login. All classes from azure.identity return the same error: credential = UsernamePasswordCredential( PowerBIDataset.update_forward_refs() ERROR: I tried: credential = UsernamePasswordCredential( from azure.core.credentials import TokenCredential But, it not works... |
This solution is really helpful :))) |
System Info
We are using the below Power BI Agent guide to try to connect to Power BI dashboard.
Power BI Dataset Agent
We are able to connect to OpenAI API but facing issues with the below line of code.
powerbi=PowerBIDataset(dataset_id="<dataset_id>", table_names=['table1', 'table2'], credential=DefaultAzureCredential())
Error:
We tried searching to solve the issues we no luck so far. Is there any configuration we are missing? Can you share more details, is there any specific configuration or access required on power BI side?
thanks in advance...
Who can help?
No response
Information
Related Components
Reproduction
Same steps mentioned your official PowerBI Dataset Agent documentation
Expected behavior
We should be able to connect to power BI
The text was updated successfully, but these errors were encountered: