REST Resource: projects.locations.collections.dataStores.conversations

Resource: Conversation

External conversation proto definition.

JSON representation
{
  "name": string,
  "state": enum (State),
  "userPseudoId": string,
  "messages": [
    {
      object (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 (State)

The state of the Conversation.

userPseudoId

string

A unique identifier for tracking users.

messages[]

object (ConversationMessage)

Conversation messages.

startTime

string (Timestamp format)

Output only. The time the conversation started.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

Output only. The time the conversation finished.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

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,

  // Union field message can be only one of the following:
  "userInput": {
    object (TextInput)
  },
  "reply": {
    object (Reply)
  }
  // End of list of possible types for union field message.
}
Fields
createTime

string (Timestamp format)

Output only. Message creation timestamp.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Union field message.

message can be only one of the following:

userInput

object (TextInput)

User text input.

reply

object (Reply)

Search reply.

TextInput

Defines text input.

JSON representation
{
  "input": string,
  "context": {
    object (ConversationContext)
  }
}
Fields
input

string

Text input.

context

object (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
{
  "reply": string,
  "references": [
    {
      object (Reference)
    }
  ],
  "summary": {
    object (Summary)
  }
}
Fields
reply
(deprecated)

string

DEPRECATED: use summary instead. Text reply.

references[]
(deprecated)

object (Reference)

References in the reply.

summary

object (Summary)

Summary based on search results.

Reference

Defines reference in reply.

JSON representation
{
  "uri": string,
  "anchorText": string,
  "start": integer,
  "end": integer
}
Fields
uri

string

URI link reference.

anchorText

string

Anchor text.

start

integer

Anchor text start index.

end

integer

Anchor text end index.

Summary

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

JSON representation
{
  "summaryText": string,
  "summarySkippedReasons": [
    enum (SummarySkippedReason)
  ],
  "safetyAttributes": {
    object (SafetyAttributes)
  },
  "summaryWithMetadata": {
    object (SummaryWithMetadata)
  }
}
Fields
summaryText

string

The summary content.

summarySkippedReasons[]

enum (SummarySkippedReason)

Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

safetyAttributes

object (SafetyAttributes)

A collection of Safety Attribute categories and their associated confidence scores.

summaryWithMetadata

object (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 SummarySpec.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 SummarySpec.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.

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 (CitationMetadata)
  },
  "references": [
    {
      object (Reference)
    }
  ]
}
Fields
summary

string

Summary text with no citation information.

citationMetadata

object (CitationMetadata)

Citation metadata for given summary.

references[]

object (Reference)

Document References.

CitationMetadata

Citation metadata.

JSON representation
{
  "citations": [
    {
      object (Citation)
    }
  ]
}
Fields
citations[]

object (Citation)

Citations for segments.

Citation

Citation info for a segment.

JSON representation
{
  "startIndex": string,
  "endIndex": string,
  "sources": [
    {
      object (CitationSource)
    }
  ]
}
Fields
startIndex

string (int64 format)

Index indicates the start of the segment, measured in bytes/unicode.

endIndex

string (int64 format)

End of the attributed segment, exclusive.

sources[]

object (CitationSource)

Citation sources for the attributed segment.

CitationSource

Citation source.

JSON representation
{
  "referenceIndex": string
}
Fields
referenceIndex

string (int64 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 (ChunkContent)
    }
  ]
}
Fields
title

string

Title of the document.

document

string

Required. Document.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 (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

converse

Converses a conversation.

create

Creates a Conversation.

delete

Deletes a Conversation.

get

Gets a Conversation.

list

Lists all Conversations by their parent DataStore.

patch

Updates a Conversation.