aifollow.news
Back IT之家 科技新闻
IT之家 科技新闻· · Original publication time AI score47

Anthropic adds beta support for changing effort during Claude API conversationsMachine translation

Anthropic 为 Claude API 新增对话中调节 effort 的 Beta 功能

AI-assisted summary

Developers can adjust Claude’s effort as tasks change within a conversation, trading off answer depth, speed and cost. The new setting takes effect from the next user message with new input and does not change content already generated. It requires no change to the top-level configuration, and prompt caching can still work.

Article · Original

The article text is unavailable in this language; an existing version is shown.

IT之家 11 月 12 日消息,Anthropic 为 Claude API 新增一项 Beta 功能,开发者可以在消息中调整 effort。这意味着,同一段对话不必始终沿用相同设置,开发者可根据后续任务需要,中途改变模型回答的“努力程度”。

IT之家注:effort 可以理解为让 Claude 回答问题时,“投入多少功夫”的档位。它帮助开发者在回答的充分程度、响应速度和使用成本之间做取舍。effort 调整的不只是最后写多少字,还会影响模型在思考、调用工具和组织回答等环节的资源投入。

在操作方面,用户可以在消息序列中插入一条内容为空的 system 消息,并通过新的 output_config.effort 设置目标等级。整个过程无需改动顶层配置,提示缓存仍可命中。

在生效时间方面,该设置不会修改已经生成的内容,将从下一条带有新输入的用户消息起,作用于后续回答。因此,开发者需要留意调整消息的插入位置,以及下一次用户输入出现的时点。

在实际场景中,用户可以设置一段对话前半部分用于简单问答,后半部分转向复杂分析时,便可在任务切换处设置新的努力等级,而不必修改顶层配置。

Found an error? Send a correction