Method: projects.locations.notebooks.sources.batchCreate

יצירת רשימה של Source.

בקשת HTTP


POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/notebooks/*}/sources:batchCreate

כתובות ה-URL כתובות בתחביר של gRPC Transcoding.

פרמטרים של נתיב

פרמטרים
parent

string

חובה. משאב האב שבו ייצרו המקורות. פורמט: projects/{project}/locations/{location}/notebooks/{notebook}

גוף הבקשה

גוף הבקשה מכיל נתונים במבנה הבא:

ייצוג ב-JSON
{
  "userContents": [
    {
      object (UserContent)
    }
  ]
}
שדות
userContents[]

object (UserContent)

חובה. הקבצים של UserContent שרוצים להעלות.

גוף התשובה

תשובה לשיטה SourceService.BatchCreateSources.

אם הפעולה מצליחה, גוף התגובה מכיל נתונים במבנה הבא:

ייצוג ב-JSON
{
  "sources": [
    {
      object (Source)
    }
  ]
}
שדות
sources[]

object (Source)

‫Source שנ'.

היקפי הרשאות

נדרש אחד מהיקפי ההרשאות הבאים של OAuth:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.serving.readwrite

ניתן למצוא מידע נוסף כאן: Authentication Overview.

הרשאות IAM

נדרשת הרשאת IAM הבאה במשאב parent:

  • discoveryengine.sources.create

מידע נוסף מופיע במאמרי העזרה בנושא IAM.

UserContent

ההודעות 'תוכן' מתייחסות לנתונים שהמשתמש רוצה להעלות.

ייצוג ב-JSON
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "googleDriveContent": {
    object (GoogleDriveContent)
  },
  "textContent": {
    object (TextContent)
  },
  "webContent": {
    object (WebContent)
  },
  "videoContent": {
    object (VideoContent)
  },
  "agentspaceContent": {
    object (AgentspaceContent)
  }
  // End of mutually exclusive fields.
}
שדות
תוכן המשתמש. הרשימה הבאה כוללת שדות שאי אפשר להשתמש בהם בו-זמנית. בכל תשובה יוגדר לכל היותר אחד מהשדות:
googleDriveContent

object (GoogleDriveContent)

התוכן מ-Google Drive.

textContent

object (TextContent)

תוכן הטקסט שהועלה כמקור.

webContent

object (WebContent)

תוכן האינטרנט שהועלה כמקור.

videoContent

object (VideoContent)

קטע הווידאו שהועלה כמקור.

agentspaceContent

object (AgentspaceContent)

תוכן ממרחב הסוכנים הועלה כמקור.

סוף השדות הבלעדיים.

GoogleDriveContent

התוכן מ-Google Drive.

ייצוג ב-JSON
{
  "documentId": string,
  "mimeType": string,
  "sourceName": string
}
שדות
documentId

string

מזהה המסמך של המסמך שנבחר.

mimeType

string

סוג ה-MIME של המסמך שנבחר.

אפשר להשתמש בפרמטר הזה כדי להבחין בין סוגי התוכן שנבחרו בכלי לבחירת תוכן ב-Drive. משתמשים ב-application/vnd.google-apps.document ל-Google Docs או ב-application/vnd.google-apps.presentation ל-Google Slides.

sourceName

string

השם שיוצג למקור.

TextContent

תוכן הטקסט שהועלה כמקור.

ייצוג ב-JSON
{
  "sourceName": string,
  "content": string
}
שדות
sourceName

string

השם המוצג של מקור הטקסט.

content

string

השם שיוצג למקור.

WebContent

תוכן האינטרנט שהועלה כמקור.

ייצוג ב-JSON
{
  "url": string,
  "sourceName": string
}
שדות
url

string

אם מספקים כתובת URL, המערכת מאחזרת את דף האינטרנט בקצה העורפי.

sourceName

string

השם שיוצג למקור.

VideoContent

קטע וידאו שהועלה כמקור.

ייצוג ב-JSON
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "youtubeUrl": string
  // End of mutually exclusive fields.
}
שדות
מציין את הפורמט של קטע הווידאו. בהמשך מפורטת רשימה של שדות שאי אפשר להשתמש בהם בו-זמנית. בכל תשובה יוגדר לכל היותר אחד מהשדות:
youtubeUrl

string

כתובת ה-URL של קטע הווידאו ב-YouTube.

סוף השדות הבלעדיים.

AgentspaceContent

תוכן ממרחב הסוכנים הועלה כמקור.

ייצוג ב-JSON
{
  "documentName": string,
  "engineName": string,
  "ideaforgeIdeaName": string
}
שדות
documentName

string

זה שינוי אופציונלי. השם המלא של המשאב של מסמך Agentspace. פורמט: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}

engineName

string

זה שינוי אופציונלי. מנוע לאימות ההרשאה של המסמך. פורמט: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}

ideaforgeIdeaName

string

זה שינוי אופציונלי. שם המשאב של מופע סדנת הרעיונות. פורמט: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/ideaForgeInstances/{instance}