Uses of Class
com.google.genkit.ai.Message
Packages that use Message
Package
Description
This package provides types for the Genkit agents feature, including enums and models for agent
state snapshots, agent execution lifecycle, and agent-related operations.
-
Uses of Message in com.google.genkit.ai
Methods in com.google.genkit.ai that return MessageModifier and TypeMethodDescriptionAdds a part to the message content.Message.Builder.build()Candidate.getMessage()ModelResponse.getMessage()Returns the first candidate's message.static MessageCreates a model message with text content.static MessageCreates a system message with text content.static MessageCreates a tool message with content.static MessageCreates a user message with text content.Methods in com.google.genkit.ai that return types with arguments of type MessageModifier and TypeMethodDescriptionGenerateActionOptions.getMessages()GenerateOptions.getMessages()Gets the conversation messages.ModelRequest.getMessages()ModelResponse.getMessages()Returns all messages including the model's response.Methods in com.google.genkit.ai with parameters of type MessageModifier and TypeMethodDescriptionModelRequest.addMessage(Message message) Adds a message to the request.ModelRequest.Builder.addMessage(Message message) voidCandidate.setMessage(Message message) Method parameters in com.google.genkit.ai with type arguments of type MessageModifier and TypeMethodDescriptionvoidGenerateActionOptions.setMessages(List<Message> messages) voidModelRequest.setMessages(List<Message> messages) GenerateActionOptions.withMessages(List<Message> newMessages) Returns a newGenerateActionOptionswith the given messages, preserving all other fields.Constructors in com.google.genkit.ai with parameters of type MessageModifierConstructorDescriptionCreates a Candidate with a message.Candidate(Message message, FinishReason finishReason) Creates a Candidate with message and finish reason.Constructor parameters in com.google.genkit.ai with type arguments of type MessageModifierConstructorDescriptionGenerateOptions(String model, String prompt, List<Message> messages, List<Document> docs, String system, List<Tool<?, ?>> tools, Object toolChoice, OutputConfig output, GenerationConfig config, Map<String, Object> context, Integer maxTurns, ResumeOptions resume, Class<T> outputClass, List<GenerationMiddleware> use) Creates new GenerateOptions.ModelRequest(List<Message> messages) Creates a ModelRequest with the given messages. -
Uses of Message in com.google.genkit.ai.agent
Methods in com.google.genkit.ai.agent that return MessageModifier and TypeMethodDescriptionAgentInput.getMessage()Returns the input message.AgentOutput.getMessage()Returns the output message.AgentResult.getMessage()Returns the result message.AgentResponse.message()Returns the assistant message produced by the turn.Methods in com.google.genkit.ai.agent that return types with arguments of type MessageModifier and TypeMethodDescriptionSession.getMessages()Returns a copy of the current messages list.SessionRunner.getMessages()Returns a copy of the current messages list.SessionState.getMessages()Returns the session messages.AgentChat.messages()Returns the accumulated conversation messages.Methods in com.google.genkit.ai.agent with parameters of type MessageModifier and TypeMethodDescriptionvoidSession.addMessages(Message... msgs) Appends the given messages to the session.voidSessionRunner.addMessages(Message... m) Appends messages to the session.voidAgentInput.setMessage(Message message) Sets the input message.voidAgentOutput.setMessage(Message message) Sets the output message.voidAgentResult.setMessage(Message message) Sets the result message.Method parameters in com.google.genkit.ai.agent with type arguments of type MessageModifier and TypeMethodDescriptionvoidSession.addMessages(List<Message> msgs) Appends the given messages to the session.voidSession.setMessages(List<Message> msgs) Replaces the session's message list with a copy of the given list.voidSessionState.setMessages(List<Message> messages) Sets the session messages.voidSession.updateMessages(UnaryOperator<List<Message>> fn) Appliesfnto the current messages list and stores the result.