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

リソース: Session

外部セッションの proto 定義。

JSON 表現
{
  "name": string,
  "displayName": string,
  "state": enum (State),
  "userPseudoId": string,
  "turns": [
    {
      object (Turn)
    }
  ],
  "labels": [
    string
  ],
  "startTime": string,
  "endTime": string,
  "isPinned": boolean
}
フィールド
name

string

変更不可。完全修飾名 projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*

displayName

string

省略可。セッションの表示名。

このフィールドは、UI でセッションを識別するために使用されます。デフォルトでは、表示名はセッションの最初のターンのクエリテキストです。

state

enum (State)

セッションの状態。

userPseudoId

string

ユーザーをトラッキングするための固有識別子。

turns[]

object (Turn)

ターン。

labels[]

string

省略可。セッションのラベル。ListSessionsRequest でフィルタとして設定できます。

startTime

string (Timestamp format)

出力専用。セッションの開始時刻。

RFC 3339 を使用します。生成された出力は常に Z 正規化され、小数点以下は 0、3、6、または 9 桁になります。「Z」以外のオフセットも使用できます。例: "2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

endTime

string (Timestamp format)

出力専用。セッションの終了時刻。

RFC 3339 を使用します。生成された出力は常に Z 正規化され、小数点以下は 0、3、6、または 9 桁になります。「Z」以外のオフセットも使用できます。例: "2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

isPinned

boolean

省略可。セッションが固定されているかどうか。固定されているセッションはセッション リストの上部に表示されます。

状態

セッションの状態の列挙。

列挙型
STATE_UNSPECIFIED 状態が指定されていません。
IN_PROGRESS セッションは現在オープンです。

Turn

ターン(ユーザーからのクエリとサービスからの回答を含む)を表します。

JSON 表現
{
  "query": {
    object (Query)
  },
  "answer": string,
  "assistAnswer": string,
  "detailedAnswer": {
    object (Answer)
  },
  "detailedAssistAnswer": {
    object (AssistAnswer)
  },
  "queryConfig": {
    string: string,
    ...
  }
}
フィールド
query

object (Query)

省略可。ユーザーのクエリ。このターンが別のターンの回答を再生成しているだけの場合は設定されない場合があります。

answer

string

省略可。ユーザー クエリに対する回答のリソース名。

このターンで回答生成(/answer API 呼び出し)が行われた場合にのみ設定します。

assistAnswer

string

出力専用。ユーザーのクエリに対するアシスタントの回答のリソース名。

このターンでアシスト呼び出し(/assist API 呼び出し)が発生した場合にのみ設定されます。

形式: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assistAnswer}。セッションのすべての AssistAnswer を取得するには、GetSessionRequest.include_answer_details を true に設定します。あるいは、個々の AssistAnswer リソースを取得するには、AssistAnswerService.GetAssistAnswer API を使用します。

detailedAnswer

object (Answer)

出力専用。ConversationalSearchService.GetSession API で GetSessionRequest.include_answer_details が true に設定されている場合、回答クエリ セッションを取得するときにこのフィールドが自動入力されます。

detailedAssistAnswer

object (AssistAnswer)

出力専用。ConversationalSearchService.GetSession API で GetSessionRequest.include_answer_details が true に設定されている場合、アシスタント セッションを取得するときにこのフィールドが自動入力されます。

queryConfig

map (key: string, value: string)

省略可。クエリ構成に関連するメタデータ(使用された LLM モデルとバージョン、モデル パラメータ[温度、グラウンディングのパラメータなど])を表します。接頭辞「google.」は、Google が開発した機能にのみ使用されます。

クエリ

ユーザーが入力したクエリを定義します。

JSON 表現
{
  "queryId": string,
  "parts": [
    {
      object (QueryPart)
    }
  ],

  // Union field content can be only one of the following:
  "text": string
  // End of list of possible types for union field content.
}
フィールド
queryId

string

出力専用。クエリの一意の ID。

parts[]

object (QueryPart)

コンテンツ パーツをクエリします。

共用体フィールド content。コンテンツをクエリします。content は次のいずれかになります。
text

string

書式なしテキスト。

QueryPart

コンテンツの一部または全体を表します。クエリを表すために使用されます。クエリは複数の部分で構成できます。

JSON 表現
{
  "mimeType": string,

  // Union field payload can be only one of the following:
  "text": string,
  "uiJsonPayload": string,
  "personReference": {
    object (PersonReference)
  },
  "driveDocumentReference": {
    object (DriveDocumentReference)
  },
  "documentReference": {
    object (DocumentReference)
  }
  // End of list of possible types for union field payload.
}
フィールド
mimeType

string

省略可。データの IANA 標準 MIME タイプ。https://www.iana.org/assignments/media-types/media-types.xhtml をご覧ください。このフィールドは省略可能です。設定されていない場合、「data」フィールドのデフォルトの MIME タイプは「text/plain」と見なされます。

共用体フィールド payload。クエリ部分のペイロード。payload は次のいずれかになります。
text

string

テキスト コンテンツ。

uiJsonPayload

string

このフィールドは、JSON 形式の UI メッセージである必要があります。2026 年第 1 四半期以降、uiJsonPayload は A2UI メッセージでのみサポートされます。

personReference

object (PersonReference)

人物への参照。

driveDocumentReference

object (DriveDocumentReference)

Google ドライブのドキュメントへの参照。

documentReference

object (DocumentReference)

その他の VAIS Document リファレンス。

PersonReference

人物参照を表します。

JSON 表現
{
  "documentName": string,
  "personId": string,
  "email": string,
  "displayName": string,
  "displayPhotoUri": string,
  "destinationUri": string,
  "fileId": string
}
フィールド
documentName

string

人物の完全なリソース名。形式: projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*

personId

string

人物の人物 ID。

email

string

人物のメールアドレス。

displayName

string

人物の表示名。

displayPhotoUri

string

人物のプロフィール写真の URL。

destinationUri

string

人物の宛先 URI。

fileId

string

出力専用。セッション コンテキスト ファイルに保存されているユーザーデータのファイル ID。

DriveDocumentReference

Google ドライブのドキュメント参照を表します。

JSON 表現
{
  "driveId": string,
  "documentName": string,
  "displayTitle": string,
  "destinationUri": string,
  "iconUri": string,
  "fileId": string
}
フィールド
driveId

string

ドキュメントのドライブ ID。

documentName

string

ドキュメントの完全なリソース名。形式: projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*

displayTitle

string

参照の表示タイトル。

destinationUri

string

参照の宛先 URI。

iconUri

string

ドライブ ドキュメント参照のアイコンの URI。

fileId

string

出力専用。セッション コンテキスト ファイルに保存されているドライブ ドキュメント データのファイル ID。

DocumentReference

ドキュメント参照を表します。

JSON 表現
{
  "documentName": string,
  "displayTitle": string,
  "destinationUri": string,
  "iconUri": string,
  "fileId": string,
  "urlForConnector": string
}
フィールド
documentName

string

ドキュメントの完全なリソース名。形式: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}

displayTitle

string

参照の表示タイトル。

destinationUri

string

参照の宛先 URI。

iconUri

string

参照のアイコンの URI。

fileId

string

出力専用。セッション コンテキスト ファイルに保存されているドキュメント データのファイル ID。

urlForConnector

string

入力専用。連携検索によって返されるドキュメントの urlForConnector。

メソッド

create

Session を作成します。

delete

Session を削除します。

get

Session を取得します。

list

DataStore ごとにすべての Session を一覧表示します。

patch

Session を更新します。