Bug描述
昨晚WolframAlphaToolSpec停止工作。
版本
llama-index-core: 0.11.0, llama-index-readers-file: 0.2.0, llama-index-tools-wolfram-alpha: 0.2.0, crewai: 0.51.1, crewai-tools: 0.8.3
重现步骤
from crewai_tools import LlamaIndexTool
from llama_index.tools.wolfram_alpha import WolframAlphaToolSpec
wolfram_spec = WolframAlphaToolSpec(app_id="E7LXP9-V748VQUY94")
wolfram_tools = wolfram_spec.to_tool_list()
crewai_wolfram_tools = [LlamaIndexTool.from_tool(t) for t in wolfram_tools]
相关日志/回溯
/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_config.py:341: UserWarning: Valid config keys have changed in V2:
* 'allow_population_by_field_name' has been renamed to 'populate_by_name'
* 'smart_union' has been removed
warnings.warn(message, UserWarning)
---------------------------------------------------------------------------
ValidationError Traceback (most recent call last)
<ipython-input-5-c7c2fcdd6516> in <cell line: 26>()
24 wolfram_tools = wolfram_spec.to_tool_list()
25
---> 26 crewai_wolfram_tools = [LlamaIndexTool.from_tool(t) for t in wolfram_tools]
2 frames
/usr/local/lib/python3.10/dist-packages/pydantic/main.py in __init__(self, **data)
191 # `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks
192 __tracebackhide__ = True
--> 193 self.__pydantic_validator__.validate_python(data, self_instance=self)
194
195 # The following line sets a flag that we use to determine when `__init__` gets overridden by the user
ValidationError: 1 validation error for LlamaIndexTool
args_schema
Input should be a subclass of BaseModel [type=is_subclass_of, input_value=<class 'llama_index.core....ls.wolfram_alpha_query'>, input_type=ModelMetaclass]
For further information visit https://errors.pydantic.dev/2.8/v/is_subclass_of
3条答案
按热度按时间yruzcnhs1#
LlamaIndex已更新到pydantic v2
看起来crewai正在使用pydantic v1
Pydantic v2已经发布一年多了,希望他们很快就会将其添加到路线图中进行更新 :)
似乎在crewai将不再使用pydantic v1之前,无法使用v0.11.0
kgqe7b3p2#
你将不得不降级
jhdbpxl93#
你必须降级
非常感谢!