Class SpringAIZhipuaiChatController

java.lang.Object
com.bytedesk.ai.springai.providers.zhipuai.SpringAIZhipuaiChatController

@RestController @RequestMapping("/api/v1/zhipuai") @ConditionalOnProperty(prefix="spring.ai.zhipuai.chat", name="enabled", havingValue="true", matchIfMissing=false) public class SpringAIZhipuaiChatController extends Object
Deprecated.
使用ZhipuaiController 智谱AI接口 https://open.bigmodel.cn/dev/api#sdk_install https://github.com/MetaGLM/zhipuai-sdk-java-v4 https://docs.spring.io/spring-ai/reference/api/chat/zhipuai-chat.html
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.springframework.ai.zhipuai.ZhiPuAiChatModel
    Deprecated.
     
    private final org.springframework.ai.zhipuai.ZhiPuAiImageModel
    Deprecated.
     
    private final ExecutorService
    Deprecated.
     
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<JsonResult<?>>
    chatCustom(String message)
    Deprecated.
    自定义模型参数的调用示例 http://127.0.0.1:9003/api/v1/zhipuai/chat/custom?
    org.springframework.web.servlet.mvc.method.annotation.SseEmitter
    chatSSE(String message)
    Deprecated.
    方式3:SSE调用 http://127.0.0.1:9003/api/v1/zhipuai/chat/sse?
    reactor.core.publisher.Flux<org.springframework.ai.chat.model.ChatResponse>
    chatStream(String message)
    Deprecated.
    方式2:异步流式调用 http://127.0.0.1:9003/api/v1/zhipuai/chat/stream?
    org.springframework.http.ResponseEntity<JsonResult<?>>
    chatSync(String message)
    Deprecated.
    方式1:同步调用 http://127.0.0.1:9003/api/v1/zhipuai/chat/sync?
    void
    Deprecated.
     
    org.springframework.http.ResponseEntity<JsonResult<?>>
    Deprecated.
    图像生成接口 http://127.0.0.1:9003/api/v1/zhipuai/image
    void
    streamSse(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Deprecated.
     
    org.springframework.http.ResponseEntity<JsonResult<?>>
    Deprecated.
    测试token提取功能 http://127.0.0.1:9003/api/v1/zhipuai/test-tokens

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • springAIZhipuaiService

      private final SpringAIZhipuaiChatService springAIZhipuaiService
      Deprecated.
    • bytedeskZhipuaiChatModel

      private final org.springframework.ai.zhipuai.ZhiPuAiChatModel bytedeskZhipuaiChatModel
      Deprecated.
    • bytedeskZhipuaiImageModel

      private final org.springframework.ai.zhipuai.ZhiPuAiImageModel bytedeskZhipuaiImageModel
      Deprecated.
    • executorService

      private final ExecutorService executorService
      Deprecated.
  • Constructor Details

    • SpringAIZhipuaiChatController

      public SpringAIZhipuaiChatController()
      Deprecated.
  • Method Details

    • chatSync

      @GetMapping("/chat/sync") public org.springframework.http.ResponseEntity<JsonResult<?>> chatSync(@RequestParam(value="message",defaultValue="Tell me a joke") String message)
      Deprecated.
      方式1:同步调用 http://127.0.0.1:9003/api/v1/zhipuai/chat/sync?message=hello
    • chatStream

      @GetMapping("/chat/stream") public reactor.core.publisher.Flux<org.springframework.ai.chat.model.ChatResponse> chatStream(@RequestParam(value="message",defaultValue="Tell me a joke") String message)
      Deprecated.
      方式2:异步流式调用 http://127.0.0.1:9003/api/v1/zhipuai/chat/stream?message=hello
    • chatSSE

      @GetMapping(value="/chat/sse", produces="text/event-stream") public org.springframework.web.servlet.mvc.method.annotation.SseEmitter chatSSE(@RequestParam(value="message",defaultValue="Tell me a joke") String message)
      Deprecated.
      方式3:SSE调用 http://127.0.0.1:9003/api/v1/zhipuai/chat/sse?message=hello
    • chatCustom

      @GetMapping("/chat/custom") public org.springframework.http.ResponseEntity<JsonResult<?>> chatCustom(@RequestParam(value="message",defaultValue="Tell me a joke") String message)
      Deprecated.
      自定义模型参数的调用示例 http://127.0.0.1:9003/api/v1/zhipuai/chat/custom?message=hello
    • generateImage

      @GetMapping("/image") public org.springframework.http.ResponseEntity<JsonResult<?>> generateImage(@RequestParam(defaultValue="A cute cat") String prompt)
      Deprecated.
      图像生成接口 http://127.0.0.1:9003/api/v1/zhipuai/image
    • testTokenExtraction

      @GetMapping("/test-tokens") public org.springframework.http.ResponseEntity<JsonResult<?>> testTokenExtraction()
      Deprecated.
      测试token提取功能 http://127.0.0.1:9003/api/v1/zhipuai/test-tokens
    • destroy

      public void destroy()
      Deprecated.
    • streamSse

      @GetMapping("/stream-sse") public void streamSse(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Deprecated.
      Throws:
      jakarta.servlet.ServletException
      IOException