|
|
@@ -1,5 +1,6 @@
|
|
|
package cn.com.yusys.ai.plus.harness.controller;
|
|
|
|
|
|
+import cn.com.yusys.ai.common.Cons;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import io.agentscope.core.agent.Agent;
|
|
|
@@ -39,7 +40,7 @@ public class HarnessAgentRest {
|
|
|
@PostMapping(value = "/harness", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
|
|
public Flux<ServerSentEvent<String>> run(
|
|
|
@RequestBody String body,
|
|
|
- @RequestHeader(value = "x-user-id", required = true) String userId) throws JsonProcessingException {
|
|
|
+ @RequestHeader(value = Cons.HEADER_USER_ID, required = true) String userId) throws JsonProcessingException {
|
|
|
RunAgentInput input = jackson2.readValue(body, RunAgentInput.class);
|
|
|
RuntimeContext ctx = RuntimeContext.builder()
|
|
|
.userId(userId) // null 也没关系 = 匿名
|