---
title: InferRequest接口
description: "构造函数。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0063.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0063.html
indexId: 00588f18bad35f8f17dd97879194a649b1749eede29bd7a4c23bde681a900f6658
---
# InferRequest接口

#### 接口功能

构造函数。


#### 接口格式

```
explicit InferRequest(InferRequestId requestId);
```


#### 接口参数

| 参数 | 是否必选 | 说明 | 取值要求 |
| --- | --- | --- | --- |
| requestId | 是 | 请求ID。 | InferRequestId类型，请参考InferRequestId。 |


#### 使用样例

构造一个ID为0的InferRequestId对象。

```
mindie_llm::InferRequestId runtimeReqId(0);
std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId);
```


#### 返回值

InferRequest对象。
