V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
LeegoYih
V2EX  ›  OpenAI

[请教]是我 Stop Sequences 用法不对吗?

  •  
  •   LeegoYih ·
    yihleego · Nov 13, 2025 · 761 views
    This topic created in 166 days ago, the information mentioned may be changed or developed.

    img


    client.chat.completions.create(
        model=model,
        messages=messages,
        stop=["</code>"]
    )
    

    按我理解,模型在遇到 </code> 后会直接停止生成,返回截至该字符串之前的内容,包括 </code> 本身都会被截掉,但是现在只截了 > ,我怀疑是 BUG ,但是他们回复是不建议这么用。

    另外,个人项目除了 OpenAI API 大家有别的推荐吗?用来研究一些 side projects 尽可能低成本🤫

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1190 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 23:23 · PVG 07:23 · LAX 16:23 · JFK 19:23
    ♥ Do have faith in what you're doing.