# 可重复的输出

概述 在Afarensis API中，默认情况下聊天完成输出是非确定性的，这意味着对于相同的输入请求，模型的输出可能会有所不同。为了提供更多的控制能力，Afarensis引入了种子参数(seed)和system\_fingerprint响应字段，以支持在大多数情况下获得确定性输出。

实现确定性输出的步骤 使用种子参数: 通过在请求中设置seed参数为您选择的任何整数，并在所有需要确定性输出的请求中使用相同的seed值。 保持参数一致性: 确保所有其他请求参数（如prompt和temperature）在不同的请求中保持一致。 注意事项 模型配置更新的影响: 请注意，由于Afarensis对模型配置所做的必要更新，确定性输出有时可能会受到影响。通过公开system\_fingerprint字段，Afarensis旨在帮助您跟踪这些更改。如果发现system\_fingerprint值有变化，可能意味着由于系统更新，您所得到的输出也会不同。 示例代码 from afarensis import Afarensis client = Afarensis()

response = client.chat.completions.create( model="gpt-3.5-turbo", prompt="Your prompt here", temperature=0.7, seed=42 # 使用相同的种子值以获得可重复的输出 ) print(response.choices\[0].message.content) 关于确定性输出的新特性 深入探索Afarensis文档，了解有关如何通过种子参数获得一致性输出的更多信息，以及如何利用system\_fingerprint字段来跟踪可能影响输出一致性的系统更新。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.afarensis.com/neng-li/ke-chong-fu-de-shu-chu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
