Class BaseDifyBuilder<T extends BaseDifyBuilder<T>>

java.lang.Object
io.github.guoshiqiufeng.dify.client.spring6.builder.BaseDifyBuilder<T>
Direct Known Subclasses:
DifyChatBuilder.DifyChatClientBuilder.Builder, DifyDatasetBuilder.DifyDatasetClientBuilder.Builder, DifyServerBuilder.DifyServerClientBuilder.Builder, DifyWorkflowBuilder.DifyWorkflowClientBuilder.Builder

public abstract class BaseDifyBuilder<T extends BaseDifyBuilder<T>> extends Object
Base builder class with common builder functionality
Since:
2025/4/18 10:20
Version:
0.9.0
Author:
yanghq
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected io.github.guoshiqiufeng.dify.core.config.DifyProperties.ClientConfig
     
    protected org.springframework.web.client.RestClient.Builder
     
    protected org.springframework.web.reactive.function.client.WebClient.Builder
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    baseUrl(String baseUrl)
    Set the base URL for the Dify API
    clientConfig(io.github.guoshiqiufeng.dify.core.config.DifyProperties.ClientConfig clientConfig)
    Set the client configuration
    protected void
    Initialize default values for common properties
    restClientBuilder(org.springframework.web.client.RestClient.Builder restClientBuilder)
    Set the RestClient builder
    webClientBuilder(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder)
    Set the WebClient builder

    Methods inherited from class java.lang.Object

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

    • baseUrl

      protected String baseUrl
    • clientConfig

      protected io.github.guoshiqiufeng.dify.core.config.DifyProperties.ClientConfig clientConfig
    • restClientBuilder

      protected org.springframework.web.client.RestClient.Builder restClientBuilder
    • webClientBuilder

      protected org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder
  • Constructor Details

    • BaseDifyBuilder

      public BaseDifyBuilder()
  • Method Details

    • baseUrl

      public T baseUrl(String baseUrl)
      Set the base URL for the Dify API
      Parameters:
      baseUrl - the base URL
      Returns:
      the builder
    • clientConfig

      public T clientConfig(io.github.guoshiqiufeng.dify.core.config.DifyProperties.ClientConfig clientConfig)
      Set the client configuration
      Parameters:
      clientConfig - the client configuration
      Returns:
      the builder
    • restClientBuilder

      public T restClientBuilder(org.springframework.web.client.RestClient.Builder restClientBuilder)
      Set the RestClient builder
      Parameters:
      restClientBuilder - the RestClient builder
      Returns:
      the builder
    • webClientBuilder

      public T webClientBuilder(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder)
      Set the WebClient builder
      Parameters:
      webClientBuilder - the WebClient builder
      Returns:
      the builder
    • initDefaults

      protected void initDefaults()
      Initialize default values for common properties