- Resource: Generator
- JSON representation
- FreeFormContext
- AgentCoachingContext
- AgentCoachingInstruction
- DuplicateCheckResult
- DuplicateSuggestion
- SummarizationContext
- SummarizationSection
- Type
- FewShotExample
- ConversationContext
- SummarizationSectionList
- GeneratorSuggestion
- FreeFormSuggestion
- SummarySuggestion
- AgentCoachingSuggestion
- AgentActionSuggestion
- Sources
- DuplicateCheckResult
- DuplicateSuggestion
- SampleResponse
- ToolCallInfo
- ToolCall
- State
- ToolCallResult
- Error
- InferenceParameter
- TriggerEvent
- SuggestionDedupingConfig
- Methods
Resource: Generator
LLM generator.
| JSON representation |
|---|
{ "name" : string , "description" : string , "inferenceParameter" : { object ( |
name
string
Output only. Identifier. The resource name of the generator. Format: projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>
description
string
Optional. Human readable description of the generator.
inferenceParameter
object (
InferenceParameter
)
Optional. Inference parameters for this generator.
triggerEvent
enum (
TriggerEvent
)
Optional. The trigger event of the generator. It defines when the generator is triggered in a conversation.
createTime
string (
Timestamp
format)
Output only. Creation time of this generator.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
updateTime
string (
Timestamp
format)
Output only. Update time of this generator.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
tools[]
string
Optional. Resource names of the tools that the generator can choose from. Format: projects/<Project ID>/locations/<Location ID>/tools/<tool ID>
.
suggestionDedupingConfig
object (
SuggestionDedupingConfig
)
Optional. Configuration for suggestion deduping. This is only applicable to AI Coach feature.
context
. Required. Input context of the generator. context
can be only one of the following:freeFormContext
object (
FreeFormContext
)
Input of free from generator to LLM.
agentCoachingContext
object (
AgentCoachingContext
)
Input of prebuilt Agent Coaching feature.
summarizationContext
object (
SummarizationContext
)
Input of prebuilt Summarization feature.
foundation_model
. The foundation model to use for generating suggestions. If a foundation model isn't specified here, a model specifically tuned for the feature type (and version when applicable) will be used. foundation_model
can be only one of the following:publishedModel
string
Optional. The published Large Language Model name. * To use the latest model version, specify the model name without version number. Example: text-bison
* To use a stable model version, specify the version number as well. Example: text-bison@002
.
FreeFormContext
Free form generator context that customer can configure.
| JSON representation |
|---|
{ "text" : string } |
| Fields | |
|---|---|
text
|
Optional. Free form text input to LLM. |
AgentCoachingContext
Agent Coaching context that customer can configure.
| JSON representation |
|---|
{
"overarchingGuidance"
:
string
,
"instructions"
:
[
{
object (
|
| Fields | |
|---|---|
overarchingGuidance
|
Optional. The overarching guidance for the agent coaching. This should be set only for v1.5 and later versions. |
instructions[]
|
Optional. Customized instructions for agent coaching. |
version
|
Optional. Version of the feature. If not set, default to latest version. Current candidates are ["1.2"]. |
outputLanguageCode
|
Optional. Output language code. |
AgentCoachingInstruction
Agent Coaching instructions that customer can configure.
| JSON representation |
|---|
{
"displayName"
:
string
,
"displayDetails"
:
string
,
"condition"
:
string
,
"agentAction"
:
string
,
"systemAction"
:
string
,
"duplicateCheckResult"
:
{
object (
|
| Fields | |
|---|---|
displayName
|
Optional. Display name for the instruction. |
displayDetails
|
Optional. The detailed description of this instruction. |
condition
|
Optional. The condition of the instruction. For example, "the customer wants to cancel an order". If the users want the instruction to be triggered unconditionally, the condition can be empty. |
agentAction
|
Optional. The action that human agent should take. For example, "apologize for the slow shipping". If the users only want to use agent coaching for intent detection, agentAction can be empty |
systemAction
|
Optional. The action that system should take. For example, "call GetOrderTime with order_number={order number provided by the customer}". If the users don't have plugins or don't want to trigger plugins, the systemAction can be empty |
duplicateCheckResult
|
Output only. Duplication check for the AgentCoachingInstruction. |
DuplicateCheckResult
Duplication check for the suggestion.
| JSON representation |
|---|
{
"duplicateSuggestions"
:
[
{
object (
|
| Fields | |
|---|---|
duplicateSuggestions[]
|
Output only. The duplicate suggestions. |
DuplicateSuggestion
The duplicate suggestion details.
| JSON representation |
|---|
{ "answerRecord" : string , "suggestionIndex" : integer , "similarityScore" : number } |
| Fields | |
|---|---|
answerRecord
|
Output only. The answer record id of the past duplicate suggestion. |
suggestionIndex
|
Output only. The index of the duplicate suggestion in the past suggestion list. |
similarityScore
|
Output only. The similarity score of between the past and current suggestion. |
SummarizationContext
Summarization context that customer can configure.
| JSON representation |
|---|
{ "summarizationSections" : [ { object ( |
| Fields | |
|---|---|
summarizationSections[]
|
Optional. List of sections. Note it contains both predefined section sand customer defined sections. |
fewShotExamples[]
|
Optional. List of few shot examples. |
version
|
Optional. Version of the feature. If not set, default to latest version. Current candidates are ["1.0"]. |
outputLanguageCode
|
Optional. The target language of the generated summary. The language code for conversation will be used if this field is empty. Supported 2.0 and later versions. |
SummarizationSection
Represents the section of summarization.
| JSON representation |
|---|
{
"key"
:
string
,
"definition"
:
string
,
"type"
:
enum (
|
| Fields | |
|---|---|
key
|
Optional. Name of the section, for example, "situation". |
definition
|
Optional. Definition of the section, for example, "what the customer needs help with or has question about." |
type
|
Optional. Type of the summarization section. |
Type
Type enum of the summarization sections.
| Enums | |
|---|---|
TYPE_UNSPECIFIED
|
Undefined section type, does not return anything. |
SITUATION
|
What the customer needs help with or has question about. Section name: "situation". |
ACTION
|
What the agent does to help the customer. Section name: "action". |
RESOLUTION
|
Result of the customer service. A single word describing the result of the conversation. Section name: "resolution". |
REASON_FOR_CANCELLATION
|
Reason for cancellation if the customer requests for a cancellation. "N/A" otherwise. Section name: "reason_for_cancellation". |
CUSTOMER_SATISFACTION
|
"Unsatisfied" or "Satisfied" depending on the customer's feelings at the end of the conversation. Section name: "customer_satisfaction". |
ENTITIES
|
Key entities extracted from the conversation, such as ticket number, order number, dollar amount, etc. Section names are prefixed by "entities/". |
CUSTOMER_DEFINED
|
Customer defined sections. |
SITUATION_CONCISE
|
Concise version of the situation section. This type is only available if type SITUATION is not selected. |
ACTION_CONCISE
|
Concise version of the action section. This type is only available if type ACTION is not selected. |
FewShotExample
Providing examples in the generator (i.e. building a few-shot generator) helps convey the desired format of the LLM response.
| JSON representation |
|---|
{ "conversationContext" : { object ( |
conversationContext
object (
ConversationContext
)
Optional. Conversation transcripts.
extraInfo
map (key: string, value: string)
Optional. Key is the placeholder field name in input, value is the value of the placeholder. E.g. instruction contains "@price", and ingested data has <"price", "10">
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
output
object (
GeneratorSuggestion
)
Required. Example output of the model.
instruction_list
. Instruction list of this few_shot example. instruction_list
can be only one of the following:summarizationSectionList
object (
SummarizationSectionList
)
Summarization sections.
ConversationContext
Context of the conversation, including transcripts.
| JSON representation |
|---|
{
"messageEntries"
:
[
{
object (
|
| Fields |
|---|
SummarizationSectionList
List of summarization sections.
| JSON representation |
|---|
{
"summarizationSections"
:
[
{
object (
|
| Fields | |
|---|---|
summarizationSections[]
|
Optional. Summarization sections. |
GeneratorSuggestion
Suggestion generated using a Generator.
| JSON representation |
|---|
{ "toolCallInfo" : [ { object ( |
toolCallInfo[]
object (
ToolCallInfo
)
Optional. List of request and response for tool calls executed.
suggestion
. The suggestion could be one of the many types suggestion
can be only one of the following:freeFormSuggestion
object (
FreeFormSuggestion
)
Optional. Free form suggestion.
summarySuggestion
object (
SummarySuggestion
)
Optional. Suggested summary.
agentCoachingSuggestion
object (
AgentCoachingSuggestion
)
Optional. Suggestion to coach the agent.
FreeFormSuggestion
Suggestion generated using free form generator.
| JSON representation |
|---|
{ "response" : string } |
| Fields | |
|---|---|
response
|
Required. Free form suggestion. |
SummarySuggestion
Suggested summary of the conversation.
| JSON representation |
|---|
{
"summarySections"
:
[
{
object (
|
| Fields | |
|---|---|
summarySections[]
|
Required. All the parts of generated summary. |
AgentCoachingSuggestion
Suggestion for coaching agents.
| JSON representation |
|---|
{ "applicableInstructions" : [ { object ( |
| Fields | |
|---|---|
applicableInstructions[]
|
Optional. Instructions applicable based on the current context. |
agentActionSuggestions[]
|
Optional. Suggested actions for the agent to take. |
sampleResponses[]
|
Optional. Sample response for the Agent. |
AgentActionSuggestion
Actions suggested for the agent. This is based on applicable instructions.
| JSON representation |
|---|
{ "agentAction" : string , "sources" : { object ( |
| Fields | |
|---|---|
agentAction
|
Optional. The suggested action for the agent. |
sources
|
Output only. Sources for the agent action suggestion. |
duplicateCheckResult
|
Output only. Duplicate check result for the agent action suggestion. |
Sources
Sources for the suggestion.
| JSON representation |
|---|
{ "instructionIndexes" : [ integer ] } |
| Fields | |
|---|---|
instructionIndexes[]
|
Output only. Source instruction indexes for the suggestion. This is the index of the applicableInstructions field. |
DuplicateCheckResult
Duplication check for the suggestion.
| JSON representation |
|---|
{
"duplicateSuggestions"
:
[
{
object (
|
| Fields | |
|---|---|
duplicateSuggestions[]
|
Output only. The duplicate suggestions. |
DuplicateSuggestion
The duplicate suggestion details. Keeping answerRecord and sources together as they are identifiers for duplicate suggestions.
| JSON representation |
|---|
{
"answerRecord"
:
string
,
"sources"
:
{
object (
|
| Fields | |
|---|---|
answerRecord
|
Output only. The answer record id of the past duplicate suggestion. |
sources
|
Output only. Sources for the suggestion. |
suggestionIndex
|
Output only. The index of the duplicate suggestion in the past suggestion list. |
similarityScore
|
Output only. The similarity score of between the past and current suggestion. |
SampleResponse
Sample response that the agent can use. This could be based on applicable instructions and ingested data from other systems.
| JSON representation |
|---|
{ "responseText" : string , "sources" : { object ( |
| Fields | |
|---|---|
responseText
|
Optional. Sample response for Agent in text. |
sources
|
Output only. Sources for the Sample Response. |
duplicateCheckResult
|
Output only. Duplicate check result for the sample response. |
ToolCallInfo
Request and response for a tool call.
| JSON representation |
|---|
{ "toolCall" : { object ( |
| Fields | |
|---|---|
toolCall
|
Required. Request for a tool call. |
toolCallResult
|
Required. Response for a tool call. |
ToolCall
Represents a call of a specific tool's action with the specified inputs.
| JSON representation |
|---|
{ "toolDisplayName" : string , "toolDisplayDetails" : string , "action" : string , "inputParameters" : { object } , "createTime" : string , "answerRecord" : string , "state" : enum ( |
toolDisplayName
string
Optional. A human readable short name of the tool, to be shown on the UI.
toolDisplayDetails
string
Optional. A human readable description of the tool.
action
string
Optional. The name of the tool's action associated with this call.
inputParameters
object (
Struct
format)
Optional. The action's input parameters.
createTime
string (
Timestamp
format)
Output only. Create time of the tool call.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
answerRecord
string
Optional. The answer record associated with this tool call.
state
enum (
State
)
Output only. State of the tool call.
source
. Specifies the source of this tool call. source
can be only one of the following:tool
string
Optional. The tool
associated with this call. Format: projects/<ProjectID>/locations/<LocationID>/tools/<ToolID>
.
State
Tool call states.
| Enums | |
|---|---|
STATE_UNSPECIFIED
|
Default value. |
TRIGGERED
|
The tool call has been triggered. |
NEEDS_CONFIRMATION
|
The tool call requires confirmation from a human. |
ToolCallResult
The result of calling a tool's action.
| JSON representation |
|---|
{ "action" : string , "createTime" : string , "answerRecord" : string , // Union field |
action
string
Optional. The name of the tool's action associated with this call.
createTime
string (
Timestamp
format)
Output only. Create time of the tool call result.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
answerRecord
string
Optional. The answer record associated with this tool call result.
source
. Specifies the source of this tool call. source
can be only one of the following:tool
string
Optional. The tool
associated with this call. Format: projects/<ProjectID>/locations/<LocationID>/tools/<ToolID>
.
result
. The tool call's result. result
can be only one of the following:error
object (
Error
)
The tool call's error.
rawContent
string ( bytes
format)
Only populated if the response content is not utf-8 encoded. (by definition byte fields are base64 encoded).
A base64-encoded string.
content
string
Only populated if the response content is utf-8 encoded.
Error
An error produced by the tool call.
| JSON representation |
|---|
{ "message" : string } |
| Fields |
|---|
InferenceParameter
The parameters of inference.
| JSON representation |
|---|
{ "maxOutputTokens" : integer , "temperature" : number , "topK" : integer , "topP" : number } |
| Fields | |
|---|---|
maxOutputTokens
|
Optional. Maximum number of the output tokens for the generator. |
temperature
|
Optional. Controls the randomness of LLM predictions. Low temperature = less random. High temperature = more random. If unset (or 0), uses a default value of 0. |
topK
|
Optional. Top-k changes how the model selects tokens for output. A top-k of 1 means the selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a top-k of 3 means that the next token is selected from among the 3 most probable tokens (using temperature). For each token selection step, the top K tokens with the highest probabilities are sampled. Then tokens are further filtered based on topP with the final token selected using temperature sampling. Specify a lower value for less random responses and a higher value for more random responses. Acceptable value is [1, 40], default to 40. |
topP
|
Optional. Top-p changes how the model selects tokens for output. Tokens are selected from most K (see topK parameter) probable to least until the sum of their probabilities equals the top-p value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-p value is 0.5, then the model will select either A or B as the next token (using temperature) and doesn't consider C. The default top-p value is 0.95. Specify a lower value for less random responses and a higher value for more random responses. Acceptable value is [0.0, 1.0], default to 0.95. |
TriggerEvent
The event that triggers the generator and LLM execution.
| Enums | |
|---|---|
TRIGGER_EVENT_UNSPECIFIED
|
Default value for TriggerEvent. |
END_OF_UTTERANCE
|
Triggers when each chat message or voice utterance ends. |
MANUAL_CALL
|
Triggers on the conversation manually by API calls, such as Conversations.GenerateStatelessSuggestion and Conversations.GenerateSuggestions. |
CUSTOMER_MESSAGE
|
Triggers after each customer message only. |
AGENT_MESSAGE
|
Triggers after each agent message only. |
SuggestionDedupingConfig
Config for suggestion deduping. NEXT_ID: 3
| JSON representation |
|---|
{ "enableDeduping" : boolean , "similarityThreshold" : number } |
| Fields | |
|---|---|
enableDeduping
|
Optional. Whether to enable suggestion deduping. |
similarityThreshold
|
Optional. The threshold for similarity between two suggestions. Acceptable value is [0.0, 1.0], default to 0.8 |
Methods |
|
|---|---|
|
Creates a generator. |
|
Lists generators. |

