|
|
@@ -6,6 +6,8 @@ import org.springframework.http.MediaType;
|
|
|
import org.springframework.util.MultiValueMap;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
@FeignClient(url = "${feign.alienAI.url}", name = "alien-AI")
|
|
|
public interface AlienAIFeign {
|
|
|
|
|
|
@@ -22,16 +24,16 @@ public interface AlienAIFeign {
|
|
|
JsonNode login(@RequestBody MultiValueMap<String, String> formData);
|
|
|
|
|
|
/**
|
|
|
- * 使用 JsonNode 灵活调用接口 - 生成促销图片
|
|
|
+ * 生成促销图片。请求体格式:{"text": "图片描述内容"}
|
|
|
*
|
|
|
* @param authorization Bearer token,格式为 "Bearer {access_token}"
|
|
|
- * @param requestBody JsonNode 请求体,可以灵活构建
|
|
|
+ * @param requestBody 请求体,需包含 key "text",值为图片描述。例如:Map.of("text", "描述内容")
|
|
|
* @return JsonNode 响应体,可以灵活解析
|
|
|
*/
|
|
|
@PostMapping(value = "/ai/life-manager/api/v1/promotion_image/generate",
|
|
|
- consumes = MediaType.APPLICATION_JSON_VALUE,
|
|
|
- produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- JsonNode generatePromotionImage(@RequestHeader("Authorization") String authorization, @RequestBody JsonNode requestBody);
|
|
|
+ consumes = MediaType.APPLICATION_JSON_VALUE,
|
|
|
+ produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ JsonNode generatePromotionImage(@RequestHeader("Authorization") String authorization, @RequestBody Map<String, String> requestBody);
|
|
|
|
|
|
// /**
|
|
|
// * 使用 JsonNode 灵活调用接口 - 发起AI审核(多模态)
|