Package com.sap.ai.sdk.orchestration.spring

# Class OrchestrationChatModel

java.lang.Object
com.sap.ai.sdk.orchestration.spring.OrchestrationChatModel

All Implemented Interfaces:
  `org.springframework.ai.chat.model.ChatModel`, `org.springframework.ai.chat.model.StreamingChatModel`, `org.springframework.ai.model.Model<org.springframework.ai.chat.prompt.Prompt,org.springframework.ai.chat.model.ChatResponse>`, `org.springframework.ai.model.StreamingModel<org.springframework.ai.chat.prompt.Prompt,org.springframework.ai.chat.model.ChatResponse>`

public class OrchestrationChatModel extends Object implements org.springframework.ai.chat.model.ChatModel
Spring AI integration for the orchestration service.

Since:
  1.2.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OrchestrationChatModel()`
  Default constructor.
  `OrchestrationChatModel(OrchestrationClient client)`
  Constructor with a custom client.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.springframework.ai.chat.model.ChatResponse`
  `call(org.springframework.ai.chat.prompt.Prompt prompt)`
  `reactor.core.publisher.Flux<org.springframework.ai.chat.model.ChatResponse>`
  `stream(org.springframework.ai.chat.prompt.Prompt prompt)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.springframework.ai.chat.model.ChatModel

  `call, call, getDefaultOptions`

  ### Methods inherited from interface org.springframework.ai.chat.model.StreamingChatModel

  `stream, stream`

- ## Constructor Details

  - ### OrchestrationChatModel

    public OrchestrationChatModel()
    Default constructor.
    Since:
      1.2.0

  - ### OrchestrationChatModel

    public OrchestrationChatModel(@Nonnull OrchestrationClient client)
    Constructor with a custom client.
    Parameters:
      `client` - The custom client to use.
    Since:
      1.2.0

- ## Method Details

  - ### call

    @Nonnull public org.springframework.ai.chat.model.ChatResponse call(@Nonnull org.springframework.ai.chat.prompt.Prompt prompt)
    Specified by:
      `call` in interface `org.springframework.ai.chat.model.ChatModel`
    Specified by:
      `call` in interface `org.springframework.ai.model.Model<org.springframework.ai.chat.prompt.Prompt,org.springframework.ai.chat.model.ChatResponse>`

  - ### stream

    @Nonnull public reactor.core.publisher.Flux<org.springframework.ai.chat.model.ChatResponse> stream(@Nonnull org.springframework.ai.chat.prompt.Prompt prompt)
    Specified by:
      `stream` in interface `org.springframework.ai.chat.model.ChatModel`
    Specified by:
      `stream` in interface `org.springframework.ai.chat.model.StreamingChatModel`
    Specified by:
      `stream` in interface `org.springframework.ai.model.StreamingModel<org.springframework.ai.chat.prompt.Prompt,org.springframework.ai.chat.model.ChatResponse>`