Interface ChatClient
- All Known Implementing Classes:
DefaultChatClient
public interface ChatClient
Client to perform stateless requests to an AI Model, using a fluent API.
Use
builder(ChatModel)
to prepare an instance.- Since:
- 1.0.0
- Author:
- Mark Pollack, Christian Tzolov, Josh Long, Arjen Poutsma
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
A mutable builder for creating aChatClient
.static interface
static interface
static interface
static interface
static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChatClient.Builder
static ChatClient.Builder
builder
(ChatModel chatModel, io.micrometer.observation.ObservationRegistry observationRegistry, ChatClientObservationConvention customObservationConvention) static ChatClient
static ChatClient
static ChatClient
create
(ChatModel chatModel, io.micrometer.observation.ObservationRegistry observationRegistry, ChatClientObservationConvention observationConvention) mutate()
Return aChatClient.Builder
to create a newChatClient
whose settings are replicated from the defaultChatClient.ChatClientRequestSpec
of this client.prompt()
-
Method Details
-
create
-
create
static ChatClient create(ChatModel chatModel, io.micrometer.observation.ObservationRegistry observationRegistry) -
create
static ChatClient create(ChatModel chatModel, io.micrometer.observation.ObservationRegistry observationRegistry, ChatClientObservationConvention observationConvention) -
builder
-
builder
static ChatClient.Builder builder(ChatModel chatModel, io.micrometer.observation.ObservationRegistry observationRegistry, ChatClientObservationConvention customObservationConvention) -
prompt
ChatClient.ChatClientRequestSpec prompt() -
prompt
-
prompt
-
mutate
ChatClient.Builder mutate()Return aChatClient.Builder
to create a newChatClient
whose settings are replicated from the defaultChatClient.ChatClientRequestSpec
of this client.
-