---
title: SetDTarget接口
description: "设置请求发往哪个D节点的server IP。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0080.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0080.html
indexId: 5bcb1039a70ef9b58d6a22c8a0147aa93dad3042de654627b29fd0e7ef9a0c3558
---
# SetDTarget接口

#### 接口功能

设置请求发往哪个D节点的server IP。


#### 接口格式

```
void SetDTarget(std::string &dTarget);
```


#### 接口参数

| 参数 | 是否必选 | 说明 | 取值要求 |
| --- | --- | --- | --- |
| dTarget | 是 | 设置做完全量推理发往D节点的IP地址。 | 合法的string类型，server IP地址。 |


#### 使用样例

构造一个请求对象后，为该请求对象设置做完全量推理发往D节点的ip地址。

```
mindie_llm::InferRequestId runtimeReqId(0);
std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId);
std::string serverIp = "";
runtimeRequest->SetDTarget(serverIp);
```


#### 返回值

无。
