Refact: switch from google-generativeai to google-genai (#13140)

### What problem does this PR solve?

Refact: switch from oogle-generativeai to google-genai  #13132
Refact: commnet out unused pywencai.

### Type of change

- [x] Refactoring
This commit is contained in:
Magicbook1108
2026-02-24 10:28:33 +08:00
committed by GitHub
parent 45aa3a0e89
commit 98e1d5aa5c
6 changed files with 949 additions and 851 deletions

View File

@@ -18,7 +18,7 @@ import os
import time
from abc import ABC
import pandas as pd
import pywencai
# import pywencai
from agent.tools.base import ToolParamBase, ToolMeta, ToolBase
from common.connection_utils import timeout
@@ -84,7 +84,8 @@ class WenCai(ToolBase, ABC):
try:
wencai_res = []
res = pywencai.get(query=kwargs["query"], query_type=self._param.query_type, perpage=self._param.top_n)
# res = pywencai.get(query=kwargs["query"], query_type=self._param.query_type, perpage=self._param.top_n)
res = []
if self.check_if_canceled("WenCai processing"):
return