Uses of Class
com.google.genai.types.Content
Packages that use Content
-
Uses of Content in com.google.genai
Methods in com.google.genai with parameters of type ContentModifier and TypeMethodDescriptionLocalTokenizer.computeTokens(Content content) Computes the token ids and string pieces for a single content object.LocalTokenizer.countTokens(Content content) Counts the number of tokens in a single content object using default configuration.LocalTokenizer.countTokens(Content content, CountTokensConfig config) Counts the number of tokens in a single content object.AsyncModels.generateContent(String model, Content content, GenerateContentConfig config) Asynchronously generates content given a GenAI model and a content object.Models.generateContent(String model, Content content, GenerateContentConfig config) Generates content given a GenAI model and a content object.AsyncModels.generateContentStream(String model, Content content, GenerateContentConfig config) Asynchronously generates content with streaming support given a GenAI model and a content object.Models.generateContentStream(String model, Content content, GenerateContentConfig config) Generates content with streaming support given a GenAI model and a content object.AsyncChat.sendMessage(Content content) Asynchronously sends a message to the model in the current multi-turn chat session and returns the model's response.AsyncChat.sendMessage(Content content, GenerateContentConfig config) Asynchronously sends a message to the model in the current multi-turn chat session and returns the model's response.Chat.sendMessage(Content content) Sends a message to the model in the current multi-turn chat session and returns the model's response.Chat.sendMessage(Content content, GenerateContentConfig config) Sends a message to the model in the current multi-turn chat session and returns the model's response.AsyncChat.sendMessageStream(Content content) Asynchronously sends a message to the model in the current multi-turn chat session and returns a stream of responses.AsyncChat.sendMessageStream(Content content, GenerateContentConfig config) Asynchronously sends a message to the model in the current multi-turn chat session and returns a stream of responses.Chat.sendMessageStream(Content content) Sends a message to the model in the current multi-turn chat session and returns a stream of responses.Chat.sendMessageStream(Content content, GenerateContentConfig config) Sends a message to the model in the current multi-turn chat session and returns a stream of responses.Method parameters in com.google.genai with type arguments of type ContentModifier and TypeMethodDescriptionAsyncModels.computeTokens(String model, List<Content> contents, ComputeTokensConfig config) Asynchronously computes tokens given a GenAI model and a list of content.LocalTokenizer.computeTokens(List<Content> contents) Computes the tokens ids and string pieces in the input.Models.computeTokens(String model, List<Content> contents, ComputeTokensConfig config) Computes tokens given a GenAI model and a list of content.AsyncModels.countTokens(String model, List<Content> contents, CountTokensConfig config) Asynchronously counts tokens given a GenAI model and a list of content.LocalTokenizer.countTokens(List<Content> contents) Counts the number of tokens in a list of content objects using default configuration.LocalTokenizer.countTokens(List<Content> contents, CountTokensConfig config) Counts the number of tokens in a given text.Models.countTokens(String model, List<Content> contents, CountTokensConfig config) Counts tokens given a GenAI model and a list of content.AsyncModels.generateContent(String model, List<Content> contents, GenerateContentConfig config) Asynchronously generates content given a GenAI model and a list of content.Models.generateContent(String model, List<Content> contents, GenerateContentConfig config) Generates content given a GenAI model and a list of content.AsyncModels.generateContentStream(String model, List<Content> contents, GenerateContentConfig config) Asynchronously generates content with streaming support given a GenAI model and a list of content.Models.generateContentStream(String model, List<Content> contents, GenerateContentConfig config) Generates content with streaming support given a GenAI model and a list of content.AsyncChat.sendMessage(List<Content> contents) Asynchronously sends a message to the model in the current multi-turn chat session and returns the model's response.AsyncChat.sendMessage(List<Content> contents, GenerateContentConfig config) Asynchronously sends a message to the model in the current multi-turn chat session and returns the model's response.Chat.sendMessage(List<Content> contents) Sends a message to the model in the current multi-turn chat session and returns the model's response.Chat.sendMessage(List<Content> contents, GenerateContentConfig config) Sends a message to the model in the current multi-turn chat session and returns the model's response.AsyncChat.sendMessageStream(List<Content> contents) Sends a message to the model in the current multi-turn chat session and returns the model's response.AsyncChat.sendMessageStream(List<Content> contents, GenerateContentConfig config) Asynchronously sends a message to the model in the current multi-turn chat session and returns a stream of responses.Chat.sendMessageStream(List<Content> contents) Sends a message to the model in the current multi-turn chat session and returns the model's response.Chat.sendMessageStream(List<Content> contents, GenerateContentConfig config) Sends a message to the model in the current multi-turn chat session and returns a stream of responses. -
Uses of Content in com.google.genai.types
Methods in com.google.genai.types that return ContentModifier and TypeMethodDescriptionabstract ContentContent.Builder.build()static ContentDeserializes a JSON string to a Content object.static ContentConstructs a Content from parts, assuming the role is "user".Methods in com.google.genai.types that return types with arguments of type ContentModifier and TypeMethodDescriptionGenerateContentResponse.automaticFunctionCallingHistory()The history of automatic function calling.GeminiPreferenceExampleCompletion.completion()Single turn completion for the given prompt.Candidate.content()Contains the multi-part content of the response.ComputeTokensParameters.contents()Input content.CountTokensParameters.contents()Input content.CreateCachedContentConfig.contents()The content to cache.EmbedContentBatch.contents()The content to embed.EmbedContentParameters.contents()The content to embed.GeminiPreferenceExample.contents()Multi-turn contents that represents the Prompt.GenerateContentParameters.contents()Content of the request.InlinedRequest.contents()Content of the request.LiveServerContent.modelTurn()The content that the model has generated as part of the current conversation with the user.CountTokensConfig.systemInstruction()Instructions for the model to steer it toward better performance.CreateCachedContentConfig.systemInstruction()Developer set system instruction.GenerateContentConfig.systemInstruction()Instructions for the model to steer it toward better performance.LiveClientSetup.systemInstruction()The user provided system instructions for the model.LiveConnectConfig.systemInstruction()The user provided system instructions for the model.LiveClientContent.turns()The content appended to the current conversation with the model.LiveSendClientContentParameters.turns()Client content to send to the session.DatasetStats.userDatasetExamples()Output only.SupervisedTuningDataStats.userDatasetExamples()Output only.Methods in com.google.genai.types with parameters of type ContentModifier and TypeMethodDescriptionGenerateContentResponse.Builder.automaticFunctionCallingHistory(Content... automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.GeminiPreferenceExampleCompletion.Builder.completion(Content completion) Setter for completion.abstract Candidate.BuilderSetter for content.Setter for contents.Setter for contents.Setter for contents.Setter for contents.Setter for contents.Setter for contents.Setter for contents.Setter for contents.abstract LiveServerContent.BuilderSetter for modelTurn.abstract CountTokensConfig.BuilderCountTokensConfig.Builder.systemInstruction(Content systemInstruction) Setter for systemInstruction.abstract CreateCachedContentConfig.BuilderCreateCachedContentConfig.Builder.systemInstruction(Content systemInstruction) Setter for systemInstruction.abstract GenerateContentConfig.BuilderGenerateContentConfig.Builder.systemInstruction(Content systemInstruction) Setter for systemInstruction.abstract LiveClientSetup.BuilderLiveClientSetup.Builder.systemInstruction(Content systemInstruction) Setter for systemInstruction.abstract LiveConnectConfig.BuilderLiveConnectConfig.Builder.systemInstruction(Content systemInstruction) Setter for systemInstruction.Setter for turns.Setter for turns.DatasetStats.Builder.userDatasetExamples(Content... userDatasetExamples) Setter for userDatasetExamples.SupervisedTuningDataStats.Builder.userDatasetExamples(Content... userDatasetExamples) Setter for userDatasetExamples.Method parameters in com.google.genai.types with type arguments of type ContentModifier and TypeMethodDescriptionabstract GenerateContentResponse.BuilderGenerateContentResponse.Builder.automaticFunctionCallingHistory(List<Content> automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.abstract ComputeTokensParameters.BuilderSetter for contents.abstract CountTokensParameters.BuilderSetter for contents.abstract CreateCachedContentConfig.BuilderSetter for contents.abstract EmbedContentBatch.BuilderSetter for contents.abstract EmbedContentParameters.BuilderSetter for contents.abstract GeminiPreferenceExample.BuilderSetter for contents.abstract GenerateContentParameters.BuilderSetter for contents.abstract InlinedRequest.BuilderSetter for contents.abstract LiveClientContent.BuilderSetter for turns.Setter for turns.abstract DatasetStats.BuilderDatasetStats.Builder.userDatasetExamples(List<Content> userDatasetExamples) Setter for userDatasetExamples.abstract SupervisedTuningDataStats.BuilderSupervisedTuningDataStats.Builder.userDatasetExamples(List<Content> userDatasetExamples) Setter for userDatasetExamples.