Class OpenAiOfficialStreamingChatModel

java.lang.Object
dev.langchain4j.model.openaiofficial.OpenAiOfficialStreamingChatModel
All Implemented Interfaces:
dev.langchain4j.model.chat.StreamingChatModel

public class OpenAiOfficialStreamingChatModel extends Object implements dev.langchain4j.model.chat.StreamingChatModel
  • Field Details

    • client

      protected com.openai.client.OpenAIClient client
    • asyncClient

      protected com.openai.client.OpenAIClientAsync asyncClient
    • modelName

      protected String modelName
    • defaultRequestParameters

      protected OpenAiOfficialChatRequestParameters defaultRequestParameters
    • responseFormat

      protected String responseFormat
    • strictJsonSchema

      protected Boolean strictJsonSchema
    • strictTools

      protected Boolean strictTools
    • tokenCountEstimator

      protected dev.langchain4j.model.TokenCountEstimator tokenCountEstimator
    • listeners

      protected List<dev.langchain4j.model.chat.listener.ChatModelListener> listeners
    • supportedCapabilities

      protected Set<dev.langchain4j.model.chat.Capability> supportedCapabilities
    • modelProvider

      protected dev.langchain4j.model.ModelProvider modelProvider
  • Constructor Details

  • Method Details

    • doChat

      public void doChat(dev.langchain4j.model.chat.request.ChatRequest chatRequest, dev.langchain4j.model.chat.response.StreamingChatResponseHandler handler)
      Specified by:
      doChat in interface dev.langchain4j.model.chat.StreamingChatModel
    • builder

    • init

      public void init(String baseUrl, String apiKey, com.openai.credential.Credential credential, String microsoftFoundryDeploymentName, com.openai.azure.AzureOpenAIServiceVersion azureOpenAIServiceVersion, String organizationId, boolean isAzure, boolean isGitHubModels, dev.langchain4j.model.chat.request.ChatRequestParameters defaultRequestParameters, String modelName, Double temperature, Double topP, List<String> stop, Integer maxCompletionTokens, Double presencePenalty, Double frequencyPenalty, Map<String,Integer> logitBias, String responseFormat, Boolean strictJsonSchema, Integer seed, String user, Boolean strictTools, Boolean parallelToolCalls, Boolean store, Map<String,String> metadata, String serviceTier, Duration timeout, Integer maxRetries, Proxy proxy, dev.langchain4j.model.TokenCountEstimator tokenCountEstimator, Map<String,String> customHeaders, List<dev.langchain4j.model.chat.listener.ChatModelListener> listeners, Set<dev.langchain4j.model.chat.Capability> capabilities, boolean isAsync)
    • defaultRequestParameters

      public OpenAiOfficialChatRequestParameters defaultRequestParameters()
    • supportedCapabilities

      public Set<dev.langchain4j.model.chat.Capability> supportedCapabilities()
    • listeners

      public List<dev.langchain4j.model.chat.listener.ChatModelListener> listeners()
    • provider

      public dev.langchain4j.model.ModelProvider provider()