Gets suggestions for a participant based on specific historical messages.
Note that suggestions.list will only list the auto-generated suggestions, while suggestions.compile will try to compile suggestion based on the provided conversation context in the real time.
HTTP request
POST https://{endpoint}/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:compile
Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location
ID>/conversations/<Conversation ID>/participants/<Participant ID>.
Authorization requires the following IAM permission on the specified resource parent:
dialogflow.suggestions.list
Request body
The request body contains data with the following structure:
JSON representation
{"latestMessage": string,"contextSize": integer}
Fields
latestMessage
string
Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation.
Optional. Max number of messages prior to and including [latestMessage] to use as context when compiling the suggestion. If zero or less than zero, 20 is used.
Number of messages prior to and including latestMessage to compile the suggestion. It may be smaller than the CompileSuggestionRequest.context_size field in the request if there aren't that many messages in the conversation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[[["\u003cp\u003eThis endpoint compiles suggestions for a participant in a conversation based on historical messages, using a POST request to the specified URL.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eparent\u003c/code\u003e path parameter is required, specifying the participant's identifier and necessitating the \u003ccode\u003edialogflow.suggestions.list\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can include the \u003ccode\u003elatestMessage\u003c/code\u003e and \u003ccode\u003econtextSize\u003c/code\u003e to refine the suggestion compilation.\u003c/p\u003e\n"],["\u003cp\u003eThe response body returns a compiled suggestion object, the latest message used for compilation, and the context size, which may be smaller than requested if there aren't enough messages.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires either the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.conversations.participants.suggestions.compile\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.CompileSuggestionResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\n| This item is deprecated!\nDeprecated. use [suggestions.suggestArticles](/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations.participants.suggestions/suggestArticles#google.cloud.dialogflow.v2beta1.Participants.SuggestArticles) and [suggestions.suggestFaqAnswers](/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations.participants.suggestions/suggestFaqAnswers#google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers) instead.\n\nGets suggestions for a participant based on specific historical messages.\n\nNote that [suggestions.list](/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations.participants.suggestions/list#google.cloud.dialogflow.v2beta1.Participants.ListSuggestions) will only list the auto-generated suggestions, while [suggestions.compile](/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations.participants.suggestions/compile#google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion) will try to compile suggestion based on the provided conversation context in the real time.\n\n### HTTP request\n\n`POST https://{endpoint}/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:compile`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/es/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\n| This item is deprecated!\nThe response message for [Participants.CompileSuggestion](/dialogflow/es/docs/reference/rest/v2beta1/projects.conversations.participants.suggestions/compile#google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion).\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]