---
title: GetMaxOutputLen接口
description: "获取最大输出长度。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0070.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0070.html
indexId: 5f616e6e07cfc8bfc9c099e19e665baffa5c72bf538ff2f18d58dffa8e03669758
---
# GetMaxOutputLen接口

#### 接口功能

获取最大输出长度。


#### 接口格式

```
uint32_t GetMaxOutputLen() const
```


#### 接口参数

无。


#### 使用样例

构造一个请求对象，获取一个请求对象的最大输出长度。

```
mindie_llm::InferRequestId runtimeReqId(0);
std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId);
uint32_t maxOutputLen = 1;
Status ret = runtimeRequest->SetMaxOutputLen(maxOutputLen);
uint32_t maxOutputLen1 = runtimeRequest->GetMaxOutputLen();
```


#### 返回值

请求对象的最大输出长度，类型为uint32_t。
