Class OpenAIProperties

java.lang.Object
io.agentscope.spring.boot.openai.OpenAIProperties

@ConfigurationProperties(prefix="agentscope.openai") public class OpenAIProperties extends Object
OpenAI provider specific settings.

Example configuration:


 agentscope:
   model:
     provider: openai
   openai:
     enabled: true
     api-key: ${OPENAI_API_KEY}
     model-name: gpt-4.1-mini
     # base-url: https://api.openai.com/v1 # optional, for compatible endpoints
     # endpoint-path: /v1/chat/completions # optional, for custom endpoint paths
     stream: true
 
  • Constructor Details

    • OpenAIProperties

      public OpenAIProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
    • getApiKey

      public String getApiKey()
    • setApiKey

      public void setApiKey(String apiKey)
    • getModelName

      public String getModelName()
    • setModelName

      public void setModelName(String modelName)
    • getBaseUrl

      public String getBaseUrl()
    • setBaseUrl

      public void setBaseUrl(String baseUrl)
    • getEndpointPath

      public String getEndpointPath()
    • setEndpointPath

      public void setEndpointPath(String endpointPath)
    • isStream

      public boolean isStream()
    • setStream

      public void setStream(boolean stream)