---
title: IsFlexLocalReq接口
description: "判断请求是否为flex节点本地处理的请求类型。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0079.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0079.html
indexId: db9648c12d1dc2cf3b18075d77ac24b72f80aff3bde131fd6929a18f0ae3b0b258
---
# IsFlexLocalReq接口

#### 接口功能

判断请求是否为flex节点本地处理的请求类型。


#### 接口格式

```
bool IsFlexLocalReq() const;
```


#### 接口参数

无。


#### 使用样例

构造一个请求对象后，为该请求对象设置请求类型，然后获取该请求是否为Decode请求。

```
mindie_llm::InferRequestId runtimeReqId(0);
std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId);
runtimeRequest->SetReqType(mindie_llm::InferReqType::REQ_FLEX_LOCAL);
bool isDecode = runtimeRequest->IsFlexLocalReq();
```


#### 返回值

bool类型。
