- [Resource: Conversation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SCHEMA_REPRESENTATION)
  - [State](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.State)
  - [ConversationMessage](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ConversationMessage)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ConversationMessage.SCHEMA_REPRESENTATION)
  - [TextInput](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.TextInput)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.TextInput.SCHEMA_REPRESENTATION)
  - [ConversationContext](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ConversationContext)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ConversationContext.SCHEMA_REPRESENTATION)
  - [Reply](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Reply)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Reply.SCHEMA_REPRESENTATION)
  - [Summary](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Summary)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Summary.SCHEMA_REPRESENTATION)
  - [SummarySkippedReason](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SummarySkippedReason)
  - [SafetyAttributes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SafetyAttributes)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SafetyAttributes.SCHEMA_REPRESENTATION)
  - [SummaryWithMetadata](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SummaryWithMetadata)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SummaryWithMetadata.SCHEMA_REPRESENTATION)
  - [CitationMetadata](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.CitationMetadata)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.CitationMetadata.SCHEMA_REPRESENTATION)
  - [Citation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Citation)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Citation.SCHEMA_REPRESENTATION)
  - [CitationSource](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.CitationSource)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.CitationSource.SCHEMA_REPRESENTATION)
  - [Reference](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Reference)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Reference.SCHEMA_REPRESENTATION)
  - [ChunkContent](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ChunkContent)
    - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ChunkContent.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#METHODS_SUMMARY)

## Resource: Conversation

External conversation proto definition.

| JSON representation |
|---|
| ``` { "name": string, "state": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.State`), "userPseudoId": string, "messages": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ConversationMessage`) } ], "startTime": string, "endTime": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. |
| `state` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.State`)`` The state of the Conversation. |
| `userPseudoId` | `string` A unique identifier for tracking users. |
| `messages[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ConversationMessage`)`` Conversation messages. |
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the conversation started. 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"`. |
| `endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the conversation finished. 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"`. |

### State

Enumeration of the state of the conversation.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unknown. |
| `IN_PROGRESS` | Conversation is currently open. |
| `COMPLETED` | Conversation has been completed. |

### ConversationMessage

Defines a conversation message.

| JSON representation |
|---|
| ``` { "createTime": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "userInput": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.TextInput`) }, "reply": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Reply`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Message creation timestamp. 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"`. |
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `userInput` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.TextInput`)`` User text input. |
| `reply` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Reply`)`` Search reply. |
| End of mutually exclusive fields. ||

### TextInput

Defines text input.

| JSON representation |
|---|
| ``` { "input": string, "context": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ConversationContext`) } } ``` |

| Fields ||
|---|---|
| `input` | `string` Text input. |
| `context` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ConversationContext`)`` Conversation context of the input. |

### ConversationContext

Defines context of the conversation

| JSON representation |
|---|
| ``` { "contextDocuments": [ string ], "activeDocument": string } ``` |

| Fields ||
|---|---|
| `contextDocuments[]` | `string` The current list of documents the user is seeing. It contains the document resource references. |
| `activeDocument` | `string` The current active document the user opened. It contains the document resource reference. |

### Reply

Defines a reply message to user.

| JSON representation |
|---|
| ``` { "summary": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Summary`) } } ``` |

| Fields ||
|---|---|
| `summary` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Summary`)`` Summary based on search results. |

### Summary

Summary of the top N search results specified by the summary spec.

| JSON representation |
|---|
| ``` { "summaryText": string, "summarySkippedReasons": [ enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SummarySkippedReason`) ], "safetyAttributes": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SafetyAttributes`) }, "summaryWithMetadata": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SummaryWithMetadata`) } } ``` |

| Fields ||
|---|---|
| `summaryText` | `string` The summary content. |
| `summarySkippedReasons[]` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SummarySkippedReason`)`` Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. |
| `safetyAttributes` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SafetyAttributes`)`` A collection of Safety Attribute categories and their associated confidence scores. |
| `summaryWithMetadata` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.SummaryWithMetadata`)`` Summary with metadata information. |

### SummarySkippedReason

An Enum for summary-skipped reasons.

| Enums ||
|---|---|
| `SUMMARY_SKIPPED_REASON_UNSPECIFIED` | Default value. The summary skipped reason is not specified. |
| `ADVERSARIAL_QUERY_IGNORED` | The adversarial query ignored case. Only used when `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/ContentSearchSpec#SummarySpec.FIELDS.ignore_adversarial_query` is set to `true`. |
| `NON_SUMMARY_SEEKING_QUERY_IGNORED` | The non-summary seeking query ignored case. Google skips the summary if the query is chit chat. Only used when `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/ContentSearchSpec#SummarySpec.FIELDS.ignore_non_summary_seeking_query` is set to `true`. |
| `OUT_OF_DOMAIN_QUERY_IGNORED` | The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B. |
| `POTENTIAL_POLICY_VIOLATION` | The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic. |
| `LLM_ADDON_NOT_ENABLED` | The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled. |
| `NO_RELEVANT_CONTENT` | The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results. |
| `JAIL_BREAKING_QUERY_IGNORED` | The jail-breaking query ignored case. For example, "Reply in the tone of a competing company's CEO". Only used when \[SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query\] is set to `true`. |
| `CUSTOMER_POLICY_VIOLATION` | The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer. |
| `NON_SUMMARY_SEEKING_QUERY_IGNORED_V2` | The non-answer seeking query ignored case. Google skips the summary if the query doesn't have clear intent. Only used when \[SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query\] is set to `true`. |
| `TIME_OUT` | The time out case. Google skips the summary if the time out. |

### SafetyAttributes

Safety Attribute categories and their associated confidence scores.

| JSON representation |
|---|
| ``` { "categories": [ string ], "scores": [ number ] } ``` |

| Fields ||
|---|---|
| `categories[]` | `string` The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. |
| `scores[]` | `number` The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. |

### SummaryWithMetadata

Summary with metadata information.

| JSON representation |
|---|
| ``` { "summary": string, "citationMetadata": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.CitationMetadata`) }, "references": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Reference`) } ] } ``` |

| Fields ||
|---|---|
| `summary` | `string` Summary text with no citation information. |
| `citationMetadata` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.CitationMetadata`)`` Citation metadata for given summary. |
| `references[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Reference`)`` Document References. |

### CitationMetadata

Citation metadata.

| JSON representation |
|---|
| ``` { "citations": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Citation`) } ] } ``` |

| Fields ||
|---|---|
| `citations[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.Citation`)`` Citations for segments. |

### Citation

Citation info for a segment.

| JSON representation |
|---|
| ``` { "startIndex": string, "endIndex": string, "sources": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.CitationSource`) } ] } ``` |

| Fields ||
|---|---|
| `startIndex` | `string (https://developers.google.com/discovery/v1/type-format format)` Index indicates the start of the segment, measured in bytes/unicode. |
| `endIndex` | `string (https://developers.google.com/discovery/v1/type-format format)` End of the attributed segment, exclusive. |
| `sources[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.CitationSource`)`` Citation sources for the attributed segment. |

### CitationSource

Citation source.

| JSON representation |
|---|
| ``` { "referenceIndex": string } ``` |

| Fields ||
|---|---|
| `referenceIndex` | `string (https://developers.google.com/discovery/v1/type-format format)` Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the referenceIndex is not set explicitly. |

### Reference

Document reference.

| JSON representation |
|---|
| ``` { "title": string, "document": string, "uri": string, "chunkContents": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ChunkContent`) } ] } ``` |

| Fields ||
|---|---|
| `title` | `string` Title of the document. |
| `document` | `string` Required. `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.branches.documents#Document.FIELDS.name` of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. |
| `uri` | `string` Cloud Storage or HTTP uri for the document. |
| `chunkContents[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations#Conversation.ChunkContent`)`` List of cited chunk contents derived from document content. |

### ChunkContent

Chunk content.

| JSON representation |
|---|
| ``` { "content": string, "pageIdentifier": string } ``` |

| Fields ||
|---|---|
| `content` | `string` Chunk textual content. |
| `pageIdentifier` | `string` Page identifier. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations/converse` | Converses a conversation. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations/create` | Creates a Conversation. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations/delete` | Deletes a Conversation. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations/get` | Gets a Conversation. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations/list` | Lists all Conversations by their parent `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores#DataStore`. |
| ### `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.conversations/patch` | Updates a Conversation. |