mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-21 14:18:52 +00:00
### Description: This PR sets a default value of `output_token_limit = 4000` for the `PowerBIToolkit` to fix the unintentionally validation error. ### Problem: When attempting to run a code snippet from [Langchain's PowerBI toolkit documentation](https://python.langchain.com/v0.1/docs/integrations/toolkits/powerbi/) to interact with a `PowerBIDataset`, the following error occurs: ``` pydantic.v1.error_wrappers.ValidationError: 1 validation error for QueryPowerBITool output_token_limit none is not an allowed value (type=type_error.none.not_allowed) ``` ### Root Cause: The issue arises because when creating a `QueryPowerBITool`, the `output_token_limit` parameter is unintentionally set to `None`, which is the current default for `PowerBIToolkit`. However, `QueryPowerBITool` expects a default value of `4000` for `output_token_limit`. This unintended override causes the error. |
||
---|---|---|
.. | ||
__init__.py | ||
base.py | ||
chat_base.py | ||
prompt.py | ||
toolkit.py |