- Resource: Source
- JSON representation
- SourceId
- SourceMetadata
- GoogleDocsSourceMetadata
- YoutubeMetadata
- AgentspaceMetadata
- SourceSettings
- SourceStatus
- FailureReason
- Unknown
- SourceTooLong
- IngestionError
- SourceEmpty
- UploadError
- PaywallError
- SourceUnreachable
- SourceUnreachableErrorReason
- GoogleDriveError
- DownloadPrevented
- YoutubeError
- VideoDeleted
- AudioTranscriptionError
- LanguageDetectionFailed
- NoAudioDetected
- SourceLimitExceeded
- DomainBlocked
- Methods
Resource: Source
Source represents a single source of content.
JSON representation |
---|
{ "name": string, "title": string, "sourceId": { object ( |
Fields | |
---|---|
name |
Identifier. The full resource name of the source. Format: This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
title |
Optional. Title of the source. |
sourceId |
Optional. Output only. Source id, which is the last segment of the source's resource name. |
metadata |
Output only. metadata about the source. |
settings |
Output only. status of the source, and any failure reasons. |
SourceId
SourceId is the last segment of the source's resource name.
JSON representation |
---|
{ "id": string } |
Fields | |
---|---|
id |
The ID of the source. |
SourceMetadata
Represents the metadata of a source and some additional information.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field metadata . Metadata for the source. metadata can be only one of the following: |
|
googleDocsMetadata |
metadata for a google doc source. |
youtubeMetadata |
metadata for a youtube video source. |
agentspaceMetadata |
metadata for an agentspace source. |
wordCount |
The word count of the source. |
tokenCount |
The number of tokens in the source. |
sourceAddedTimestamp |
The timestamp the source was added. 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: |
GoogleDocsSourceMetadata
metadata about a google doc source.
JSON representation |
---|
{ "documentId": string, "revisionId": string } |
Fields | |
---|---|
documentId |
Output only. The document id of the google doc. |
revisionId |
Output only. Revision id for the doc. |
YoutubeMetadata
metadata about a youtube video source.
JSON representation |
---|
{ "videoId": string, "channelName": string } |
Fields | |
---|---|
videoId |
Output only. The ID of the youtube video. |
channelName |
Output only. The channel name of the youtube video. |
AgentspaceMetadata
metadata about an agentspace source.
JSON representation |
---|
{ "documentName": string, "documentTitle": string } |
Fields | |
---|---|
documentName |
Output only. The full document name in Agentspace. |
documentTitle |
Output only. The title of the document. |
SourceSettings
Allows extension of Source Settings in the sources.batchCreate (Formerly AddSource request).
JSON representation |
---|
{ "status": enum ( |
Fields | |
---|---|
status |
status of the source. |
failureReason |
Failure reason containing details about why a source failed to ingest. |
SourceStatus
List of possible statuses for a source.
Enums | |
---|---|
SOURCE_STATUS_UNSPECIFIED |
Unspecified status. |
SOURCE_STATUS_PENDING |
The source is pending addition. |
SOURCE_STATUS_COMPLETE |
Source addition is complete and successful. |
SOURCE_STATUS_ERROR |
Source addition has permanently failed. |
SOURCE_STATUS_PENDING_DELETION |
The source is pending deletion. |
SOURCE_STATUS_TENTATIVE |
The user is attempting to add a source, but we have not yet uploaded it or checked user limits. Does not count towards the user's source limit. |
FailureReason
Failure reason containing details about why a source failed to ingest.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field error . The specific error. error can be only one of the following: |
|
unknown |
Indicates an unknown error occurred. |
sourceTooLong |
Indicates source word count exceeded the user's limit. |
ingestionError |
Indicates an error occurred while ingesting the source. |
sourceEmpty |
Indicates that the source is empty. |
uploadError |
Indicates an error occurred while uploading the source. |
paywallError |
Indicates that the source is paywalled and cannot be ingested. |
sourceUnreachable |
Indicates that the source is unreachable. |
googleDriveError |
A google drive specific error. |
youtubeError |
A youtube specific error. |
audioTranscriptionError |
An audio file transcription specific error. |
sourceLimitExceeded |
Error if the user tries to update beyond their limits. |
domainBlocked |
Error if the user tries to add a source from a blocked domain. |
Unknown
This type has no fields.
Indicates an unknown error occurred.
SourceTooLong
Indicates source word count exceeded the user's limit.
JSON representation |
---|
{ "wordCount": integer, "wordLimit": integer } |
Fields | |
---|---|
wordCount |
The number of words in the source. |
wordLimit |
The word count limit for the current user at the time of the upload. |
IngestionError
This type has no fields.
Indicates an error occurred while ingesting the source.
SourceEmpty
This type has no fields.
Indicates that the source is empty.
UploadError
This type has no fields.
Indicates an error occurred while uploading the source.
PaywallError
This type has no fields.
Indicates that the source is paywalled and cannot be ingested.
SourceUnreachable
Indicates that the source is unreachable. This is primarily used for sources that are added via URL.
JSON representation |
---|
{
"errorDetails": enum ( |
Fields | |
---|---|
errorDetails |
Describes why the source is unreachable. |
SourceUnreachableErrorReason
Details about why the source is unreachable. Used to display appropriate message to the user.
Enums | |
---|---|
ERROR_REASON_UNSPECIFIED |
Default |
ERROR_REASON_INVALID_URL |
The source URL is invalid. |
ERROR_REASON_NOT_ACCESSIBLE |
The source URL is not accessible. |
ERROR_REASON_NOT_REACHABLE |
The source URL is not reachable. |
ERROR_REASON_URL_NOT_FOUND |
The source URL returned 404. |
ERROR_REASON_TRANSIENT_ERROR |
The source URL not reachable due to a transient network error or host timeout etc. |
ERROR_REASON_FETCH_FAILED |
The source URL could not be fetched due to an internal error. |
ERROR_REASON_NOT_SUPPORTED |
The URL is not yet supported. Examples include: the fetched content exceeds the trawler fetch max size, the fetched content is a type we do not yet support, etc. |
GoogleDriveError
A google drive specific error.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field error . The Drive specific error. error can be only one of the following: |
|
downloadPrevented |
The user was prevented from downloading the file. |
DownloadPrevented
This type has no fields.
The user was prevented from downloading the file.
YoutubeError
A youtube specific error.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field error . The youtube specific error. error can be only one of the following: |
|
videoDeleted |
Error to indicate that the source was removed because the video was deleted. |
VideoDeleted
This type has no fields.
Error to indicate that the source was removed because the video was deleted.
AudioTranscriptionError
An audio file transcription specific error.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field error . The audio file transcription specific error. error can be only one of the following: |
|
languageDetectionFailed |
Could not detect language of the file (it may not be speech). |
noAudioDetected |
No audio was detected in the input file (it may have been a video). |
LanguageDetectionFailed
This type has no fields.
Could not detect language of the file (it may not be speech).
NoAudioDetected
This type has no fields.
No audio was detected in the input file.
SourceLimitExceeded
This type has no fields.
Indicates that the user does not have space for this source.
DomainBlocked
This type has no fields.
Error to indicate that the source was removed because the domain was blocked.
Methods |
|
---|---|
|
Creates a list of Source s. |
|
Deletes multiple sources |
|
Gets a Source . |