blob: 53066f0dc86f10b4f2febcb99f84bb9e6307f3b5 [file] [edit]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="dialogflow_v2.html">Dialogflow API</a> . <a href="dialogflow_v2.projects.html">projects</a> . <a href="dialogflow_v2.projects.locations.html">locations</a> . <a href="dialogflow_v2.projects.locations.statelessSuggestion.html">statelessSuggestion</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#generate">generate(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Generates and returns a suggestion for a conversation that does not have a resource created for it.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="generate">generate(parent, body=None, x__xgafv=None)</code>
<pre>Generates and returns a suggestion for a conversation that does not have a resource created for it.
Args:
parent: string, Required. The parent resource to charge for the Suggestion&#x27;s generation. Format: `projects//locations/`. (required)
body: object, The request body.
The object takes the form of:
{ # The request message for Conversations.GenerateStatelessSuggestion.
&quot;conversationContext&quot;: { # Context of the conversation, including transcripts. # Optional. Context of the conversation, including transcripts.
&quot;messageEntries&quot;: [ # Optional. List of message transcripts in the conversation.
{ # Represents a message entry of a conversation.
&quot;createTime&quot;: &quot;A String&quot;, # Optional. Create time of the message entry.
&quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language of the text. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.
&quot;role&quot;: &quot;A String&quot;, # Optional. Participant role of the message.
&quot;text&quot;: &quot;A String&quot;, # Optional. Transcript content of the message.
},
],
},
&quot;generator&quot;: { # LLM generator. # Uncreated generator. It should be a complete generator that includes all information about the generator.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. Creation time of this generator.
&quot;description&quot;: &quot;A String&quot;, # Optional. Human readable description of the generator.
&quot;inferenceParameter&quot;: { # The parameters of inference. # Optional. Inference parameters for this generator.
&quot;maxOutputTokens&quot;: 42, # Optional. Maximum number of the output tokens for the generator.
&quot;temperature&quot;: 3.14, # 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.
&quot;topK&quot;: 42, # 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&#x27;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.
&quot;topP&quot;: 3.14, # 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&#x27;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.
},
&quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of the generator. Format: `projects//locations//generators/`
&quot;summarizationContext&quot;: { # Summarization context that customer can configure. # Input of prebuilt Summarization feature.
&quot;fewShotExamples&quot;: [ # Optional. List of few shot examples.
{ # Providing examples in the generator (i.e. building a few-shot generator) helps convey the desired format of the LLM response. NEXT_ID: 10
&quot;conversationContext&quot;: { # Context of the conversation, including transcripts. # Optional. Conversation transcripts.
&quot;messageEntries&quot;: [ # Optional. List of message transcripts in the conversation.
{ # Represents a message entry of a conversation.
&quot;createTime&quot;: &quot;A String&quot;, # Optional. Create time of the message entry.
&quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language of the text. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.
&quot;role&quot;: &quot;A String&quot;, # Optional. Participant role of the message.
&quot;text&quot;: &quot;A String&quot;, # Optional. Transcript content of the message.
},
],
},
&quot;extraInfo&quot;: { # Optional. Key is the placeholder field name in input, value is the value of the placeholder. E.g. instruction contains &quot;@price&quot;, and ingested data has &lt;&quot;price&quot;, &quot;10&quot;&gt;
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;output&quot;: { # Suggestion generated using a Generator. # Required. Example output of the model.
&quot;summarySuggestion&quot;: { # Suggested summary of the conversation. # Optional. Suggested summary.
&quot;summarySections&quot;: [ # Required. All the parts of generated summary.
{ # A component of the generated summary.
&quot;section&quot;: &quot;A String&quot;, # Required. Name of the section.
&quot;summary&quot;: &quot;A String&quot;, # Required. Summary text for the section.
},
],
},
},
&quot;summarizationSectionList&quot;: { # List of summarization sections. # Summarization sections.
&quot;summarizationSections&quot;: [ # Optional. Summarization sections.
{ # Represents the section of summarization.
&quot;definition&quot;: &quot;A String&quot;, # Optional. Definition of the section, for example, &quot;what the customer needs help with or has question about.&quot;
&quot;key&quot;: &quot;A String&quot;, # Optional. Name of the section, for example, &quot;situation&quot;.
&quot;type&quot;: &quot;A String&quot;, # Optional. Type of the summarization section.
},
],
},
},
],
&quot;outputLanguageCode&quot;: &quot;A String&quot;, # 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.
&quot;summarizationSections&quot;: [ # Optional. List of sections. Note it contains both predefined section sand customer defined sections.
{ # Represents the section of summarization.
&quot;definition&quot;: &quot;A String&quot;, # Optional. Definition of the section, for example, &quot;what the customer needs help with or has question about.&quot;
&quot;key&quot;: &quot;A String&quot;, # Optional. Name of the section, for example, &quot;situation&quot;.
&quot;type&quot;: &quot;A String&quot;, # Optional. Type of the summarization section.
},
],
&quot;version&quot;: &quot;A String&quot;, # Optional. Version of the feature. If not set, default to latest version. Current candidates are [&quot;1.0&quot;].
},
&quot;triggerEvent&quot;: &quot;A String&quot;, # Optional. The trigger event of the generator. It defines when the generator is triggered in a conversation.
&quot;updateTime&quot;: &quot;A String&quot;, # Output only. Update time of this generator.
},
&quot;generatorName&quot;: &quot;A String&quot;, # The resource name of the existing created generator. Format: `projects//locations//generators/`
&quot;triggerEvents&quot;: [ # Optional. A list of trigger events. Generator will be triggered only if it&#x27;s trigger event is included here.
&quot;A String&quot;,
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The response message for Conversations.GenerateStatelessSuggestion.
&quot;generatorSuggestion&quot;: { # Suggestion generated using a Generator. # Required. Generated suggestion for a conversation.
&quot;summarySuggestion&quot;: { # Suggested summary of the conversation. # Optional. Suggested summary.
&quot;summarySections&quot;: [ # Required. All the parts of generated summary.
{ # A component of the generated summary.
&quot;section&quot;: &quot;A String&quot;, # Required. Name of the section.
&quot;summary&quot;: &quot;A String&quot;, # Required. Summary text for the section.
},
],
},
},
}</pre>
</div>
</body></html>