V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
bantianys
V2EX  ›  OpenAI

langflow 中的模型无法工作(key 正常)

  •  
  •   bantianys · 17 天前 · 719 次点击

    装了个 langflow ,发现模型节点无法正常工作。

    试了 openai 和 azure openai 的 api key (其他客户端能正常使用),都不能正常工作,看后台日志似乎有 api 连接错误。

    两个 key 绝对没问题,一个是自己在 azure 部署的,用了一段时间了。一个是从卖 key 的平台新注册用户送的一个小额度 key 。

    有没大佬见多识广知道咋回事的?

    4 条回复    2024-09-29 09:22:02 +08:00
    bantianys
        1
    bantianys  
    OP
       17 天前
    APIConnectionError: Connection error.
    [09/28/24 20:02:37] ERROR 2024-09-28 20:02:37 - ERROR - main - unhandled error: 'NoneType' object is main.py:170
    not subscriptable

    表象是 api 连接错误,但后面的错误似乎是某些参数没有正确读到。
    maymay5
        2
    maymay5  
       17 天前
    这是代码抛异常了,检查一下看是不是节点配置错了,我说的是 flow 中的节点,如果一切都对,那就是程序本身的 bug
    bantianys
        3
    bantianys  
    OP
       17 天前
    发现可能的原因了。
    https://github.com/langflow-ai/langflow/issues/3860
    https://stackoverflow.com/questions/76475419/how-can-i-select-the-proper-openai-api-version

    我在 flow 的模型节点的 api 版本选择的是我在 azure 部署的版本( 2024.05.13 ),但似乎这个版本 api 和之前 2023 的有些差异,正如爆栈上提到的“”The API Version property depends on the method you are calling in the API: all methods are not supported in all API versions.“

    目前 langflow 的这个 auzure openai 组件还不能使用 2024.05.13 的版本,选择 2023.05.15 则一切正常。
    bantianys
        4
    bantianys  
    OP
       17 天前
    另外再补充一个。auzure openai 组件的配置不能使用全局变量,我前面调通的例子把参数改成全局变量就失败了。只能配置成明文。

    官方 issue 清单似乎也有人遇到这样的问题。
    https://github.com/langflow-ai/langflow/issues/3876
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3594 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:38 · PVG 18:38 · LAX 03:38 · JFK 06:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.