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

#### 接口功能

构造函数。


#### C++函数原型

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


#### Python函数

```
InferRequest(request_id)
```


#### 接口参数

| 参数 | 是否必选 | 说明 | 取值要求 |
| --- | --- | --- | --- |
| request\_id | 是 | 请求ID。 | 合法的InferRequestId类型，请参考InferRequestId。 |


#### 使用样例

通过字符串ID，初始化构造推理请求ID和推理请求。

```
id = '123'
request_id = llm_manager_python.InferRequestId(id)
infer_request = llm_manager_python.InferRequest(request_id)
```
