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

משאב: סשן

הגדרת פרוטו של סשן חיצוני.

ייצוג ב-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

זה שינוי אופציונלי. השם המוצג של הסשן.

השדה הזה משמש לזיהוי הסשן בממשק המשתמש. כברירת מחדל, השם לתצוגה הוא הטקסט של השאילתה הראשונה בסשן.

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

זה שינוי אופציונלי. אם הסשן מוצמד, הוא יוצג בראש רשימת הסשנים.

מדינה

רשימה של מצב הסשן.

טיפוסים בני מנייה (enum)
STATE_UNSPECIFIED לא צוין מצב.
IN_PROGRESS הסשן פתוח כרגע.

הפעלה

מייצג תור, כולל שאילתה מהמשתמש ותשובה מהשירות.

ייצוג ב-JSON
{
  "query": {
    object (Query)
  },
  "answer": string,
  "assistAnswer": string,
  "detailedAnswer": {
    object (Answer)
  },
  "detailedAssistAnswer": {
    object (AssistAnswer)
  },
  "queryConfig": {
    string: string,
    ...
  }
}
שדות
query

object (Query)

זה שינוי אופציונלי. שאילתת המשתמש. יכול להיות שההגדרה לא תהיה מוגדרת אם התור הזה הוא רק יצירה מחדש של תשובה לתור אחר

answer

string

זה שינוי אופציונלי. שם המשאב של התשובה לשאילתת המשתמש.

ההגדרה הזו רלוונטית רק אם יצירת התשובה (קריאה ל-API של answer) התרחשה בתור הזה.

assistAnswer

string

פלט בלבד. שם המשאב של התשובה של Assistant לשאילתת המשתמש.

ההגדרה הזו מתבצעת רק אם התבצעה שיחת עזרה (קריאה ל-API של העזרה) בתור הזה.

פורמט: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assistAnswer} כדי לקבל את כל התשובות של AssistAnswers עבור סשן, צריך להגדיר את 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

פלט בלבד. מזהה ייחודי של השאילתה.

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

זה שינוי אופציונלי. סוג ה-MIME של הנתונים לפי תקן IANA. מידע נוסף זמין בכתובת https://www.iana.org/assignments/media-types/media-types.xhtml. השדה הזה הוא אופציונלי. אם לא מגדירים את סוג ה-MIME, ברירת המחדל של סוג ה-MIME בשדה 'data' היא 'text/plain'.

שדה איחוד payload. המטען הייעודי (Payload) של חלק השאילתה. הערך payload יכול להיות רק אחד מהבאים:
text

string

תוכן טקסטואלי.

uiJsonPayload

string

השדה הזה אמור להיות הודעת ממשק משתמש בפורמט JSON. החל מהרבעון הראשון של 2026, יש תמיכה ב-uiJsonPayload רק בהודעות A2UI.

personReference

object (PersonReference)

הפניה לאדם.

driveDocumentReference

object (DriveDocumentReference)

הפניה למסמך ב-Google Drive.

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

מזהה האדם.

email

string

כתובת האימייל של האדם.

displayName

string

השם המוצג של האדם.

displayPhotoUri

string

כתובת ה-URL של תמונת הפרופיל של האדם.

destinationUri

string

ה-URI של היעד של האדם.

fileId

string

פלט בלבד. מזהה הקובץ של נתוני האדם שמאוחסנים בקבצים של הקשר הסשן.

DriveDocumentReference

מייצג הפניה למסמך ב-Google Drive.

ייצוג ב-JSON
{
  "driveId": string,
  "documentName": string,
  "displayTitle": string,
  "destinationUri": string,
  "iconUri": string,
  "fileId": string
}
שדות
driveId

string

מזהה ה-Drive של המסמך.

documentName

string

השם המלא של המשאב של המסמך. פורמט: projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*

displayTitle

string

השם המוצג של קובץ העזר.

destinationUri

string

ה-URI של היעד של ההפניה.

iconUri

string

ה-URI של הסמל של ההפניה למסמך ב-Drive.

fileId

string

פלט בלבד. מזהה הקובץ של נתוני מסמך Drive שמאוחסנים בקבצי ההקשר של הסשן.

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

פלט בלבד. מזהה הקובץ של נתוני המסמך שמאוחסנים בקובצי ההקשר של הסשן.

urlForConnector

string

קלט בלבד. כתובת ה-URL של המחבר של המסמך שהוחזרה על ידי החיפוש המאוחד.

Methods

create

יוצר סשן.

delete

מחיקת סשן.

get

קבלת סשן.

list

רשימה של כל הסשנים לפי ההורה שלהם DataStore.

patch

עדכון של סשן.