from csv_agent import agent_executor as csv_agent_chain add_routes(app, csv_agent_chain, path="/csv-agent") # Windows 系统中将 "" 改为 "/"
复制代码
启动应用:运行以下命令启动应用:
poetry run langchain serve
复制代码
处理反序列化错误
如果在启动时遇到以下错误:
`ValueError: The de-serialization relies loading a pickle file. Pickle files can be modified to deliver a malicious payload that results in execution of arbitrary code on your machine. You will need to set `allow_dangerous_deserialization` to `True` to enable deserialization. `