Interface ChatClient.ChatClientRequestSpec
- All Known Implementing Classes:
DefaultChatClient.DefaultChatClientRequestSpec
- Enclosing interface:
- ChatClient
public static interface ChatClient.ChatClientRequestSpec
-
Method Summary
Modifier and TypeMethodDescriptionadvisors(Consumer<ChatClient.AdvisorSpec> consumer) call()messages(org.springframework.ai.chat.messages.Message... messages) mutate()Return aChatClient.Builderto create a newChatClientwhose settings are replicated from thisChatClientRequest.<B extends org.springframework.ai.chat.prompt.ChatOptions.Builder<?>>
ChatClient.ChatClientRequestSpecoptions(B customizer) stream()system(Consumer<ChatClient.PromptSystemSpec> consumer) system(org.springframework.core.io.Resource text) templateRenderer(org.springframework.ai.template.TemplateRenderer templateRenderer) toolCallbacks(List<org.springframework.ai.tool.ToolCallback> toolCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.toolCallbacks(org.springframework.ai.tool.ToolCallback... toolCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer)andtools(Consumer<ToolSpec>)To be removed in 3.0.0.toolCallbacks(org.springframework.ai.tool.ToolCallbackProvider... toolCallbackProviders) Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer)andtools(Consumer<ToolSpec>)To be removed in 3.0.0.toolContext(Map<String, Object> toolContext) Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer)andtools(Consumer<ToolSpec>)To be removed in 3.0.0.Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer).tools(Consumer<ChatClient.ToolSpec> consumer) user(Consumer<ChatClient.PromptUserSpec> consumer) user(org.springframework.core.io.Resource text)
-
Method Details
-
mutate
ChatClient.Builder mutate()Return aChatClient.Builderto create a newChatClientwhose settings are replicated from thisChatClientRequest. -
advisors
-
advisors
-
advisors
-
messages
-
messages
ChatClient.ChatClientRequestSpec messages(List<org.springframework.ai.chat.messages.Message> messages) -
options
<B extends org.springframework.ai.chat.prompt.ChatOptions.Builder<?>> ChatClient.ChatClientRequestSpec options(B customizer) -
tools
-
tools
-
toolNames
@Deprecated(since="2.0.0", forRemoval=true) ChatClient.ChatClientRequestSpec toolNames(String... toolNames) Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer). To be removed in 3.0.0. -
toolCallbacks
@Deprecated(since="2.0.0", forRemoval=true) ChatClient.ChatClientRequestSpec toolCallbacks(org.springframework.ai.tool.ToolCallback... toolCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer)andtools(Consumer<ToolSpec>)To be removed in 3.0.0. -
toolCallbacks
@Deprecated(since="2.0.0", forRemoval=true) ChatClient.ChatClientRequestSpec toolCallbacks(List<org.springframework.ai.tool.ToolCallback> toolCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer)andtools(Consumer<ToolSpec>)To be removed in 3.0.0. -
toolCallbacks
@Deprecated(since="2.0.0", forRemoval=true) ChatClient.ChatClientRequestSpec toolCallbacks(org.springframework.ai.tool.ToolCallbackProvider... toolCallbackProviders) Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer)andtools(Consumer<ToolSpec>)To be removed in 3.0.0. -
toolContext
@Deprecated(since="2.0.0", forRemoval=true) ChatClient.ChatClientRequestSpec toolContext(Map<String, Object> toolContext) Deprecated, for removal: This API element is subject to removal in a future version.as of 2.0.0, in favor oftools(Consumer)andtools(Consumer<ToolSpec>)To be removed in 3.0.0. -
system
-
system
ChatClient.ChatClientRequestSpec system(org.springframework.core.io.Resource textResource, Charset charset) -
system
-
system
-
user
-
user
-
user
-
user
-
templateRenderer
ChatClient.ChatClientRequestSpec templateRenderer(org.springframework.ai.template.TemplateRenderer templateRenderer) -
call
ChatClient.CallResponseSpec call() -
stream
ChatClient.StreamResponseSpec stream()
-
tools(Consumer)andtools(Consumer<ToolSpec>)To be removed in 3.0.0.