dataiku / dataiku/dataiku-api-client-python

*** ModuleNotFoundError: No module named 'dataiku.langchain'

未关闭
#336 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
44
派生
29
平均合并
3 小时 34 分钟
30 天内合并 PR
2

描述

dataikuapi.dss.langchain.tool tries to import dataiku

from dataiku.langchain.dku_tracer import dku_span_builder_for_callbacks

I have both dataiku and datikuapi installed and calling tool.as_langchain_structured_tool() doesn't work with either

(Pdb) tool
<dataikuapi.dss.agent_tool.DSSAgentTool object at 0x7f25f62f58e0>
(Pdb) t = tool.as_langchain_structured_tool()
*** ModuleNotFoundError: No module named 'dataiku.langchain'
(Pdb) from dataiku import langchain
*** ImportError: cannot import name 'langchain' from 'dataiku' (.venv/lib/python3.12/site-packages/dataiku/__init__.py)
(Pdb) tool
<dataikuapi.dss.agent_tool.DSSAgentTool object at 0x7f25f62f58e0>
(Pdb) tool.as_langchain_structured_tool()
*** ModuleNotFoundError: No module named 'dataiku.langchain'

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 dataikuapi.dss.langchain.tool 开始,重点检查 dataiku.langchain.dku_tracer 的导入,并使用 DSSAgentTool.as_langchain_structured_tool() 重现该故障。跟踪所需模块是否已打包,或是否从错误的依赖项导入;完成标准是:在已安装 dataiku 和 dataikuapi 的环境中,该方法运行时不出现 ModuleNotFoundError。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。