crypto-com / crypto-com/developer-platform-sdk-examples

BigQueryAI LangChain Deprecation Error

Ouverte
#112 2 commentaires 0 réactions 1 personne assignée Réclamée par @leejw51crypto Voir sur GitHub
good first issue
Langage dominant
TypeScript
Étoiles
7
Forks
5
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Issue
When interacting with `bigquery.py` using input `help`, the following error occurs:
```
LangChainDeprecationWarning: The method `BaseTool.__call__` was deprecated in langchain-core 0.1.47 and will be removed in 1.0. Use :meth:`~invoke` instead.
print(tools.explain_bigquery_usage())
[ERROR] Failed to initialize agent: BaseTool.__call__() missing 1 required positional argument: 'tool_input'
```
When interacting with `bigquery.py` using inputs like `limits`, `cost` or `info`, the following error occurs:
```
LangChainDeprecationWarning: The method `BaseTool.__call__` was deprecated in langchain-core 0.1.47 and will be removed in 1.0. Use :meth:`~invoke` instead.
print(tools.get_bigquery_cost_info())
[ERROR] Failed to initialize agent: BaseTool.__call__() missing 1 required positional argument: 'tool_input'
```
When interacting with `bigquery.py` using inputs like `dataset`, `data`, or `tables`, the following error occurs:
```
LangChainDeprecationWarning: The method `BaseTool.__call__` was deprecated in langchain-core 0.1.47 and will be removed in 1.0. Use :meth:`~invoke` instead.
print(tools.get_bigquery_dataset_info())
[ERROR] Failed to initialize agent: BaseTool.__call__() missing 1 required positional argument: 'tool_input'
```
### Verified Fix
https://github.com/crypto-com/developer-platform-sdk-examples/blob/393ae23338e7ca289a068127b9507afe4ab4bcd2/integrations/bigqueryai/bigquery.py#L145
Update to:
```
print(tools.explain_bigquery_usage.invoke(""))
```
https://github.com/crypto-com/developer-platform-sdk-examples/blob/393ae23338e7ca289a068127b9507afe4ab4bcd2/integrations/bigqueryai/bigquery.py#L149
Update to:
```
print(tools.get_bigquery_cost_info.invoke(""))
```
https://github.com/crypto-com/developer-platform-sdk-examples/blob/393ae23338e7ca289a068127b9507afe4ab4bcd2/integrations/bigqueryai/bigquery.py#L153
Update to:
```
print(tools.get_bigquery_dataset_info.invoke(""))
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.