agently-model-response

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agently Model Response

Agently 模型响应

Use this skill when the output contract is already chosen and the remaining issue is how the response instance should be consumed or reused.
The user does not need to say
get_response()
. Requests to reuse one result as text, parsed data, metadata, or progressive updates should route here.
当输出协议已确定,剩下的问题是如何消费或复用响应实例时,可使用此技能。
用户无需明确提及
get_response()
。所有关于将单一结果复用为文本、解析后的数据、元数据或渐进式更新的请求都应引导至此处处理。

Native-First Rules

原生优先规则

  • prefer
    get_response()
    when one request result must be consumed more than once
  • prefer async response APIs in async runtimes
  • use
    delta
    ,
    instant
    ,
    specific
    , or
    all
    instead of custom stream splitting logic
  • 当单一请求结果需要被多次消费时,优先使用
    get_response()
  • 在异步运行时中优先使用异步响应API
  • 使用
    delta
    instant
    specific
    all
    替代自定义流式拆分逻辑

Anti-Patterns

反模式

  • do not re-issue the same request to obtain text, data, and metadata separately
  • do not build ad hoc field-level stream parsers when
    instant
    or
    streaming_parse
    already fits
  • 不要为了分别获取文本、数据和元数据而重复发起相同的请求
  • instant
    streaming_parse
    已能满足需求时,不要构建临时的字段级流式解析器

Read Next

后续阅读

  • references/overview.md
  • references/overview.md