Documentation
¶
Index ¶
- Constants
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func NewFile(rdr io.Reader, filename string, contentType string) file
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type AdvancedModeTransformConfig
- type AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig
- type AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfigParam
- type AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig
- type AdvancedModeTransformConfigChunkingConfigNoneChunkingConfigParam
- type AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig
- type AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfigParam
- type AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig
- type AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfigParam
- type AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig
- type AdvancedModeTransformConfigChunkingConfigTokenChunkingConfigParam
- type AdvancedModeTransformConfigChunkingConfigUnion
- func (u AdvancedModeTransformConfigChunkingConfigUnion) AsCharacterChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig)
- func (u AdvancedModeTransformConfigChunkingConfigUnion) AsNoneChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig)
- func (u AdvancedModeTransformConfigChunkingConfigUnion) AsSemanticChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig)
- func (u AdvancedModeTransformConfigChunkingConfigUnion) AsSentenceChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig)
- func (u AdvancedModeTransformConfigChunkingConfigUnion) AsTokenChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig)
- func (u AdvancedModeTransformConfigChunkingConfigUnion) RawJSON() string
- func (r *AdvancedModeTransformConfigChunkingConfigUnion) UnmarshalJSON(data []byte) error
- type AdvancedModeTransformConfigChunkingConfigUnionParam
- type AdvancedModeTransformConfigMode
- type AdvancedModeTransformConfigParam
- type AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig
- type AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfigParam
- type AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig
- type AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfigParam
- type AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig
- type AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfigParam
- type AdvancedModeTransformConfigSegmentationConfigUnion
- func (u AdvancedModeTransformConfigSegmentationConfigUnion) AsElementSegmentationConfig() (v AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig)
- func (u AdvancedModeTransformConfigSegmentationConfigUnion) AsNoneSegmentationConfig() (v AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig)
- func (u AdvancedModeTransformConfigSegmentationConfigUnion) AsPageSegmentationConfig() (v AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig)
- func (u AdvancedModeTransformConfigSegmentationConfigUnion) RawJSON() string
- func (r *AdvancedModeTransformConfigSegmentationConfigUnion) UnmarshalJSON(data []byte) error
- type AdvancedModeTransformConfigSegmentationConfigUnionParam
- type AgentData
- type AutoTransformConfig
- type AutoTransformConfigMode
- type AutoTransformConfigParam
- type AzureOpenAIEmbedding
- type AzureOpenAIEmbeddingConfig
- type AzureOpenAIEmbeddingConfigParam
- type AzureOpenAIEmbeddingConfigType
- type AzureOpenAIEmbeddingParam
- type BBox
- type BatchGetParams
- type BatchGetResponse
- type BatchGetResponseConfig
- type BatchGetResponseConfigJob
- type BatchGetResponseConfigJobType
- type BatchGetResponseResult
- type BatchGetResponseResultJobReference
- type BatchGetResponseResultJobReferenceType
- type BatchGetResponseStatus
- type BatchListParams
- type BatchListParamsStatus
- type BatchListResponse
- type BatchListResponseConfig
- type BatchListResponseConfigJob
- type BatchListResponseConfigJobType
- type BatchListResponseResult
- type BatchListResponseResultJobReference
- type BatchListResponseResultJobReferenceType
- type BatchListResponseStatus
- type BatchNewParams
- type BatchNewParamsConfig
- type BatchNewParamsConfigJob
- type BatchNewParamsConfigJobType
- type BatchNewResponse
- type BatchNewResponseConfig
- type BatchNewResponseConfigJob
- type BatchNewResponseConfigJobType
- type BatchNewResponseResult
- type BatchNewResponseResultJobReference
- type BatchNewResponseResultJobReferenceType
- type BatchNewResponseStatus
- type BatchService
- func (r *BatchService) Get(ctx context.Context, batchID string, query BatchGetParams, ...) (res *BatchGetResponse, err error)
- func (r *BatchService) List(ctx context.Context, query BatchListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BatchListResponse], err error)
- func (r *BatchService) ListAutoPaging(ctx context.Context, query BatchListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BatchListResponse]
- func (r *BatchService) New(ctx context.Context, params BatchNewParams, opts ...option.RequestOption) (res *BatchNewResponse, err error)
- type BedrockEmbedding
- type BedrockEmbeddingConfig
- type BedrockEmbeddingConfigParam
- type BedrockEmbeddingConfigType
- type BedrockEmbeddingParam
- type BetaAgentDataAggregateParams
- type BetaAgentDataAggregateParamsFilter
- type BetaAgentDataAggregateParamsFilterEqUnion
- type BetaAgentDataAggregateParamsFilterExcludeUnion
- type BetaAgentDataAggregateParamsFilterGtUnion
- type BetaAgentDataAggregateParamsFilterGteUnion
- type BetaAgentDataAggregateParamsFilterIncludeUnion
- type BetaAgentDataAggregateParamsFilterLtUnion
- type BetaAgentDataAggregateParamsFilterLteUnion
- type BetaAgentDataAggregateParamsFilterNeUnion
- type BetaAgentDataAggregateResponse
- type BetaAgentDataDeleteByQueryParams
- type BetaAgentDataDeleteByQueryParamsFilter
- type BetaAgentDataDeleteByQueryParamsFilterEqUnion
- type BetaAgentDataDeleteByQueryParamsFilterExcludeUnion
- type BetaAgentDataDeleteByQueryParamsFilterGtUnion
- type BetaAgentDataDeleteByQueryParamsFilterGteUnion
- type BetaAgentDataDeleteByQueryParamsFilterIncludeUnion
- type BetaAgentDataDeleteByQueryParamsFilterLtUnion
- type BetaAgentDataDeleteByQueryParamsFilterLteUnion
- type BetaAgentDataDeleteByQueryParamsFilterNeUnion
- type BetaAgentDataDeleteByQueryResponse
- type BetaAgentDataDeleteParams
- type BetaAgentDataDeleteResponse
- type BetaAgentDataGetParams
- type BetaAgentDataNewParams
- type BetaAgentDataSearchParams
- type BetaAgentDataSearchParamsFilter
- type BetaAgentDataSearchParamsFilterEqUnion
- type BetaAgentDataSearchParamsFilterExcludeUnion
- type BetaAgentDataSearchParamsFilterGtUnion
- type BetaAgentDataSearchParamsFilterGteUnion
- type BetaAgentDataSearchParamsFilterIncludeUnion
- type BetaAgentDataSearchParamsFilterLtUnion
- type BetaAgentDataSearchParamsFilterLteUnion
- type BetaAgentDataSearchParamsFilterNeUnion
- type BetaAgentDataService
- func (r *BetaAgentDataService) Aggregate(ctx context.Context, params BetaAgentDataAggregateParams, ...) (res *pagination.PaginatedCursorPost[BetaAgentDataAggregateResponse], err error)
- func (r *BetaAgentDataService) AggregateAutoPaging(ctx context.Context, params BetaAgentDataAggregateParams, ...) *pagination.PaginatedCursorPostAutoPager[BetaAgentDataAggregateResponse]
- func (r *BetaAgentDataService) Delete(ctx context.Context, itemID string, body BetaAgentDataDeleteParams, ...) (res *BetaAgentDataDeleteResponse, err error)
- func (r *BetaAgentDataService) DeleteByQuery(ctx context.Context, params BetaAgentDataDeleteByQueryParams, ...) (res *BetaAgentDataDeleteByQueryResponse, err error)
- func (r *BetaAgentDataService) Get(ctx context.Context, itemID string, query BetaAgentDataGetParams, ...) (res *AgentData, err error)
- func (r *BetaAgentDataService) New(ctx context.Context, params BetaAgentDataNewParams, ...) (res *AgentData, err error)
- func (r *BetaAgentDataService) Search(ctx context.Context, params BetaAgentDataSearchParams, ...) (res *pagination.PaginatedCursorPost[AgentData], err error)
- func (r *BetaAgentDataService) SearchAutoPaging(ctx context.Context, params BetaAgentDataSearchParams, ...) *pagination.PaginatedCursorPostAutoPager[AgentData]
- func (r *BetaAgentDataService) Update(ctx context.Context, itemID string, params BetaAgentDataUpdateParams, ...) (res *AgentData, err error)
- type BetaAgentDataUpdateParams
- type BetaBatchCancelParams
- type BetaBatchCancelResponse
- type BetaBatchCancelResponseStatus
- type BetaBatchGetStatusParams
- type BetaBatchGetStatusResponse
- type BetaBatchGetStatusResponseJob
- type BetaBatchJobItemGetProcessingResultsParams
- type BetaBatchJobItemGetProcessingResultsParamsJobType
- type BetaBatchJobItemGetProcessingResultsResponse
- type BetaBatchJobItemGetProcessingResultsResponseProcessingResult
- type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate
- type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters
- type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration
- func (r BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) RawJSON() string
- func (r *BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) UnmarshalJSON(data []byte) error
- type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion
- func (u BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) AsBatchParseJobRecordCreate() (...)
- func (u BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) AsClassifyJob() (v ClassifyJob)
- func (u BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) RawJSON() string
- func (r *BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) UnmarshalJSON(data []byte) error
- type BetaBatchJobItemListParams
- type BetaBatchJobItemListParamsStatus
- type BetaBatchJobItemListResponse
- type BetaBatchJobItemListResponseStatus
- type BetaBatchJobItemService
- func (r *BetaBatchJobItemService) GetProcessingResults(ctx context.Context, itemID string, ...) (res *BetaBatchJobItemGetProcessingResultsResponse, err error)
- func (r *BetaBatchJobItemService) List(ctx context.Context, jobID string, query BetaBatchJobItemListParams, ...) (res *pagination.PaginatedBatchItems[BetaBatchJobItemListResponse], err error)
- func (r *BetaBatchJobItemService) ListAutoPaging(ctx context.Context, jobID string, query BetaBatchJobItemListParams, ...) *pagination.PaginatedBatchItemsAutoPager[BetaBatchJobItemListResponse]
- type BetaBatchListParams
- type BetaBatchListParamsJobType
- type BetaBatchListParamsStatus
- type BetaBatchListResponse
- type BetaBatchListResponseJobType
- type BetaBatchListResponseStatus
- type BetaBatchNewParams
- type BetaBatchNewParamsJobConfigBatchParseJobRecordCreate
- type BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters
- type BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration
- type BetaBatchNewParamsJobConfigUnion
- type BetaBatchNewResponse
- type BetaBatchNewResponseJobType
- type BetaBatchNewResponseStatus
- type BetaBatchService
- func (r *BetaBatchService) Cancel(ctx context.Context, jobID string, params BetaBatchCancelParams, ...) (res *BetaBatchCancelResponse, err error)
- func (r *BetaBatchService) GetStatus(ctx context.Context, jobID string, query BetaBatchGetStatusParams, ...) (res *BetaBatchGetStatusResponse, err error)
- func (r *BetaBatchService) List(ctx context.Context, query BetaBatchListParams, opts ...option.RequestOption) (res *pagination.PaginatedBatchItems[BetaBatchListResponse], err error)
- func (r *BetaBatchService) ListAutoPaging(ctx context.Context, query BetaBatchListParams, opts ...option.RequestOption) *pagination.PaginatedBatchItemsAutoPager[BetaBatchListResponse]
- func (r *BetaBatchService) New(ctx context.Context, params BetaBatchNewParams, opts ...option.RequestOption) (res *BetaBatchNewResponse, err error)
- type BetaChatDeleteParams
- type BetaChatGetParams
- type BetaChatGetResponse
- type BetaChatGetResponseEventStop
- type BetaChatGetResponseEventStopUsage
- type BetaChatGetResponseEventText
- type BetaChatGetResponseEventTextDelta
- type BetaChatGetResponseEventThinking
- type BetaChatGetResponseEventThinkingDelta
- type BetaChatGetResponseEventToolCall
- type BetaChatGetResponseEventToolResult
- type BetaChatGetResponseEventToolResultImageAttachment
- type BetaChatGetResponseEventUnion
- func (u BetaChatGetResponseEventUnion) AsAny() anyBetaChatGetResponseEvent
- func (u BetaChatGetResponseEventUnion) AsStop() (v BetaChatGetResponseEventStop)
- func (u BetaChatGetResponseEventUnion) AsText() (v BetaChatGetResponseEventText)
- func (u BetaChatGetResponseEventUnion) AsTextDelta() (v BetaChatGetResponseEventTextDelta)
- func (u BetaChatGetResponseEventUnion) AsThinking() (v BetaChatGetResponseEventThinking)
- func (u BetaChatGetResponseEventUnion) AsThinkingDelta() (v BetaChatGetResponseEventThinkingDelta)
- func (u BetaChatGetResponseEventUnion) AsToolCall() (v BetaChatGetResponseEventToolCall)
- func (u BetaChatGetResponseEventUnion) AsToolResult() (v BetaChatGetResponseEventToolResult)
- func (u BetaChatGetResponseEventUnion) AsUserInput() (v BetaChatGetResponseEventUserInput)
- func (u BetaChatGetResponseEventUnion) RawJSON() string
- func (r *BetaChatGetResponseEventUnion) UnmarshalJSON(data []byte) error
- type BetaChatGetResponseEventUserInput
- type BetaChatGetResponseJobMetadata
- type BetaChatGetSummaryParams
- type BetaChatGetSummaryResponse
- type BetaChatGetSummaryResponseJobMetadata
- type BetaChatListParams
- type BetaChatListResponse
- type BetaChatListResponseJobMetadata
- type BetaChatNewParams
- type BetaChatNewResponse
- type BetaChatNewResponseJobMetadata
- type BetaChatService
- func (r *BetaChatService) Delete(ctx context.Context, sessionID string, body BetaChatDeleteParams, ...) (err error)
- func (r *BetaChatService) Get(ctx context.Context, sessionID string, query BetaChatGetParams, ...) (res *BetaChatGetResponse, err error)
- func (r *BetaChatService) GetSummary(ctx context.Context, sessionID string, query BetaChatGetSummaryParams, ...) (res *BetaChatGetSummaryResponse, err error)
- func (r *BetaChatService) List(ctx context.Context, query BetaChatListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BetaChatListResponse], err error)
- func (r *BetaChatService) ListAutoPaging(ctx context.Context, query BetaChatListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BetaChatListResponse]
- func (r *BetaChatService) New(ctx context.Context, params BetaChatNewParams, opts ...option.RequestOption) (res *BetaChatNewResponse, err error)
- func (r *BetaChatService) Stream(ctx context.Context, sessionID string, params BetaChatStreamParams, ...) (res *BetaChatStreamResponse, err error)
- type BetaChatStreamParams
- type BetaChatStreamResponse
- type BetaDirectoryDeleteParams
- type BetaDirectoryFileAddParams
- type BetaDirectoryFileAddParamsMetadataUnion
- type BetaDirectoryFileAddResponse
- type BetaDirectoryFileAddResponseMetadataUnion
- func (u BetaDirectoryFileAddResponseMetadataUnion) AsBool() (v bool)
- func (u BetaDirectoryFileAddResponseMetadataUnion) AsFloat() (v float64)
- func (u BetaDirectoryFileAddResponseMetadataUnion) AsInt() (v int64)
- func (u BetaDirectoryFileAddResponseMetadataUnion) AsString() (v string)
- func (u BetaDirectoryFileAddResponseMetadataUnion) AsStringArray() (v []string)
- func (u BetaDirectoryFileAddResponseMetadataUnion) RawJSON() string
- func (r *BetaDirectoryFileAddResponseMetadataUnion) UnmarshalJSON(data []byte) error
- type BetaDirectoryFileDeleteParams
- type BetaDirectoryFileGetParams
- type BetaDirectoryFileGetResponse
- type BetaDirectoryFileGetResponseMetadataUnion
- func (u BetaDirectoryFileGetResponseMetadataUnion) AsBool() (v bool)
- func (u BetaDirectoryFileGetResponseMetadataUnion) AsFloat() (v float64)
- func (u BetaDirectoryFileGetResponseMetadataUnion) AsInt() (v int64)
- func (u BetaDirectoryFileGetResponseMetadataUnion) AsString() (v string)
- func (u BetaDirectoryFileGetResponseMetadataUnion) AsStringArray() (v []string)
- func (u BetaDirectoryFileGetResponseMetadataUnion) RawJSON() string
- func (r *BetaDirectoryFileGetResponseMetadataUnion) UnmarshalJSON(data []byte) error
- type BetaDirectoryFileListParams
- type BetaDirectoryFileListResponse
- type BetaDirectoryFileListResponseMetadataUnion
- func (u BetaDirectoryFileListResponseMetadataUnion) AsBool() (v bool)
- func (u BetaDirectoryFileListResponseMetadataUnion) AsFloat() (v float64)
- func (u BetaDirectoryFileListResponseMetadataUnion) AsInt() (v int64)
- func (u BetaDirectoryFileListResponseMetadataUnion) AsString() (v string)
- func (u BetaDirectoryFileListResponseMetadataUnion) AsStringArray() (v []string)
- func (u BetaDirectoryFileListResponseMetadataUnion) RawJSON() string
- func (r *BetaDirectoryFileListResponseMetadataUnion) UnmarshalJSON(data []byte) error
- type BetaDirectoryFileService
- func (r *BetaDirectoryFileService) Add(ctx context.Context, directoryID string, params BetaDirectoryFileAddParams, ...) (res *BetaDirectoryFileAddResponse, err error)
- func (r *BetaDirectoryFileService) Delete(ctx context.Context, directoryFileID string, ...) (err error)
- func (r *BetaDirectoryFileService) Get(ctx context.Context, directoryFileID string, params BetaDirectoryFileGetParams, ...) (res *BetaDirectoryFileGetResponse, err error)
- func (r *BetaDirectoryFileService) List(ctx context.Context, directoryID string, query BetaDirectoryFileListParams, ...) (res *pagination.PaginatedCursor[BetaDirectoryFileListResponse], err error)
- func (r *BetaDirectoryFileService) ListAutoPaging(ctx context.Context, directoryID string, query BetaDirectoryFileListParams, ...) *pagination.PaginatedCursorAutoPager[BetaDirectoryFileListResponse]
- func (r *BetaDirectoryFileService) Update(ctx context.Context, directoryFileID string, ...) (res *BetaDirectoryFileUpdateResponse, err error)
- func (r *BetaDirectoryFileService) Upload(ctx context.Context, directoryID string, params BetaDirectoryFileUploadParams, ...) (res *BetaDirectoryFileUploadResponse, err error)
- type BetaDirectoryFileUpdateParams
- type BetaDirectoryFileUpdateParamsMetadataUnion
- type BetaDirectoryFileUpdateResponse
- type BetaDirectoryFileUpdateResponseMetadataUnion
- func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsBool() (v bool)
- func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsFloat() (v float64)
- func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsInt() (v int64)
- func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsString() (v string)
- func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsStringArray() (v []string)
- func (u BetaDirectoryFileUpdateResponseMetadataUnion) RawJSON() string
- func (r *BetaDirectoryFileUpdateResponseMetadataUnion) UnmarshalJSON(data []byte) error
- type BetaDirectoryFileUploadParams
- type BetaDirectoryFileUploadResponse
- type BetaDirectoryFileUploadResponseMetadataUnion
- func (u BetaDirectoryFileUploadResponseMetadataUnion) AsBool() (v bool)
- func (u BetaDirectoryFileUploadResponseMetadataUnion) AsFloat() (v float64)
- func (u BetaDirectoryFileUploadResponseMetadataUnion) AsInt() (v int64)
- func (u BetaDirectoryFileUploadResponseMetadataUnion) AsString() (v string)
- func (u BetaDirectoryFileUploadResponseMetadataUnion) AsStringArray() (v []string)
- func (u BetaDirectoryFileUploadResponseMetadataUnion) RawJSON() string
- func (r *BetaDirectoryFileUploadResponseMetadataUnion) UnmarshalJSON(data []byte) error
- type BetaDirectoryGetParams
- type BetaDirectoryGetResponse
- type BetaDirectoryGetResponseType
- type BetaDirectoryListParams
- type BetaDirectoryListParamsType
- type BetaDirectoryListResponse
- type BetaDirectoryListResponseType
- type BetaDirectoryNewParams
- type BetaDirectoryNewParamsType
- type BetaDirectoryNewResponse
- type BetaDirectoryNewResponseType
- type BetaDirectoryService
- func (r *BetaDirectoryService) Delete(ctx context.Context, directoryID string, body BetaDirectoryDeleteParams, ...) (err error)
- func (r *BetaDirectoryService) Get(ctx context.Context, directoryID string, query BetaDirectoryGetParams, ...) (res *BetaDirectoryGetResponse, err error)
- func (r *BetaDirectoryService) List(ctx context.Context, query BetaDirectoryListParams, ...) (res *pagination.PaginatedCursor[BetaDirectoryListResponse], err error)
- func (r *BetaDirectoryService) ListAutoPaging(ctx context.Context, query BetaDirectoryListParams, ...) *pagination.PaginatedCursorAutoPager[BetaDirectoryListResponse]
- func (r *BetaDirectoryService) New(ctx context.Context, params BetaDirectoryNewParams, ...) (res *BetaDirectoryNewResponse, err error)
- func (r *BetaDirectoryService) Update(ctx context.Context, directoryID string, params BetaDirectoryUpdateParams, ...) (res *BetaDirectoryUpdateResponse, err error)
- type BetaDirectoryUpdateParams
- type BetaDirectoryUpdateResponse
- type BetaDirectoryUpdateResponseType
- type BetaIndexDeleteParams
- type BetaIndexGetParams
- type BetaIndexGetResponse
- type BetaIndexListParams
- type BetaIndexListResponse
- type BetaIndexNewParams
- type BetaIndexNewParamsProduct
- type BetaIndexNewParamsVectorTarget
- type BetaIndexNewResponse
- type BetaIndexService
- func (r *BetaIndexService) Delete(ctx context.Context, indexID string, body BetaIndexDeleteParams, ...) (err error)
- func (r *BetaIndexService) Get(ctx context.Context, indexID string, query BetaIndexGetParams, ...) (res *BetaIndexGetResponse, err error)
- func (r *BetaIndexService) List(ctx context.Context, query BetaIndexListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BetaIndexListResponse], err error)
- func (r *BetaIndexService) ListAutoPaging(ctx context.Context, query BetaIndexListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BetaIndexListResponse]
- func (r *BetaIndexService) New(ctx context.Context, params BetaIndexNewParams, opts ...option.RequestOption) (res *BetaIndexNewResponse, err error)
- func (r *BetaIndexService) Sync(ctx context.Context, indexID string, body BetaIndexSyncParams, ...) (res *BetaIndexSyncResponse, err error)
- type BetaIndexSyncParams
- type BetaIndexSyncResponse
- type BetaRetrievalFindParams
- type BetaRetrievalFindResponse
- type BetaRetrievalGetParams
- type BetaRetrievalGetParamsCustomFilterArrayItem
- type BetaRetrievalGetParamsCustomFilterArrayItemValueUnion
- type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat
- type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion
- type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion
- type BetaRetrievalGetParamsCustomFilterUnion
- type BetaRetrievalGetParamsRerank
- type BetaRetrievalGetParamsStaticFilters
- type BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID
- type BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion
- type BetaRetrievalGetResponse
- type BetaRetrievalGetResponseResult
- type BetaRetrievalGetResponseResultMetadataUnion
- func (u BetaRetrievalGetResponseResultMetadataUnion) AsBool() (v bool)
- func (u BetaRetrievalGetResponseResultMetadataUnion) AsFloat() (v float64)
- func (u BetaRetrievalGetResponseResultMetadataUnion) AsInt() (v int64)
- func (u BetaRetrievalGetResponseResultMetadataUnion) AsString() (v string)
- func (u BetaRetrievalGetResponseResultMetadataUnion) AsStringArray() (v []string)
- func (u BetaRetrievalGetResponseResultMetadataUnion) RawJSON() string
- func (r *BetaRetrievalGetResponseResultMetadataUnion) UnmarshalJSON(data []byte) error
- type BetaRetrievalGetResponseResultStaticFields
- type BetaRetrievalGetResponseResultStaticFieldsAttachment
- type BetaRetrievalGrepParams
- type BetaRetrievalGrepResponse
- type BetaRetrievalReadParams
- type BetaRetrievalReadResponse
- type BetaRetrievalService
- func (r *BetaRetrievalService) Find(ctx context.Context, params BetaRetrievalFindParams, ...) (res *pagination.PaginatedCursorPost[BetaRetrievalFindResponse], err error)
- func (r *BetaRetrievalService) FindAutoPaging(ctx context.Context, params BetaRetrievalFindParams, ...) *pagination.PaginatedCursorPostAutoPager[BetaRetrievalFindResponse]
- func (r *BetaRetrievalService) Get(ctx context.Context, params BetaRetrievalGetParams, ...) (res *BetaRetrievalGetResponse, err error)
- func (r *BetaRetrievalService) Grep(ctx context.Context, params BetaRetrievalGrepParams, ...) (res *pagination.PaginatedCursorPost[BetaRetrievalGrepResponse], err error)
- func (r *BetaRetrievalService) GrepAutoPaging(ctx context.Context, params BetaRetrievalGrepParams, ...) *pagination.PaginatedCursorPostAutoPager[BetaRetrievalGrepResponse]
- func (r *BetaRetrievalService) Read(ctx context.Context, params BetaRetrievalReadParams, ...) (res *BetaRetrievalReadResponse, err error)
- type BetaService
- type BetaSheetDeleteJobParams
- type BetaSheetDeleteJobResponse
- type BetaSheetGetParams
- type BetaSheetGetResultTableParams
- type BetaSheetGetResultTableParamsRegionType
- type BetaSheetListParams
- type BetaSheetListParamsStatus
- type BetaSheetNewParams
- type BetaSheetNewParamsWebhookConfiguration
- type BetaSheetService
- func (r *BetaSheetService) DeleteJob(ctx context.Context, spreadsheetJobID string, body BetaSheetDeleteJobParams, ...) (res *BetaSheetDeleteJobResponse, err error)
- func (r *BetaSheetService) Get(ctx context.Context, spreadsheetJobID string, query BetaSheetGetParams, ...) (res *SheetsJob, err error)
- func (r *BetaSheetService) GetResultTable(ctx context.Context, regionType BetaSheetGetResultTableParamsRegionType, ...) (res *PresignedURL, err error)
- func (r *BetaSheetService) List(ctx context.Context, query BetaSheetListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[SheetsJob], err error)
- func (r *BetaSheetService) ListAutoPaging(ctx context.Context, query BetaSheetListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[SheetsJob]
- func (r *BetaSheetService) New(ctx context.Context, params BetaSheetNewParams, opts ...option.RequestOption) (res *SheetsJob, err error)
- type BetaSplitGetParams
- type BetaSplitGetResponse
- type BetaSplitListParams
- type BetaSplitListParamsStatus
- type BetaSplitListResponse
- type BetaSplitNewParams
- type BetaSplitNewParamsConfiguration
- type BetaSplitNewParamsConfigurationSplittingStrategy
- type BetaSplitNewResponse
- type BetaSplitService
- func (r *BetaSplitService) Get(ctx context.Context, splitJobID string, query BetaSplitGetParams, ...) (res *BetaSplitGetResponse, err error)
- func (r *BetaSplitService) List(ctx context.Context, query BetaSplitListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BetaSplitListResponse], err error)
- func (r *BetaSplitService) ListAutoPaging(ctx context.Context, query BetaSplitListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BetaSplitListResponse]
- func (r *BetaSplitService) New(ctx context.Context, params BetaSplitNewParams, opts ...option.RequestOption) (res *BetaSplitNewResponse, err error)
- type ClassifierJobGetParams
- type ClassifierJobGetResultsParams
- type ClassifierJobGetResultsResponse
- type ClassifierJobGetResultsResponseItem
- type ClassifierJobGetResultsResponseItemResult
- type ClassifierJobListParams
- type ClassifierJobNewParams
- type ClassifierJobNewParamsMode
- type ClassifierJobNewParamsWebhookConfiguration
- type ClassifierJobService
- func (r *ClassifierJobService) Get(ctx context.Context, classifyJobID string, query ClassifierJobGetParams, ...) (res *ClassifyJob, err error)deprecated
- func (r *ClassifierJobService) GetResults(ctx context.Context, classifyJobID string, query ClassifierJobGetResultsParams, ...) (res *ClassifierJobGetResultsResponse, err error)deprecated
- func (r *ClassifierJobService) List(ctx context.Context, query ClassifierJobListParams, ...) (res *pagination.PaginatedCursor[ClassifyJob], err error)deprecated
- func (r *ClassifierJobService) ListAutoPaging(ctx context.Context, query ClassifierJobListParams, ...) *pagination.PaginatedCursorAutoPager[ClassifyJob]deprecated
- func (r *ClassifierJobService) New(ctx context.Context, params ClassifierJobNewParams, ...) (res *ClassifyJob, err error)deprecated
- type ClassifierRule
- type ClassifierRuleParam
- type ClassifierService
- type ClassifyConfiguration
- type ClassifyConfigurationMode
- type ClassifyConfigurationParam
- type ClassifyConfigurationParsingConfiguration
- type ClassifyConfigurationParsingConfigurationParam
- type ClassifyConfigurationRule
- type ClassifyConfigurationRuleParam
- type ClassifyCreateRequestParam
- type ClassifyCreateRequestWebhookConfigurationParam
- type ClassifyGetParams
- type ClassifyGetResponse
- type ClassifyGetResponseDocumentInputType
- type ClassifyGetResponseStatus
- type ClassifyJob
- type ClassifyJobMode
- type ClassifyJobParam
- type ClassifyListParams
- type ClassifyListParamsStatus
- type ClassifyListResponse
- type ClassifyListResponseDocumentInputType
- type ClassifyListResponseStatus
- type ClassifyNewParams
- type ClassifyNewResponse
- type ClassifyNewResponseDocumentInputType
- type ClassifyNewResponseStatus
- type ClassifyParsingConfiguration
- type ClassifyParsingConfigurationParam
- type ClassifyResult
- type ClassifyService
- func (r *ClassifyService) Get(ctx context.Context, jobID string, query ClassifyGetParams, ...) (res *ClassifyGetResponse, err error)
- func (r *ClassifyService) List(ctx context.Context, query ClassifyListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[ClassifyListResponse], err error)
- func (r *ClassifyService) ListAutoPaging(ctx context.Context, query ClassifyListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[ClassifyListResponse]
- func (r *ClassifyService) New(ctx context.Context, params ClassifyNewParams, opts ...option.RequestOption) (res *ClassifyNewResponse, err error)
- type ClassifyV2Parameters
- type ClassifyV2ParametersMode
- type ClassifyV2ParametersParsingConfiguration
- type ClassifyV2ParametersParsingConfigurationResp
- type ClassifyV2ParametersResp
- type ClassifyV2ParametersRule
- type ClassifyV2ParametersRuleResp
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type CloudAstraDBVectorStore
- type CloudAstraDBVectorStoreParam
- type CloudAzStorageBlobDataSource
- type CloudAzStorageBlobDataSourceParam
- type CloudAzureAISearchVectorStore
- type CloudAzureAISearchVectorStoreParam
- type CloudBoxDataSource
- type CloudBoxDataSourceAuthenticationMechanism
- type CloudBoxDataSourceParam
- type CloudConfluenceDataSource
- type CloudConfluenceDataSourceParam
- type CloudDocument
- type CloudDocumentCreateParam
- type CloudGoogleDriveDataSource
- type CloudGoogleDriveDataSourceParam
- type CloudJiraDataSource
- type CloudJiraDataSourceParam
- type CloudJiraDataSourceV2
- type CloudJiraDataSourceV2APIVersion
- type CloudJiraDataSourceV2Param
- type CloudMilvusVectorStore
- type CloudMilvusVectorStoreParam
- type CloudMongoDBAtlasVectorSearch
- type CloudMongoDBAtlasVectorSearchParam
- type CloudNotionPageDataSource
- type CloudNotionPageDataSourceParam
- type CloudOneDriveDataSource
- type CloudOneDriveDataSourceParam
- type CloudPineconeVectorStore
- type CloudPineconeVectorStoreParam
- type CloudPostgresVectorStore
- type CloudPostgresVectorStoreParam
- type CloudQdrantVectorStore
- type CloudQdrantVectorStoreParam
- type CloudS3DataSource
- type CloudS3DataSourceParam
- type CloudSharepointDataSource
- type CloudSharepointDataSourceParam
- type CloudSlackDataSource
- type CloudSlackDataSourceParam
- type CodeItem
- type CodeItemType
- type CohereEmbedding
- type CohereEmbeddingConfig
- type CohereEmbeddingConfigParam
- type CohereEmbeddingConfigType
- type CohereEmbeddingParam
- type CompositeRetrievalMode
- type CompositeRetrievalResult
- type CompositeRetrievalResultNode
- type CompositeRetrievalResultNodeNode
- type ConfigurationCreate
- type ConfigurationCreateParam
- type ConfigurationCreateParametersSpreadsheetV1
- type ConfigurationCreateParametersSpreadsheetV1Param
- type ConfigurationCreateParametersUnion
- func (u ConfigurationCreateParametersUnion) AsAny() anyConfigurationCreateParameters
- func (u ConfigurationCreateParametersUnion) AsClassifyV2() (v ClassifyV2ParametersResp)
- func (u ConfigurationCreateParametersUnion) AsExtractV2() (v ExtractV2ParametersResp)
- func (u ConfigurationCreateParametersUnion) AsParseV2() (v ParseV2ParametersResp)
- func (u ConfigurationCreateParametersUnion) AsSplitV1() (v SplitV1ParametersResp)
- func (u ConfigurationCreateParametersUnion) AsSpreadsheetV1() (v ConfigurationCreateParametersSpreadsheetV1)
- func (u ConfigurationCreateParametersUnion) AsUnknown() (v UntypedParametersResp)
- func (u ConfigurationCreateParametersUnion) RawJSON() string
- func (r *ConfigurationCreateParametersUnion) UnmarshalJSON(data []byte) error
- type ConfigurationCreateParametersUnionParam
- type ConfigurationDeleteParams
- type ConfigurationGetParams
- type ConfigurationListParams
- type ConfigurationNewParams
- type ConfigurationResponse
- type ConfigurationResponseParametersSpreadsheetV1
- type ConfigurationResponseParametersUnion
- func (u ConfigurationResponseParametersUnion) AsAny() anyConfigurationResponseParameters
- func (u ConfigurationResponseParametersUnion) AsClassifyV2() (v ClassifyV2ParametersResp)
- func (u ConfigurationResponseParametersUnion) AsExtractV2() (v ExtractV2ParametersResp)
- func (u ConfigurationResponseParametersUnion) AsParseV2() (v ParseV2ParametersResp)
- func (u ConfigurationResponseParametersUnion) AsSplitV1() (v SplitV1ParametersResp)
- func (u ConfigurationResponseParametersUnion) AsSpreadsheetV1() (v ConfigurationResponseParametersSpreadsheetV1)
- func (u ConfigurationResponseParametersUnion) AsUnknown() (v UntypedParametersResp)
- func (u ConfigurationResponseParametersUnion) RawJSON() string
- func (r *ConfigurationResponseParametersUnion) UnmarshalJSON(data []byte) error
- type ConfigurationResponseProductType
- type ConfigurationService
- func (r *ConfigurationService) Delete(ctx context.Context, configID string, body ConfigurationDeleteParams, ...) (err error)
- func (r *ConfigurationService) Get(ctx context.Context, configID string, query ConfigurationGetParams, ...) (res *ConfigurationResponse, err error)
- func (r *ConfigurationService) List(ctx context.Context, query ConfigurationListParams, ...) (res *pagination.PaginatedCursor[ConfigurationResponse], err error)
- func (r *ConfigurationService) ListAutoPaging(ctx context.Context, query ConfigurationListParams, ...) *pagination.PaginatedCursorAutoPager[ConfigurationResponse]
- func (r *ConfigurationService) New(ctx context.Context, params ConfigurationNewParams, ...) (res *ConfigurationResponse, err error)
- func (r *ConfigurationService) Update(ctx context.Context, configID string, params ConfigurationUpdateParams, ...) (res *ConfigurationResponse, err error)
- type ConfigurationUpdateParams
- type ConfigurationUpdateParamsParametersSpreadsheetV1
- type ConfigurationUpdateParamsParametersUnion
- type DataSink
- type DataSinkComponentUnion
- func (u DataSinkComponentUnion) AsAnyMap() (v map[string]any)
- func (u DataSinkComponentUnion) AsCloudAstraDBVectorStore() (v shared.CloudAstraDBVectorStore)
- func (u DataSinkComponentUnion) AsCloudAzureAISearchVectorStore() (v shared.CloudAzureAISearchVectorStore)
- func (u DataSinkComponentUnion) AsCloudMilvusVectorStore() (v shared.CloudMilvusVectorStore)
- func (u DataSinkComponentUnion) AsCloudMongoDBAtlasVectorSearch() (v shared.CloudMongoDBAtlasVectorSearch)
- func (u DataSinkComponentUnion) AsCloudPineconeVectorStore() (v shared.CloudPineconeVectorStore)
- func (u DataSinkComponentUnion) AsCloudPostgresVectorStore() (v shared.CloudPostgresVectorStore)
- func (u DataSinkComponentUnion) AsCloudQdrantVectorStore() (v shared.CloudQdrantVectorStore)
- func (u DataSinkComponentUnion) RawJSON() string
- func (r *DataSinkComponentUnion) UnmarshalJSON(data []byte) error
- type DataSinkCreateComponentUnionParam
- type DataSinkCreateParam
- type DataSinkCreateSinkType
- type DataSinkListParams
- type DataSinkNewParams
- type DataSinkService
- func (r *DataSinkService) Delete(ctx context.Context, dataSinkID string, opts ...option.RequestOption) (err error)
- func (r *DataSinkService) Get(ctx context.Context, dataSinkID string, opts ...option.RequestOption) (res *DataSink, err error)
- func (r *DataSinkService) List(ctx context.Context, query DataSinkListParams, opts ...option.RequestOption) (res *[]DataSink, err error)
- func (r *DataSinkService) New(ctx context.Context, params DataSinkNewParams, opts ...option.RequestOption) (res *DataSink, err error)
- func (r *DataSinkService) Update(ctx context.Context, dataSinkID string, body DataSinkUpdateParams, ...) (res *DataSink, err error)
- type DataSinkSinkType
- type DataSinkUpdateParams
- type DataSinkUpdateParamsComponentUnion
- type DataSinkUpdateParamsSinkType
- type DataSource
- type DataSourceComponentUnion
- func (u DataSourceComponentUnion) AsAnyMap() (v map[string]any)
- func (u DataSourceComponentUnion) AsCloudAzStorageBlobDataSource() (v shared.CloudAzStorageBlobDataSource)
- func (u DataSourceComponentUnion) AsCloudBoxDataSource() (v shared.CloudBoxDataSource)
- func (u DataSourceComponentUnion) AsCloudConfluenceDataSource() (v shared.CloudConfluenceDataSource)
- func (u DataSourceComponentUnion) AsCloudGoogleDriveDataSource() (v shared.CloudGoogleDriveDataSource)
- func (u DataSourceComponentUnion) AsCloudJiraDataSource() (v shared.CloudJiraDataSource)
- func (u DataSourceComponentUnion) AsCloudJiraDataSourceV2() (v shared.CloudJiraDataSourceV2)
- func (u DataSourceComponentUnion) AsCloudNotionPageDataSource() (v shared.CloudNotionPageDataSource)
- func (u DataSourceComponentUnion) AsCloudOneDriveDataSource() (v shared.CloudOneDriveDataSource)
- func (u DataSourceComponentUnion) AsCloudS3DataSource() (v shared.CloudS3DataSource)
- func (u DataSourceComponentUnion) AsCloudSharepointDataSource() (v shared.CloudSharepointDataSource)
- func (u DataSourceComponentUnion) AsCloudSlackDataSource() (v shared.CloudSlackDataSource)
- func (u DataSourceComponentUnion) RawJSON() string
- func (r *DataSourceComponentUnion) UnmarshalJSON(data []byte) error
- type DataSourceCustomMetadataUnion
- func (u DataSourceCustomMetadataUnion) AsAnyArray() (v []any)
- func (u DataSourceCustomMetadataUnion) AsAnyMap() (v map[string]any)
- func (u DataSourceCustomMetadataUnion) AsBool() (v bool)
- func (u DataSourceCustomMetadataUnion) AsFloat() (v float64)
- func (u DataSourceCustomMetadataUnion) AsString() (v string)
- func (u DataSourceCustomMetadataUnion) RawJSON() string
- func (r *DataSourceCustomMetadataUnion) UnmarshalJSON(data []byte) error
- type DataSourceListParams
- type DataSourceNewParams
- type DataSourceNewParamsComponentUnion
- type DataSourceNewParamsCustomMetadataUnion
- type DataSourceNewParamsSourceType
- type DataSourceReaderVersionMetadata
- type DataSourceReaderVersionMetadataReaderVersion
- type DataSourceService
- func (r *DataSourceService) Delete(ctx context.Context, dataSourceID string, opts ...option.RequestOption) (err error)
- func (r *DataSourceService) Get(ctx context.Context, dataSourceID string, opts ...option.RequestOption) (res *DataSource, err error)
- func (r *DataSourceService) List(ctx context.Context, query DataSourceListParams, opts ...option.RequestOption) (res *[]DataSource, err error)
- func (r *DataSourceService) New(ctx context.Context, params DataSourceNewParams, opts ...option.RequestOption) (res *DataSource, err error)
- func (r *DataSourceService) Update(ctx context.Context, dataSourceID string, body DataSourceUpdateParams, ...) (res *DataSource, err error)
- type DataSourceSourceType
- type DataSourceUpdateParams
- type DataSourceUpdateParamsComponentUnion
- type DataSourceUpdateParamsCustomMetadataUnion
- type DataSourceUpdateParamsSourceType
- type Error
- type ExtractConfiguration
- type ExtractConfigurationDataSchemaUnion
- func (u ExtractConfigurationDataSchemaUnion) AsAnyArray() (v []any)
- func (u ExtractConfigurationDataSchemaUnion) AsAnyMap() (v map[string]any)
- func (u ExtractConfigurationDataSchemaUnion) AsBool() (v bool)
- func (u ExtractConfigurationDataSchemaUnion) AsFloat() (v float64)
- func (u ExtractConfigurationDataSchemaUnion) AsString() (v string)
- func (u ExtractConfigurationDataSchemaUnion) RawJSON() string
- func (r *ExtractConfigurationDataSchemaUnion) UnmarshalJSON(data []byte) error
- type ExtractConfigurationDataSchemaUnionParam
- type ExtractConfigurationExtractionTarget
- type ExtractConfigurationParam
- type ExtractConfigurationTier
- type ExtractDeleteParams
- type ExtractDeleteResponse
- type ExtractGenerateSchemaParams
- type ExtractGetParams
- type ExtractJobMetadata
- type ExtractJobUsage
- type ExtractListParams
- type ExtractListParamsStatus
- type ExtractNewParams
- type ExtractService
- func (r *ExtractService) Delete(ctx context.Context, jobID string, body ExtractDeleteParams, ...) (res *ExtractDeleteResponse, err error)
- func (r *ExtractService) GenerateSchema(ctx context.Context, params ExtractGenerateSchemaParams, ...) (res *ConfigurationCreate, err error)
- func (r *ExtractService) Get(ctx context.Context, jobID string, query ExtractGetParams, ...) (res *ExtractV2Job, err error)
- func (r *ExtractService) List(ctx context.Context, query ExtractListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[ExtractV2Job], err error)
- func (r *ExtractService) ListAutoPaging(ctx context.Context, query ExtractListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[ExtractV2Job]
- func (r *ExtractService) New(ctx context.Context, params ExtractNewParams, opts ...option.RequestOption) (res *ExtractV2Job, err error)
- func (r *ExtractService) ValidateSchema(ctx context.Context, body ExtractValidateSchemaParams, ...) (res *ExtractV2SchemaValidateResponse, err error)
- type ExtractV2Job
- type ExtractV2JobCreateParam
- type ExtractV2JobCreateWebhookConfigurationParam
- type ExtractV2JobExtractResultArrayItemUnion
- func (u ExtractV2JobExtractResultArrayItemUnion) AsAnyArray() (v []any)
- func (u ExtractV2JobExtractResultArrayItemUnion) AsAnyMap() (v map[string]any)
- func (u ExtractV2JobExtractResultArrayItemUnion) AsBool() (v bool)
- func (u ExtractV2JobExtractResultArrayItemUnion) AsFloat() (v float64)
- func (u ExtractV2JobExtractResultArrayItemUnion) AsString() (v string)
- func (u ExtractV2JobExtractResultArrayItemUnion) RawJSON() string
- func (r *ExtractV2JobExtractResultArrayItemUnion) UnmarshalJSON(data []byte) error
- type ExtractV2JobExtractResultMapItemUnion
- func (u ExtractV2JobExtractResultMapItemUnion) AsAnyArray() (v []any)
- func (u ExtractV2JobExtractResultMapItemUnion) AsAnyMap() (v map[string]any)
- func (u ExtractV2JobExtractResultMapItemUnion) AsBool() (v bool)
- func (u ExtractV2JobExtractResultMapItemUnion) AsFloat() (v float64)
- func (u ExtractV2JobExtractResultMapItemUnion) AsString() (v string)
- func (u ExtractV2JobExtractResultMapItemUnion) RawJSON() string
- func (r *ExtractV2JobExtractResultMapItemUnion) UnmarshalJSON(data []byte) error
- type ExtractV2JobExtractResultUnion
- func (u ExtractV2JobExtractResultUnion) AsExtractV2JobExtractResultMapMap() (v map[string]*ExtractV2JobExtractResultMapItemUnion)
- func (u ExtractV2JobExtractResultUnion) AsMapOfExtractV2JobExtractResultArrayItemMap() (v []map[string]*ExtractV2JobExtractResultArrayItemUnion)
- func (u ExtractV2JobExtractResultUnion) RawJSON() string
- func (r *ExtractV2JobExtractResultUnion) UnmarshalJSON(data []byte) error
- type ExtractV2JobMetadata
- type ExtractV2JobQueryResponse
- type ExtractV2Parameters
- type ExtractV2ParametersDataSchemaUnion
- type ExtractV2ParametersDataSchemaUnionResp
- func (u ExtractV2ParametersDataSchemaUnionResp) AsAnyArray() (v []any)
- func (u ExtractV2ParametersDataSchemaUnionResp) AsAnyMap() (v map[string]any)
- func (u ExtractV2ParametersDataSchemaUnionResp) AsBool() (v bool)
- func (u ExtractV2ParametersDataSchemaUnionResp) AsFloat() (v float64)
- func (u ExtractV2ParametersDataSchemaUnionResp) AsString() (v string)
- func (u ExtractV2ParametersDataSchemaUnionResp) RawJSON() string
- func (r *ExtractV2ParametersDataSchemaUnionResp) UnmarshalJSON(data []byte) error
- type ExtractV2ParametersExtractionTarget
- type ExtractV2ParametersResp
- type ExtractV2ParametersTier
- type ExtractV2SchemaGenerateRequestDataSchemaUnionParam
- type ExtractV2SchemaGenerateRequestParam
- type ExtractV2SchemaValidateRequestDataSchemaUnionParam
- type ExtractV2SchemaValidateRequestParam
- type ExtractV2SchemaValidateResponse
- type ExtractV2SchemaValidateResponseDataSchemaUnion
- func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsAnyArray() (v []any)
- func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsAnyMap() (v map[string]any)
- func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsBool() (v bool)
- func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsFloat() (v float64)
- func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsString() (v string)
- func (u ExtractV2SchemaValidateResponseDataSchemaUnion) RawJSON() string
- func (r *ExtractV2SchemaValidateResponseDataSchemaUnion) UnmarshalJSON(data []byte) error
- type ExtractValidateSchemaParams
- type ExtractedFieldMetadata
- type ExtractedFieldMetadataDocumentMetadataUnion
- func (u ExtractedFieldMetadataDocumentMetadataUnion) AsAnyArray() (v []any)
- func (u ExtractedFieldMetadataDocumentMetadataUnion) AsAnyMap() (v map[string]any)
- func (u ExtractedFieldMetadataDocumentMetadataUnion) AsBool() (v bool)
- func (u ExtractedFieldMetadataDocumentMetadataUnion) AsFloat() (v float64)
- func (u ExtractedFieldMetadataDocumentMetadataUnion) AsString() (v string)
- func (u ExtractedFieldMetadataDocumentMetadataUnion) RawJSON() string
- func (r *ExtractedFieldMetadataDocumentMetadataUnion) UnmarshalJSON(data []byte) error
- type ExtractedFieldMetadataPageMetadataUnion
- func (u ExtractedFieldMetadataPageMetadataUnion) AsAnyArray() (v []any)
- func (u ExtractedFieldMetadataPageMetadataUnion) AsAnyMap() (v map[string]any)
- func (u ExtractedFieldMetadataPageMetadataUnion) AsBool() (v bool)
- func (u ExtractedFieldMetadataPageMetadataUnion) AsFloat() (v float64)
- func (u ExtractedFieldMetadataPageMetadataUnion) AsString() (v string)
- func (u ExtractedFieldMetadataPageMetadataUnion) RawJSON() string
- func (r *ExtractedFieldMetadataPageMetadataUnion) UnmarshalJSON(data []byte) error
- type ExtractedFieldMetadataRowMetadataUnion
- func (u ExtractedFieldMetadataRowMetadataUnion) AsAnyArray() (v []any)
- func (u ExtractedFieldMetadataRowMetadataUnion) AsAnyMap() (v map[string]any)
- func (u ExtractedFieldMetadataRowMetadataUnion) AsBool() (v bool)
- func (u ExtractedFieldMetadataRowMetadataUnion) AsFloat() (v float64)
- func (u ExtractedFieldMetadataRowMetadataUnion) AsString() (v string)
- func (u ExtractedFieldMetadataRowMetadataUnion) RawJSON() string
- func (r *ExtractedFieldMetadataRowMetadataUnion) UnmarshalJSON(data []byte) error
- type FailPageMode
- type FailureHandlingConfig
- type FailureHandlingConfigParam
- type File
- type FileDeleteParams
- type FileGetParams
- type FileListParams
- type FileListResponse
- type FileNewParams
- type FileNewResponse
- type FilePermissionInfoUnion
- func (u FilePermissionInfoUnion) AsAnyArray() (v []any)
- func (u FilePermissionInfoUnion) AsAnyMap() (v map[string]any)
- func (u FilePermissionInfoUnion) AsBool() (v bool)
- func (u FilePermissionInfoUnion) AsFloat() (v float64)
- func (u FilePermissionInfoUnion) AsString() (v string)
- func (u FilePermissionInfoUnion) RawJSON() string
- func (r *FilePermissionInfoUnion) UnmarshalJSON(data []byte) error
- type FileQueryParams
- type FileQueryParamsFilter
- type FileQueryResponse
- type FileQueryResponseItem
- type FileResourceInfoUnion
- func (u FileResourceInfoUnion) AsAnyArray() (v []any)
- func (u FileResourceInfoUnion) AsAnyMap() (v map[string]any)
- func (u FileResourceInfoUnion) AsBool() (v bool)
- func (u FileResourceInfoUnion) AsFloat() (v float64)
- func (u FileResourceInfoUnion) AsString() (v string)
- func (u FileResourceInfoUnion) RawJSON() string
- func (r *FileResourceInfoUnion) UnmarshalJSON(data []byte) error
- type FileService
- func (r *FileService) Delete(ctx context.Context, fileID string, body FileDeleteParams, ...) (err error)
- func (r *FileService) Get(ctx context.Context, fileID string, query FileGetParams, ...) (res *PresignedURL, err error)
- func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[FileListResponse], err error)
- func (r *FileService) ListAutoPaging(ctx context.Context, query FileListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[FileListResponse]
- func (r *FileService) New(ctx context.Context, params FileNewParams, opts ...option.RequestOption) (res *FileNewResponse, err error)
- func (r *FileService) Query(ctx context.Context, params FileQueryParams, opts ...option.RequestOption) (res *FileQueryResponse, err error)deprecated
- type FooterItem
- type FooterItemItemUnion
- func (u FooterItemItemUnion) AsAny() anyFooterItemItem
- func (u FooterItemItemUnion) AsCode() (v CodeItem)
- func (u FooterItemItemUnion) AsHeading() (v HeadingItem)
- func (u FooterItemItemUnion) AsImage() (v ImageItem)
- func (u FooterItemItemUnion) AsLink() (v LinkItem)
- func (u FooterItemItemUnion) AsList() (v ListItem)
- func (u FooterItemItemUnion) AsTable() (v TableItem)
- func (u FooterItemItemUnion) AsText() (v TextItem)
- func (u FooterItemItemUnion) RawJSON() string
- func (r *FooterItemItemUnion) UnmarshalJSON(data []byte) error
- type FooterItemType
- type GeminiEmbedding
- type GeminiEmbeddingConfig
- type GeminiEmbeddingConfigParam
- type GeminiEmbeddingConfigType
- type GeminiEmbeddingParam
- type HeaderItem
- type HeaderItemItemUnion
- func (u HeaderItemItemUnion) AsAny() anyHeaderItemItem
- func (u HeaderItemItemUnion) AsCode() (v CodeItem)
- func (u HeaderItemItemUnion) AsHeading() (v HeadingItem)
- func (u HeaderItemItemUnion) AsImage() (v ImageItem)
- func (u HeaderItemItemUnion) AsLink() (v LinkItem)
- func (u HeaderItemItemUnion) AsList() (v ListItem)
- func (u HeaderItemItemUnion) AsTable() (v TableItem)
- func (u HeaderItemItemUnion) AsText() (v TextItem)
- func (u HeaderItemItemUnion) RawJSON() string
- func (r *HeaderItemItemUnion) UnmarshalJSON(data []byte) error
- type HeaderItemType
- type HeadingItem
- type HeadingItemType
- type HuggingFaceInferenceAPIEmbedding
- type HuggingFaceInferenceAPIEmbeddingConfig
- type HuggingFaceInferenceAPIEmbeddingConfigParam
- type HuggingFaceInferenceAPIEmbeddingConfigType
- type HuggingFaceInferenceAPIEmbeddingParam
- type HuggingFaceInferenceAPIEmbeddingPooling
- type HuggingFaceInferenceAPIEmbeddingTokenUnion
- type HuggingFaceInferenceAPIEmbeddingTokenUnionParam
- type ImageItem
- type ImageItemType
- type LinkItem
- type LinkItemType
- type ListItem
- type ListItemItemUnion
- type ListItemType
- type LlamaParseParameters
- type LlamaParseParametersPriority
- type LlamaParseParametersResp
- type LlamaParseParametersWebhookConfiguration
- type LlamaParseParametersWebhookConfigurationResp
- type ManagedIngestionStatusResponse
- type ManagedIngestionStatusResponseError
- type ManagedIngestionStatusResponseStatus
- type MetadataFilters
- type MetadataFiltersCondition
- type MetadataFiltersFilterMetadataFilter
- type MetadataFiltersFilterMetadataFilterParam
- type MetadataFiltersFilterMetadataFilterValueUnion
- func (u MetadataFiltersFilterMetadataFilterValueUnion) AsFloat() (v float64)
- func (u MetadataFiltersFilterMetadataFilterValueUnion) AsIntegerArray() (v []int64)
- func (u MetadataFiltersFilterMetadataFilterValueUnion) AsNumberArray() (v []float64)
- func (u MetadataFiltersFilterMetadataFilterValueUnion) AsString() (v string)
- func (u MetadataFiltersFilterMetadataFilterValueUnion) AsStringArray() (v []string)
- func (u MetadataFiltersFilterMetadataFilterValueUnion) RawJSON() string
- func (r *MetadataFiltersFilterMetadataFilterValueUnion) UnmarshalJSON(data []byte) error
- type MetadataFiltersFilterMetadataFilterValueUnionParam
- type MetadataFiltersFilterUnion
- type MetadataFiltersFilterUnionParam
- type MetadataFiltersParam
- type OpenAIEmbedding
- type OpenAIEmbeddingConfig
- type OpenAIEmbeddingConfigParam
- type OpenAIEmbeddingConfigType
- type OpenAIEmbeddingParam
- type PageFigureNodeWithScore
- type PageFigureNodeWithScoreNode
- type PageScreenshotNodeWithScore
- type PageScreenshotNodeWithScoreNode
- type ParseV2Parameters
- type ParseV2ParametersAgenticOptions
- type ParseV2ParametersAgenticOptionsResp
- type ParseV2ParametersCropBox
- type ParseV2ParametersCropBoxResp
- type ParseV2ParametersInputOptions
- type ParseV2ParametersInputOptionsHTML
- type ParseV2ParametersInputOptionsHTMLResp
- type ParseV2ParametersInputOptionsPresentation
- type ParseV2ParametersInputOptionsPresentationResp
- type ParseV2ParametersInputOptionsResp
- type ParseV2ParametersInputOptionsSpreadsheet
- type ParseV2ParametersInputOptionsSpreadsheetResp
- type ParseV2ParametersOutputOptions
- type ParseV2ParametersOutputOptionsMarkdown
- type ParseV2ParametersOutputOptionsMarkdownResp
- type ParseV2ParametersOutputOptionsMarkdownTables
- type ParseV2ParametersOutputOptionsMarkdownTablesResp
- type ParseV2ParametersOutputOptionsResp
- type ParseV2ParametersOutputOptionsSpatialText
- type ParseV2ParametersOutputOptionsSpatialTextResp
- type ParseV2ParametersOutputOptionsTablesAsSpreadsheet
- type ParseV2ParametersOutputOptionsTablesAsSpreadsheetResp
- type ParseV2ParametersPageRanges
- type ParseV2ParametersPageRangesResp
- type ParseV2ParametersProcessingControl
- type ParseV2ParametersProcessingControlJobFailureConditions
- type ParseV2ParametersProcessingControlJobFailureConditionsResp
- type ParseV2ParametersProcessingControlResp
- type ParseV2ParametersProcessingControlTimeouts
- type ParseV2ParametersProcessingControlTimeoutsResp
- type ParseV2ParametersProcessingOptions
- type ParseV2ParametersProcessingOptionsAutoModeConfiguration
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) AsFloat() (v float64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) AsFloat() (v float64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) AsInt() (v int64)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) AsString() (v string)
- func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) RawJSON() string
- func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) UnmarshalJSON(data []byte) error
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConf
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBox
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBoxResp
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnore
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnoreResp
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentation
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentationResp
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfResp
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialText
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialTextResp
- type ParseV2ParametersProcessingOptionsAutoModeConfigurationResp
- type ParseV2ParametersProcessingOptionsCostOptimizer
- type ParseV2ParametersProcessingOptionsCostOptimizerResp
- type ParseV2ParametersProcessingOptionsIgnore
- type ParseV2ParametersProcessingOptionsIgnoreResp
- type ParseV2ParametersProcessingOptionsOcrParameters
- type ParseV2ParametersProcessingOptionsOcrParametersResp
- type ParseV2ParametersProcessingOptionsResp
- type ParseV2ParametersResp
- type ParseV2ParametersTier
- type ParseV2ParametersVersion
- type ParseV2ParametersWebhookConfiguration
- type ParseV2ParametersWebhookConfigurationResp
- type ParsingGetParams
- type ParsingGetResponse
- type ParsingGetResponseImagesContentMetadata
- type ParsingGetResponseImagesContentMetadataImage
- type ParsingGetResponseImagesContentMetadataImageBbox
- type ParsingGetResponseItems
- type ParsingGetResponseItemsPageFailedStructuredPage
- type ParsingGetResponseItemsPageStructuredResultPage
- type ParsingGetResponseItemsPageStructuredResultPageItemUnion
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsAny() anyParsingGetResponseItemsPageStructuredResultPageItem
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsCode() (v CodeItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsFooter() (v FooterItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsHeader() (v HeaderItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsHeading() (v HeadingItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsImage() (v ImageItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsLink() (v LinkItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsList() (v ListItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsTable() (v TableItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsText() (v TextItem)
- func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) RawJSON() string
- func (r *ParsingGetResponseItemsPageStructuredResultPageItemUnion) UnmarshalJSON(data []byte) error
- type ParsingGetResponseItemsPageStructuredResultPageItemUnionItems
- type ParsingGetResponseItemsPageUnion
- func (u ParsingGetResponseItemsPageUnion) AsFailedStructuredPage() (v ParsingGetResponseItemsPageFailedStructuredPage)
- func (u ParsingGetResponseItemsPageUnion) AsStructuredResultPage() (v ParsingGetResponseItemsPageStructuredResultPage)
- func (u ParsingGetResponseItemsPageUnion) RawJSON() string
- func (r *ParsingGetResponseItemsPageUnion) UnmarshalJSON(data []byte) error
- type ParsingGetResponseJob
- type ParsingGetResponseMarkdown
- type ParsingGetResponseMarkdownPageFailedMarkdownPage
- type ParsingGetResponseMarkdownPageMarkdownResultPage
- type ParsingGetResponseMarkdownPageUnion
- func (u ParsingGetResponseMarkdownPageUnion) AsFailedMarkdownPage() (v ParsingGetResponseMarkdownPageFailedMarkdownPage)
- func (u ParsingGetResponseMarkdownPageUnion) AsMarkdownResultPage() (v ParsingGetResponseMarkdownPageMarkdownResultPage)
- func (u ParsingGetResponseMarkdownPageUnion) RawJSON() string
- func (r *ParsingGetResponseMarkdownPageUnion) UnmarshalJSON(data []byte) error
- type ParsingGetResponseMetadata
- type ParsingGetResponseMetadataPage
- type ParsingGetResponseResultContentMetadata
- type ParsingGetResponseText
- type ParsingGetResponseTextPage
- type ParsingLanguages
- type ParsingListParams
- type ParsingListParamsStatus
- type ParsingListResponse
- type ParsingListResponseStatus
- type ParsingMode
- type ParsingNewParams
- type ParsingNewParamsAgenticOptions
- type ParsingNewParamsCropBox
- type ParsingNewParamsInputOptions
- type ParsingNewParamsInputOptionsHTML
- type ParsingNewParamsInputOptionsPresentation
- type ParsingNewParamsInputOptionsSpreadsheet
- type ParsingNewParamsOutputOptions
- type ParsingNewParamsOutputOptionsMarkdown
- type ParsingNewParamsOutputOptionsMarkdownTables
- type ParsingNewParamsOutputOptionsSpatialText
- type ParsingNewParamsOutputOptionsTablesAsSpreadsheet
- type ParsingNewParamsPageRanges
- type ParsingNewParamsProcessingControl
- type ParsingNewParamsProcessingControlJobFailureConditions
- type ParsingNewParamsProcessingControlTimeouts
- type ParsingNewParamsProcessingOptions
- type ParsingNewParamsProcessingOptionsAutoModeConfiguration
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConf
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfCropBox
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfIgnore
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfPresentation
- type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfSpatialText
- type ParsingNewParamsProcessingOptionsCostOptimizer
- type ParsingNewParamsProcessingOptionsIgnore
- type ParsingNewParamsProcessingOptionsOcrParameters
- type ParsingNewParamsTier
- type ParsingNewParamsVersion
- type ParsingNewParamsWebhookConfiguration
- type ParsingNewResponse
- type ParsingNewResponseStatus
- type ParsingService
- func (r *ParsingService) Get(ctx context.Context, jobID string, query ParsingGetParams, ...) (res *ParsingGetResponse, err error)
- func (r *ParsingService) List(ctx context.Context, query ParsingListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[ParsingListResponse], err error)
- func (r *ParsingService) ListAutoPaging(ctx context.Context, query ParsingListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[ParsingListResponse]
- func (r *ParsingService) New(ctx context.Context, params ParsingNewParams, opts ...option.RequestOption) (res *ParsingNewResponse, err error)
- type PgVectorHnswSettings
- type PgVectorHnswSettingsDistanceMethod
- type PgVectorHnswSettingsParam
- type PgVectorHnswSettingsVectorType
- type Pipeline
- type PipelineConfigHash
- type PipelineCreateEmbeddingConfigUnionParam
- type PipelineCreateParam
- type PipelineCreateTransformConfigUnionParam
- type PipelineDataSource
- type PipelineDataSourceComponentUnion
- func (u PipelineDataSourceComponentUnion) AsAnyMap() (v map[string]any)
- func (u PipelineDataSourceComponentUnion) AsCloudAzStorageBlobDataSource() (v shared.CloudAzStorageBlobDataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudBoxDataSource() (v shared.CloudBoxDataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudConfluenceDataSource() (v shared.CloudConfluenceDataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudGoogleDriveDataSource() (v shared.CloudGoogleDriveDataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudJiraDataSource() (v shared.CloudJiraDataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudJiraDataSourceV2() (v shared.CloudJiraDataSourceV2)
- func (u PipelineDataSourceComponentUnion) AsCloudNotionPageDataSource() (v shared.CloudNotionPageDataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudOneDriveDataSource() (v shared.CloudOneDriveDataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudS3DataSource() (v shared.CloudS3DataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudSharepointDataSource() (v shared.CloudSharepointDataSource)
- func (u PipelineDataSourceComponentUnion) AsCloudSlackDataSource() (v shared.CloudSlackDataSource)
- func (u PipelineDataSourceComponentUnion) RawJSON() string
- func (r *PipelineDataSourceComponentUnion) UnmarshalJSON(data []byte) error
- type PipelineDataSourceCustomMetadataUnion
- func (u PipelineDataSourceCustomMetadataUnion) AsAnyArray() (v []any)
- func (u PipelineDataSourceCustomMetadataUnion) AsAnyMap() (v map[string]any)
- func (u PipelineDataSourceCustomMetadataUnion) AsBool() (v bool)
- func (u PipelineDataSourceCustomMetadataUnion) AsFloat() (v float64)
- func (u PipelineDataSourceCustomMetadataUnion) AsString() (v string)
- func (u PipelineDataSourceCustomMetadataUnion) RawJSON() string
- func (r *PipelineDataSourceCustomMetadataUnion) UnmarshalJSON(data []byte) error
- type PipelineDataSourceGetStatusParams
- type PipelineDataSourceService
- func (r *PipelineDataSourceService) GetDataSources(ctx context.Context, pipelineID string, opts ...option.RequestOption) (res *[]PipelineDataSource, err error)
- func (r *PipelineDataSourceService) GetStatus(ctx context.Context, dataSourceID string, ...) (res *ManagedIngestionStatusResponse, err error)
- func (r *PipelineDataSourceService) Sync(ctx context.Context, dataSourceID string, params PipelineDataSourceSyncParams, ...) (res *Pipeline, err error)
- func (r *PipelineDataSourceService) Update(ctx context.Context, dataSourceID string, ...) (res *PipelineDataSource, err error)
- func (r *PipelineDataSourceService) UpdateDataSources(ctx context.Context, pipelineID string, ...) (res *[]PipelineDataSource, err error)
- type PipelineDataSourceSourceType
- type PipelineDataSourceStatus
- type PipelineDataSourceSyncParams
- type PipelineDataSourceUpdateDataSourcesParams
- type PipelineDataSourceUpdateDataSourcesParamsBody
- type PipelineDataSourceUpdateParams
- type PipelineDocumentDeleteParams
- type PipelineDocumentGetChunksParams
- type PipelineDocumentGetParams
- type PipelineDocumentGetStatusParams
- type PipelineDocumentListParams
- type PipelineDocumentListParamsStatusRefreshPolicy
- type PipelineDocumentNewParams
- type PipelineDocumentService
- func (r *PipelineDocumentService) Delete(ctx context.Context, documentID string, body PipelineDocumentDeleteParams, ...) (err error)
- func (r *PipelineDocumentService) Get(ctx context.Context, documentID string, query PipelineDocumentGetParams, ...) (res *CloudDocument, err error)
- func (r *PipelineDocumentService) GetChunks(ctx context.Context, documentID string, query PipelineDocumentGetChunksParams, ...) (res *[]TextNode, err error)
- func (r *PipelineDocumentService) GetStatus(ctx context.Context, documentID string, query PipelineDocumentGetStatusParams, ...) (res *ManagedIngestionStatusResponse, err error)
- func (r *PipelineDocumentService) List(ctx context.Context, pipelineID string, query PipelineDocumentListParams, ...) (res *pagination.PaginatedCloudDocuments[CloudDocument], err error)
- func (r *PipelineDocumentService) ListAutoPaging(ctx context.Context, pipelineID string, query PipelineDocumentListParams, ...) *pagination.PaginatedCloudDocumentsAutoPager[CloudDocument]
- func (r *PipelineDocumentService) New(ctx context.Context, pipelineID string, body PipelineDocumentNewParams, ...) (res *[]CloudDocument, err error)
- func (r *PipelineDocumentService) Sync(ctx context.Context, documentID string, body PipelineDocumentSyncParams, ...) (res *PipelineDocumentSyncResponse, err error)
- func (r *PipelineDocumentService) Upsert(ctx context.Context, pipelineID string, body PipelineDocumentUpsertParams, ...) (res *[]CloudDocument, err error)
- type PipelineDocumentSyncParams
- type PipelineDocumentSyncResponse
- type PipelineDocumentUpsertParams
- type PipelineEmbeddingConfigManagedOpenAIEmbedding
- type PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent
- type PipelineEmbeddingConfigUnion
- func (u PipelineEmbeddingConfigUnion) AsAny() anyPipelineEmbeddingConfig
- func (u PipelineEmbeddingConfigUnion) AsAzureEmbedding() (v AzureOpenAIEmbeddingConfig)
- func (u PipelineEmbeddingConfigUnion) AsBedrockEmbedding() (v BedrockEmbeddingConfig)
- func (u PipelineEmbeddingConfigUnion) AsCohereEmbedding() (v CohereEmbeddingConfig)
- func (u PipelineEmbeddingConfigUnion) AsGeminiEmbedding() (v GeminiEmbeddingConfig)
- func (u PipelineEmbeddingConfigUnion) AsHuggingfaceAPIEmbedding() (v HuggingFaceInferenceAPIEmbeddingConfig)
- func (u PipelineEmbeddingConfigUnion) AsManagedOpenAIEmbedding() (v PipelineEmbeddingConfigManagedOpenAIEmbedding)
- func (u PipelineEmbeddingConfigUnion) AsOpenAIEmbedding() (v OpenAIEmbeddingConfig)
- func (u PipelineEmbeddingConfigUnion) AsVertexaiEmbedding() (v VertexAIEmbeddingConfig)
- func (u PipelineEmbeddingConfigUnion) RawJSON() string
- func (r *PipelineEmbeddingConfigUnion) UnmarshalJSON(data []byte) error
- type PipelineEmbeddingConfigUnionComponent
- type PipelineEmbeddingModelConfig
- type PipelineEmbeddingModelConfigEmbeddingConfigUnion
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsAny() anyPipelineEmbeddingModelConfigEmbeddingConfig
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsAzureEmbedding() (v AzureOpenAIEmbeddingConfig)
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsBedrockEmbedding() (v BedrockEmbeddingConfig)
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsCohereEmbedding() (v CohereEmbeddingConfig)
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsGeminiEmbedding() (v GeminiEmbeddingConfig)
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsHuggingfaceAPIEmbedding() (v HuggingFaceInferenceAPIEmbeddingConfig)
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsOpenAIEmbedding() (v OpenAIEmbeddingConfig)
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsVertexaiEmbedding() (v VertexAIEmbeddingConfig)
- func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) RawJSON() string
- func (r *PipelineEmbeddingModelConfigEmbeddingConfigUnion) UnmarshalJSON(data []byte) error
- type PipelineEmbeddingModelConfigEmbeddingConfigUnionComponent
- type PipelineFile
- type PipelineFileConfigHashUnion
- func (u PipelineFileConfigHashUnion) AsAnyArray() (v []any)
- func (u PipelineFileConfigHashUnion) AsAnyMap() (v map[string]any)
- func (u PipelineFileConfigHashUnion) AsBool() (v bool)
- func (u PipelineFileConfigHashUnion) AsFloat() (v float64)
- func (u PipelineFileConfigHashUnion) AsString() (v string)
- func (u PipelineFileConfigHashUnion) RawJSON() string
- func (r *PipelineFileConfigHashUnion) UnmarshalJSON(data []byte) error
- type PipelineFileCustomMetadataUnion
- func (u PipelineFileCustomMetadataUnion) AsAnyArray() (v []any)
- func (u PipelineFileCustomMetadataUnion) AsAnyMap() (v map[string]any)
- func (u PipelineFileCustomMetadataUnion) AsBool() (v bool)
- func (u PipelineFileCustomMetadataUnion) AsFloat() (v float64)
- func (u PipelineFileCustomMetadataUnion) AsString() (v string)
- func (u PipelineFileCustomMetadataUnion) RawJSON() string
- func (r *PipelineFileCustomMetadataUnion) UnmarshalJSON(data []byte) error
- type PipelineFileDeleteParams
- type PipelineFileGetStatusCountsParams
- type PipelineFileGetStatusCountsResponse
- type PipelineFileGetStatusParams
- type PipelineFileListParams
- type PipelineFileNewParams
- type PipelineFileNewParamsBody
- type PipelineFileNewParamsBodyCustomMetadataUnion
- type PipelineFilePermissionInfoUnion
- func (u PipelineFilePermissionInfoUnion) AsAnyArray() (v []any)
- func (u PipelineFilePermissionInfoUnion) AsAnyMap() (v map[string]any)
- func (u PipelineFilePermissionInfoUnion) AsBool() (v bool)
- func (u PipelineFilePermissionInfoUnion) AsFloat() (v float64)
- func (u PipelineFilePermissionInfoUnion) AsString() (v string)
- func (u PipelineFilePermissionInfoUnion) RawJSON() string
- func (r *PipelineFilePermissionInfoUnion) UnmarshalJSON(data []byte) error
- type PipelineFileResourceInfoUnion
- func (u PipelineFileResourceInfoUnion) AsAnyArray() (v []any)
- func (u PipelineFileResourceInfoUnion) AsAnyMap() (v map[string]any)
- func (u PipelineFileResourceInfoUnion) AsBool() (v bool)
- func (u PipelineFileResourceInfoUnion) AsFloat() (v float64)
- func (u PipelineFileResourceInfoUnion) AsString() (v string)
- func (u PipelineFileResourceInfoUnion) RawJSON() string
- func (r *PipelineFileResourceInfoUnion) UnmarshalJSON(data []byte) error
- type PipelineFileService
- func (r *PipelineFileService) Delete(ctx context.Context, fileID string, body PipelineFileDeleteParams, ...) (err error)
- func (r *PipelineFileService) GetStatus(ctx context.Context, fileID string, query PipelineFileGetStatusParams, ...) (res *ManagedIngestionStatusResponse, err error)
- func (r *PipelineFileService) GetStatusCounts(ctx context.Context, pipelineID string, ...) (res *PipelineFileGetStatusCountsResponse, err error)
- func (r *PipelineFileService) List(ctx context.Context, pipelineID string, query PipelineFileListParams, ...) (res *pagination.PaginatedPipelineFiles[PipelineFile], err error)deprecated
- func (r *PipelineFileService) ListAutoPaging(ctx context.Context, pipelineID string, query PipelineFileListParams, ...) *pagination.PaginatedPipelineFilesAutoPager[PipelineFile]deprecated
- func (r *PipelineFileService) New(ctx context.Context, pipelineID string, body PipelineFileNewParams, ...) (res *[]PipelineFile, err error)
- func (r *PipelineFileService) Update(ctx context.Context, fileID string, params PipelineFileUpdateParams, ...) (res *PipelineFile, err error)
- type PipelineFileStatus
- type PipelineFileUpdateParams
- type PipelineFileUpdateParamsCustomMetadataUnion
- type PipelineGetStatusParams
- type PipelineImageGetPageFigureParams
- type PipelineImageGetPageFigureResponse
- type PipelineImageGetPageScreenshotParams
- type PipelineImageGetPageScreenshotResponse
- type PipelineImageListPageFiguresParams
- type PipelineImageListPageFiguresResponse
- type PipelineImageListPageScreenshotsParams
- type PipelineImageListPageScreenshotsResponse
- type PipelineImageService
- func (r *PipelineImageService) GetPageFigure(ctx context.Context, figureName string, ...) (res *PipelineImageGetPageFigureResponse, err error)
- func (r *PipelineImageService) GetPageScreenshot(ctx context.Context, pageIndex int64, ...) (res *PipelineImageGetPageScreenshotResponse, err error)
- func (r *PipelineImageService) ListPageFigures(ctx context.Context, id string, query PipelineImageListPageFiguresParams, ...) (res *[]PipelineImageListPageFiguresResponse, err error)
- func (r *PipelineImageService) ListPageScreenshots(ctx context.Context, id string, query PipelineImageListPageScreenshotsParams, ...) (res *[]PipelineImageListPageScreenshotsResponse, err error)
- type PipelineListParams
- type PipelineMetadataConfig
- type PipelineMetadataConfigParam
- type PipelineMetadataNewParams
- type PipelineMetadataNewResponse
- type PipelineMetadataService
- type PipelineNewParams
- type PipelineRunSearchParams
- type PipelineRunSearchParamsSearchFiltersInferenceSchemaUnion
- type PipelineRunSearchResponse
- type PipelineRunSearchResponseRetrievalNode
- type PipelineService
- func (r *PipelineService) Delete(ctx context.Context, pipelineID string, opts ...option.RequestOption) (err error)
- func (r *PipelineService) Get(ctx context.Context, pipelineID string, opts ...option.RequestOption) (res *Pipeline, err error)
- func (r *PipelineService) GetStatus(ctx context.Context, pipelineID string, query PipelineGetStatusParams, ...) (res *ManagedIngestionStatusResponse, err error)
- func (r *PipelineService) List(ctx context.Context, query PipelineListParams, opts ...option.RequestOption) (res *[]Pipeline, err error)
- func (r *PipelineService) New(ctx context.Context, params PipelineNewParams, opts ...option.RequestOption) (res *Pipeline, err error)
- func (r *PipelineService) RunSearch(ctx context.Context, pipelineID string, params PipelineRunSearchParams, ...) (res *PipelineRunSearchResponse, err error)
- func (r *PipelineService) Update(ctx context.Context, pipelineID string, body PipelineUpdateParams, ...) (res *Pipeline, err error)
- func (r *PipelineService) Upsert(ctx context.Context, params PipelineUpsertParams, opts ...option.RequestOption) (res *Pipeline, err error)
- type PipelineStatus
- type PipelineSyncService
- type PipelineTransformConfigUnion
- func (u PipelineTransformConfigUnion) AsAdvancedModeTransformConfig() (v AdvancedModeTransformConfig)
- func (u PipelineTransformConfigUnion) AsAutoTransformConfig() (v AutoTransformConfig)
- func (u PipelineTransformConfigUnion) RawJSON() string
- func (r *PipelineTransformConfigUnion) UnmarshalJSON(data []byte) error
- type PipelineType
- type PipelineUpdateParams
- type PipelineUpdateParamsEmbeddingConfigUnion
- type PipelineUpdateParamsTransformConfigUnion
- type PipelineUpsertParams
- type PresetRetrievalParams
- type PresetRetrievalParamsResp
- type PresetRetrievalParamsSearchFiltersInferenceSchemaUnion
- type PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp
- func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsAnyArray() (v []any)
- func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsAnyMap() (v map[string]any)
- func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsBool() (v bool)
- func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsFloat() (v float64)
- func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsString() (v string)
- func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) RawJSON() string
- func (r *PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) UnmarshalJSON(data []byte) error
- type PresignedURL
- type Project
- type ProjectGetParams
- type ProjectListParams
- type ProjectService
- type ReRankConfigParam
- type ReRankConfigType
- type RetrievalMode
- type Retriever
- type RetrieverCreateParam
- type RetrieverDeleteParams
- type RetrieverGetParams
- type RetrieverListParams
- type RetrieverNewParams
- type RetrieverPipeline
- type RetrieverPipelineParam
- type RetrieverRetrieverSearchParams
- type RetrieverRetrieverService
- type RetrieverSearchParams
- type RetrieverService
- func (r *RetrieverService) Delete(ctx context.Context, retrieverID string, body RetrieverDeleteParams, ...) (err error)
- func (r *RetrieverService) Get(ctx context.Context, retrieverID string, query RetrieverGetParams, ...) (res *Retriever, err error)
- func (r *RetrieverService) List(ctx context.Context, query RetrieverListParams, opts ...option.RequestOption) (res *[]Retriever, err error)
- func (r *RetrieverService) New(ctx context.Context, params RetrieverNewParams, opts ...option.RequestOption) (res *Retriever, err error)
- func (r *RetrieverService) Search(ctx context.Context, params RetrieverSearchParams, ...) (res *CompositeRetrievalResult, err error)
- func (r *RetrieverService) Update(ctx context.Context, retrieverID string, params RetrieverUpdateParams, ...) (res *Retriever, err error)
- func (r *RetrieverService) Upsert(ctx context.Context, params RetrieverUpsertParams, ...) (res *Retriever, err error)
- type RetrieverUpdateParams
- type RetrieverUpsertParams
- type SheetsJob
- type SheetsJobParameters
- type SheetsJobParametersWebhookConfiguration
- type SheetsJobRegion
- type SheetsJobStatus
- type SheetsJobWorksheetMetadata
- type SheetsParsingConfig
- type SheetsParsingConfigParam
- type SheetsParsingConfigTableMergeSensitivity
- type SparseModelConfig
- type SparseModelConfigModelType
- type SparseModelConfigParam
- type SplitCategory
- type SplitCategoryParam
- type SplitDocumentInput
- type SplitDocumentInputParam
- type SplitResultResponse
- type SplitSegmentResponse
- type SplitV1Parameters
- type SplitV1ParametersResp
- type SplitV1ParametersSplittingStrategy
- type SplitV1ParametersSplittingStrategyResp
- type StatusEnum
- type TableItem
- type TableItemParseConcern
- type TableItemRowUnion
- type TableItemType
- type TextItem
- type TextItemType
- type TextNode
- type TextNodeRelationshipArrayItem
- type TextNodeRelationshipRelatedNodeInfo
- type TextNodeRelationshipUnion
- func (u TextNodeRelationshipUnion) AsRelatedNodeInfo() (v TextNodeRelationshipRelatedNodeInfo)
- func (u TextNodeRelationshipUnion) AsTextNodeRelationshipArray() (v []TextNodeRelationshipArrayItem)
- func (u TextNodeRelationshipUnion) RawJSON() string
- func (r *TextNodeRelationshipUnion) UnmarshalJSON(data []byte) error
- type UntypedParameters
- type UntypedParametersResp
- type VertexAIEmbeddingConfig
- type VertexAIEmbeddingConfigParam
- type VertexAIEmbeddingConfigType
- type VertexTextEmbedding
- type VertexTextEmbeddingEmbedMode
- type VertexTextEmbeddingParam
Constants ¶
const CloudBoxDataSourceAuthenticationMechanismCcg = shared.CloudBoxDataSourceAuthenticationMechanismCcg
Equals "ccg"
const CloudBoxDataSourceAuthenticationMechanismDeveloperToken = shared.CloudBoxDataSourceAuthenticationMechanismDeveloperToken
Equals "developer_token"
const CloudJiraDataSourceV2APIVersion2 = shared.CloudJiraDataSourceV2APIVersion2
Equals "2"
const CloudJiraDataSourceV2APIVersion3 = shared.CloudJiraDataSourceV2APIVersion3
Equals "3"
const PgVectorHnswSettingsDistanceMethodCosine = shared.PgVectorHnswSettingsDistanceMethodCosine
Equals "cosine"
const PgVectorHnswSettingsDistanceMethodHamming = shared.PgVectorHnswSettingsDistanceMethodHamming
Equals "hamming"
const PgVectorHnswSettingsDistanceMethodIP = shared.PgVectorHnswSettingsDistanceMethodIP
Equals "ip"
const PgVectorHnswSettingsDistanceMethodJaccard = shared.PgVectorHnswSettingsDistanceMethodJaccard
Equals "jaccard"
const PgVectorHnswSettingsDistanceMethodL1 = shared.PgVectorHnswSettingsDistanceMethodL1
Equals "l1"
const PgVectorHnswSettingsDistanceMethodL2 = shared.PgVectorHnswSettingsDistanceMethodL2
Equals "l2"
const PgVectorHnswSettingsVectorTypeBit = shared.PgVectorHnswSettingsVectorTypeBit
Equals "bit"
const PgVectorHnswSettingsVectorTypeHalfVec = shared.PgVectorHnswSettingsVectorTypeHalfVec
Equals "half_vec"
const PgVectorHnswSettingsVectorTypeSparseVec = shared.PgVectorHnswSettingsVectorTypeSparseVec
Equals "sparse_vec"
const PgVectorHnswSettingsVectorTypeVector = shared.PgVectorHnswSettingsVectorTypeVector
Equals "vector"
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (LLAMA_CLOUD_API_KEY, LLAMA_CLOUD_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type AdvancedModeTransformConfig ¶
type AdvancedModeTransformConfig struct {
// Configuration for the chunking.
ChunkingConfig AdvancedModeTransformConfigChunkingConfigUnion `json:"chunking_config"`
// Any of "advanced".
Mode AdvancedModeTransformConfigMode `json:"mode"`
// Configuration for the segmentation.
SegmentationConfig AdvancedModeTransformConfigSegmentationConfigUnion `json:"segmentation_config"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChunkingConfig respjson.Field
Mode respjson.Field
SegmentationConfig respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfig) RawJSON ¶
func (r AdvancedModeTransformConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (AdvancedModeTransformConfig) ToParam ¶
func (r AdvancedModeTransformConfig) ToParam() AdvancedModeTransformConfigParam
ToParam converts this AdvancedModeTransformConfig to a AdvancedModeTransformConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AdvancedModeTransformConfigParam.Overrides()
func (*AdvancedModeTransformConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig ¶
type AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig struct {
ChunkOverlap int64 `json:"chunk_overlap"`
ChunkSize int64 `json:"chunk_size"`
// Any of "character".
Mode string `json:"mode"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChunkOverlap respjson.Field
ChunkSize respjson.Field
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig) RawJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfigParam ¶
type AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfigParam struct {
ChunkOverlap param.Opt[int64] `json:"chunk_overlap,omitzero"`
ChunkSize param.Opt[int64] `json:"chunk_size,omitzero"`
// Any of "character".
Mode string `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig ¶
type AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig struct {
// Any of "none".
Mode string `json:"mode"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig) RawJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigNoneChunkingConfigParam ¶
type AdvancedModeTransformConfigChunkingConfigNoneChunkingConfigParam struct {
// Any of "none".
Mode string `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigChunkingConfigNoneChunkingConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigNoneChunkingConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigChunkingConfigNoneChunkingConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigNoneChunkingConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig ¶
type AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig struct {
BreakpointPercentileThreshold int64 `json:"breakpoint_percentile_threshold"`
BufferSize int64 `json:"buffer_size"`
// Any of "semantic".
Mode string `json:"mode"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BreakpointPercentileThreshold respjson.Field
BufferSize respjson.Field
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig) RawJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfigParam ¶
type AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfigParam struct {
BreakpointPercentileThreshold param.Opt[int64] `json:"breakpoint_percentile_threshold,omitzero"`
BufferSize param.Opt[int64] `json:"buffer_size,omitzero"`
// Any of "semantic".
Mode string `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig ¶
type AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig struct {
ChunkOverlap int64 `json:"chunk_overlap"`
ChunkSize int64 `json:"chunk_size"`
// Any of "sentence".
Mode string `json:"mode"`
ParagraphSeparator string `json:"paragraph_separator"`
Separator string `json:"separator"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChunkOverlap respjson.Field
ChunkSize respjson.Field
Mode respjson.Field
ParagraphSeparator respjson.Field
Separator respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig) RawJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfigParam ¶
type AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfigParam struct {
ChunkOverlap param.Opt[int64] `json:"chunk_overlap,omitzero"`
ChunkSize param.Opt[int64] `json:"chunk_size,omitzero"`
ParagraphSeparator param.Opt[string] `json:"paragraph_separator,omitzero"`
Separator param.Opt[string] `json:"separator,omitzero"`
// Any of "sentence".
Mode string `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig ¶
type AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig struct {
ChunkOverlap int64 `json:"chunk_overlap"`
ChunkSize int64 `json:"chunk_size"`
// Any of "token".
Mode string `json:"mode"`
Separator string `json:"separator"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChunkOverlap respjson.Field
ChunkSize respjson.Field
Mode respjson.Field
Separator respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig) RawJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigTokenChunkingConfigParam ¶
type AdvancedModeTransformConfigChunkingConfigTokenChunkingConfigParam struct {
ChunkOverlap param.Opt[int64] `json:"chunk_overlap,omitzero"`
ChunkSize param.Opt[int64] `json:"chunk_size,omitzero"`
Separator param.Opt[string] `json:"separator,omitzero"`
// Any of "token".
Mode string `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigChunkingConfigTokenChunkingConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigChunkingConfigTokenChunkingConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigChunkingConfigTokenChunkingConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigTokenChunkingConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigUnion ¶
type AdvancedModeTransformConfigChunkingConfigUnion struct {
Mode string `json:"mode"`
ChunkOverlap int64 `json:"chunk_overlap"`
ChunkSize int64 `json:"chunk_size"`
Separator string `json:"separator"`
// This field is from variant
// [AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig].
ParagraphSeparator string `json:"paragraph_separator"`
// This field is from variant
// [AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig].
BreakpointPercentileThreshold int64 `json:"breakpoint_percentile_threshold"`
// This field is from variant
// [AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig].
BufferSize int64 `json:"buffer_size"`
JSON struct {
Mode respjson.Field
ChunkOverlap respjson.Field
ChunkSize respjson.Field
Separator respjson.Field
ParagraphSeparator respjson.Field
BreakpointPercentileThreshold respjson.Field
BufferSize respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AdvancedModeTransformConfigChunkingConfigUnion contains all possible properties and values from AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig, AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig, AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig, AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig, AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (AdvancedModeTransformConfigChunkingConfigUnion) AsCharacterChunkingConfig ¶
func (u AdvancedModeTransformConfigChunkingConfigUnion) AsCharacterChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfig)
func (AdvancedModeTransformConfigChunkingConfigUnion) AsNoneChunkingConfig ¶
func (u AdvancedModeTransformConfigChunkingConfigUnion) AsNoneChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigNoneChunkingConfig)
func (AdvancedModeTransformConfigChunkingConfigUnion) AsSemanticChunkingConfig ¶
func (u AdvancedModeTransformConfigChunkingConfigUnion) AsSemanticChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfig)
func (AdvancedModeTransformConfigChunkingConfigUnion) AsSentenceChunkingConfig ¶
func (u AdvancedModeTransformConfigChunkingConfigUnion) AsSentenceChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfig)
func (AdvancedModeTransformConfigChunkingConfigUnion) AsTokenChunkingConfig ¶
func (u AdvancedModeTransformConfigChunkingConfigUnion) AsTokenChunkingConfig() (v AdvancedModeTransformConfigChunkingConfigTokenChunkingConfig)
func (AdvancedModeTransformConfigChunkingConfigUnion) RawJSON ¶
func (u AdvancedModeTransformConfigChunkingConfigUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigChunkingConfigUnion) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigChunkingConfigUnion) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigChunkingConfigUnionParam ¶
type AdvancedModeTransformConfigChunkingConfigUnionParam struct {
OfNoneChunkingConfig *AdvancedModeTransformConfigChunkingConfigNoneChunkingConfigParam `json:",omitzero,inline"`
OfCharacterChunkingConfig *AdvancedModeTransformConfigChunkingConfigCharacterChunkingConfigParam `json:",omitzero,inline"`
OfTokenChunkingConfig *AdvancedModeTransformConfigChunkingConfigTokenChunkingConfigParam `json:",omitzero,inline"`
OfSentenceChunkingConfig *AdvancedModeTransformConfigChunkingConfigSentenceChunkingConfigParam `json:",omitzero,inline"`
OfSemanticChunkingConfig *AdvancedModeTransformConfigChunkingConfigSemanticChunkingConfigParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AdvancedModeTransformConfigChunkingConfigUnionParam) MarshalJSON ¶
func (u AdvancedModeTransformConfigChunkingConfigUnionParam) MarshalJSON() ([]byte, error)
func (*AdvancedModeTransformConfigChunkingConfigUnionParam) UnmarshalJSON ¶
func (u *AdvancedModeTransformConfigChunkingConfigUnionParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigMode ¶
type AdvancedModeTransformConfigMode string
const (
AdvancedModeTransformConfigModeAdvanced AdvancedModeTransformConfigMode = "advanced"
)
type AdvancedModeTransformConfigParam ¶
type AdvancedModeTransformConfigParam struct {
// Configuration for the chunking.
ChunkingConfig AdvancedModeTransformConfigChunkingConfigUnionParam `json:"chunking_config,omitzero"`
// Any of "advanced".
Mode AdvancedModeTransformConfigMode `json:"mode,omitzero"`
// Configuration for the segmentation.
SegmentationConfig AdvancedModeTransformConfigSegmentationConfigUnionParam `json:"segmentation_config,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig ¶
type AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig struct {
// Any of "element".
Mode string `json:"mode"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig) RawJSON ¶
func (r AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfigParam ¶
type AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfigParam struct {
// Any of "element".
Mode string `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig ¶
type AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig struct {
// Any of "none".
Mode string `json:"mode"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig) RawJSON ¶
func (r AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfigParam ¶
type AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfigParam struct {
// Any of "none".
Mode string `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig ¶
type AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig struct {
// Any of "page".
Mode string `json:"mode"`
PageSeparator string `json:"page_separator"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Mode respjson.Field
PageSeparator respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig) RawJSON ¶
func (r AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfigParam ¶
type AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfigParam struct {
PageSeparator param.Opt[string] `json:"page_separator,omitzero"`
// Any of "page".
Mode string `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfigParam) MarshalJSON ¶
func (r AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfigParam) MarshalJSON() (data []byte, err error)
func (*AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfigParam) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfigParam) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigSegmentationConfigUnion ¶
type AdvancedModeTransformConfigSegmentationConfigUnion struct {
Mode string `json:"mode"`
// This field is from variant
// [AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig].
PageSeparator string `json:"page_separator"`
JSON struct {
Mode respjson.Field
PageSeparator respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AdvancedModeTransformConfigSegmentationConfigUnion contains all possible properties and values from AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig, AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig, AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (AdvancedModeTransformConfigSegmentationConfigUnion) AsElementSegmentationConfig ¶
func (u AdvancedModeTransformConfigSegmentationConfigUnion) AsElementSegmentationConfig() (v AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfig)
func (AdvancedModeTransformConfigSegmentationConfigUnion) AsNoneSegmentationConfig ¶
func (u AdvancedModeTransformConfigSegmentationConfigUnion) AsNoneSegmentationConfig() (v AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfig)
func (AdvancedModeTransformConfigSegmentationConfigUnion) AsPageSegmentationConfig ¶
func (u AdvancedModeTransformConfigSegmentationConfigUnion) AsPageSegmentationConfig() (v AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfig)
func (AdvancedModeTransformConfigSegmentationConfigUnion) RawJSON ¶
func (u AdvancedModeTransformConfigSegmentationConfigUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdvancedModeTransformConfigSegmentationConfigUnion) UnmarshalJSON ¶
func (r *AdvancedModeTransformConfigSegmentationConfigUnion) UnmarshalJSON(data []byte) error
type AdvancedModeTransformConfigSegmentationConfigUnionParam ¶
type AdvancedModeTransformConfigSegmentationConfigUnionParam struct {
OfNoneSegmentationConfig *AdvancedModeTransformConfigSegmentationConfigNoneSegmentationConfigParam `json:",omitzero,inline"`
OfPageSegmentationConfig *AdvancedModeTransformConfigSegmentationConfigPageSegmentationConfigParam `json:",omitzero,inline"`
OfElementSegmentationConfig *AdvancedModeTransformConfigSegmentationConfigElementSegmentationConfigParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AdvancedModeTransformConfigSegmentationConfigUnionParam) MarshalJSON ¶
func (u AdvancedModeTransformConfigSegmentationConfigUnionParam) MarshalJSON() ([]byte, error)
func (*AdvancedModeTransformConfigSegmentationConfigUnionParam) UnmarshalJSON ¶
func (u *AdvancedModeTransformConfigSegmentationConfigUnionParam) UnmarshalJSON(data []byte) error
type AgentData ¶
type AgentData struct {
Data map[string]any `json:"data" api:"required"`
DeploymentName string `json:"deployment_name" api:"required"`
ID string `json:"id" api:"nullable"`
Collection string `json:"collection"`
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
ProjectID string `json:"project_id" api:"nullable"`
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
DeploymentName respjson.Field
ID respjson.Field
Collection respjson.Field
CreatedAt respjson.Field
ProjectID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API Result for a single agent data item
func (*AgentData) UnmarshalJSON ¶
type AutoTransformConfig ¶
type AutoTransformConfig struct {
// Chunk overlap for the transformation.
ChunkOverlap int64 `json:"chunk_overlap"`
// Chunk size for the transformation.
ChunkSize int64 `json:"chunk_size"`
// Any of "auto".
Mode AutoTransformConfigMode `json:"mode"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChunkOverlap respjson.Field
ChunkSize respjson.Field
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AutoTransformConfig) RawJSON ¶
func (r AutoTransformConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (AutoTransformConfig) ToParam ¶
func (r AutoTransformConfig) ToParam() AutoTransformConfigParam
ToParam converts this AutoTransformConfig to a AutoTransformConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AutoTransformConfigParam.Overrides()
func (*AutoTransformConfig) UnmarshalJSON ¶
func (r *AutoTransformConfig) UnmarshalJSON(data []byte) error
type AutoTransformConfigMode ¶
type AutoTransformConfigMode string
const (
AutoTransformConfigModeAuto AutoTransformConfigMode = "auto"
)
type AutoTransformConfigParam ¶
type AutoTransformConfigParam struct {
// Chunk overlap for the transformation.
ChunkOverlap param.Opt[int64] `json:"chunk_overlap,omitzero"`
// Chunk size for the transformation.
ChunkSize param.Opt[int64] `json:"chunk_size,omitzero"`
// Any of "auto".
Mode AutoTransformConfigMode `json:"mode,omitzero"`
// contains filtered or unexported fields
}
func (AutoTransformConfigParam) MarshalJSON ¶
func (r AutoTransformConfigParam) MarshalJSON() (data []byte, err error)
func (*AutoTransformConfigParam) UnmarshalJSON ¶
func (r *AutoTransformConfigParam) UnmarshalJSON(data []byte) error
type AzureOpenAIEmbedding ¶
type AzureOpenAIEmbedding struct {
// Additional kwargs for the OpenAI API.
AdditionalKwargs map[string]any `json:"additional_kwargs"`
// The base URL for Azure deployment.
APIBase string `json:"api_base"`
// The OpenAI API key.
APIKey string `json:"api_key" api:"nullable"`
// The version for Azure OpenAI API.
APIVersion string `json:"api_version"`
// The Azure deployment to use.
AzureDeployment string `json:"azure_deployment" api:"nullable"`
// The Azure endpoint to use.
AzureEndpoint string `json:"azure_endpoint" api:"nullable"`
ClassName string `json:"class_name"`
// The default headers for API requests.
DefaultHeaders map[string]string `json:"default_headers" api:"nullable"`
// The number of dimensions on the output embedding vectors. Works only with v3
// embedding models.
Dimensions int64 `json:"dimensions" api:"nullable"`
// The batch size for embedding calls.
EmbedBatchSize int64 `json:"embed_batch_size"`
// Maximum number of retries.
MaxRetries int64 `json:"max_retries"`
// The name of the OpenAI embedding model.
ModelName string `json:"model_name"`
// The number of workers to use for async embedding calls.
NumWorkers int64 `json:"num_workers" api:"nullable"`
// Reuse the OpenAI client between requests. When doing anything with large volumes
// of async API calls, setting this to false can improve stability.
ReuseClient bool `json:"reuse_client"`
// Timeout for each request.
Timeout float64 `json:"timeout"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdditionalKwargs respjson.Field
APIBase respjson.Field
APIKey respjson.Field
APIVersion respjson.Field
AzureDeployment respjson.Field
AzureEndpoint respjson.Field
ClassName respjson.Field
DefaultHeaders respjson.Field
Dimensions respjson.Field
EmbedBatchSize respjson.Field
MaxRetries respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
ReuseClient respjson.Field
Timeout respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AzureOpenAIEmbedding) RawJSON ¶
func (r AzureOpenAIEmbedding) RawJSON() string
Returns the unmodified JSON received from the API
func (AzureOpenAIEmbedding) ToParam ¶
func (r AzureOpenAIEmbedding) ToParam() AzureOpenAIEmbeddingParam
ToParam converts this AzureOpenAIEmbedding to a AzureOpenAIEmbeddingParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AzureOpenAIEmbeddingParam.Overrides()
func (*AzureOpenAIEmbedding) UnmarshalJSON ¶
func (r *AzureOpenAIEmbedding) UnmarshalJSON(data []byte) error
type AzureOpenAIEmbeddingConfig ¶
type AzureOpenAIEmbeddingConfig struct {
// Configuration for the Azure OpenAI embedding model.
Component AzureOpenAIEmbedding `json:"component"`
// Type of the embedding model.
//
// Any of "AZURE_EMBEDDING".
Type AzureOpenAIEmbeddingConfigType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Component respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AzureOpenAIEmbeddingConfig) RawJSON ¶
func (r AzureOpenAIEmbeddingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (AzureOpenAIEmbeddingConfig) ToParam ¶
func (r AzureOpenAIEmbeddingConfig) ToParam() AzureOpenAIEmbeddingConfigParam
ToParam converts this AzureOpenAIEmbeddingConfig to a AzureOpenAIEmbeddingConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AzureOpenAIEmbeddingConfigParam.Overrides()
func (*AzureOpenAIEmbeddingConfig) UnmarshalJSON ¶
func (r *AzureOpenAIEmbeddingConfig) UnmarshalJSON(data []byte) error
type AzureOpenAIEmbeddingConfigParam ¶
type AzureOpenAIEmbeddingConfigParam struct {
// Configuration for the Azure OpenAI embedding model.
Component AzureOpenAIEmbeddingParam `json:"component,omitzero"`
// Type of the embedding model.
//
// Any of "AZURE_EMBEDDING".
Type AzureOpenAIEmbeddingConfigType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (AzureOpenAIEmbeddingConfigParam) MarshalJSON ¶
func (r AzureOpenAIEmbeddingConfigParam) MarshalJSON() (data []byte, err error)
func (*AzureOpenAIEmbeddingConfigParam) UnmarshalJSON ¶
func (r *AzureOpenAIEmbeddingConfigParam) UnmarshalJSON(data []byte) error
type AzureOpenAIEmbeddingConfigType ¶
type AzureOpenAIEmbeddingConfigType string
Type of the embedding model.
const (
AzureOpenAIEmbeddingConfigTypeAzureEmbedding AzureOpenAIEmbeddingConfigType = "AZURE_EMBEDDING"
)
type AzureOpenAIEmbeddingParam ¶
type AzureOpenAIEmbeddingParam struct {
// The OpenAI API key.
APIKey param.Opt[string] `json:"api_key,omitzero"`
// The Azure deployment to use.
AzureDeployment param.Opt[string] `json:"azure_deployment,omitzero"`
// The Azure endpoint to use.
AzureEndpoint param.Opt[string] `json:"azure_endpoint,omitzero"`
// The number of dimensions on the output embedding vectors. Works only with v3
// embedding models.
Dimensions param.Opt[int64] `json:"dimensions,omitzero"`
// The number of workers to use for async embedding calls.
NumWorkers param.Opt[int64] `json:"num_workers,omitzero"`
// The base URL for Azure deployment.
APIBase param.Opt[string] `json:"api_base,omitzero"`
// The version for Azure OpenAI API.
APIVersion param.Opt[string] `json:"api_version,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// The batch size for embedding calls.
EmbedBatchSize param.Opt[int64] `json:"embed_batch_size,omitzero"`
// Maximum number of retries.
MaxRetries param.Opt[int64] `json:"max_retries,omitzero"`
// The name of the OpenAI embedding model.
ModelName param.Opt[string] `json:"model_name,omitzero"`
// Reuse the OpenAI client between requests. When doing anything with large volumes
// of async API calls, setting this to false can improve stability.
ReuseClient param.Opt[bool] `json:"reuse_client,omitzero"`
// Timeout for each request.
Timeout param.Opt[float64] `json:"timeout,omitzero"`
// The default headers for API requests.
DefaultHeaders map[string]string `json:"default_headers,omitzero"`
// Additional kwargs for the OpenAI API.
AdditionalKwargs map[string]any `json:"additional_kwargs,omitzero"`
// contains filtered or unexported fields
}
func (AzureOpenAIEmbeddingParam) MarshalJSON ¶
func (r AzureOpenAIEmbeddingParam) MarshalJSON() (data []byte, err error)
func (*AzureOpenAIEmbeddingParam) UnmarshalJSON ¶
func (r *AzureOpenAIEmbeddingParam) UnmarshalJSON(data []byte) error
type BBox ¶
type BBox struct {
// Height of the bounding box
H float64 `json:"h" api:"required"`
// Width of the bounding box
W float64 `json:"w" api:"required"`
// X coordinate of the bounding box
X float64 `json:"x" api:"required"`
// Y coordinate of the bounding box
Y float64 `json:"y" api:"required"`
// Confidence score
Confidence float64 `json:"confidence" api:"nullable"`
// End index in the text
EndIndex int64 `json:"end_index" api:"nullable"`
// Label for the bounding box
Label string `json:"label" api:"nullable"`
// Optional visual text rotation angle in degrees. Omitted when unrotated.
R float64 `json:"r" api:"nullable"`
// Start index in the text
StartIndex int64 `json:"start_index" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
H respjson.Field
W respjson.Field
X respjson.Field
Y respjson.Field
Confidence respjson.Field
EndIndex respjson.Field
Label respjson.Field
R respjson.Field
StartIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bounding box with coordinates and optional metadata.
func (*BBox) UnmarshalJSON ¶
type BatchGetParams ¶
type BatchGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Fields to expand. Supported value: results.
Expand []string `query:"expand,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BatchGetParams) URLQuery ¶
func (r BatchGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BatchGetParams's query parameters as `url.Values`.
type BatchGetResponse ¶
type BatchGetResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// Batch configuration snapshot.
Config BatchGetResponseConfig `json:"config" api:"required"`
// Project this batch belongs to.
ProjectID string `json:"project_id" api:"required"`
// Directory being processed.
SourceDirectoryID string `json:"source_directory_id" api:"required"`
// Current batch status.
//
// Any of "PENDING", "THROTTLED", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status BatchGetResponseStatus `json:"status" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Expanded per-file result mappings. Null unless requested with expand=results, or
// while the batch is still running.
Results []BatchGetResponseResult `json:"results" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Config respjson.Field
ProjectID respjson.Field
SourceDirectoryID respjson.Field
Status respjson.Field
CreatedAt respjson.Field
Results respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A top-level batch.
Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type": "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } }, "status": "COMPLETED", "results": [ { "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message": null } ] }
Batch-level `FAILED` means the orchestration failed and cannot provide a reliable per-file result set. `results` is only populated when explicitly requested with `expand=results` and may be `null` while a batch is still running.
func (BatchGetResponse) RawJSON ¶
func (r BatchGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchGetResponse) UnmarshalJSON ¶
func (r *BatchGetResponse) UnmarshalJSON(data []byte) error
type BatchGetResponseConfig ¶
type BatchGetResponseConfig struct {
// Job to create for each file in the source directory.
Job BatchGetResponseConfigJob `json:"job" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Job respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Batch configuration snapshot.
func (BatchGetResponseConfig) RawJSON ¶
func (r BatchGetResponseConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchGetResponseConfig) UnmarshalJSON ¶
func (r *BatchGetResponseConfig) UnmarshalJSON(data []byte) error
type BatchGetResponseConfigJob ¶
type BatchGetResponseConfigJob struct {
// Product configuration ID or built-in preset ID matching the job type.
ConfigurationID string `json:"configuration_id" api:"required"`
// Product job type to run for each source directory file.
//
// Any of "parse_v2", "extract_v2".
Type BatchGetResponseConfigJobType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ConfigurationID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Job to create for each file in the source directory.
func (BatchGetResponseConfigJob) RawJSON ¶
func (r BatchGetResponseConfigJob) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchGetResponseConfigJob) UnmarshalJSON ¶
func (r *BatchGetResponseConfigJob) UnmarshalJSON(data []byte) error
type BatchGetResponseConfigJobType ¶
type BatchGetResponseConfigJobType string
Product job type to run for each source directory file.
const ( BatchGetResponseConfigJobTypeParseV2 BatchGetResponseConfigJobType = "parse_v2" BatchGetResponseConfigJobTypeExtractV2 BatchGetResponseConfigJobType = "extract_v2" )
type BatchGetResponseResult ¶
type BatchGetResponseResult struct {
// Source directory file processed by this batch.
SourceDirectoryFileID string `json:"source_directory_file_id" api:"required"`
// Batch-level mapping error if the system could not create or associate a job for
// this source file.
ErrorMessage string `json:"error_message" api:"nullable"`
// Reference to a job produced by a batch.
//
// Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
// }
JobReference BatchGetResponseResultJobReference `json:"job_reference" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SourceDirectoryFileID respjson.Field
ErrorMessage respjson.Field
JobReference respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Result projection for one source directory file in a batch.
Example: { "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message": null }
This is a projection of directory-sync state, not a separate child resource that callers need to create. The source directory file ID is the stable correlation key. Underlying job progress and failures should be resolved through the referenced product job endpoint.
func (BatchGetResponseResult) RawJSON ¶
func (r BatchGetResponseResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchGetResponseResult) UnmarshalJSON ¶
func (r *BatchGetResponseResult) UnmarshalJSON(data []byte) error
type BatchGetResponseResultJobReference ¶
type BatchGetResponseResultJobReference struct {
// Job ID, such as a parse job ID.
ID string `json:"id" api:"required"`
// Type of job produced for the file.
//
// Any of "parse_v2", "extract_v2".
Type BatchGetResponseResultJobReferenceType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Reference to a job produced by a batch.
Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }
func (BatchGetResponseResultJobReference) RawJSON ¶
func (r BatchGetResponseResultJobReference) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchGetResponseResultJobReference) UnmarshalJSON ¶
func (r *BatchGetResponseResultJobReference) UnmarshalJSON(data []byte) error
type BatchGetResponseResultJobReferenceType ¶
type BatchGetResponseResultJobReferenceType string
Type of job produced for the file.
const ( BatchGetResponseResultJobReferenceTypeParseV2 BatchGetResponseResultJobReferenceType = "parse_v2" BatchGetResponseResultJobReferenceTypeExtractV2 BatchGetResponseResultJobReferenceType = "extract_v2" )
type BatchGetResponseStatus ¶
type BatchGetResponseStatus string
Current batch status.
const ( BatchGetResponseStatusPending BatchGetResponseStatus = "PENDING" BatchGetResponseStatusThrottled BatchGetResponseStatus = "THROTTLED" BatchGetResponseStatusRunning BatchGetResponseStatus = "RUNNING" BatchGetResponseStatusCompleted BatchGetResponseStatus = "COMPLETED" BatchGetResponseStatusFailed BatchGetResponseStatus = "FAILED" BatchGetResponseStatusCancelled BatchGetResponseStatus = "CANCELLED" )
type BatchListParams ¶
type BatchListParams struct {
CreatedAtOnOrAfter param.Opt[time.Time] `query:"created_at_on_or_after,omitzero" format:"date-time" json:"-"`
CreatedAtOnOrBefore param.Opt[time.Time] `query:"created_at_on_or_before,omitzero" format:"date-time" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
SourceDirectoryID param.Opt[string] `query:"source_directory_id,omitzero" json:"-"`
// Any of "PENDING", "THROTTLED", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status BatchListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BatchListParams) URLQuery ¶
func (r BatchListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BatchListParams's query parameters as `url.Values`.
type BatchListParamsStatus ¶
type BatchListParamsStatus string
const ( BatchListParamsStatusPending BatchListParamsStatus = "PENDING" BatchListParamsStatusThrottled BatchListParamsStatus = "THROTTLED" BatchListParamsStatusRunning BatchListParamsStatus = "RUNNING" BatchListParamsStatusCompleted BatchListParamsStatus = "COMPLETED" BatchListParamsStatusFailed BatchListParamsStatus = "FAILED" BatchListParamsStatusCancelled BatchListParamsStatus = "CANCELLED" )
type BatchListResponse ¶
type BatchListResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// Batch configuration snapshot.
Config BatchListResponseConfig `json:"config" api:"required"`
// Project this batch belongs to.
ProjectID string `json:"project_id" api:"required"`
// Directory being processed.
SourceDirectoryID string `json:"source_directory_id" api:"required"`
// Current batch status.
//
// Any of "PENDING", "THROTTLED", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status BatchListResponseStatus `json:"status" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Expanded per-file result mappings. Null unless requested with expand=results, or
// while the batch is still running.
Results []BatchListResponseResult `json:"results" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Config respjson.Field
ProjectID respjson.Field
SourceDirectoryID respjson.Field
Status respjson.Field
CreatedAt respjson.Field
Results respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A top-level batch.
Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type": "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } }, "status": "COMPLETED", "results": [ { "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message": null } ] }
Batch-level `FAILED` means the orchestration failed and cannot provide a reliable per-file result set. `results` is only populated when explicitly requested with `expand=results` and may be `null` while a batch is still running.
func (BatchListResponse) RawJSON ¶
func (r BatchListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchListResponse) UnmarshalJSON ¶
func (r *BatchListResponse) UnmarshalJSON(data []byte) error
type BatchListResponseConfig ¶
type BatchListResponseConfig struct {
// Job to create for each file in the source directory.
Job BatchListResponseConfigJob `json:"job" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Job respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Batch configuration snapshot.
func (BatchListResponseConfig) RawJSON ¶
func (r BatchListResponseConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchListResponseConfig) UnmarshalJSON ¶
func (r *BatchListResponseConfig) UnmarshalJSON(data []byte) error
type BatchListResponseConfigJob ¶
type BatchListResponseConfigJob struct {
// Product configuration ID or built-in preset ID matching the job type.
ConfigurationID string `json:"configuration_id" api:"required"`
// Product job type to run for each source directory file.
//
// Any of "parse_v2", "extract_v2".
Type BatchListResponseConfigJobType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ConfigurationID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Job to create for each file in the source directory.
func (BatchListResponseConfigJob) RawJSON ¶
func (r BatchListResponseConfigJob) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchListResponseConfigJob) UnmarshalJSON ¶
func (r *BatchListResponseConfigJob) UnmarshalJSON(data []byte) error
type BatchListResponseConfigJobType ¶
type BatchListResponseConfigJobType string
Product job type to run for each source directory file.
const ( BatchListResponseConfigJobTypeParseV2 BatchListResponseConfigJobType = "parse_v2" BatchListResponseConfigJobTypeExtractV2 BatchListResponseConfigJobType = "extract_v2" )
type BatchListResponseResult ¶
type BatchListResponseResult struct {
// Source directory file processed by this batch.
SourceDirectoryFileID string `json:"source_directory_file_id" api:"required"`
// Batch-level mapping error if the system could not create or associate a job for
// this source file.
ErrorMessage string `json:"error_message" api:"nullable"`
// Reference to a job produced by a batch.
//
// Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
// }
JobReference BatchListResponseResultJobReference `json:"job_reference" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SourceDirectoryFileID respjson.Field
ErrorMessage respjson.Field
JobReference respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Result projection for one source directory file in a batch.
Example: { "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message": null }
This is a projection of directory-sync state, not a separate child resource that callers need to create. The source directory file ID is the stable correlation key. Underlying job progress and failures should be resolved through the referenced product job endpoint.
func (BatchListResponseResult) RawJSON ¶
func (r BatchListResponseResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchListResponseResult) UnmarshalJSON ¶
func (r *BatchListResponseResult) UnmarshalJSON(data []byte) error
type BatchListResponseResultJobReference ¶
type BatchListResponseResultJobReference struct {
// Job ID, such as a parse job ID.
ID string `json:"id" api:"required"`
// Type of job produced for the file.
//
// Any of "parse_v2", "extract_v2".
Type BatchListResponseResultJobReferenceType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Reference to a job produced by a batch.
Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }
func (BatchListResponseResultJobReference) RawJSON ¶
func (r BatchListResponseResultJobReference) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchListResponseResultJobReference) UnmarshalJSON ¶
func (r *BatchListResponseResultJobReference) UnmarshalJSON(data []byte) error
type BatchListResponseResultJobReferenceType ¶
type BatchListResponseResultJobReferenceType string
Type of job produced for the file.
const ( BatchListResponseResultJobReferenceTypeParseV2 BatchListResponseResultJobReferenceType = "parse_v2" BatchListResponseResultJobReferenceTypeExtractV2 BatchListResponseResultJobReferenceType = "extract_v2" )
type BatchListResponseStatus ¶
type BatchListResponseStatus string
Current batch status.
const ( BatchListResponseStatusPending BatchListResponseStatus = "PENDING" BatchListResponseStatusThrottled BatchListResponseStatus = "THROTTLED" BatchListResponseStatusRunning BatchListResponseStatus = "RUNNING" BatchListResponseStatusCompleted BatchListResponseStatus = "COMPLETED" BatchListResponseStatusFailed BatchListResponseStatus = "FAILED" BatchListResponseStatusCancelled BatchListResponseStatus = "CANCELLED" )
type BatchNewParams ¶
type BatchNewParams struct {
// Batch configuration snapshot to apply to this source directory.
Config BatchNewParamsConfig `json:"config,omitzero" api:"required"`
// Directory whose files should be processed.
SourceDirectoryID string `json:"source_directory_id" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BatchNewParams) MarshalJSON ¶
func (r BatchNewParams) MarshalJSON() (data []byte, err error)
func (BatchNewParams) URLQuery ¶
func (r BatchNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes BatchNewParams's query parameters as `url.Values`.
func (*BatchNewParams) UnmarshalJSON ¶
func (r *BatchNewParams) UnmarshalJSON(data []byte) error
type BatchNewParamsConfig ¶
type BatchNewParamsConfig struct {
// Job to create for each file in the source directory.
Job BatchNewParamsConfigJob `json:"job,omitzero" api:"required"`
// contains filtered or unexported fields
}
Batch configuration snapshot to apply to this source directory.
The property Job is required.
func (BatchNewParamsConfig) MarshalJSON ¶
func (r BatchNewParamsConfig) MarshalJSON() (data []byte, err error)
func (*BatchNewParamsConfig) UnmarshalJSON ¶
func (r *BatchNewParamsConfig) UnmarshalJSON(data []byte) error
type BatchNewParamsConfigJob ¶
type BatchNewParamsConfigJob struct {
// Product configuration ID or built-in preset ID matching the job type.
ConfigurationID string `json:"configuration_id" api:"required"`
// Product job type to run for each source directory file.
//
// Any of "parse_v2", "extract_v2".
Type BatchNewParamsConfigJobType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Job to create for each file in the source directory.
The properties ConfigurationID, Type are required.
func (BatchNewParamsConfigJob) MarshalJSON ¶
func (r BatchNewParamsConfigJob) MarshalJSON() (data []byte, err error)
func (*BatchNewParamsConfigJob) UnmarshalJSON ¶
func (r *BatchNewParamsConfigJob) UnmarshalJSON(data []byte) error
type BatchNewParamsConfigJobType ¶
type BatchNewParamsConfigJobType string
Product job type to run for each source directory file.
const ( BatchNewParamsConfigJobTypeParseV2 BatchNewParamsConfigJobType = "parse_v2" BatchNewParamsConfigJobTypeExtractV2 BatchNewParamsConfigJobType = "extract_v2" )
type BatchNewResponse ¶
type BatchNewResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// Batch configuration snapshot.
Config BatchNewResponseConfig `json:"config" api:"required"`
// Project this batch belongs to.
ProjectID string `json:"project_id" api:"required"`
// Directory being processed.
SourceDirectoryID string `json:"source_directory_id" api:"required"`
// Current batch status.
//
// Any of "PENDING", "THROTTLED", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status BatchNewResponseStatus `json:"status" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Expanded per-file result mappings. Null unless requested with expand=results, or
// while the batch is still running.
Results []BatchNewResponseResult `json:"results" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Config respjson.Field
ProjectID respjson.Field
SourceDirectoryID respjson.Field
Status respjson.Field
CreatedAt respjson.Field
Results respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A top-level batch.
Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type": "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } }, "status": "COMPLETED", "results": [ { "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message": null } ] }
Batch-level `FAILED` means the orchestration failed and cannot provide a reliable per-file result set. `results` is only populated when explicitly requested with `expand=results` and may be `null` while a batch is still running.
func (BatchNewResponse) RawJSON ¶
func (r BatchNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchNewResponse) UnmarshalJSON ¶
func (r *BatchNewResponse) UnmarshalJSON(data []byte) error
type BatchNewResponseConfig ¶
type BatchNewResponseConfig struct {
// Job to create for each file in the source directory.
Job BatchNewResponseConfigJob `json:"job" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Job respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Batch configuration snapshot.
func (BatchNewResponseConfig) RawJSON ¶
func (r BatchNewResponseConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchNewResponseConfig) UnmarshalJSON ¶
func (r *BatchNewResponseConfig) UnmarshalJSON(data []byte) error
type BatchNewResponseConfigJob ¶
type BatchNewResponseConfigJob struct {
// Product configuration ID or built-in preset ID matching the job type.
ConfigurationID string `json:"configuration_id" api:"required"`
// Product job type to run for each source directory file.
//
// Any of "parse_v2", "extract_v2".
Type BatchNewResponseConfigJobType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ConfigurationID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Job to create for each file in the source directory.
func (BatchNewResponseConfigJob) RawJSON ¶
func (r BatchNewResponseConfigJob) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchNewResponseConfigJob) UnmarshalJSON ¶
func (r *BatchNewResponseConfigJob) UnmarshalJSON(data []byte) error
type BatchNewResponseConfigJobType ¶
type BatchNewResponseConfigJobType string
Product job type to run for each source directory file.
const ( BatchNewResponseConfigJobTypeParseV2 BatchNewResponseConfigJobType = "parse_v2" BatchNewResponseConfigJobTypeExtractV2 BatchNewResponseConfigJobType = "extract_v2" )
type BatchNewResponseResult ¶
type BatchNewResponseResult struct {
// Source directory file processed by this batch.
SourceDirectoryFileID string `json:"source_directory_file_id" api:"required"`
// Batch-level mapping error if the system could not create or associate a job for
// this source file.
ErrorMessage string `json:"error_message" api:"nullable"`
// Reference to a job produced by a batch.
//
// Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
// }
JobReference BatchNewResponseResultJobReference `json:"job_reference" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SourceDirectoryFileID respjson.Field
ErrorMessage respjson.Field
JobReference respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Result projection for one source directory file in a batch.
Example: { "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message": null }
This is a projection of directory-sync state, not a separate child resource that callers need to create. The source directory file ID is the stable correlation key. Underlying job progress and failures should be resolved through the referenced product job endpoint.
func (BatchNewResponseResult) RawJSON ¶
func (r BatchNewResponseResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchNewResponseResult) UnmarshalJSON ¶
func (r *BatchNewResponseResult) UnmarshalJSON(data []byte) error
type BatchNewResponseResultJobReference ¶
type BatchNewResponseResultJobReference struct {
// Job ID, such as a parse job ID.
ID string `json:"id" api:"required"`
// Type of job produced for the file.
//
// Any of "parse_v2", "extract_v2".
Type BatchNewResponseResultJobReferenceType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Reference to a job produced by a batch.
Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }
func (BatchNewResponseResultJobReference) RawJSON ¶
func (r BatchNewResponseResultJobReference) RawJSON() string
Returns the unmodified JSON received from the API
func (*BatchNewResponseResultJobReference) UnmarshalJSON ¶
func (r *BatchNewResponseResultJobReference) UnmarshalJSON(data []byte) error
type BatchNewResponseResultJobReferenceType ¶
type BatchNewResponseResultJobReferenceType string
Type of job produced for the file.
const ( BatchNewResponseResultJobReferenceTypeParseV2 BatchNewResponseResultJobReferenceType = "parse_v2" BatchNewResponseResultJobReferenceTypeExtractV2 BatchNewResponseResultJobReferenceType = "extract_v2" )
type BatchNewResponseStatus ¶
type BatchNewResponseStatus string
Current batch status.
const ( BatchNewResponseStatusPending BatchNewResponseStatus = "PENDING" BatchNewResponseStatusThrottled BatchNewResponseStatus = "THROTTLED" BatchNewResponseStatusRunning BatchNewResponseStatus = "RUNNING" BatchNewResponseStatusCompleted BatchNewResponseStatus = "COMPLETED" BatchNewResponseStatusFailed BatchNewResponseStatus = "FAILED" BatchNewResponseStatusCancelled BatchNewResponseStatus = "CANCELLED" )
type BatchService ¶
type BatchService struct {
// contains filtered or unexported fields
}
BatchService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBatchService method instead.
func NewBatchService ¶
func NewBatchService(opts ...option.RequestOption) (r BatchService)
NewBatchService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BatchService) Get ¶
func (r *BatchService) Get(ctx context.Context, batchID string, query BatchGetParams, opts ...option.RequestOption) (res *BatchGetResponse, err error)
Get a batch by ID.
func (*BatchService) List ¶
func (r *BatchService) List(ctx context.Context, query BatchListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BatchListResponse], err error)
List batches for the current project.
func (*BatchService) ListAutoPaging ¶
func (r *BatchService) ListAutoPaging(ctx context.Context, query BatchListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BatchListResponse]
List batches for the current project.
func (*BatchService) New ¶
func (r *BatchService) New(ctx context.Context, params BatchNewParams, opts ...option.RequestOption) (res *BatchNewResponse, err error)
Create a batch over a source directory and start processing asynchronously.
type BedrockEmbedding ¶
type BedrockEmbedding struct {
// Additional kwargs for the bedrock client.
AdditionalKwargs map[string]any `json:"additional_kwargs"`
// AWS Access Key ID to use
AwsAccessKeyID string `json:"aws_access_key_id" api:"nullable"`
// AWS Secret Access Key to use
AwsSecretAccessKey string `json:"aws_secret_access_key" api:"nullable"`
// AWS Session Token to use
AwsSessionToken string `json:"aws_session_token" api:"nullable"`
ClassName string `json:"class_name"`
// The batch size for embedding calls.
EmbedBatchSize int64 `json:"embed_batch_size"`
// The maximum number of API retries.
MaxRetries int64 `json:"max_retries"`
// The modelId of the Bedrock model to use.
ModelName string `json:"model_name"`
// The number of workers to use for async embedding calls.
NumWorkers int64 `json:"num_workers" api:"nullable"`
// The name of aws profile to use. If not given, then the default profile is used.
ProfileName string `json:"profile_name" api:"nullable"`
// AWS region name to use. Uses region configured in AWS CLI if not passed
RegionName string `json:"region_name" api:"nullable"`
// The timeout for the Bedrock API request in seconds. It will be used for both
// connect and read timeouts.
Timeout float64 `json:"timeout"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdditionalKwargs respjson.Field
AwsAccessKeyID respjson.Field
AwsSecretAccessKey respjson.Field
AwsSessionToken respjson.Field
ClassName respjson.Field
EmbedBatchSize respjson.Field
MaxRetries respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
ProfileName respjson.Field
RegionName respjson.Field
Timeout respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BedrockEmbedding) RawJSON ¶
func (r BedrockEmbedding) RawJSON() string
Returns the unmodified JSON received from the API
func (BedrockEmbedding) ToParam ¶
func (r BedrockEmbedding) ToParam() BedrockEmbeddingParam
ToParam converts this BedrockEmbedding to a BedrockEmbeddingParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with BedrockEmbeddingParam.Overrides()
func (*BedrockEmbedding) UnmarshalJSON ¶
func (r *BedrockEmbedding) UnmarshalJSON(data []byte) error
type BedrockEmbeddingConfig ¶
type BedrockEmbeddingConfig struct {
// Configuration for the Bedrock embedding model.
Component BedrockEmbedding `json:"component"`
// Type of the embedding model.
//
// Any of "BEDROCK_EMBEDDING".
Type BedrockEmbeddingConfigType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Component respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BedrockEmbeddingConfig) RawJSON ¶
func (r BedrockEmbeddingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (BedrockEmbeddingConfig) ToParam ¶
func (r BedrockEmbeddingConfig) ToParam() BedrockEmbeddingConfigParam
ToParam converts this BedrockEmbeddingConfig to a BedrockEmbeddingConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with BedrockEmbeddingConfigParam.Overrides()
func (*BedrockEmbeddingConfig) UnmarshalJSON ¶
func (r *BedrockEmbeddingConfig) UnmarshalJSON(data []byte) error
type BedrockEmbeddingConfigParam ¶
type BedrockEmbeddingConfigParam struct {
// Configuration for the Bedrock embedding model.
Component BedrockEmbeddingParam `json:"component,omitzero"`
// Type of the embedding model.
//
// Any of "BEDROCK_EMBEDDING".
Type BedrockEmbeddingConfigType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (BedrockEmbeddingConfigParam) MarshalJSON ¶
func (r BedrockEmbeddingConfigParam) MarshalJSON() (data []byte, err error)
func (*BedrockEmbeddingConfigParam) UnmarshalJSON ¶
func (r *BedrockEmbeddingConfigParam) UnmarshalJSON(data []byte) error
type BedrockEmbeddingConfigType ¶
type BedrockEmbeddingConfigType string
Type of the embedding model.
const (
BedrockEmbeddingConfigTypeBedrockEmbedding BedrockEmbeddingConfigType = "BEDROCK_EMBEDDING"
)
type BedrockEmbeddingParam ¶
type BedrockEmbeddingParam struct {
// AWS Access Key ID to use
AwsAccessKeyID param.Opt[string] `json:"aws_access_key_id,omitzero"`
// AWS Secret Access Key to use
AwsSecretAccessKey param.Opt[string] `json:"aws_secret_access_key,omitzero"`
// AWS Session Token to use
AwsSessionToken param.Opt[string] `json:"aws_session_token,omitzero"`
// The number of workers to use for async embedding calls.
NumWorkers param.Opt[int64] `json:"num_workers,omitzero"`
// The name of aws profile to use. If not given, then the default profile is used.
ProfileName param.Opt[string] `json:"profile_name,omitzero"`
// AWS region name to use. Uses region configured in AWS CLI if not passed
RegionName param.Opt[string] `json:"region_name,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// The batch size for embedding calls.
EmbedBatchSize param.Opt[int64] `json:"embed_batch_size,omitzero"`
// The maximum number of API retries.
MaxRetries param.Opt[int64] `json:"max_retries,omitzero"`
// The modelId of the Bedrock model to use.
ModelName param.Opt[string] `json:"model_name,omitzero"`
// The timeout for the Bedrock API request in seconds. It will be used for both
// connect and read timeouts.
Timeout param.Opt[float64] `json:"timeout,omitzero"`
// Additional kwargs for the bedrock client.
AdditionalKwargs map[string]any `json:"additional_kwargs,omitzero"`
// contains filtered or unexported fields
}
func (BedrockEmbeddingParam) MarshalJSON ¶
func (r BedrockEmbeddingParam) MarshalJSON() (data []byte, err error)
func (*BedrockEmbeddingParam) UnmarshalJSON ¶
func (r *BedrockEmbeddingParam) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParams ¶
type BetaAgentDataAggregateParams struct {
// The agent deployment's name to aggregate data for
DeploymentName string `json:"deployment_name" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Whether to count the number of items in each group
Count param.Opt[bool] `json:"count,omitzero"`
// Whether to return the first item in each group (Sorted by created_at)
First param.Opt[bool] `json:"first,omitzero"`
// The offset to start from. If not provided, the first page is returned
Offset param.Opt[int64] `json:"offset,omitzero"`
// A comma-separated list of fields to order by, sorted in ascending order. Use
// 'field_name desc' to specify descending order.
OrderBy param.Opt[string] `json:"order_by,omitzero"`
// The maximum number of items to return. The service may return fewer than this
// value. If unspecified, a default page size will be used. The maximum value is
// typically 1000; values above this will be coerced to the maximum.
PageSize param.Opt[int64] `json:"page_size,omitzero"`
// A page token, received from a previous list call. Provide this to retrieve the
// subsequent page.
PageToken param.Opt[string] `json:"page_token,omitzero"`
// The logical agent data collection to aggregate data for
Collection param.Opt[string] `json:"collection,omitzero"`
// A filter object or expression that filters resources listed in the response.
Filter map[string]BetaAgentDataAggregateParamsFilter `json:"filter,omitzero"`
// The fields to group by. If empty, the entire dataset is grouped on. e.g. if left
// out, can be used for simple count operations
GroupBy []string `json:"group_by,omitzero"`
// contains filtered or unexported fields
}
func (BetaAgentDataAggregateParams) MarshalJSON ¶
func (r BetaAgentDataAggregateParams) MarshalJSON() (data []byte, err error)
func (BetaAgentDataAggregateParams) URLQuery ¶
func (r BetaAgentDataAggregateParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaAgentDataAggregateParams's query parameters as `url.Values`.
func (*BetaAgentDataAggregateParams) UnmarshalJSON ¶
func (r *BetaAgentDataAggregateParams) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilter ¶
type BetaAgentDataAggregateParamsFilter struct {
Eq BetaAgentDataAggregateParamsFilterEqUnion `json:"eq,omitzero" format:"date-time"`
Gt BetaAgentDataAggregateParamsFilterGtUnion `json:"gt,omitzero" format:"date-time"`
Gte BetaAgentDataAggregateParamsFilterGteUnion `json:"gte,omitzero" format:"date-time"`
Lt BetaAgentDataAggregateParamsFilterLtUnion `json:"lt,omitzero" format:"date-time"`
Lte BetaAgentDataAggregateParamsFilterLteUnion `json:"lte,omitzero" format:"date-time"`
Ne BetaAgentDataAggregateParamsFilterNeUnion `json:"ne,omitzero" format:"date-time"`
Excludes []*BetaAgentDataAggregateParamsFilterExcludeUnion `json:"excludes,omitzero" format:"date-time"`
Includes []*BetaAgentDataAggregateParamsFilterIncludeUnion `json:"includes,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
API request model for a filter comparison operation.
func (BetaAgentDataAggregateParamsFilter) MarshalJSON ¶
func (r BetaAgentDataAggregateParamsFilter) MarshalJSON() (data []byte, err error)
func (*BetaAgentDataAggregateParamsFilter) UnmarshalJSON ¶
func (r *BetaAgentDataAggregateParamsFilter) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilterEqUnion ¶
type BetaAgentDataAggregateParamsFilterEqUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataAggregateParamsFilterEqUnion) MarshalJSON ¶
func (u BetaAgentDataAggregateParamsFilterEqUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataAggregateParamsFilterEqUnion) UnmarshalJSON ¶
func (u *BetaAgentDataAggregateParamsFilterEqUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilterExcludeUnion ¶
type BetaAgentDataAggregateParamsFilterExcludeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataAggregateParamsFilterExcludeUnion) MarshalJSON ¶
func (u BetaAgentDataAggregateParamsFilterExcludeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataAggregateParamsFilterExcludeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataAggregateParamsFilterExcludeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilterGtUnion ¶
type BetaAgentDataAggregateParamsFilterGtUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataAggregateParamsFilterGtUnion) MarshalJSON ¶
func (u BetaAgentDataAggregateParamsFilterGtUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataAggregateParamsFilterGtUnion) UnmarshalJSON ¶
func (u *BetaAgentDataAggregateParamsFilterGtUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilterGteUnion ¶
type BetaAgentDataAggregateParamsFilterGteUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataAggregateParamsFilterGteUnion) MarshalJSON ¶
func (u BetaAgentDataAggregateParamsFilterGteUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataAggregateParamsFilterGteUnion) UnmarshalJSON ¶
func (u *BetaAgentDataAggregateParamsFilterGteUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilterIncludeUnion ¶
type BetaAgentDataAggregateParamsFilterIncludeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataAggregateParamsFilterIncludeUnion) MarshalJSON ¶
func (u BetaAgentDataAggregateParamsFilterIncludeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataAggregateParamsFilterIncludeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataAggregateParamsFilterIncludeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilterLtUnion ¶
type BetaAgentDataAggregateParamsFilterLtUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataAggregateParamsFilterLtUnion) MarshalJSON ¶
func (u BetaAgentDataAggregateParamsFilterLtUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataAggregateParamsFilterLtUnion) UnmarshalJSON ¶
func (u *BetaAgentDataAggregateParamsFilterLtUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilterLteUnion ¶
type BetaAgentDataAggregateParamsFilterLteUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataAggregateParamsFilterLteUnion) MarshalJSON ¶
func (u BetaAgentDataAggregateParamsFilterLteUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataAggregateParamsFilterLteUnion) UnmarshalJSON ¶
func (u *BetaAgentDataAggregateParamsFilterLteUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateParamsFilterNeUnion ¶
type BetaAgentDataAggregateParamsFilterNeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataAggregateParamsFilterNeUnion) MarshalJSON ¶
func (u BetaAgentDataAggregateParamsFilterNeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataAggregateParamsFilterNeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataAggregateParamsFilterNeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataAggregateResponse ¶
type BetaAgentDataAggregateResponse struct {
GroupKey map[string]any `json:"group_key" api:"required"`
Count int64 `json:"count" api:"nullable"`
FirstItem map[string]any `json:"first_item" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
GroupKey respjson.Field
Count respjson.Field
FirstItem respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API Result for a single group in the aggregate response
func (BetaAgentDataAggregateResponse) RawJSON ¶
func (r BetaAgentDataAggregateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaAgentDataAggregateResponse) UnmarshalJSON ¶
func (r *BetaAgentDataAggregateResponse) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParams ¶
type BetaAgentDataDeleteByQueryParams struct {
// The agent deployment's name to delete data for
DeploymentName string `json:"deployment_name" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// The logical agent data collection to delete from
Collection param.Opt[string] `json:"collection,omitzero"`
// Optional filters to select which items to delete
Filter map[string]BetaAgentDataDeleteByQueryParamsFilter `json:"filter,omitzero"`
// contains filtered or unexported fields
}
func (BetaAgentDataDeleteByQueryParams) MarshalJSON ¶
func (r BetaAgentDataDeleteByQueryParams) MarshalJSON() (data []byte, err error)
func (BetaAgentDataDeleteByQueryParams) URLQuery ¶
func (r BetaAgentDataDeleteByQueryParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaAgentDataDeleteByQueryParams's query parameters as `url.Values`.
func (*BetaAgentDataDeleteByQueryParams) UnmarshalJSON ¶
func (r *BetaAgentDataDeleteByQueryParams) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilter ¶
type BetaAgentDataDeleteByQueryParamsFilter struct {
Eq BetaAgentDataDeleteByQueryParamsFilterEqUnion `json:"eq,omitzero" format:"date-time"`
Gt BetaAgentDataDeleteByQueryParamsFilterGtUnion `json:"gt,omitzero" format:"date-time"`
Gte BetaAgentDataDeleteByQueryParamsFilterGteUnion `json:"gte,omitzero" format:"date-time"`
Lt BetaAgentDataDeleteByQueryParamsFilterLtUnion `json:"lt,omitzero" format:"date-time"`
Lte BetaAgentDataDeleteByQueryParamsFilterLteUnion `json:"lte,omitzero" format:"date-time"`
Ne BetaAgentDataDeleteByQueryParamsFilterNeUnion `json:"ne,omitzero" format:"date-time"`
Excludes []*BetaAgentDataDeleteByQueryParamsFilterExcludeUnion `json:"excludes,omitzero" format:"date-time"`
Includes []*BetaAgentDataDeleteByQueryParamsFilterIncludeUnion `json:"includes,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
API request model for a filter comparison operation.
func (BetaAgentDataDeleteByQueryParamsFilter) MarshalJSON ¶
func (r BetaAgentDataDeleteByQueryParamsFilter) MarshalJSON() (data []byte, err error)
func (*BetaAgentDataDeleteByQueryParamsFilter) UnmarshalJSON ¶
func (r *BetaAgentDataDeleteByQueryParamsFilter) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilterEqUnion ¶
type BetaAgentDataDeleteByQueryParamsFilterEqUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataDeleteByQueryParamsFilterEqUnion) MarshalJSON ¶
func (u BetaAgentDataDeleteByQueryParamsFilterEqUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataDeleteByQueryParamsFilterEqUnion) UnmarshalJSON ¶
func (u *BetaAgentDataDeleteByQueryParamsFilterEqUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilterExcludeUnion ¶
type BetaAgentDataDeleteByQueryParamsFilterExcludeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataDeleteByQueryParamsFilterExcludeUnion) MarshalJSON ¶
func (u BetaAgentDataDeleteByQueryParamsFilterExcludeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataDeleteByQueryParamsFilterExcludeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataDeleteByQueryParamsFilterExcludeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilterGtUnion ¶
type BetaAgentDataDeleteByQueryParamsFilterGtUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataDeleteByQueryParamsFilterGtUnion) MarshalJSON ¶
func (u BetaAgentDataDeleteByQueryParamsFilterGtUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataDeleteByQueryParamsFilterGtUnion) UnmarshalJSON ¶
func (u *BetaAgentDataDeleteByQueryParamsFilterGtUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilterGteUnion ¶
type BetaAgentDataDeleteByQueryParamsFilterGteUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataDeleteByQueryParamsFilterGteUnion) MarshalJSON ¶
func (u BetaAgentDataDeleteByQueryParamsFilterGteUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataDeleteByQueryParamsFilterGteUnion) UnmarshalJSON ¶
func (u *BetaAgentDataDeleteByQueryParamsFilterGteUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilterIncludeUnion ¶
type BetaAgentDataDeleteByQueryParamsFilterIncludeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataDeleteByQueryParamsFilterIncludeUnion) MarshalJSON ¶
func (u BetaAgentDataDeleteByQueryParamsFilterIncludeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataDeleteByQueryParamsFilterIncludeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataDeleteByQueryParamsFilterIncludeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilterLtUnion ¶
type BetaAgentDataDeleteByQueryParamsFilterLtUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataDeleteByQueryParamsFilterLtUnion) MarshalJSON ¶
func (u BetaAgentDataDeleteByQueryParamsFilterLtUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataDeleteByQueryParamsFilterLtUnion) UnmarshalJSON ¶
func (u *BetaAgentDataDeleteByQueryParamsFilterLtUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilterLteUnion ¶
type BetaAgentDataDeleteByQueryParamsFilterLteUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataDeleteByQueryParamsFilterLteUnion) MarshalJSON ¶
func (u BetaAgentDataDeleteByQueryParamsFilterLteUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataDeleteByQueryParamsFilterLteUnion) UnmarshalJSON ¶
func (u *BetaAgentDataDeleteByQueryParamsFilterLteUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryParamsFilterNeUnion ¶
type BetaAgentDataDeleteByQueryParamsFilterNeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataDeleteByQueryParamsFilterNeUnion) MarshalJSON ¶
func (u BetaAgentDataDeleteByQueryParamsFilterNeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataDeleteByQueryParamsFilterNeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataDeleteByQueryParamsFilterNeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteByQueryResponse ¶
type BetaAgentDataDeleteByQueryResponse struct {
DeletedCount int64 `json:"deleted_count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DeletedCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response for bulk delete operation
func (BetaAgentDataDeleteByQueryResponse) RawJSON ¶
func (r BetaAgentDataDeleteByQueryResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaAgentDataDeleteByQueryResponse) UnmarshalJSON ¶
func (r *BetaAgentDataDeleteByQueryResponse) UnmarshalJSON(data []byte) error
type BetaAgentDataDeleteParams ¶
type BetaAgentDataDeleteParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaAgentDataDeleteParams) URLQuery ¶
func (r BetaAgentDataDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaAgentDataDeleteParams's query parameters as `url.Values`.
type BetaAgentDataGetParams ¶
type BetaAgentDataGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaAgentDataGetParams) URLQuery ¶
func (r BetaAgentDataGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaAgentDataGetParams's query parameters as `url.Values`.
type BetaAgentDataNewParams ¶
type BetaAgentDataNewParams struct {
Data map[string]any `json:"data,omitzero" api:"required"`
DeploymentName string `json:"deployment_name" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
Collection param.Opt[string] `json:"collection,omitzero"`
// contains filtered or unexported fields
}
func (BetaAgentDataNewParams) MarshalJSON ¶
func (r BetaAgentDataNewParams) MarshalJSON() (data []byte, err error)
func (BetaAgentDataNewParams) URLQuery ¶
func (r BetaAgentDataNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaAgentDataNewParams's query parameters as `url.Values`.
func (*BetaAgentDataNewParams) UnmarshalJSON ¶
func (r *BetaAgentDataNewParams) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParams ¶
type BetaAgentDataSearchParams struct {
// The agent deployment's name to search within
DeploymentName string `json:"deployment_name" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// The offset to start from. If not provided, the first page is returned
Offset param.Opt[int64] `json:"offset,omitzero"`
// A comma-separated list of fields to order by, sorted in ascending order. Use
// 'field_name desc' to specify descending order.
OrderBy param.Opt[string] `json:"order_by,omitzero"`
// The maximum number of items to return. The service may return fewer than this
// value. If unspecified, a default page size will be used. The maximum value is
// typically 1000; values above this will be coerced to the maximum.
PageSize param.Opt[int64] `json:"page_size,omitzero"`
// A page token, received from a previous list call. Provide this to retrieve the
// subsequent page.
PageToken param.Opt[string] `json:"page_token,omitzero"`
// The logical agent data collection to search within
Collection param.Opt[string] `json:"collection,omitzero"`
// Whether to include the total number of items in the response
IncludeTotal param.Opt[bool] `json:"include_total,omitzero"`
// A filter object or expression that filters resources listed in the response.
Filter map[string]BetaAgentDataSearchParamsFilter `json:"filter,omitzero"`
// contains filtered or unexported fields
}
func (BetaAgentDataSearchParams) MarshalJSON ¶
func (r BetaAgentDataSearchParams) MarshalJSON() (data []byte, err error)
func (BetaAgentDataSearchParams) URLQuery ¶
func (r BetaAgentDataSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaAgentDataSearchParams's query parameters as `url.Values`.
func (*BetaAgentDataSearchParams) UnmarshalJSON ¶
func (r *BetaAgentDataSearchParams) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilter ¶
type BetaAgentDataSearchParamsFilter struct {
Eq BetaAgentDataSearchParamsFilterEqUnion `json:"eq,omitzero" format:"date-time"`
Gt BetaAgentDataSearchParamsFilterGtUnion `json:"gt,omitzero" format:"date-time"`
Gte BetaAgentDataSearchParamsFilterGteUnion `json:"gte,omitzero" format:"date-time"`
Lt BetaAgentDataSearchParamsFilterLtUnion `json:"lt,omitzero" format:"date-time"`
Lte BetaAgentDataSearchParamsFilterLteUnion `json:"lte,omitzero" format:"date-time"`
Ne BetaAgentDataSearchParamsFilterNeUnion `json:"ne,omitzero" format:"date-time"`
Excludes []*BetaAgentDataSearchParamsFilterExcludeUnion `json:"excludes,omitzero" format:"date-time"`
Includes []*BetaAgentDataSearchParamsFilterIncludeUnion `json:"includes,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
API request model for a filter comparison operation.
func (BetaAgentDataSearchParamsFilter) MarshalJSON ¶
func (r BetaAgentDataSearchParamsFilter) MarshalJSON() (data []byte, err error)
func (*BetaAgentDataSearchParamsFilter) UnmarshalJSON ¶
func (r *BetaAgentDataSearchParamsFilter) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilterEqUnion ¶
type BetaAgentDataSearchParamsFilterEqUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataSearchParamsFilterEqUnion) MarshalJSON ¶
func (u BetaAgentDataSearchParamsFilterEqUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataSearchParamsFilterEqUnion) UnmarshalJSON ¶
func (u *BetaAgentDataSearchParamsFilterEqUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilterExcludeUnion ¶
type BetaAgentDataSearchParamsFilterExcludeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataSearchParamsFilterExcludeUnion) MarshalJSON ¶
func (u BetaAgentDataSearchParamsFilterExcludeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataSearchParamsFilterExcludeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataSearchParamsFilterExcludeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilterGtUnion ¶
type BetaAgentDataSearchParamsFilterGtUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataSearchParamsFilterGtUnion) MarshalJSON ¶
func (u BetaAgentDataSearchParamsFilterGtUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataSearchParamsFilterGtUnion) UnmarshalJSON ¶
func (u *BetaAgentDataSearchParamsFilterGtUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilterGteUnion ¶
type BetaAgentDataSearchParamsFilterGteUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataSearchParamsFilterGteUnion) MarshalJSON ¶
func (u BetaAgentDataSearchParamsFilterGteUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataSearchParamsFilterGteUnion) UnmarshalJSON ¶
func (u *BetaAgentDataSearchParamsFilterGteUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilterIncludeUnion ¶
type BetaAgentDataSearchParamsFilterIncludeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataSearchParamsFilterIncludeUnion) MarshalJSON ¶
func (u BetaAgentDataSearchParamsFilterIncludeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataSearchParamsFilterIncludeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataSearchParamsFilterIncludeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilterLtUnion ¶
type BetaAgentDataSearchParamsFilterLtUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataSearchParamsFilterLtUnion) MarshalJSON ¶
func (u BetaAgentDataSearchParamsFilterLtUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataSearchParamsFilterLtUnion) UnmarshalJSON ¶
func (u *BetaAgentDataSearchParamsFilterLtUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilterLteUnion ¶
type BetaAgentDataSearchParamsFilterLteUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataSearchParamsFilterLteUnion) MarshalJSON ¶
func (u BetaAgentDataSearchParamsFilterLteUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataSearchParamsFilterLteUnion) UnmarshalJSON ¶
func (u *BetaAgentDataSearchParamsFilterLteUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataSearchParamsFilterNeUnion ¶
type BetaAgentDataSearchParamsFilterNeUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfTime param.Opt[time.Time] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaAgentDataSearchParamsFilterNeUnion) MarshalJSON ¶
func (u BetaAgentDataSearchParamsFilterNeUnion) MarshalJSON() ([]byte, error)
func (*BetaAgentDataSearchParamsFilterNeUnion) UnmarshalJSON ¶
func (u *BetaAgentDataSearchParamsFilterNeUnion) UnmarshalJSON(data []byte) error
type BetaAgentDataService ¶
type BetaAgentDataService struct {
// contains filtered or unexported fields
}
BetaAgentDataService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaAgentDataService method instead.
func NewBetaAgentDataService ¶
func NewBetaAgentDataService(opts ...option.RequestOption) (r BetaAgentDataService)
NewBetaAgentDataService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaAgentDataService) Aggregate ¶
func (r *BetaAgentDataService) Aggregate(ctx context.Context, params BetaAgentDataAggregateParams, opts ...option.RequestOption) (res *pagination.PaginatedCursorPost[BetaAgentDataAggregateResponse], err error)
Aggregate agent data with grouping and optional counting/first item retrieval.
func (*BetaAgentDataService) AggregateAutoPaging ¶
func (r *BetaAgentDataService) AggregateAutoPaging(ctx context.Context, params BetaAgentDataAggregateParams, opts ...option.RequestOption) *pagination.PaginatedCursorPostAutoPager[BetaAgentDataAggregateResponse]
Aggregate agent data with grouping and optional counting/first item retrieval.
func (*BetaAgentDataService) Delete ¶
func (r *BetaAgentDataService) Delete(ctx context.Context, itemID string, body BetaAgentDataDeleteParams, opts ...option.RequestOption) (res *BetaAgentDataDeleteResponse, err error)
Delete agent data by ID.
func (*BetaAgentDataService) DeleteByQuery ¶
func (r *BetaAgentDataService) DeleteByQuery(ctx context.Context, params BetaAgentDataDeleteByQueryParams, opts ...option.RequestOption) (res *BetaAgentDataDeleteByQueryResponse, err error)
Bulk delete agent data by query (deployment_name, collection, optional filters).
func (*BetaAgentDataService) Get ¶
func (r *BetaAgentDataService) Get(ctx context.Context, itemID string, query BetaAgentDataGetParams, opts ...option.RequestOption) (res *AgentData, err error)
Get agent data by ID.
func (*BetaAgentDataService) New ¶
func (r *BetaAgentDataService) New(ctx context.Context, params BetaAgentDataNewParams, opts ...option.RequestOption) (res *AgentData, err error)
Create new agent data.
func (*BetaAgentDataService) Search ¶
func (r *BetaAgentDataService) Search(ctx context.Context, params BetaAgentDataSearchParams, opts ...option.RequestOption) (res *pagination.PaginatedCursorPost[AgentData], err error)
Search agent data with filtering, sorting, and pagination.
func (*BetaAgentDataService) SearchAutoPaging ¶
func (r *BetaAgentDataService) SearchAutoPaging(ctx context.Context, params BetaAgentDataSearchParams, opts ...option.RequestOption) *pagination.PaginatedCursorPostAutoPager[AgentData]
Search agent data with filtering, sorting, and pagination.
func (*BetaAgentDataService) Update ¶
func (r *BetaAgentDataService) Update(ctx context.Context, itemID string, params BetaAgentDataUpdateParams, opts ...option.RequestOption) (res *AgentData, err error)
Update agent data by ID (overwrites).
type BetaAgentDataUpdateParams ¶
type BetaAgentDataUpdateParams struct {
Data map[string]any `json:"data,omitzero" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaAgentDataUpdateParams) MarshalJSON ¶
func (r BetaAgentDataUpdateParams) MarshalJSON() (data []byte, err error)
func (BetaAgentDataUpdateParams) URLQuery ¶
func (r BetaAgentDataUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaAgentDataUpdateParams's query parameters as `url.Values`.
func (*BetaAgentDataUpdateParams) UnmarshalJSON ¶
func (r *BetaAgentDataUpdateParams) UnmarshalJSON(data []byte) error
type BetaBatchCancelParams ¶
type BetaBatchCancelParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Optional reason for cancelling the job
Reason param.Opt[string] `json:"reason,omitzero"`
TemporalNamespace param.Opt[string] `header:"temporal-namespace,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaBatchCancelParams) MarshalJSON ¶
func (r BetaBatchCancelParams) MarshalJSON() (data []byte, err error)
func (BetaBatchCancelParams) URLQuery ¶
func (r BetaBatchCancelParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaBatchCancelParams's query parameters as `url.Values`.
func (*BetaBatchCancelParams) UnmarshalJSON ¶
func (r *BetaBatchCancelParams) UnmarshalJSON(data []byte) error
type BetaBatchCancelResponse ¶
type BetaBatchCancelResponse struct {
// ID of the cancelled job
JobID string `json:"job_id" api:"required"`
// Confirmation message
Message string `json:"message" api:"required"`
// Number of items processed before cancellation
ProcessedItems int64 `json:"processed_items" api:"required"`
// New status (should be 'cancelled')
//
// Any of "pending", "running", "dispatched", "completed", "failed", "cancelled".
Status BetaBatchCancelResponseStatus `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
JobID respjson.Field
Message respjson.Field
ProcessedItems respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response after cancelling a batch job.
func (BetaBatchCancelResponse) RawJSON ¶
func (r BetaBatchCancelResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchCancelResponse) UnmarshalJSON ¶
func (r *BetaBatchCancelResponse) UnmarshalJSON(data []byte) error
type BetaBatchCancelResponseStatus ¶
type BetaBatchCancelResponseStatus string
New status (should be 'cancelled')
const ( BetaBatchCancelResponseStatusPending BetaBatchCancelResponseStatus = "pending" BetaBatchCancelResponseStatusRunning BetaBatchCancelResponseStatus = "running" BetaBatchCancelResponseStatusDispatched BetaBatchCancelResponseStatus = "dispatched" BetaBatchCancelResponseStatusCompleted BetaBatchCancelResponseStatus = "completed" BetaBatchCancelResponseStatusFailed BetaBatchCancelResponseStatus = "failed" BetaBatchCancelResponseStatusCancelled BetaBatchCancelResponseStatus = "cancelled" )
type BetaBatchGetStatusParams ¶
type BetaBatchGetStatusParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaBatchGetStatusParams) URLQuery ¶
func (r BetaBatchGetStatusParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaBatchGetStatusParams's query parameters as `url.Values`.
type BetaBatchGetStatusResponse ¶
type BetaBatchGetStatusResponse struct {
// Response schema for a batch processing job.
Job BetaBatchGetStatusResponseJob `json:"job" api:"required"`
// Percentage of items processed (0-100)
ProgressPercentage float64 `json:"progress_percentage" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Job respjson.Field
ProgressPercentage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Detailed status response for a batch processing job.
func (BetaBatchGetStatusResponse) RawJSON ¶
func (r BetaBatchGetStatusResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchGetStatusResponse) UnmarshalJSON ¶
func (r *BetaBatchGetStatusResponse) UnmarshalJSON(data []byte) error
type BetaBatchGetStatusResponseJob ¶
type BetaBatchGetStatusResponseJob struct {
// Unique identifier for the batch job
ID string `json:"id" api:"required"`
// Type of processing operation (parse or classify)
//
// Any of "parse", "extract", "classify".
JobType string `json:"job_type" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status
//
// Any of "pending", "running", "dispatched", "completed", "failed", "cancelled".
Status string `json:"status" api:"required"`
// Total number of items in the job
TotalItems int64 `json:"total_items" api:"required"`
// Timestamp when job completed
CompletedAt time.Time `json:"completed_at" api:"nullable" format:"date-time"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Directory being processed
DirectoryID string `json:"directory_id" api:"nullable"`
EffectiveAt time.Time `json:"effective_at" format:"date-time"`
// Error message for the latest job attempt, if any.
ErrorMessage string `json:"error_message" api:"nullable"`
// Number of items that failed processing
FailedItems int64 `json:"failed_items"`
// The job record ID associated with this status, if any.
JobRecordID string `json:"job_record_id" api:"nullable"`
// Number of items processed so far
ProcessedItems int64 `json:"processed_items"`
// Number of items skipped (already processed or size limit)
SkippedItems int64 `json:"skipped_items"`
// Timestamp when job processing started
StartedAt time.Time `json:"started_at" api:"nullable" format:"date-time"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// Async job tracking ID
WorkflowID string `json:"workflow_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
JobType respjson.Field
ProjectID respjson.Field
Status respjson.Field
TotalItems respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
DirectoryID respjson.Field
EffectiveAt respjson.Field
ErrorMessage respjson.Field
FailedItems respjson.Field
JobRecordID respjson.Field
ProcessedItems respjson.Field
SkippedItems respjson.Field
StartedAt respjson.Field
UpdatedAt respjson.Field
WorkflowID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response schema for a batch processing job.
func (BetaBatchGetStatusResponseJob) RawJSON ¶
func (r BetaBatchGetStatusResponseJob) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchGetStatusResponseJob) UnmarshalJSON ¶
func (r *BetaBatchGetStatusResponseJob) UnmarshalJSON(data []byte) error
type BetaBatchJobItemGetProcessingResultsParams ¶
type BetaBatchJobItemGetProcessingResultsParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Filter results by job type
//
// Any of "parse", "extract", "classify".
JobType BetaBatchJobItemGetProcessingResultsParamsJobType `query:"job_type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaBatchJobItemGetProcessingResultsParams) URLQuery ¶
func (r BetaBatchJobItemGetProcessingResultsParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaBatchJobItemGetProcessingResultsParams's query parameters as `url.Values`.
type BetaBatchJobItemGetProcessingResultsParamsJobType ¶
type BetaBatchJobItemGetProcessingResultsParamsJobType string
Filter results by job type
const ( BetaBatchJobItemGetProcessingResultsParamsJobTypeParse BetaBatchJobItemGetProcessingResultsParamsJobType = "parse" BetaBatchJobItemGetProcessingResultsParamsJobTypeExtract BetaBatchJobItemGetProcessingResultsParamsJobType = "extract" BetaBatchJobItemGetProcessingResultsParamsJobTypeClassify BetaBatchJobItemGetProcessingResultsParamsJobType = "classify" )
type BetaBatchJobItemGetProcessingResultsResponse ¶
type BetaBatchJobItemGetProcessingResultsResponse struct {
// ID of the source item
ItemID string `json:"item_id" api:"required"`
// Name of the source item
ItemName string `json:"item_name" api:"required"`
// List of all processing operations performed on this item
ProcessingResults []BetaBatchJobItemGetProcessingResultsResponseProcessingResult `json:"processing_results"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ItemID respjson.Field
ItemName respjson.Field
ProcessingResults respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response containing all processing results for an item.
func (BetaBatchJobItemGetProcessingResultsResponse) RawJSON ¶
func (r BetaBatchJobItemGetProcessingResultsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchJobItemGetProcessingResultsResponse) UnmarshalJSON ¶
func (r *BetaBatchJobItemGetProcessingResultsResponse) UnmarshalJSON(data []byte) error
type BetaBatchJobItemGetProcessingResultsResponseProcessingResult ¶
type BetaBatchJobItemGetProcessingResultsResponseProcessingResult struct {
// Source item that was processed
ItemID string `json:"item_id" api:"required"`
// Job configuration used for processing
JobConfig BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion `json:"job_config" api:"required"`
// Type of processing performed
//
// Any of "parse", "extract", "classify".
JobType string `json:"job_type" api:"required"`
// Location of the processing output
OutputS3Path string `json:"output_s3_path" api:"required"`
// Content hash of the job configuration for dedup
ParametersHash string `json:"parameters_hash" api:"required"`
// When this processing occurred
ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
// Unique identifier for this result
ResultID string `json:"result_id" api:"required"`
// Metadata about processing output.
//
// Currently empty - will be populated with job-type-specific metadata fields in
// the future.
OutputMetadata any `json:"output_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ItemID respjson.Field
JobConfig respjson.Field
JobType respjson.Field
OutputS3Path respjson.Field
ParametersHash respjson.Field
ProcessedAt respjson.Field
ResultID respjson.Field
OutputMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A processing result with lineage information.
func (BetaBatchJobItemGetProcessingResultsResponseProcessingResult) RawJSON ¶
func (r BetaBatchJobItemGetProcessingResultsResponseProcessingResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchJobItemGetProcessingResultsResponseProcessingResult) UnmarshalJSON ¶
func (r *BetaBatchJobItemGetProcessingResultsResponseProcessingResult) UnmarshalJSON(data []byte) error
type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate ¶
type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate struct {
// The correlation ID for this job. Used for tracking the job across services.
CorrelationID string `json:"correlation_id" api:"nullable" format:"uuid"`
// Any of "parse_raw_file_job".
JobName string `json:"job_name"`
// Generic parse job configuration for batch processing.
//
// This model contains the parsing configuration that applies to all files in a
// batch, but excludes file-specific fields like file_name, file_id, etc. Those
// file-specific fields are populated from DirectoryFile data when creating
// individual ParseJobRecordCreate instances for each file.
//
// The fields in this model should be generic settings that apply uniformly to all
// files being processed in the batch.
Parameters BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters `json:"parameters" api:"nullable"`
// The ID of the parent job execution.
ParentJobExecutionID string `json:"parent_job_execution_id" api:"nullable" format:"uuid"`
// The partitions for this execution. Used for determining where to save job
// output.
Partitions map[string]string `json:"partitions" format:"uuid"`
// The ID of the project this job belongs to.
ProjectID string `json:"project_id" api:"nullable" format:"uuid"`
// The upstream request ID that created this job. Used for tracking the job across
// services.
SessionID string `json:"session_id" api:"nullable" format:"uuid"`
// The ID of the user that created this job
UserID string `json:"user_id" api:"nullable"`
// The URL that needs to be called at the end of the parsing job.
WebhookURL string `json:"webhook_url" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CorrelationID respjson.Field
JobName respjson.Field
Parameters respjson.Field
ParentJobExecutionID respjson.Field
Partitions respjson.Field
ProjectID respjson.Field
SessionID respjson.Field
UserID respjson.Field
WebhookURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Batch-specific parse job record for batch processing.
This model contains the metadata and configuration for a batch parse job, but excludes file-specific information. It's used as input to the batch parent workflow and combined with DirectoryFile data to create full ParseJobRecordCreate instances for each file.
Attributes: job_name: Must be PARSE_RAW_FILE partitions: Partitions for job output location parameters: Generic parse configuration (BatchParseJobConfig) session_id: Upstream request ID for tracking correlation_id: Correlation ID for cross-service tracking parent_job_execution_id: Parent job execution ID if nested user_id: User who created the job project_id: Project this job belongs to webhook_url: Optional webhook URL for job completion notifications
func (BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate) RawJSON ¶
func (r BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate) UnmarshalJSON ¶
func (r *BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate) UnmarshalJSON(data []byte) error
type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters ¶
type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters struct {
AdaptiveLongTable bool `json:"adaptive_long_table" api:"nullable"`
AggressiveTableExtraction bool `json:"aggressive_table_extraction" api:"nullable"`
AnnotateLinks bool `json:"annotate_links" api:"nullable"`
AutoMode bool `json:"auto_mode" api:"nullable"`
AutoModeConfigurationJson string `json:"auto_mode_configuration_json" api:"nullable"`
AutoModeTriggerOnImageInPage bool `json:"auto_mode_trigger_on_image_in_page" api:"nullable"`
AutoModeTriggerOnRegexpInPage string `json:"auto_mode_trigger_on_regexp_in_page" api:"nullable"`
AutoModeTriggerOnTableInPage bool `json:"auto_mode_trigger_on_table_in_page" api:"nullable"`
AutoModeTriggerOnTextInPage string `json:"auto_mode_trigger_on_text_in_page" api:"nullable"`
AzureOpenAIAPIVersion string `json:"azure_openai_api_version" api:"nullable"`
AzureOpenAIDeploymentName string `json:"azure_openai_deployment_name" api:"nullable"`
AzureOpenAIEndpoint string `json:"azure_openai_endpoint" api:"nullable"`
AzureOpenAIKey string `json:"azure_openai_key" api:"nullable"`
BboxBottom float64 `json:"bbox_bottom" api:"nullable"`
BboxLeft float64 `json:"bbox_left" api:"nullable"`
BboxRight float64 `json:"bbox_right" api:"nullable"`
BboxTop float64 `json:"bbox_top" api:"nullable"`
BoundingBox string `json:"bounding_box" api:"nullable"`
CompactMarkdownTable bool `json:"compact_markdown_table" api:"nullable"`
ComplementalFormattingInstruction string `json:"complemental_formatting_instruction" api:"nullable"`
ContentGuidelineInstruction string `json:"content_guideline_instruction" api:"nullable"`
ContinuousMode bool `json:"continuous_mode" api:"nullable"`
// The custom metadata to attach to the documents.
CustomMetadata map[string]any `json:"custom_metadata" api:"nullable"`
DisableImageExtraction bool `json:"disable_image_extraction" api:"nullable"`
DisableOcr bool `json:"disable_ocr" api:"nullable"`
DisableReconstruction bool `json:"disable_reconstruction" api:"nullable"`
DoNotCache bool `json:"do_not_cache" api:"nullable"`
DoNotUnrollColumns bool `json:"do_not_unroll_columns" api:"nullable"`
EnableCostOptimizer bool `json:"enable_cost_optimizer" api:"nullable"`
ExtractCharts bool `json:"extract_charts" api:"nullable"`
ExtractLayout bool `json:"extract_layout" api:"nullable"`
ExtractPrintedPageNumber bool `json:"extract_printed_page_number" api:"nullable"`
FastMode bool `json:"fast_mode" api:"nullable"`
FormattingInstruction string `json:"formatting_instruction" api:"nullable"`
Gpt4oAPIKey string `json:"gpt4o_api_key" api:"nullable"`
Gpt4oMode bool `json:"gpt4o_mode" api:"nullable"`
GuessXlsxSheetName bool `json:"guess_xlsx_sheet_name" api:"nullable"`
HideHeaders bool `json:"hide_headers" api:"nullable"`
HighResOcr bool `json:"high_res_ocr" api:"nullable"`
HTMLMakeAllElementsVisible bool `json:"html_make_all_elements_visible" api:"nullable"`
HTMLRemoveFixedElements bool `json:"html_remove_fixed_elements" api:"nullable"`
HTTPProxy string `json:"http_proxy" api:"nullable"`
IgnoreDocumentElementsForLayoutDetection bool `json:"ignore_document_elements_for_layout_detection" api:"nullable"`
// Any of "screenshot", "embedded", "layout".
ImagesToSave []string `json:"images_to_save" api:"nullable"`
InlineImagesInMarkdown bool `json:"inline_images_in_markdown" api:"nullable"`
InputS3Path string `json:"input_s3_path" api:"nullable"`
// The region for the input S3 bucket.
InputS3Region string `json:"input_s3_region" api:"nullable"`
InputURL string `json:"input_url" api:"nullable"`
InternalIsScreenshotJob bool `json:"internal_is_screenshot_job" api:"nullable"`
InvalidateCache bool `json:"invalidate_cache" api:"nullable"`
IsFormattingInstruction bool `json:"is_formatting_instruction" api:"nullable"`
JobTimeoutExtraTimePerPageInSeconds float64 `json:"job_timeout_extra_time_per_page_in_seconds" api:"nullable"`
JobTimeoutInSeconds float64 `json:"job_timeout_in_seconds" api:"nullable"`
KeepPageSeparatorWhenMergingTables bool `json:"keep_page_separator_when_merging_tables" api:"nullable"`
// The language.
Lang string `json:"lang"`
Languages []ParsingLanguages `json:"languages"`
LayoutAware bool `json:"layout_aware" api:"nullable"`
LineLevelBoundingBox bool `json:"line_level_bounding_box" api:"nullable"`
MarkdownTableMultilineHeaderSeparator string `json:"markdown_table_multiline_header_separator" api:"nullable"`
MaxPages int64 `json:"max_pages" api:"nullable"`
MaxPagesEnforced int64 `json:"max_pages_enforced" api:"nullable"`
MergeTablesAcrossPagesInMarkdown bool `json:"merge_tables_across_pages_in_markdown" api:"nullable"`
Model string `json:"model" api:"nullable"`
OutlinedTableExtraction bool `json:"outlined_table_extraction" api:"nullable"`
OutputPdfOfDocument bool `json:"output_pdf_of_document" api:"nullable"`
// If specified, llamaParse will save the output to the specified path. All output
// file will use this 'prefix' should be a valid s3:// url
OutputS3PathPrefix string `json:"output_s3_path_prefix" api:"nullable"`
// The region for the output S3 bucket.
OutputS3Region string `json:"output_s3_region" api:"nullable"`
OutputTablesAsHTML bool `json:"output_tables_as_HTML" api:"nullable"`
// The output bucket.
OutputBucket string `json:"outputBucket" api:"nullable"`
PageErrorTolerance float64 `json:"page_error_tolerance" api:"nullable"`
PageHeaderPrefix string `json:"page_header_prefix" api:"nullable"`
PageHeaderSuffix string `json:"page_header_suffix" api:"nullable"`
PagePrefix string `json:"page_prefix" api:"nullable"`
PageSeparator string `json:"page_separator" api:"nullable"`
PageSuffix string `json:"page_suffix" api:"nullable"`
// Enum for representing the mode of parsing to be used.
//
// Any of "parse_page_without_llm", "parse_page_with_llm", "parse_page_with_lvm",
// "parse_page_with_agent", "parse_page_with_layout_agent",
// "parse_document_with_llm", "parse_document_with_lvm",
// "parse_document_with_agent".
ParseMode ParsingMode `json:"parse_mode" api:"nullable"`
ParsingInstruction string `json:"parsing_instruction" api:"nullable"`
// The pipeline ID.
PipelineID string `json:"pipeline_id" api:"nullable"`
PreciseBoundingBox bool `json:"precise_bounding_box" api:"nullable"`
PremiumMode bool `json:"premium_mode" api:"nullable"`
PresentationOutOfBoundsContent bool `json:"presentation_out_of_bounds_content" api:"nullable"`
PresentationSkipEmbeddedData bool `json:"presentation_skip_embedded_data" api:"nullable"`
PreserveLayoutAlignmentAcrossPages bool `json:"preserve_layout_alignment_across_pages" api:"nullable"`
PreserveVerySmallText bool `json:"preserve_very_small_text" api:"nullable"`
Preset string `json:"preset" api:"nullable"`
// The priority for the request. This field may be ignored or overwritten depending
// on the organization tier.
//
// Any of "low", "medium", "high", "critical".
Priority string `json:"priority" api:"nullable"`
ProjectID string `json:"project_id" api:"nullable"`
RemoveHiddenText bool `json:"remove_hidden_text" api:"nullable"`
// Enum for representing the different available page error handling modes.
//
// Any of "raw_text", "blank_page", "error_message".
ReplaceFailedPageMode FailPageMode `json:"replace_failed_page_mode" api:"nullable"`
ReplaceFailedPageWithErrorMessagePrefix string `json:"replace_failed_page_with_error_message_prefix" api:"nullable"`
ReplaceFailedPageWithErrorMessageSuffix string `json:"replace_failed_page_with_error_message_suffix" api:"nullable"`
// The resource info about the file
ResourceInfo map[string]any `json:"resource_info" api:"nullable"`
SaveImages bool `json:"save_images" api:"nullable"`
SkipDiagonalText bool `json:"skip_diagonal_text" api:"nullable"`
SpecializedChartParsingAgentic bool `json:"specialized_chart_parsing_agentic" api:"nullable"`
SpecializedChartParsingEfficient bool `json:"specialized_chart_parsing_efficient" api:"nullable"`
SpecializedChartParsingPlus bool `json:"specialized_chart_parsing_plus" api:"nullable"`
SpecializedImageParsing bool `json:"specialized_image_parsing" api:"nullable"`
SpreadsheetExtractSubTables bool `json:"spreadsheet_extract_sub_tables" api:"nullable"`
SpreadsheetForceFormulaComputation bool `json:"spreadsheet_force_formula_computation" api:"nullable"`
SpreadsheetIncludeHiddenSheets bool `json:"spreadsheet_include_hidden_sheets" api:"nullable"`
StrictModeBuggyFont bool `json:"strict_mode_buggy_font" api:"nullable"`
StrictModeImageExtraction bool `json:"strict_mode_image_extraction" api:"nullable"`
StrictModeImageOcr bool `json:"strict_mode_image_ocr" api:"nullable"`
StrictModeReconstruction bool `json:"strict_mode_reconstruction" api:"nullable"`
StructuredOutput bool `json:"structured_output" api:"nullable"`
StructuredOutputJsonSchema string `json:"structured_output_json_schema" api:"nullable"`
StructuredOutputJsonSchemaName string `json:"structured_output_json_schema_name" api:"nullable"`
SystemPrompt string `json:"system_prompt" api:"nullable"`
SystemPromptAppend string `json:"system_prompt_append" api:"nullable"`
TakeScreenshot bool `json:"take_screenshot" api:"nullable"`
TargetPages string `json:"target_pages" api:"nullable"`
Tier string `json:"tier" api:"nullable"`
// Any of "parse".
Type string `json:"type"`
UseVendorMultimodalModel bool `json:"use_vendor_multimodal_model" api:"nullable"`
UserPrompt string `json:"user_prompt" api:"nullable"`
VendorMultimodalAPIKey string `json:"vendor_multimodal_api_key" api:"nullable"`
VendorMultimodalModelName string `json:"vendor_multimodal_model_name" api:"nullable"`
Version string `json:"version" api:"nullable"`
// Outbound webhook endpoints to notify on job status changes
WebhookConfigurations []BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration `json:"webhook_configurations" api:"nullable"`
WebhookURL string `json:"webhook_url" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdaptiveLongTable respjson.Field
AggressiveTableExtraction respjson.Field
AnnotateLinks respjson.Field
AutoMode respjson.Field
AutoModeConfigurationJson respjson.Field
AutoModeTriggerOnImageInPage respjson.Field
AutoModeTriggerOnRegexpInPage respjson.Field
AutoModeTriggerOnTableInPage respjson.Field
AutoModeTriggerOnTextInPage respjson.Field
AzureOpenAIAPIVersion respjson.Field
AzureOpenAIDeploymentName respjson.Field
AzureOpenAIEndpoint respjson.Field
AzureOpenAIKey respjson.Field
BboxBottom respjson.Field
BboxLeft respjson.Field
BboxRight respjson.Field
BboxTop respjson.Field
BoundingBox respjson.Field
CompactMarkdownTable respjson.Field
ComplementalFormattingInstruction respjson.Field
ContentGuidelineInstruction respjson.Field
ContinuousMode respjson.Field
CustomMetadata respjson.Field
DisableImageExtraction respjson.Field
DisableOcr respjson.Field
DisableReconstruction respjson.Field
DoNotCache respjson.Field
DoNotUnrollColumns respjson.Field
EnableCostOptimizer respjson.Field
ExtractCharts respjson.Field
ExtractLayout respjson.Field
ExtractPrintedPageNumber respjson.Field
FastMode respjson.Field
FormattingInstruction respjson.Field
Gpt4oAPIKey respjson.Field
Gpt4oMode respjson.Field
GuessXlsxSheetName respjson.Field
HideFooters respjson.Field
HideHeaders respjson.Field
HighResOcr respjson.Field
HTMLMakeAllElementsVisible respjson.Field
HTMLRemoveFixedElements respjson.Field
HTMLRemoveNavigationElements respjson.Field
HTTPProxy respjson.Field
IgnoreDocumentElementsForLayoutDetection respjson.Field
ImagesToSave respjson.Field
InlineImagesInMarkdown respjson.Field
InputS3Path respjson.Field
InputS3Region respjson.Field
InputURL respjson.Field
InternalIsScreenshotJob respjson.Field
InvalidateCache respjson.Field
IsFormattingInstruction respjson.Field
JobTimeoutExtraTimePerPageInSeconds respjson.Field
JobTimeoutInSeconds respjson.Field
KeepPageSeparatorWhenMergingTables respjson.Field
Lang respjson.Field
Languages respjson.Field
LayoutAware respjson.Field
LineLevelBoundingBox respjson.Field
MarkdownTableMultilineHeaderSeparator respjson.Field
MaxPages respjson.Field
MaxPagesEnforced respjson.Field
MergeTablesAcrossPagesInMarkdown respjson.Field
Model respjson.Field
OutlinedTableExtraction respjson.Field
OutputPdfOfDocument respjson.Field
OutputS3PathPrefix respjson.Field
OutputS3Region respjson.Field
OutputTablesAsHTML respjson.Field
OutputBucket respjson.Field
PageErrorTolerance respjson.Field
PageFooterPrefix respjson.Field
PageFooterSuffix respjson.Field
PageHeaderPrefix respjson.Field
PageHeaderSuffix respjson.Field
PagePrefix respjson.Field
PageSeparator respjson.Field
PageSuffix respjson.Field
ParseMode respjson.Field
ParsingInstruction respjson.Field
PipelineID respjson.Field
PreciseBoundingBox respjson.Field
PremiumMode respjson.Field
PresentationOutOfBoundsContent respjson.Field
PresentationSkipEmbeddedData respjson.Field
PreserveLayoutAlignmentAcrossPages respjson.Field
PreserveVerySmallText respjson.Field
Preset respjson.Field
Priority respjson.Field
ProjectID respjson.Field
RemoveHiddenText respjson.Field
ReplaceFailedPageMode respjson.Field
ReplaceFailedPageWithErrorMessagePrefix respjson.Field
ReplaceFailedPageWithErrorMessageSuffix respjson.Field
ResourceInfo respjson.Field
SaveImages respjson.Field
SkipDiagonalText respjson.Field
SpecializedChartParsingAgentic respjson.Field
SpecializedChartParsingEfficient respjson.Field
SpecializedChartParsingPlus respjson.Field
SpecializedImageParsing respjson.Field
SpreadsheetExtractSubTables respjson.Field
SpreadsheetForceFormulaComputation respjson.Field
SpreadsheetIncludeHiddenSheets respjson.Field
StrictModeBuggyFont respjson.Field
StrictModeImageExtraction respjson.Field
StrictModeImageOcr respjson.Field
StrictModeReconstruction respjson.Field
StructuredOutput respjson.Field
StructuredOutputJsonSchema respjson.Field
StructuredOutputJsonSchemaName respjson.Field
SystemPrompt respjson.Field
SystemPromptAppend respjson.Field
TakeScreenshot respjson.Field
TargetPages respjson.Field
Tier respjson.Field
Type respjson.Field
UseVendorMultimodalModel respjson.Field
UserPrompt respjson.Field
VendorMultimodalAPIKey respjson.Field
VendorMultimodalModelName respjson.Field
Version respjson.Field
WebhookConfigurations respjson.Field
WebhookURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Generic parse job configuration for batch processing.
This model contains the parsing configuration that applies to all files in a batch, but excludes file-specific fields like file_name, file_id, etc. Those file-specific fields are populated from DirectoryFile data when creating individual ParseJobRecordCreate instances for each file.
The fields in this model should be generic settings that apply uniformly to all files being processed in the batch.
func (BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters) RawJSON ¶
func (r BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters) UnmarshalJSON ¶
func (r *BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters) UnmarshalJSON(data []byte) error
type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration ¶
type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration struct {
// Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
// events are delivered.
//
// Any of "extract.pending", "extract.success", "extract.error",
// "extract.partial_success", "extract.cancelled", "parse.pending",
// "parse.running", "parse.success", "parse.error", "parse.partial_success",
// "parse.cancelled", "classify.pending", "classify.running", "classify.success",
// "classify.error", "classify.partial_success", "classify.cancelled",
// "sheets.pending", "sheets.success", "sheets.error", "sheets.partial_success",
// "sheets.cancelled", "unmapped_event".
WebhookEvents []string `json:"webhook_events" api:"nullable"`
// Custom HTTP headers sent with each webhook request (e.g. auth tokens)
WebhookHeaders map[string]string `json:"webhook_headers" api:"nullable"`
// Response format sent to the webhook: 'string' (default) or 'json'
WebhookOutputFormat string `json:"webhook_output_format" api:"nullable"`
// URL to receive webhook POST notifications
WebhookURL string `json:"webhook_url" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
WebhookEvents respjson.Field
WebhookHeaders respjson.Field
WebhookOutputFormat respjson.Field
WebhookURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for a single outbound webhook endpoint.
func (BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) RawJSON ¶
func (r BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) UnmarshalJSON ¶
func (r *BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) UnmarshalJSON(data []byte) error
type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion ¶
type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion struct {
// This field is from variant
// [BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate].
CorrelationID string `json:"correlation_id"`
// This field is from variant
// [BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate].
JobName string `json:"job_name"`
// This field is from variant
// [BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate].
Parameters BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters `json:"parameters"`
// This field is from variant
// [BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate].
ParentJobExecutionID string `json:"parent_job_execution_id"`
// This field is from variant
// [BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate].
Partitions map[string]string `json:"partitions"`
ProjectID string `json:"project_id"`
// This field is from variant
// [BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate].
SessionID string `json:"session_id"`
UserID string `json:"user_id"`
// This field is from variant
// [BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate].
WebhookURL string `json:"webhook_url"`
// This field is from variant [ClassifyJob].
ID string `json:"id"`
// This field is from variant [ClassifyJob].
Rules []ClassifierRule `json:"rules"`
// This field is from variant [ClassifyJob].
Status StatusEnum `json:"status"`
// This field is from variant [ClassifyJob].
CreatedAt time.Time `json:"created_at"`
// This field is from variant [ClassifyJob].
EffectiveAt time.Time `json:"effective_at"`
// This field is from variant [ClassifyJob].
ErrorMessage string `json:"error_message"`
// This field is from variant [ClassifyJob].
JobRecordID string `json:"job_record_id"`
// This field is from variant [ClassifyJob].
Mode ClassifyJobMode `json:"mode"`
// This field is from variant [ClassifyJob].
ParsingConfiguration ClassifyParsingConfiguration `json:"parsing_configuration"`
// This field is from variant [ClassifyJob].
UpdatedAt time.Time `json:"updated_at"`
JSON struct {
CorrelationID respjson.Field
JobName respjson.Field
Parameters respjson.Field
ParentJobExecutionID respjson.Field
Partitions respjson.Field
ProjectID respjson.Field
SessionID respjson.Field
UserID respjson.Field
WebhookURL respjson.Field
ID respjson.Field
Rules respjson.Field
Status respjson.Field
CreatedAt respjson.Field
EffectiveAt respjson.Field
ErrorMessage respjson.Field
JobRecordID respjson.Field
Mode respjson.Field
ParsingConfiguration respjson.Field
UpdatedAt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion contains all possible properties and values from BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate, ClassifyJob.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) AsBatchParseJobRecordCreate ¶
func (u BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) AsBatchParseJobRecordCreate() (v BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate)
func (BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) AsClassifyJob ¶
func (u BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) AsClassifyJob() (v ClassifyJob)
func (BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) RawJSON ¶
func (u BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) UnmarshalJSON ¶
func (r *BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion) UnmarshalJSON(data []byte) error
type BetaBatchJobItemListParams ¶
type BetaBatchJobItemListParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Filter items by status
//
// Any of "pending", "processing", "completed", "failed", "skipped", "cancelled".
Status BetaBatchJobItemListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaBatchJobItemListParams) URLQuery ¶
func (r BetaBatchJobItemListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaBatchJobItemListParams's query parameters as `url.Values`.
type BetaBatchJobItemListParamsStatus ¶
type BetaBatchJobItemListParamsStatus string
Filter items by status
const ( BetaBatchJobItemListParamsStatusPending BetaBatchJobItemListParamsStatus = "pending" BetaBatchJobItemListParamsStatusProcessing BetaBatchJobItemListParamsStatus = "processing" BetaBatchJobItemListParamsStatusCompleted BetaBatchJobItemListParamsStatus = "completed" BetaBatchJobItemListParamsStatusFailed BetaBatchJobItemListParamsStatus = "failed" BetaBatchJobItemListParamsStatusSkipped BetaBatchJobItemListParamsStatus = "skipped" BetaBatchJobItemListParamsStatusCancelled BetaBatchJobItemListParamsStatus = "cancelled" )
type BetaBatchJobItemListResponse ¶
type BetaBatchJobItemListResponse struct {
// ID of the item
ItemID string `json:"item_id" api:"required"`
// Name of the item
ItemName string `json:"item_name" api:"required"`
// Processing status of this item
//
// Any of "pending", "processing", "completed", "failed", "skipped", "cancelled".
Status BetaBatchJobItemListResponseStatus `json:"status" api:"required"`
// When processing completed for this item
CompletedAt time.Time `json:"completed_at" api:"nullable" format:"date-time"`
EffectiveAt time.Time `json:"effective_at" format:"date-time"`
// Error message for the latest job attempt, if any.
ErrorMessage string `json:"error_message" api:"nullable"`
// Job ID for the underlying processing job (links to parse/extract job results)
JobID string `json:"job_id" api:"nullable"`
// The job record ID associated with this status, if any.
JobRecordID string `json:"job_record_id" api:"nullable"`
// Reason item was skipped (e.g., 'already_processed', 'size_limit_exceeded')
SkipReason string `json:"skip_reason" api:"nullable"`
// When processing started for this item
StartedAt time.Time `json:"started_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ItemID respjson.Field
ItemName respjson.Field
Status respjson.Field
CompletedAt respjson.Field
EffectiveAt respjson.Field
ErrorMessage respjson.Field
JobID respjson.Field
JobRecordID respjson.Field
SkipReason respjson.Field
StartedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Detailed information about an item in a batch job.
func (BetaBatchJobItemListResponse) RawJSON ¶
func (r BetaBatchJobItemListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchJobItemListResponse) UnmarshalJSON ¶
func (r *BetaBatchJobItemListResponse) UnmarshalJSON(data []byte) error
type BetaBatchJobItemListResponseStatus ¶
type BetaBatchJobItemListResponseStatus string
Processing status of this item
const ( BetaBatchJobItemListResponseStatusPending BetaBatchJobItemListResponseStatus = "pending" BetaBatchJobItemListResponseStatusProcessing BetaBatchJobItemListResponseStatus = "processing" BetaBatchJobItemListResponseStatusCompleted BetaBatchJobItemListResponseStatus = "completed" BetaBatchJobItemListResponseStatusFailed BetaBatchJobItemListResponseStatus = "failed" BetaBatchJobItemListResponseStatusSkipped BetaBatchJobItemListResponseStatus = "skipped" BetaBatchJobItemListResponseStatusCancelled BetaBatchJobItemListResponseStatus = "cancelled" )
type BetaBatchJobItemService ¶
type BetaBatchJobItemService struct {
// contains filtered or unexported fields
}
BetaBatchJobItemService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaBatchJobItemService method instead.
func NewBetaBatchJobItemService ¶
func NewBetaBatchJobItemService(opts ...option.RequestOption) (r BetaBatchJobItemService)
NewBetaBatchJobItemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaBatchJobItemService) GetProcessingResults ¶
func (r *BetaBatchJobItemService) GetProcessingResults(ctx context.Context, itemID string, query BetaBatchJobItemGetProcessingResultsParams, opts ...option.RequestOption) (res *BetaBatchJobItemGetProcessingResultsResponse, err error)
Get all processing results for a specific item.
Returns the complete processing history for an item including what operations were performed, parameters used, and where outputs are stored. Optionally filter by `job_type`.
func (*BetaBatchJobItemService) List ¶
func (r *BetaBatchJobItemService) List(ctx context.Context, jobID string, query BetaBatchJobItemListParams, opts ...option.RequestOption) (res *pagination.PaginatedBatchItems[BetaBatchJobItemListResponse], err error)
List items in a batch job with optional status filtering.
Useful for finding failed items, viewing completed items, or debugging processing issues.
func (*BetaBatchJobItemService) ListAutoPaging ¶
func (r *BetaBatchJobItemService) ListAutoPaging(ctx context.Context, jobID string, query BetaBatchJobItemListParams, opts ...option.RequestOption) *pagination.PaginatedBatchItemsAutoPager[BetaBatchJobItemListResponse]
List items in a batch job with optional status filtering.
Useful for finding failed items, viewing completed items, or debugging processing issues.
type BetaBatchListParams ¶
type BetaBatchListParams struct {
// Filter by directory ID
DirectoryID param.Opt[string] `query:"directory_id,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Maximum number of jobs to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of jobs to skip for pagination
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Filter by job type (PARSE, EXTRACT, CLASSIFY)
//
// Any of "parse", "extract", "classify".
JobType BetaBatchListParamsJobType `query:"job_type,omitzero" json:"-"`
// Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)
//
// Any of "pending", "running", "dispatched", "completed", "failed", "cancelled".
Status BetaBatchListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaBatchListParams) URLQuery ¶
func (r BetaBatchListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaBatchListParams's query parameters as `url.Values`.
type BetaBatchListParamsJobType ¶
type BetaBatchListParamsJobType string
Filter by job type (PARSE, EXTRACT, CLASSIFY)
const ( BetaBatchListParamsJobTypeParse BetaBatchListParamsJobType = "parse" BetaBatchListParamsJobTypeExtract BetaBatchListParamsJobType = "extract" BetaBatchListParamsJobTypeClassify BetaBatchListParamsJobType = "classify" )
type BetaBatchListParamsStatus ¶
type BetaBatchListParamsStatus string
Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)
const ( BetaBatchListParamsStatusPending BetaBatchListParamsStatus = "pending" BetaBatchListParamsStatusRunning BetaBatchListParamsStatus = "running" BetaBatchListParamsStatusDispatched BetaBatchListParamsStatus = "dispatched" BetaBatchListParamsStatusCompleted BetaBatchListParamsStatus = "completed" BetaBatchListParamsStatusFailed BetaBatchListParamsStatus = "failed" BetaBatchListParamsStatusCancelled BetaBatchListParamsStatus = "cancelled" )
type BetaBatchListResponse ¶
type BetaBatchListResponse struct {
// Unique identifier for the batch job
ID string `json:"id" api:"required"`
// Type of processing operation (parse or classify)
//
// Any of "parse", "extract", "classify".
JobType BetaBatchListResponseJobType `json:"job_type" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status
//
// Any of "pending", "running", "dispatched", "completed", "failed", "cancelled".
Status BetaBatchListResponseStatus `json:"status" api:"required"`
// Total number of items in the job
TotalItems int64 `json:"total_items" api:"required"`
// Timestamp when job completed
CompletedAt time.Time `json:"completed_at" api:"nullable" format:"date-time"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Directory being processed
DirectoryID string `json:"directory_id" api:"nullable"`
EffectiveAt time.Time `json:"effective_at" format:"date-time"`
// Error message for the latest job attempt, if any.
ErrorMessage string `json:"error_message" api:"nullable"`
// Number of items that failed processing
FailedItems int64 `json:"failed_items"`
// The job record ID associated with this status, if any.
JobRecordID string `json:"job_record_id" api:"nullable"`
// Number of items processed so far
ProcessedItems int64 `json:"processed_items"`
// Number of items skipped (already processed or size limit)
SkippedItems int64 `json:"skipped_items"`
// Timestamp when job processing started
StartedAt time.Time `json:"started_at" api:"nullable" format:"date-time"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// Async job tracking ID
WorkflowID string `json:"workflow_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
JobType respjson.Field
ProjectID respjson.Field
Status respjson.Field
TotalItems respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
DirectoryID respjson.Field
EffectiveAt respjson.Field
ErrorMessage respjson.Field
FailedItems respjson.Field
JobRecordID respjson.Field
ProcessedItems respjson.Field
SkippedItems respjson.Field
StartedAt respjson.Field
UpdatedAt respjson.Field
WorkflowID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response schema for a batch processing job.
func (BetaBatchListResponse) RawJSON ¶
func (r BetaBatchListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchListResponse) UnmarshalJSON ¶
func (r *BetaBatchListResponse) UnmarshalJSON(data []byte) error
type BetaBatchListResponseJobType ¶
type BetaBatchListResponseJobType string
Type of processing operation (parse or classify)
const ( BetaBatchListResponseJobTypeParse BetaBatchListResponseJobType = "parse" BetaBatchListResponseJobTypeExtract BetaBatchListResponseJobType = "extract" BetaBatchListResponseJobTypeClassify BetaBatchListResponseJobType = "classify" )
type BetaBatchListResponseStatus ¶
type BetaBatchListResponseStatus string
Current job status
const ( BetaBatchListResponseStatusPending BetaBatchListResponseStatus = "pending" BetaBatchListResponseStatusRunning BetaBatchListResponseStatus = "running" BetaBatchListResponseStatusDispatched BetaBatchListResponseStatus = "dispatched" BetaBatchListResponseStatusCompleted BetaBatchListResponseStatus = "completed" BetaBatchListResponseStatusFailed BetaBatchListResponseStatus = "failed" BetaBatchListResponseStatusCancelled BetaBatchListResponseStatus = "cancelled" )
type BetaBatchNewParams ¶
type BetaBatchNewParams struct {
// Job configuration — either a parse or classify config
JobConfig BetaBatchNewParamsJobConfigUnion `json:"job_config,omitzero" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Maximum files to process per execution cycle in directory mode. Defaults to
// page_size.
ContinueAsNewThreshold param.Opt[int64] `json:"continue_as_new_threshold,omitzero"`
// ID of the directory containing files to process
DirectoryID param.Opt[string] `json:"directory_id,omitzero"`
// Number of files to process per batch when using directory mode
PageSize param.Opt[int64] `json:"page_size,omitzero"`
TemporalNamespace param.Opt[string] `header:"temporal-namespace,omitzero" json:"-"`
// List of specific item IDs to process. Either this or directory_id must be
// provided.
ItemIDs []string `json:"item_ids,omitzero"`
// contains filtered or unexported fields
}
func (BetaBatchNewParams) MarshalJSON ¶
func (r BetaBatchNewParams) MarshalJSON() (data []byte, err error)
func (BetaBatchNewParams) URLQuery ¶
func (r BetaBatchNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaBatchNewParams's query parameters as `url.Values`.
func (*BetaBatchNewParams) UnmarshalJSON ¶
func (r *BetaBatchNewParams) UnmarshalJSON(data []byte) error
type BetaBatchNewParamsJobConfigBatchParseJobRecordCreate ¶
type BetaBatchNewParamsJobConfigBatchParseJobRecordCreate struct {
// The correlation ID for this job. Used for tracking the job across services.
CorrelationID param.Opt[string] `json:"correlation_id,omitzero" format:"uuid"`
// The ID of the parent job execution.
ParentJobExecutionID param.Opt[string] `json:"parent_job_execution_id,omitzero" format:"uuid"`
// The ID of the project this job belongs to.
ProjectID param.Opt[string] `json:"project_id,omitzero" format:"uuid"`
// The upstream request ID that created this job. Used for tracking the job across
// services.
SessionID param.Opt[string] `json:"session_id,omitzero" format:"uuid"`
// The ID of the user that created this job
UserID param.Opt[string] `json:"user_id,omitzero"`
// The URL that needs to be called at the end of the parsing job.
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Generic parse job configuration for batch processing.
//
// This model contains the parsing configuration that applies to all files in a
// batch, but excludes file-specific fields like file_name, file_id, etc. Those
// file-specific fields are populated from DirectoryFile data when creating
// individual ParseJobRecordCreate instances for each file.
//
// The fields in this model should be generic settings that apply uniformly to all
// files being processed in the batch.
Parameters BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters `json:"parameters,omitzero"`
// Any of "parse_raw_file_job".
JobName string `json:"job_name,omitzero"`
// The partitions for this execution. Used for determining where to save job
// output.
Partitions map[string]string `json:"partitions,omitzero" format:"uuid"`
// contains filtered or unexported fields
}
Batch-specific parse job record for batch processing.
This model contains the metadata and configuration for a batch parse job, but excludes file-specific information. It's used as input to the batch parent workflow and combined with DirectoryFile data to create full ParseJobRecordCreate instances for each file.
Attributes: job_name: Must be PARSE_RAW_FILE partitions: Partitions for job output location parameters: Generic parse configuration (BatchParseJobConfig) session_id: Upstream request ID for tracking correlation_id: Correlation ID for cross-service tracking parent_job_execution_id: Parent job execution ID if nested user_id: User who created the job project_id: Project this job belongs to webhook_url: Optional webhook URL for job completion notifications
func (BetaBatchNewParamsJobConfigBatchParseJobRecordCreate) MarshalJSON ¶
func (r BetaBatchNewParamsJobConfigBatchParseJobRecordCreate) MarshalJSON() (data []byte, err error)
func (*BetaBatchNewParamsJobConfigBatchParseJobRecordCreate) UnmarshalJSON ¶
func (r *BetaBatchNewParamsJobConfigBatchParseJobRecordCreate) UnmarshalJSON(data []byte) error
type BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters ¶
type BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters struct {
AdaptiveLongTable param.Opt[bool] `json:"adaptive_long_table,omitzero"`
AggressiveTableExtraction param.Opt[bool] `json:"aggressive_table_extraction,omitzero"`
AnnotateLinks param.Opt[bool] `json:"annotate_links,omitzero"`
AutoMode param.Opt[bool] `json:"auto_mode,omitzero"`
AutoModeConfigurationJson param.Opt[string] `json:"auto_mode_configuration_json,omitzero"`
AutoModeTriggerOnImageInPage param.Opt[bool] `json:"auto_mode_trigger_on_image_in_page,omitzero"`
AutoModeTriggerOnRegexpInPage param.Opt[string] `json:"auto_mode_trigger_on_regexp_in_page,omitzero"`
AutoModeTriggerOnTableInPage param.Opt[bool] `json:"auto_mode_trigger_on_table_in_page,omitzero"`
AutoModeTriggerOnTextInPage param.Opt[string] `json:"auto_mode_trigger_on_text_in_page,omitzero"`
AzureOpenAIAPIVersion param.Opt[string] `json:"azure_openai_api_version,omitzero"`
AzureOpenAIDeploymentName param.Opt[string] `json:"azure_openai_deployment_name,omitzero"`
AzureOpenAIEndpoint param.Opt[string] `json:"azure_openai_endpoint,omitzero"`
AzureOpenAIKey param.Opt[string] `json:"azure_openai_key,omitzero"`
BboxBottom param.Opt[float64] `json:"bbox_bottom,omitzero"`
BboxLeft param.Opt[float64] `json:"bbox_left,omitzero"`
BboxRight param.Opt[float64] `json:"bbox_right,omitzero"`
BboxTop param.Opt[float64] `json:"bbox_top,omitzero"`
BoundingBox param.Opt[string] `json:"bounding_box,omitzero"`
CompactMarkdownTable param.Opt[bool] `json:"compact_markdown_table,omitzero"`
ComplementalFormattingInstruction param.Opt[string] `json:"complemental_formatting_instruction,omitzero"`
ContentGuidelineInstruction param.Opt[string] `json:"content_guideline_instruction,omitzero"`
ContinuousMode param.Opt[bool] `json:"continuous_mode,omitzero"`
DisableImageExtraction param.Opt[bool] `json:"disable_image_extraction,omitzero"`
DisableOcr param.Opt[bool] `json:"disable_ocr,omitzero"`
DisableReconstruction param.Opt[bool] `json:"disable_reconstruction,omitzero"`
DoNotCache param.Opt[bool] `json:"do_not_cache,omitzero"`
DoNotUnrollColumns param.Opt[bool] `json:"do_not_unroll_columns,omitzero"`
EnableCostOptimizer param.Opt[bool] `json:"enable_cost_optimizer,omitzero"`
ExtractCharts param.Opt[bool] `json:"extract_charts,omitzero"`
ExtractLayout param.Opt[bool] `json:"extract_layout,omitzero"`
ExtractPrintedPageNumber param.Opt[bool] `json:"extract_printed_page_number,omitzero"`
FastMode param.Opt[bool] `json:"fast_mode,omitzero"`
FormattingInstruction param.Opt[string] `json:"formatting_instruction,omitzero"`
Gpt4oAPIKey param.Opt[string] `json:"gpt4o_api_key,omitzero"`
Gpt4oMode param.Opt[bool] `json:"gpt4o_mode,omitzero"`
GuessXlsxSheetName param.Opt[bool] `json:"guess_xlsx_sheet_name,omitzero"`
HideHeaders param.Opt[bool] `json:"hide_headers,omitzero"`
HighResOcr param.Opt[bool] `json:"high_res_ocr,omitzero"`
HTMLMakeAllElementsVisible param.Opt[bool] `json:"html_make_all_elements_visible,omitzero"`
HTMLRemoveFixedElements param.Opt[bool] `json:"html_remove_fixed_elements,omitzero"`
HTTPProxy param.Opt[string] `json:"http_proxy,omitzero"`
IgnoreDocumentElementsForLayoutDetection param.Opt[bool] `json:"ignore_document_elements_for_layout_detection,omitzero"`
InlineImagesInMarkdown param.Opt[bool] `json:"inline_images_in_markdown,omitzero"`
InputS3Path param.Opt[string] `json:"input_s3_path,omitzero"`
// The region for the input S3 bucket.
InputS3Region param.Opt[string] `json:"input_s3_region,omitzero"`
InputURL param.Opt[string] `json:"input_url,omitzero"`
InternalIsScreenshotJob param.Opt[bool] `json:"internal_is_screenshot_job,omitzero"`
InvalidateCache param.Opt[bool] `json:"invalidate_cache,omitzero"`
IsFormattingInstruction param.Opt[bool] `json:"is_formatting_instruction,omitzero"`
JobTimeoutExtraTimePerPageInSeconds param.Opt[float64] `json:"job_timeout_extra_time_per_page_in_seconds,omitzero"`
JobTimeoutInSeconds param.Opt[float64] `json:"job_timeout_in_seconds,omitzero"`
KeepPageSeparatorWhenMergingTables param.Opt[bool] `json:"keep_page_separator_when_merging_tables,omitzero"`
LayoutAware param.Opt[bool] `json:"layout_aware,omitzero"`
LineLevelBoundingBox param.Opt[bool] `json:"line_level_bounding_box,omitzero"`
MarkdownTableMultilineHeaderSeparator param.Opt[string] `json:"markdown_table_multiline_header_separator,omitzero"`
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
MaxPagesEnforced param.Opt[int64] `json:"max_pages_enforced,omitzero"`
MergeTablesAcrossPagesInMarkdown param.Opt[bool] `json:"merge_tables_across_pages_in_markdown,omitzero"`
Model param.Opt[string] `json:"model,omitzero"`
OutlinedTableExtraction param.Opt[bool] `json:"outlined_table_extraction,omitzero"`
OutputPdfOfDocument param.Opt[bool] `json:"output_pdf_of_document,omitzero"`
// If specified, llamaParse will save the output to the specified path. All output
// file will use this 'prefix' should be a valid s3:// url
OutputS3PathPrefix param.Opt[string] `json:"output_s3_path_prefix,omitzero"`
// The region for the output S3 bucket.
OutputS3Region param.Opt[string] `json:"output_s3_region,omitzero"`
OutputTablesAsHTML param.Opt[bool] `json:"output_tables_as_HTML,omitzero"`
// The output bucket.
OutputBucket param.Opt[string] `json:"outputBucket,omitzero"`
PageErrorTolerance param.Opt[float64] `json:"page_error_tolerance,omitzero"`
PageHeaderPrefix param.Opt[string] `json:"page_header_prefix,omitzero"`
PageHeaderSuffix param.Opt[string] `json:"page_header_suffix,omitzero"`
PagePrefix param.Opt[string] `json:"page_prefix,omitzero"`
PageSeparator param.Opt[string] `json:"page_separator,omitzero"`
PageSuffix param.Opt[string] `json:"page_suffix,omitzero"`
ParsingInstruction param.Opt[string] `json:"parsing_instruction,omitzero"`
// The pipeline ID.
PipelineID param.Opt[string] `json:"pipeline_id,omitzero"`
PreciseBoundingBox param.Opt[bool] `json:"precise_bounding_box,omitzero"`
PremiumMode param.Opt[bool] `json:"premium_mode,omitzero"`
PresentationOutOfBoundsContent param.Opt[bool] `json:"presentation_out_of_bounds_content,omitzero"`
PresentationSkipEmbeddedData param.Opt[bool] `json:"presentation_skip_embedded_data,omitzero"`
PreserveLayoutAlignmentAcrossPages param.Opt[bool] `json:"preserve_layout_alignment_across_pages,omitzero"`
PreserveVerySmallText param.Opt[bool] `json:"preserve_very_small_text,omitzero"`
Preset param.Opt[string] `json:"preset,omitzero"`
ProjectID param.Opt[string] `json:"project_id,omitzero"`
RemoveHiddenText param.Opt[bool] `json:"remove_hidden_text,omitzero"`
ReplaceFailedPageWithErrorMessagePrefix param.Opt[string] `json:"replace_failed_page_with_error_message_prefix,omitzero"`
ReplaceFailedPageWithErrorMessageSuffix param.Opt[string] `json:"replace_failed_page_with_error_message_suffix,omitzero"`
SaveImages param.Opt[bool] `json:"save_images,omitzero"`
SkipDiagonalText param.Opt[bool] `json:"skip_diagonal_text,omitzero"`
SpecializedChartParsingAgentic param.Opt[bool] `json:"specialized_chart_parsing_agentic,omitzero"`
SpecializedChartParsingEfficient param.Opt[bool] `json:"specialized_chart_parsing_efficient,omitzero"`
SpecializedChartParsingPlus param.Opt[bool] `json:"specialized_chart_parsing_plus,omitzero"`
SpecializedImageParsing param.Opt[bool] `json:"specialized_image_parsing,omitzero"`
SpreadsheetExtractSubTables param.Opt[bool] `json:"spreadsheet_extract_sub_tables,omitzero"`
SpreadsheetForceFormulaComputation param.Opt[bool] `json:"spreadsheet_force_formula_computation,omitzero"`
SpreadsheetIncludeHiddenSheets param.Opt[bool] `json:"spreadsheet_include_hidden_sheets,omitzero"`
StrictModeBuggyFont param.Opt[bool] `json:"strict_mode_buggy_font,omitzero"`
StrictModeImageExtraction param.Opt[bool] `json:"strict_mode_image_extraction,omitzero"`
StrictModeImageOcr param.Opt[bool] `json:"strict_mode_image_ocr,omitzero"`
StrictModeReconstruction param.Opt[bool] `json:"strict_mode_reconstruction,omitzero"`
StructuredOutput param.Opt[bool] `json:"structured_output,omitzero"`
StructuredOutputJsonSchema param.Opt[string] `json:"structured_output_json_schema,omitzero"`
StructuredOutputJsonSchemaName param.Opt[string] `json:"structured_output_json_schema_name,omitzero"`
SystemPrompt param.Opt[string] `json:"system_prompt,omitzero"`
SystemPromptAppend param.Opt[string] `json:"system_prompt_append,omitzero"`
TakeScreenshot param.Opt[bool] `json:"take_screenshot,omitzero"`
TargetPages param.Opt[string] `json:"target_pages,omitzero"`
Tier param.Opt[string] `json:"tier,omitzero"`
UseVendorMultimodalModel param.Opt[bool] `json:"use_vendor_multimodal_model,omitzero"`
UserPrompt param.Opt[string] `json:"user_prompt,omitzero"`
VendorMultimodalAPIKey param.Opt[string] `json:"vendor_multimodal_api_key,omitzero"`
VendorMultimodalModelName param.Opt[string] `json:"vendor_multimodal_model_name,omitzero"`
Version param.Opt[string] `json:"version,omitzero"`
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// The language.
Lang param.Opt[string] `json:"lang,omitzero"`
// The custom metadata to attach to the documents.
CustomMetadata map[string]any `json:"custom_metadata,omitzero"`
// Any of "screenshot", "embedded", "layout".
ImagesToSave []string `json:"images_to_save,omitzero"`
// The priority for the request. This field may be ignored or overwritten depending
// on the organization tier.
//
// Any of "low", "medium", "high", "critical".
Priority string `json:"priority,omitzero"`
// The resource info about the file
ResourceInfo map[string]any `json:"resource_info,omitzero"`
// Outbound webhook endpoints to notify on job status changes
WebhookConfigurations []BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration `json:"webhook_configurations,omitzero"`
Languages []ParsingLanguages `json:"languages,omitzero"`
// Enum for representing the mode of parsing to be used.
//
// Any of "parse_page_without_llm", "parse_page_with_llm", "parse_page_with_lvm",
// "parse_page_with_agent", "parse_page_with_layout_agent",
// "parse_document_with_llm", "parse_document_with_lvm",
// "parse_document_with_agent".
ParseMode ParsingMode `json:"parse_mode,omitzero"`
// Enum for representing the different available page error handling modes.
//
// Any of "raw_text", "blank_page", "error_message".
ReplaceFailedPageMode FailPageMode `json:"replace_failed_page_mode,omitzero"`
// Any of "parse".
Type string `json:"type,omitzero"`
// contains filtered or unexported fields
}
Generic parse job configuration for batch processing.
This model contains the parsing configuration that applies to all files in a batch, but excludes file-specific fields like file_name, file_id, etc. Those file-specific fields are populated from DirectoryFile data when creating individual ParseJobRecordCreate instances for each file.
The fields in this model should be generic settings that apply uniformly to all files being processed in the batch.
func (BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters) MarshalJSON ¶
func (r BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters) MarshalJSON() (data []byte, err error)
func (*BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters) UnmarshalJSON ¶
func (r *BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters) UnmarshalJSON(data []byte) error
type BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration ¶
type BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration struct {
// Response format sent to the webhook: 'string' (default) or 'json'
WebhookOutputFormat param.Opt[string] `json:"webhook_output_format,omitzero"`
// URL to receive webhook POST notifications
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
// events are delivered.
//
// Any of "extract.pending", "extract.success", "extract.error",
// "extract.partial_success", "extract.cancelled", "parse.pending",
// "parse.running", "parse.success", "parse.error", "parse.partial_success",
// "parse.cancelled", "classify.pending", "classify.running", "classify.success",
// "classify.error", "classify.partial_success", "classify.cancelled",
// "sheets.pending", "sheets.success", "sheets.error", "sheets.partial_success",
// "sheets.cancelled", "unmapped_event".
WebhookEvents []string `json:"webhook_events,omitzero"`
// Custom HTTP headers sent with each webhook request (e.g. auth tokens)
WebhookHeaders map[string]string `json:"webhook_headers,omitzero"`
// contains filtered or unexported fields
}
Configuration for a single outbound webhook endpoint.
func (BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) MarshalJSON ¶
func (r BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) MarshalJSON() (data []byte, err error)
func (*BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) UnmarshalJSON ¶
func (r *BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration) UnmarshalJSON(data []byte) error
type BetaBatchNewParamsJobConfigUnion ¶
type BetaBatchNewParamsJobConfigUnion struct {
OfBatchParseJobRecordCreate *BetaBatchNewParamsJobConfigBatchParseJobRecordCreate `json:",omitzero,inline"`
OfClassifyJob *ClassifyJobParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaBatchNewParamsJobConfigUnion) MarshalJSON ¶
func (u BetaBatchNewParamsJobConfigUnion) MarshalJSON() ([]byte, error)
func (*BetaBatchNewParamsJobConfigUnion) UnmarshalJSON ¶
func (u *BetaBatchNewParamsJobConfigUnion) UnmarshalJSON(data []byte) error
type BetaBatchNewResponse ¶
type BetaBatchNewResponse struct {
// Unique identifier for the batch job
ID string `json:"id" api:"required"`
// Type of processing operation (parse or classify)
//
// Any of "parse", "extract", "classify".
JobType BetaBatchNewResponseJobType `json:"job_type" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status
//
// Any of "pending", "running", "dispatched", "completed", "failed", "cancelled".
Status BetaBatchNewResponseStatus `json:"status" api:"required"`
// Total number of items in the job
TotalItems int64 `json:"total_items" api:"required"`
// Timestamp when job completed
CompletedAt time.Time `json:"completed_at" api:"nullable" format:"date-time"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Directory being processed
DirectoryID string `json:"directory_id" api:"nullable"`
EffectiveAt time.Time `json:"effective_at" format:"date-time"`
// Error message for the latest job attempt, if any.
ErrorMessage string `json:"error_message" api:"nullable"`
// Number of items that failed processing
FailedItems int64 `json:"failed_items"`
// The job record ID associated with this status, if any.
JobRecordID string `json:"job_record_id" api:"nullable"`
// Number of items processed so far
ProcessedItems int64 `json:"processed_items"`
// Number of items skipped (already processed or size limit)
SkippedItems int64 `json:"skipped_items"`
// Timestamp when job processing started
StartedAt time.Time `json:"started_at" api:"nullable" format:"date-time"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// Async job tracking ID
WorkflowID string `json:"workflow_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
JobType respjson.Field
ProjectID respjson.Field
Status respjson.Field
TotalItems respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
DirectoryID respjson.Field
EffectiveAt respjson.Field
ErrorMessage respjson.Field
FailedItems respjson.Field
JobRecordID respjson.Field
ProcessedItems respjson.Field
SkippedItems respjson.Field
StartedAt respjson.Field
UpdatedAt respjson.Field
WorkflowID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response schema for a batch processing job.
func (BetaBatchNewResponse) RawJSON ¶
func (r BetaBatchNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaBatchNewResponse) UnmarshalJSON ¶
func (r *BetaBatchNewResponse) UnmarshalJSON(data []byte) error
type BetaBatchNewResponseJobType ¶
type BetaBatchNewResponseJobType string
Type of processing operation (parse or classify)
const ( BetaBatchNewResponseJobTypeParse BetaBatchNewResponseJobType = "parse" BetaBatchNewResponseJobTypeExtract BetaBatchNewResponseJobType = "extract" BetaBatchNewResponseJobTypeClassify BetaBatchNewResponseJobType = "classify" )
type BetaBatchNewResponseStatus ¶
type BetaBatchNewResponseStatus string
Current job status
const ( BetaBatchNewResponseStatusPending BetaBatchNewResponseStatus = "pending" BetaBatchNewResponseStatusRunning BetaBatchNewResponseStatus = "running" BetaBatchNewResponseStatusDispatched BetaBatchNewResponseStatus = "dispatched" BetaBatchNewResponseStatusCompleted BetaBatchNewResponseStatus = "completed" BetaBatchNewResponseStatusFailed BetaBatchNewResponseStatus = "failed" BetaBatchNewResponseStatusCancelled BetaBatchNewResponseStatus = "cancelled" )
type BetaBatchService ¶
type BetaBatchService struct {
JobItems BetaBatchJobItemService
// contains filtered or unexported fields
}
BetaBatchService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaBatchService method instead.
func NewBetaBatchService ¶
func NewBetaBatchService(opts ...option.RequestOption) (r BetaBatchService)
NewBetaBatchService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaBatchService) Cancel ¶
func (r *BetaBatchService) Cancel(ctx context.Context, jobID string, params BetaBatchCancelParams, opts ...option.RequestOption) (res *BetaBatchCancelResponse, err error)
Cancel a running batch processing job.
Stops processing and marks pending items as cancelled. Items currently being processed may still complete.
func (*BetaBatchService) GetStatus ¶
func (r *BetaBatchService) GetStatus(ctx context.Context, jobID string, query BetaBatchGetStatusParams, opts ...option.RequestOption) (res *BetaBatchGetStatusResponse, err error)
Get detailed status of a batch processing job.
Returns current progress percentage, file counts (total, processed, failed, skipped), and timestamps.
func (*BetaBatchService) List ¶
func (r *BetaBatchService) List(ctx context.Context, query BetaBatchListParams, opts ...option.RequestOption) (res *pagination.PaginatedBatchItems[BetaBatchListResponse], err error)
List batch processing jobs with optional filtering.
Filter by `directory_id`, `job_type`, or `status`. Results are paginated with configurable `limit` and `offset`.
func (*BetaBatchService) ListAutoPaging ¶
func (r *BetaBatchService) ListAutoPaging(ctx context.Context, query BetaBatchListParams, opts ...option.RequestOption) *pagination.PaginatedBatchItemsAutoPager[BetaBatchListResponse]
List batch processing jobs with optional filtering.
Filter by `directory_id`, `job_type`, or `status`. Results are paginated with configurable `limit` and `offset`.
func (*BetaBatchService) New ¶
func (r *BetaBatchService) New(ctx context.Context, params BetaBatchNewParams, opts ...option.RequestOption) (res *BetaBatchNewResponse, err error)
Create a batch processing job.
Processes files from a directory or a specific list of item IDs. Supports batch parsing and classification operations.
Provide either `directory_id` to process all files in a directory, or `item_ids` for specific items. The job runs asynchronously — poll `GET /batch/{job_id}` for progress.
type BetaChatDeleteParams ¶
type BetaChatDeleteParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaChatDeleteParams) URLQuery ¶
func (r BetaChatDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaChatDeleteParams's query parameters as `url.Values`.
type BetaChatGetParams ¶
type BetaChatGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaChatGetParams) URLQuery ¶
func (r BetaChatGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaChatGetParams's query parameters as `url.Values`.
type BetaChatGetResponse ¶
type BetaChatGetResponse struct {
// Ordered list of events that make up the conversation history.
Events []BetaChatGetResponseEventUnion `json:"events" api:"required"`
// ISO-format timestamp showing when the session was last updated.
LastUpdatedAt string `json:"last_updated_at" api:"required"`
// Unique session identifier.
SessionID string `json:"session_id" api:"required"`
// Auto-generated title derived from the first user message.
GeneratedTitle string `json:"generated_title" api:"nullable"`
// Indexes this session is bound to. Null on unbound sessions.
IndexIDs []string `json:"index_ids" api:"nullable"`
// Token usage and status from the most recent run. Null if the session has not
// been run yet.
JobMetadata BetaChatGetResponseJobMetadata `json:"job_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Events respjson.Field
LastUpdatedAt respjson.Field
SessionID respjson.Field
GeneratedTitle respjson.Field
IndexIDs respjson.Field
JobMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Full chat session including its complete event history.
func (BetaChatGetResponse) RawJSON ¶
func (r BetaChatGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponse) UnmarshalJSON ¶
func (r *BetaChatGetResponse) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventStop ¶
type BetaChatGetResponseEventStop struct {
Error string `json:"error" api:"required"`
IsError bool `json:"is_error" api:"required"`
Usage BetaChatGetResponseEventStopUsage `json:"usage" api:"required"`
// Any of "stop".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Error respjson.Field
IsError respjson.Field
Usage respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventStop) RawJSON ¶
func (r BetaChatGetResponseEventStop) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventStop) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventStop) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventStopUsage ¶
type BetaChatGetResponseEventStopUsage struct {
DurationMs float64 `json:"duration_ms"`
TotalInputTokens int64 `json:"total_input_tokens" api:"nullable"`
TotalOutputTokens int64 `json:"total_output_tokens" api:"nullable"`
Turns int64 `json:"turns"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DurationMs respjson.Field
TotalInputTokens respjson.Field
TotalOutputTokens respjson.Field
Turns respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventStopUsage) RawJSON ¶
func (r BetaChatGetResponseEventStopUsage) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventStopUsage) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventStopUsage) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventText ¶
type BetaChatGetResponseEventText struct {
Content string `json:"content" api:"required"`
// Any of "text".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Content respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventText) RawJSON ¶
func (r BetaChatGetResponseEventText) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventText) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventText) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventTextDelta ¶
type BetaChatGetResponseEventTextDelta struct {
Content string `json:"content" api:"required"`
// Any of "text_delta".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Content respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventTextDelta) RawJSON ¶
func (r BetaChatGetResponseEventTextDelta) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventTextDelta) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventTextDelta) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventThinking ¶
type BetaChatGetResponseEventThinking struct {
Content string `json:"content" api:"required"`
// Any of "thinking".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Content respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventThinking) RawJSON ¶
func (r BetaChatGetResponseEventThinking) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventThinking) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventThinking) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventThinkingDelta ¶
type BetaChatGetResponseEventThinkingDelta struct {
Content string `json:"content" api:"required"`
// Any of "thinking_delta".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Content respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventThinkingDelta) RawJSON ¶
func (r BetaChatGetResponseEventThinkingDelta) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventThinkingDelta) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventThinkingDelta) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventToolCall ¶
type BetaChatGetResponseEventToolCall struct {
Arguments map[string]any `json:"arguments" api:"required"`
CallID string `json:"call_id" api:"required"`
Name string `json:"name" api:"required"`
// Any of "tool_call".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Arguments respjson.Field
CallID respjson.Field
Name respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventToolCall) RawJSON ¶
func (r BetaChatGetResponseEventToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventToolCall) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventToolCall) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventToolResult ¶
type BetaChatGetResponseEventToolResult struct {
CallID string `json:"call_id" api:"required"`
Name string `json:"name" api:"required"`
Result any `json:"result" api:"required"`
// Coordinates for lazily resolving a page screenshot presigned URL.
ImageAttachment BetaChatGetResponseEventToolResultImageAttachment `json:"image_attachment" api:"nullable"`
// Any of "tool_result".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CallID respjson.Field
Name respjson.Field
Result respjson.Field
ImageAttachment respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventToolResult) RawJSON ¶
func (r BetaChatGetResponseEventToolResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventToolResult) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventToolResult) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventToolResultImageAttachment ¶
type BetaChatGetResponseEventToolResultImageAttachment struct {
AttachmentName string `json:"attachment_name" api:"required"`
SourceID string `json:"source_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AttachmentName respjson.Field
SourceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Coordinates for lazily resolving a page screenshot presigned URL.
func (BetaChatGetResponseEventToolResultImageAttachment) RawJSON ¶
func (r BetaChatGetResponseEventToolResultImageAttachment) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventToolResultImageAttachment) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventToolResultImageAttachment) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventUnion ¶
type BetaChatGetResponseEventUnion struct {
Content string `json:"content"`
// Any of "thinking_delta", "text_delta", "thinking", "text", "tool_call",
// "tool_result", "stop", "user_input".
Type string `json:"type"`
// This field is from variant [BetaChatGetResponseEventToolCall].
Arguments map[string]any `json:"arguments"`
CallID string `json:"call_id"`
Name string `json:"name"`
// This field is from variant [BetaChatGetResponseEventToolResult].
Result any `json:"result"`
// This field is from variant [BetaChatGetResponseEventToolResult].
ImageAttachment BetaChatGetResponseEventToolResultImageAttachment `json:"image_attachment"`
// This field is from variant [BetaChatGetResponseEventStop].
Error string `json:"error"`
// This field is from variant [BetaChatGetResponseEventStop].
IsError bool `json:"is_error"`
// This field is from variant [BetaChatGetResponseEventStop].
Usage BetaChatGetResponseEventStopUsage `json:"usage"`
JSON struct {
Content respjson.Field
Type respjson.Field
Arguments respjson.Field
CallID respjson.Field
Name respjson.Field
Result respjson.Field
ImageAttachment respjson.Field
Error respjson.Field
IsError respjson.Field
Usage respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BetaChatGetResponseEventUnion contains all possible properties and values from BetaChatGetResponseEventThinkingDelta, BetaChatGetResponseEventTextDelta, BetaChatGetResponseEventThinking, BetaChatGetResponseEventText, BetaChatGetResponseEventToolCall, BetaChatGetResponseEventToolResult, BetaChatGetResponseEventStop, BetaChatGetResponseEventUserInput.
Use the BetaChatGetResponseEventUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (BetaChatGetResponseEventUnion) AsAny ¶
func (u BetaChatGetResponseEventUnion) AsAny() anyBetaChatGetResponseEvent
Use the following switch statement to find the correct variant
switch variant := BetaChatGetResponseEventUnion.AsAny().(type) {
case llamacloudprod.BetaChatGetResponseEventThinkingDelta:
case llamacloudprod.BetaChatGetResponseEventTextDelta:
case llamacloudprod.BetaChatGetResponseEventThinking:
case llamacloudprod.BetaChatGetResponseEventText:
case llamacloudprod.BetaChatGetResponseEventToolCall:
case llamacloudprod.BetaChatGetResponseEventToolResult:
case llamacloudprod.BetaChatGetResponseEventStop:
case llamacloudprod.BetaChatGetResponseEventUserInput:
default:
fmt.Errorf("no variant present")
}
func (BetaChatGetResponseEventUnion) AsStop ¶
func (u BetaChatGetResponseEventUnion) AsStop() (v BetaChatGetResponseEventStop)
func (BetaChatGetResponseEventUnion) AsText ¶
func (u BetaChatGetResponseEventUnion) AsText() (v BetaChatGetResponseEventText)
func (BetaChatGetResponseEventUnion) AsTextDelta ¶
func (u BetaChatGetResponseEventUnion) AsTextDelta() (v BetaChatGetResponseEventTextDelta)
func (BetaChatGetResponseEventUnion) AsThinking ¶
func (u BetaChatGetResponseEventUnion) AsThinking() (v BetaChatGetResponseEventThinking)
func (BetaChatGetResponseEventUnion) AsThinkingDelta ¶
func (u BetaChatGetResponseEventUnion) AsThinkingDelta() (v BetaChatGetResponseEventThinkingDelta)
func (BetaChatGetResponseEventUnion) AsToolCall ¶
func (u BetaChatGetResponseEventUnion) AsToolCall() (v BetaChatGetResponseEventToolCall)
func (BetaChatGetResponseEventUnion) AsToolResult ¶
func (u BetaChatGetResponseEventUnion) AsToolResult() (v BetaChatGetResponseEventToolResult)
func (BetaChatGetResponseEventUnion) AsUserInput ¶
func (u BetaChatGetResponseEventUnion) AsUserInput() (v BetaChatGetResponseEventUserInput)
func (BetaChatGetResponseEventUnion) RawJSON ¶
func (u BetaChatGetResponseEventUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventUnion) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventUnion) UnmarshalJSON(data []byte) error
type BetaChatGetResponseEventUserInput ¶
type BetaChatGetResponseEventUserInput struct {
Content string `json:"content" api:"required"`
// Any of "user_input".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Content respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (BetaChatGetResponseEventUserInput) RawJSON ¶
func (r BetaChatGetResponseEventUserInput) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseEventUserInput) UnmarshalJSON ¶
func (r *BetaChatGetResponseEventUserInput) UnmarshalJSON(data []byte) error
type BetaChatGetResponseJobMetadata ¶
type BetaChatGetResponseJobMetadata struct {
DurationMs float64 `json:"duration_ms"`
Error string `json:"error" api:"nullable"`
ExportConfigIDs []string `json:"export_config_ids" api:"nullable"`
IsError bool `json:"is_error"`
TotalInputTokens int64 `json:"total_input_tokens" api:"nullable"`
TotalOutputTokens int64 `json:"total_output_tokens" api:"nullable"`
Turns int64 `json:"turns"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DurationMs respjson.Field
Error respjson.Field
ExportConfigIDs respjson.Field
IsError respjson.Field
TotalInputTokens respjson.Field
TotalOutputTokens respjson.Field
Turns respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Token usage and status from the most recent run. Null if the session has not been run yet.
func (BetaChatGetResponseJobMetadata) RawJSON ¶
func (r BetaChatGetResponseJobMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetResponseJobMetadata) UnmarshalJSON ¶
func (r *BetaChatGetResponseJobMetadata) UnmarshalJSON(data []byte) error
type BetaChatGetSummaryParams ¶
type BetaChatGetSummaryParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaChatGetSummaryParams) URLQuery ¶
func (r BetaChatGetSummaryParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaChatGetSummaryParams's query parameters as `url.Values`.
type BetaChatGetSummaryResponse ¶
type BetaChatGetSummaryResponse struct {
// ISO-format timestamp showing when the session was last updated.
LastUpdatedAt string `json:"last_updated_at" api:"required"`
// Unique session identifier.
SessionID string `json:"session_id" api:"required"`
// Auto-generated title derived from the first user message.
GeneratedTitle string `json:"generated_title" api:"nullable"`
// Indexes this session is bound to. Null on unbound sessions.
IndexIDs []string `json:"index_ids" api:"nullable"`
// Token usage and status from the most recent run. Null if the session has not
// been run yet.
JobMetadata BetaChatGetSummaryResponseJobMetadata `json:"job_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LastUpdatedAt respjson.Field
SessionID respjson.Field
GeneratedTitle respjson.Field
IndexIDs respjson.Field
JobMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Summary of a chat session, including its title and last run metadata.
func (BetaChatGetSummaryResponse) RawJSON ¶
func (r BetaChatGetSummaryResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetSummaryResponse) UnmarshalJSON ¶
func (r *BetaChatGetSummaryResponse) UnmarshalJSON(data []byte) error
type BetaChatGetSummaryResponseJobMetadata ¶
type BetaChatGetSummaryResponseJobMetadata struct {
DurationMs float64 `json:"duration_ms"`
Error string `json:"error" api:"nullable"`
ExportConfigIDs []string `json:"export_config_ids" api:"nullable"`
IsError bool `json:"is_error"`
TotalInputTokens int64 `json:"total_input_tokens" api:"nullable"`
TotalOutputTokens int64 `json:"total_output_tokens" api:"nullable"`
Turns int64 `json:"turns"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DurationMs respjson.Field
Error respjson.Field
ExportConfigIDs respjson.Field
IsError respjson.Field
TotalInputTokens respjson.Field
TotalOutputTokens respjson.Field
Turns respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Token usage and status from the most recent run. Null if the session has not been run yet.
func (BetaChatGetSummaryResponseJobMetadata) RawJSON ¶
func (r BetaChatGetSummaryResponseJobMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatGetSummaryResponseJobMetadata) UnmarshalJSON ¶
func (r *BetaChatGetSummaryResponseJobMetadata) UnmarshalJSON(data []byte) error
type BetaChatListParams ¶
type BetaChatListParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaChatListParams) URLQuery ¶
func (r BetaChatListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaChatListParams's query parameters as `url.Values`.
type BetaChatListResponse ¶
type BetaChatListResponse struct {
// ISO-format timestamp showing when the session was last updated.
LastUpdatedAt string `json:"last_updated_at" api:"required"`
// Unique session identifier.
SessionID string `json:"session_id" api:"required"`
// Auto-generated title derived from the first user message.
GeneratedTitle string `json:"generated_title" api:"nullable"`
// Indexes this session is bound to. Null on unbound sessions.
IndexIDs []string `json:"index_ids" api:"nullable"`
// Token usage and status from the most recent run. Null if the session has not
// been run yet.
JobMetadata BetaChatListResponseJobMetadata `json:"job_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LastUpdatedAt respjson.Field
SessionID respjson.Field
GeneratedTitle respjson.Field
IndexIDs respjson.Field
JobMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Summary of a chat session, including its title and last run metadata.
func (BetaChatListResponse) RawJSON ¶
func (r BetaChatListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatListResponse) UnmarshalJSON ¶
func (r *BetaChatListResponse) UnmarshalJSON(data []byte) error
type BetaChatListResponseJobMetadata ¶
type BetaChatListResponseJobMetadata struct {
DurationMs float64 `json:"duration_ms"`
Error string `json:"error" api:"nullable"`
ExportConfigIDs []string `json:"export_config_ids" api:"nullable"`
IsError bool `json:"is_error"`
TotalInputTokens int64 `json:"total_input_tokens" api:"nullable"`
TotalOutputTokens int64 `json:"total_output_tokens" api:"nullable"`
Turns int64 `json:"turns"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DurationMs respjson.Field
Error respjson.Field
ExportConfigIDs respjson.Field
IsError respjson.Field
TotalInputTokens respjson.Field
TotalOutputTokens respjson.Field
Turns respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Token usage and status from the most recent run. Null if the session has not been run yet.
func (BetaChatListResponseJobMetadata) RawJSON ¶
func (r BetaChatListResponseJobMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatListResponseJobMetadata) UnmarshalJSON ¶
func (r *BetaChatListResponseJobMetadata) UnmarshalJSON(data []byte) error
type BetaChatNewParams ¶
type BetaChatNewParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Indexes this session will retrieve from. Once set and the first message has been
// sent, the source set is locked for the session's lifetime. Leave null to create
// an unbound session.
IndexIDs []string `json:"index_ids,omitzero"`
// contains filtered or unexported fields
}
func (BetaChatNewParams) MarshalJSON ¶
func (r BetaChatNewParams) MarshalJSON() (data []byte, err error)
func (BetaChatNewParams) URLQuery ¶
func (r BetaChatNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaChatNewParams's query parameters as `url.Values`.
func (*BetaChatNewParams) UnmarshalJSON ¶
func (r *BetaChatNewParams) UnmarshalJSON(data []byte) error
type BetaChatNewResponse ¶
type BetaChatNewResponse struct {
// ISO-format timestamp showing when the session was last updated.
LastUpdatedAt string `json:"last_updated_at" api:"required"`
// Unique session identifier.
SessionID string `json:"session_id" api:"required"`
// Auto-generated title derived from the first user message.
GeneratedTitle string `json:"generated_title" api:"nullable"`
// Indexes this session is bound to. Null on unbound sessions.
IndexIDs []string `json:"index_ids" api:"nullable"`
// Token usage and status from the most recent run. Null if the session has not
// been run yet.
JobMetadata BetaChatNewResponseJobMetadata `json:"job_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LastUpdatedAt respjson.Field
SessionID respjson.Field
GeneratedTitle respjson.Field
IndexIDs respjson.Field
JobMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Summary of a chat session, including its title and last run metadata.
func (BetaChatNewResponse) RawJSON ¶
func (r BetaChatNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatNewResponse) UnmarshalJSON ¶
func (r *BetaChatNewResponse) UnmarshalJSON(data []byte) error
type BetaChatNewResponseJobMetadata ¶
type BetaChatNewResponseJobMetadata struct {
DurationMs float64 `json:"duration_ms"`
Error string `json:"error" api:"nullable"`
ExportConfigIDs []string `json:"export_config_ids" api:"nullable"`
IsError bool `json:"is_error"`
TotalInputTokens int64 `json:"total_input_tokens" api:"nullable"`
TotalOutputTokens int64 `json:"total_output_tokens" api:"nullable"`
Turns int64 `json:"turns"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DurationMs respjson.Field
Error respjson.Field
ExportConfigIDs respjson.Field
IsError respjson.Field
TotalInputTokens respjson.Field
TotalOutputTokens respjson.Field
Turns respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Token usage and status from the most recent run. Null if the session has not been run yet.
func (BetaChatNewResponseJobMetadata) RawJSON ¶
func (r BetaChatNewResponseJobMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaChatNewResponseJobMetadata) UnmarshalJSON ¶
func (r *BetaChatNewResponseJobMetadata) UnmarshalJSON(data []byte) error
type BetaChatService ¶
type BetaChatService struct {
// contains filtered or unexported fields
}
BetaChatService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaChatService method instead.
func NewBetaChatService ¶
func NewBetaChatService(opts ...option.RequestOption) (r BetaChatService)
NewBetaChatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaChatService) Delete ¶
func (r *BetaChatService) Delete(ctx context.Context, sessionID string, body BetaChatDeleteParams, opts ...option.RequestOption) (err error)
Delete a session.
func (*BetaChatService) Get ¶
func (r *BetaChatService) Get(ctx context.Context, sessionID string, query BetaChatGetParams, opts ...option.RequestOption) (res *BetaChatGetResponse, err error)
Retrieve a full session by ID, including its event history.
func (*BetaChatService) GetSummary ¶
func (r *BetaChatService) GetSummary(ctx context.Context, sessionID string, query BetaChatGetSummaryParams, opts ...option.RequestOption) (res *BetaChatGetSummaryResponse, err error)
Retrieve a session summary by ID.
func (*BetaChatService) List ¶
func (r *BetaChatService) List(ctx context.Context, query BetaChatListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BetaChatListResponse], err error)
List all chat sessions for the current project.
func (*BetaChatService) ListAutoPaging ¶
func (r *BetaChatService) ListAutoPaging(ctx context.Context, query BetaChatListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BetaChatListResponse]
List all chat sessions for the current project.
func (*BetaChatService) New ¶
func (r *BetaChatService) New(ctx context.Context, params BetaChatNewParams, opts ...option.RequestOption) (res *BetaChatNewResponse, err error)
Create a chat session, optionally bound to indexes (locked after the first message).
func (*BetaChatService) Stream ¶
func (r *BetaChatService) Stream(ctx context.Context, sessionID string, params BetaChatStreamParams, opts ...option.RequestOption) (res *BetaChatStreamResponse, err error)
Stream agent events for a chat turn as Server-Sent Events.
type BetaChatStreamParams ¶
type BetaChatStreamParams struct {
// Indexes to retrieve data from.
IndexIDs []string `json:"index_ids,omitzero" api:"required"`
// User message for this chat turn.
Prompt string `json:"prompt" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaChatStreamParams) MarshalJSON ¶
func (r BetaChatStreamParams) MarshalJSON() (data []byte, err error)
func (BetaChatStreamParams) URLQuery ¶
func (r BetaChatStreamParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaChatStreamParams's query parameters as `url.Values`.
func (*BetaChatStreamParams) UnmarshalJSON ¶
func (r *BetaChatStreamParams) UnmarshalJSON(data []byte) error
type BetaChatStreamResponse ¶
type BetaChatStreamResponse = any
type BetaDirectoryDeleteParams ¶
type BetaDirectoryDeleteParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaDirectoryDeleteParams) URLQuery ¶
func (r BetaDirectoryDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryDeleteParams's query parameters as `url.Values`.
type BetaDirectoryFileAddParams ¶
type BetaDirectoryFileAddParams struct {
// File ID for the storage location (required).
FileID string `json:"file_id" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Display name for the file. If not provided, will use the file's name.
DisplayName param.Opt[string] `json:"display_name,omitzero"`
// Unique identifier for the file in the directory. If not provided, will use the
// file's external_file_id or name.
UniqueID param.Opt[string] `json:"unique_id,omitzero"`
// User-defined metadata key-value pairs to associate with the file.
Metadata map[string]BetaDirectoryFileAddParamsMetadataUnion `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (BetaDirectoryFileAddParams) MarshalJSON ¶
func (r BetaDirectoryFileAddParams) MarshalJSON() (data []byte, err error)
func (BetaDirectoryFileAddParams) URLQuery ¶
func (r BetaDirectoryFileAddParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryFileAddParams's query parameters as `url.Values`.
func (*BetaDirectoryFileAddParams) UnmarshalJSON ¶
func (r *BetaDirectoryFileAddParams) UnmarshalJSON(data []byte) error
type BetaDirectoryFileAddParamsMetadataUnion ¶
type BetaDirectoryFileAddParamsMetadataUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaDirectoryFileAddParamsMetadataUnion) MarshalJSON ¶
func (u BetaDirectoryFileAddParamsMetadataUnion) MarshalJSON() ([]byte, error)
func (*BetaDirectoryFileAddParamsMetadataUnion) UnmarshalJSON ¶
func (u *BetaDirectoryFileAddParamsMetadataUnion) UnmarshalJSON(data []byte) error
type BetaDirectoryFileAddResponse ¶
type BetaDirectoryFileAddResponse struct {
// Unique identifier for the directory file.
ID string `json:"id" api:"required"`
// Directory the file belongs to.
DirectoryID string `json:"directory_id" api:"required"`
// Display name for the file.
DisplayName string `json:"display_name" api:"required"`
// Project the directory file belongs to.
ProjectID string `json:"project_id" api:"required"`
// Unique identifier for the file in the directory
UniqueID string `json:"unique_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Soft delete marker when the file is removed upstream or by user action.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Schema for a presigned URL.
DownloadURL PresignedURL `json:"download_url" api:"nullable"`
// File ID for the storage location.
FileID string `json:"file_id" api:"nullable"`
// Merged metadata from all sources. Higher-priority sources override lower.
Metadata map[string]BetaDirectoryFileAddResponseMetadataUnion `json:"metadata"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DirectoryID respjson.Field
DisplayName respjson.Field
ProjectID respjson.Field
UniqueID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
DownloadURL respjson.Field
FileID respjson.Field
Metadata respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory file.
func (BetaDirectoryFileAddResponse) RawJSON ¶
func (r BetaDirectoryFileAddResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileAddResponse) UnmarshalJSON ¶
func (r *BetaDirectoryFileAddResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryFileAddResponseMetadataUnion ¶
type BetaDirectoryFileAddResponseMetadataUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BetaDirectoryFileAddResponseMetadataUnion contains all possible properties and values from [string], [int64], [float64], [bool], [[]string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt OfFloat OfBool OfStringArray]
func (BetaDirectoryFileAddResponseMetadataUnion) AsBool ¶
func (u BetaDirectoryFileAddResponseMetadataUnion) AsBool() (v bool)
func (BetaDirectoryFileAddResponseMetadataUnion) AsFloat ¶
func (u BetaDirectoryFileAddResponseMetadataUnion) AsFloat() (v float64)
func (BetaDirectoryFileAddResponseMetadataUnion) AsInt ¶
func (u BetaDirectoryFileAddResponseMetadataUnion) AsInt() (v int64)
func (BetaDirectoryFileAddResponseMetadataUnion) AsString ¶
func (u BetaDirectoryFileAddResponseMetadataUnion) AsString() (v string)
func (BetaDirectoryFileAddResponseMetadataUnion) AsStringArray ¶
func (u BetaDirectoryFileAddResponseMetadataUnion) AsStringArray() (v []string)
func (BetaDirectoryFileAddResponseMetadataUnion) RawJSON ¶
func (u BetaDirectoryFileAddResponseMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileAddResponseMetadataUnion) UnmarshalJSON ¶
func (r *BetaDirectoryFileAddResponseMetadataUnion) UnmarshalJSON(data []byte) error
type BetaDirectoryFileDeleteParams ¶
type BetaDirectoryFileDeleteParams struct {
DirectoryID string `path:"directory_id" api:"required" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaDirectoryFileDeleteParams) URLQuery ¶
func (r BetaDirectoryFileDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryFileDeleteParams's query parameters as `url.Values`.
type BetaDirectoryFileGetParams ¶
type BetaDirectoryFileGetParams struct {
DirectoryID string `path:"directory_id" api:"required" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Fields to expand.
Expand []string `query:"expand,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaDirectoryFileGetParams) URLQuery ¶
func (r BetaDirectoryFileGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryFileGetParams's query parameters as `url.Values`.
type BetaDirectoryFileGetResponse ¶
type BetaDirectoryFileGetResponse struct {
// Unique identifier for the directory file.
ID string `json:"id" api:"required"`
// Directory the file belongs to.
DirectoryID string `json:"directory_id" api:"required"`
// Display name for the file.
DisplayName string `json:"display_name" api:"required"`
// Project the directory file belongs to.
ProjectID string `json:"project_id" api:"required"`
// Unique identifier for the file in the directory
UniqueID string `json:"unique_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Soft delete marker when the file is removed upstream or by user action.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Schema for a presigned URL.
DownloadURL PresignedURL `json:"download_url" api:"nullable"`
// File ID for the storage location.
FileID string `json:"file_id" api:"nullable"`
// Merged metadata from all sources. Higher-priority sources override lower.
Metadata map[string]BetaDirectoryFileGetResponseMetadataUnion `json:"metadata"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DirectoryID respjson.Field
DisplayName respjson.Field
ProjectID respjson.Field
UniqueID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
DownloadURL respjson.Field
FileID respjson.Field
Metadata respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory file.
func (BetaDirectoryFileGetResponse) RawJSON ¶
func (r BetaDirectoryFileGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileGetResponse) UnmarshalJSON ¶
func (r *BetaDirectoryFileGetResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryFileGetResponseMetadataUnion ¶
type BetaDirectoryFileGetResponseMetadataUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BetaDirectoryFileGetResponseMetadataUnion contains all possible properties and values from [string], [int64], [float64], [bool], [[]string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt OfFloat OfBool OfStringArray]
func (BetaDirectoryFileGetResponseMetadataUnion) AsBool ¶
func (u BetaDirectoryFileGetResponseMetadataUnion) AsBool() (v bool)
func (BetaDirectoryFileGetResponseMetadataUnion) AsFloat ¶
func (u BetaDirectoryFileGetResponseMetadataUnion) AsFloat() (v float64)
func (BetaDirectoryFileGetResponseMetadataUnion) AsInt ¶
func (u BetaDirectoryFileGetResponseMetadataUnion) AsInt() (v int64)
func (BetaDirectoryFileGetResponseMetadataUnion) AsString ¶
func (u BetaDirectoryFileGetResponseMetadataUnion) AsString() (v string)
func (BetaDirectoryFileGetResponseMetadataUnion) AsStringArray ¶
func (u BetaDirectoryFileGetResponseMetadataUnion) AsStringArray() (v []string)
func (BetaDirectoryFileGetResponseMetadataUnion) RawJSON ¶
func (u BetaDirectoryFileGetResponseMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileGetResponseMetadataUnion) UnmarshalJSON ¶
func (r *BetaDirectoryFileGetResponseMetadataUnion) UnmarshalJSON(data []byte) error
type BetaDirectoryFileListParams ¶
type BetaDirectoryFileListParams struct {
DisplayName param.Opt[string] `query:"display_name,omitzero" json:"-"`
DisplayNameContains param.Opt[string] `query:"display_name_contains,omitzero" json:"-"`
FileID param.Opt[string] `query:"file_id,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
UniqueID param.Opt[string] `query:"unique_id,omitzero" json:"-"`
// Include items updated at or after this timestamp (inclusive)
UpdatedAtOnOrAfter param.Opt[time.Time] `query:"updated_at_on_or_after,omitzero" format:"date-time" json:"-"`
// Include items updated at or before this timestamp (inclusive)
UpdatedAtOnOrBefore param.Opt[time.Time] `query:"updated_at_on_or_before,omitzero" format:"date-time" json:"-"`
IncludeDeleted param.Opt[bool] `query:"include_deleted,omitzero" json:"-"`
// Fields to expand on each directory file.
Expand []string `query:"expand,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaDirectoryFileListParams) URLQuery ¶
func (r BetaDirectoryFileListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryFileListParams's query parameters as `url.Values`.
type BetaDirectoryFileListResponse ¶
type BetaDirectoryFileListResponse struct {
// Unique identifier for the directory file.
ID string `json:"id" api:"required"`
// Directory the file belongs to.
DirectoryID string `json:"directory_id" api:"required"`
// Display name for the file.
DisplayName string `json:"display_name" api:"required"`
// Project the directory file belongs to.
ProjectID string `json:"project_id" api:"required"`
// Unique identifier for the file in the directory
UniqueID string `json:"unique_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Soft delete marker when the file is removed upstream or by user action.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Schema for a presigned URL.
DownloadURL PresignedURL `json:"download_url" api:"nullable"`
// File ID for the storage location.
FileID string `json:"file_id" api:"nullable"`
// Merged metadata from all sources. Higher-priority sources override lower.
Metadata map[string]BetaDirectoryFileListResponseMetadataUnion `json:"metadata"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DirectoryID respjson.Field
DisplayName respjson.Field
ProjectID respjson.Field
UniqueID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
DownloadURL respjson.Field
FileID respjson.Field
Metadata respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory file.
func (BetaDirectoryFileListResponse) RawJSON ¶
func (r BetaDirectoryFileListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileListResponse) UnmarshalJSON ¶
func (r *BetaDirectoryFileListResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryFileListResponseMetadataUnion ¶
type BetaDirectoryFileListResponseMetadataUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BetaDirectoryFileListResponseMetadataUnion contains all possible properties and values from [string], [int64], [float64], [bool], [[]string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt OfFloat OfBool OfStringArray]
func (BetaDirectoryFileListResponseMetadataUnion) AsBool ¶
func (u BetaDirectoryFileListResponseMetadataUnion) AsBool() (v bool)
func (BetaDirectoryFileListResponseMetadataUnion) AsFloat ¶
func (u BetaDirectoryFileListResponseMetadataUnion) AsFloat() (v float64)
func (BetaDirectoryFileListResponseMetadataUnion) AsInt ¶
func (u BetaDirectoryFileListResponseMetadataUnion) AsInt() (v int64)
func (BetaDirectoryFileListResponseMetadataUnion) AsString ¶
func (u BetaDirectoryFileListResponseMetadataUnion) AsString() (v string)
func (BetaDirectoryFileListResponseMetadataUnion) AsStringArray ¶
func (u BetaDirectoryFileListResponseMetadataUnion) AsStringArray() (v []string)
func (BetaDirectoryFileListResponseMetadataUnion) RawJSON ¶
func (u BetaDirectoryFileListResponseMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileListResponseMetadataUnion) UnmarshalJSON ¶
func (r *BetaDirectoryFileListResponseMetadataUnion) UnmarshalJSON(data []byte) error
type BetaDirectoryFileService ¶
type BetaDirectoryFileService struct {
// contains filtered or unexported fields
}
BetaDirectoryFileService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaDirectoryFileService method instead.
func NewBetaDirectoryFileService ¶
func NewBetaDirectoryFileService(opts ...option.RequestOption) (r BetaDirectoryFileService)
NewBetaDirectoryFileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaDirectoryFileService) Add ¶
func (r *BetaDirectoryFileService) Add(ctx context.Context, directoryID string, params BetaDirectoryFileAddParams, opts ...option.RequestOption) (res *BetaDirectoryFileAddResponse, err error)
Create a new file within the specified directory; the directory must exist in the project and `file_id` must reference an existing file.
func (*BetaDirectoryFileService) Delete ¶
func (r *BetaDirectoryFileService) Delete(ctx context.Context, directoryFileID string, params BetaDirectoryFileDeleteParams, opts ...option.RequestOption) (err error)
Delete a directory file by `directory_file_id`; to resolve from `unique_id`, list with a filter first.
func (*BetaDirectoryFileService) Get ¶
func (r *BetaDirectoryFileService) Get(ctx context.Context, directoryFileID string, params BetaDirectoryFileGetParams, opts ...option.RequestOption) (res *BetaDirectoryFileGetResponse, err error)
Get a directory file by `directory_file_id`; to look up by `unique_id`, use the list endpoint with a filter.
func (*BetaDirectoryFileService) List ¶
func (r *BetaDirectoryFileService) List(ctx context.Context, directoryID string, query BetaDirectoryFileListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BetaDirectoryFileListResponse], err error)
List all files within the specified directory with optional filtering and pagination.
func (*BetaDirectoryFileService) ListAutoPaging ¶
func (r *BetaDirectoryFileService) ListAutoPaging(ctx context.Context, directoryID string, query BetaDirectoryFileListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BetaDirectoryFileListResponse]
List all files within the specified directory with optional filtering and pagination.
func (*BetaDirectoryFileService) Update ¶
func (r *BetaDirectoryFileService) Update(ctx context.Context, directoryFileID string, params BetaDirectoryFileUpdateParams, opts ...option.RequestOption) (res *BetaDirectoryFileUpdateResponse, err error)
Update directory-file metadata by `directory_file_id`; set `directory_id` to move the file to a different directory. To resolve from `unique_id`, list with a filter first.
func (*BetaDirectoryFileService) Upload ¶
func (r *BetaDirectoryFileService) Upload(ctx context.Context, directoryID string, params BetaDirectoryFileUploadParams, opts ...option.RequestOption) (res *BetaDirectoryFileUploadResponse, err error)
Upload a file and create its directory entry in one call; `unique_id` / `display_name` default to values derived from file metadata.
type BetaDirectoryFileUpdateParams ¶
type BetaDirectoryFileUpdateParams struct {
DirectoryID string `path:"directory_id" api:"required" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Updated display name.
DisplayName param.Opt[string] `json:"display_name,omitzero"`
// Move file to a different directory.
TargetDirectoryID param.Opt[string] `json:"target_directory_id,omitzero"`
// Updated unique identifier.
UniqueID param.Opt[string] `json:"unique_id,omitzero"`
// User-defined metadata key-value pairs. Replaces the user metadata layer.
Metadata map[string]BetaDirectoryFileUpdateParamsMetadataUnion `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (BetaDirectoryFileUpdateParams) MarshalJSON ¶
func (r BetaDirectoryFileUpdateParams) MarshalJSON() (data []byte, err error)
func (BetaDirectoryFileUpdateParams) URLQuery ¶
func (r BetaDirectoryFileUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryFileUpdateParams's query parameters as `url.Values`.
func (*BetaDirectoryFileUpdateParams) UnmarshalJSON ¶
func (r *BetaDirectoryFileUpdateParams) UnmarshalJSON(data []byte) error
type BetaDirectoryFileUpdateParamsMetadataUnion ¶
type BetaDirectoryFileUpdateParamsMetadataUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaDirectoryFileUpdateParamsMetadataUnion) MarshalJSON ¶
func (u BetaDirectoryFileUpdateParamsMetadataUnion) MarshalJSON() ([]byte, error)
func (*BetaDirectoryFileUpdateParamsMetadataUnion) UnmarshalJSON ¶
func (u *BetaDirectoryFileUpdateParamsMetadataUnion) UnmarshalJSON(data []byte) error
type BetaDirectoryFileUpdateResponse ¶
type BetaDirectoryFileUpdateResponse struct {
// Unique identifier for the directory file.
ID string `json:"id" api:"required"`
// Directory the file belongs to.
DirectoryID string `json:"directory_id" api:"required"`
// Display name for the file.
DisplayName string `json:"display_name" api:"required"`
// Project the directory file belongs to.
ProjectID string `json:"project_id" api:"required"`
// Unique identifier for the file in the directory
UniqueID string `json:"unique_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Soft delete marker when the file is removed upstream or by user action.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Schema for a presigned URL.
DownloadURL PresignedURL `json:"download_url" api:"nullable"`
// File ID for the storage location.
FileID string `json:"file_id" api:"nullable"`
// Merged metadata from all sources. Higher-priority sources override lower.
Metadata map[string]BetaDirectoryFileUpdateResponseMetadataUnion `json:"metadata"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DirectoryID respjson.Field
DisplayName respjson.Field
ProjectID respjson.Field
UniqueID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
DownloadURL respjson.Field
FileID respjson.Field
Metadata respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory file.
func (BetaDirectoryFileUpdateResponse) RawJSON ¶
func (r BetaDirectoryFileUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileUpdateResponse) UnmarshalJSON ¶
func (r *BetaDirectoryFileUpdateResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryFileUpdateResponseMetadataUnion ¶
type BetaDirectoryFileUpdateResponseMetadataUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BetaDirectoryFileUpdateResponseMetadataUnion contains all possible properties and values from [string], [int64], [float64], [bool], [[]string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt OfFloat OfBool OfStringArray]
func (BetaDirectoryFileUpdateResponseMetadataUnion) AsBool ¶
func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsBool() (v bool)
func (BetaDirectoryFileUpdateResponseMetadataUnion) AsFloat ¶
func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsFloat() (v float64)
func (BetaDirectoryFileUpdateResponseMetadataUnion) AsInt ¶
func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsInt() (v int64)
func (BetaDirectoryFileUpdateResponseMetadataUnion) AsString ¶
func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsString() (v string)
func (BetaDirectoryFileUpdateResponseMetadataUnion) AsStringArray ¶
func (u BetaDirectoryFileUpdateResponseMetadataUnion) AsStringArray() (v []string)
func (BetaDirectoryFileUpdateResponseMetadataUnion) RawJSON ¶
func (u BetaDirectoryFileUpdateResponseMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileUpdateResponseMetadataUnion) UnmarshalJSON ¶
func (r *BetaDirectoryFileUpdateResponseMetadataUnion) UnmarshalJSON(data []byte) error
type BetaDirectoryFileUploadParams ¶
type BetaDirectoryFileUploadParams struct {
UploadFile io.Reader `json:"upload_file,omitzero" api:"required" format:"binary"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
DisplayName param.Opt[string] `json:"display_name,omitzero"`
ExternalFileID param.Opt[string] `json:"external_file_id,omitzero"`
// User metadata as a JSON object string.
Metadata param.Opt[string] `json:"metadata,omitzero"`
UniqueID param.Opt[string] `json:"unique_id,omitzero"`
// contains filtered or unexported fields
}
func (BetaDirectoryFileUploadParams) MarshalMultipart ¶
func (r BetaDirectoryFileUploadParams) MarshalMultipart() (data []byte, contentType string, err error)
func (BetaDirectoryFileUploadParams) URLQuery ¶
func (r BetaDirectoryFileUploadParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryFileUploadParams's query parameters as `url.Values`.
type BetaDirectoryFileUploadResponse ¶
type BetaDirectoryFileUploadResponse struct {
// Unique identifier for the directory file.
ID string `json:"id" api:"required"`
// Directory the file belongs to.
DirectoryID string `json:"directory_id" api:"required"`
// Display name for the file.
DisplayName string `json:"display_name" api:"required"`
// Project the directory file belongs to.
ProjectID string `json:"project_id" api:"required"`
// Unique identifier for the file in the directory
UniqueID string `json:"unique_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Soft delete marker when the file is removed upstream or by user action.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Schema for a presigned URL.
DownloadURL PresignedURL `json:"download_url" api:"nullable"`
// File ID for the storage location.
FileID string `json:"file_id" api:"nullable"`
// Merged metadata from all sources. Higher-priority sources override lower.
Metadata map[string]BetaDirectoryFileUploadResponseMetadataUnion `json:"metadata"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DirectoryID respjson.Field
DisplayName respjson.Field
ProjectID respjson.Field
UniqueID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
DownloadURL respjson.Field
FileID respjson.Field
Metadata respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory file.
func (BetaDirectoryFileUploadResponse) RawJSON ¶
func (r BetaDirectoryFileUploadResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileUploadResponse) UnmarshalJSON ¶
func (r *BetaDirectoryFileUploadResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryFileUploadResponseMetadataUnion ¶
type BetaDirectoryFileUploadResponseMetadataUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BetaDirectoryFileUploadResponseMetadataUnion contains all possible properties and values from [string], [int64], [float64], [bool], [[]string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt OfFloat OfBool OfStringArray]
func (BetaDirectoryFileUploadResponseMetadataUnion) AsBool ¶
func (u BetaDirectoryFileUploadResponseMetadataUnion) AsBool() (v bool)
func (BetaDirectoryFileUploadResponseMetadataUnion) AsFloat ¶
func (u BetaDirectoryFileUploadResponseMetadataUnion) AsFloat() (v float64)
func (BetaDirectoryFileUploadResponseMetadataUnion) AsInt ¶
func (u BetaDirectoryFileUploadResponseMetadataUnion) AsInt() (v int64)
func (BetaDirectoryFileUploadResponseMetadataUnion) AsString ¶
func (u BetaDirectoryFileUploadResponseMetadataUnion) AsString() (v string)
func (BetaDirectoryFileUploadResponseMetadataUnion) AsStringArray ¶
func (u BetaDirectoryFileUploadResponseMetadataUnion) AsStringArray() (v []string)
func (BetaDirectoryFileUploadResponseMetadataUnion) RawJSON ¶
func (u BetaDirectoryFileUploadResponseMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryFileUploadResponseMetadataUnion) UnmarshalJSON ¶
func (r *BetaDirectoryFileUploadResponseMetadataUnion) UnmarshalJSON(data []byte) error
type BetaDirectoryGetParams ¶
type BetaDirectoryGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaDirectoryGetParams) URLQuery ¶
func (r BetaDirectoryGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryGetParams's query parameters as `url.Values`.
type BetaDirectoryGetResponse ¶
type BetaDirectoryGetResponse struct {
// Unique identifier for the directory.
ID string `json:"id" api:"required"`
// Human-readable name for the directory.
Name string `json:"name" api:"required"`
// Project the directory belongs to.
ProjectID string `json:"project_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Optional timestamp of when the directory was deleted. Null if not deleted.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Optional description shown to users.
Description string `json:"description" api:"nullable"`
// When this directory expires and is eligible for cleanup.
ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
// Reserved system-managed metadata.
SystemMetadata map[string]any `json:"system_metadata" api:"nullable"`
// Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
//
// Any of "user", "index", "ephemeral", "system_ephemeral".
Type BetaDirectoryGetResponseType `json:"type" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
Description respjson.Field
ExpiresAt respjson.Field
SystemMetadata respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory.
func (BetaDirectoryGetResponse) RawJSON ¶
func (r BetaDirectoryGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryGetResponse) UnmarshalJSON ¶
func (r *BetaDirectoryGetResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryGetResponseType ¶
type BetaDirectoryGetResponseType string
Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
const ( BetaDirectoryGetResponseTypeUser BetaDirectoryGetResponseType = "user" BetaDirectoryGetResponseTypeIndex BetaDirectoryGetResponseType = "index" BetaDirectoryGetResponseTypeEphemeral BetaDirectoryGetResponseType = "ephemeral" BetaDirectoryGetResponseTypeSystemEphemeral BetaDirectoryGetResponseType = "system_ephemeral" )
type BetaDirectoryListParams ¶
type BetaDirectoryListParams struct {
Name param.Opt[string] `query:"name,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
IncludeDeleted param.Opt[bool] `query:"include_deleted,omitzero" json:"-"`
// Any of "user", "index", "ephemeral".
Type BetaDirectoryListParamsType `query:"type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaDirectoryListParams) URLQuery ¶
func (r BetaDirectoryListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryListParams's query parameters as `url.Values`.
type BetaDirectoryListParamsType ¶
type BetaDirectoryListParamsType string
const ( BetaDirectoryListParamsTypeUser BetaDirectoryListParamsType = "user" BetaDirectoryListParamsTypeIndex BetaDirectoryListParamsType = "index" BetaDirectoryListParamsTypeEphemeral BetaDirectoryListParamsType = "ephemeral" )
type BetaDirectoryListResponse ¶
type BetaDirectoryListResponse struct {
// Unique identifier for the directory.
ID string `json:"id" api:"required"`
// Human-readable name for the directory.
Name string `json:"name" api:"required"`
// Project the directory belongs to.
ProjectID string `json:"project_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Optional timestamp of when the directory was deleted. Null if not deleted.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Optional description shown to users.
Description string `json:"description" api:"nullable"`
// When this directory expires and is eligible for cleanup.
ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
// Reserved system-managed metadata.
SystemMetadata map[string]any `json:"system_metadata" api:"nullable"`
// Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
//
// Any of "user", "index", "ephemeral", "system_ephemeral".
Type BetaDirectoryListResponseType `json:"type" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
Description respjson.Field
ExpiresAt respjson.Field
SystemMetadata respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory.
func (BetaDirectoryListResponse) RawJSON ¶
func (r BetaDirectoryListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryListResponse) UnmarshalJSON ¶
func (r *BetaDirectoryListResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryListResponseType ¶
type BetaDirectoryListResponseType string
Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
const ( BetaDirectoryListResponseTypeUser BetaDirectoryListResponseType = "user" BetaDirectoryListResponseTypeIndex BetaDirectoryListResponseType = "index" BetaDirectoryListResponseTypeEphemeral BetaDirectoryListResponseType = "ephemeral" BetaDirectoryListResponseTypeSystemEphemeral BetaDirectoryListResponseType = "system_ephemeral" )
type BetaDirectoryNewParams ¶
type BetaDirectoryNewParams struct {
// Human-readable name for the directory.
Name string `json:"name" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Optional description shown to users.
Description param.Opt[string] `json:"description,omitzero"`
// When this directory expires. Required for ephemeral directories.
ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
// Reserved system-managed metadata.
SystemMetadata map[string]any `json:"system_metadata,omitzero"`
// Directory type. Use 'ephemeral' for batch processing with automatic cleanup.
//
// Any of "user", "ephemeral".
Type BetaDirectoryNewParamsType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (BetaDirectoryNewParams) MarshalJSON ¶
func (r BetaDirectoryNewParams) MarshalJSON() (data []byte, err error)
func (BetaDirectoryNewParams) URLQuery ¶
func (r BetaDirectoryNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryNewParams's query parameters as `url.Values`.
func (*BetaDirectoryNewParams) UnmarshalJSON ¶
func (r *BetaDirectoryNewParams) UnmarshalJSON(data []byte) error
type BetaDirectoryNewParamsType ¶
type BetaDirectoryNewParamsType string
Directory type. Use 'ephemeral' for batch processing with automatic cleanup.
const ( BetaDirectoryNewParamsTypeUser BetaDirectoryNewParamsType = "user" BetaDirectoryNewParamsTypeEphemeral BetaDirectoryNewParamsType = "ephemeral" )
type BetaDirectoryNewResponse ¶
type BetaDirectoryNewResponse struct {
// Unique identifier for the directory.
ID string `json:"id" api:"required"`
// Human-readable name for the directory.
Name string `json:"name" api:"required"`
// Project the directory belongs to.
ProjectID string `json:"project_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Optional timestamp of when the directory was deleted. Null if not deleted.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Optional description shown to users.
Description string `json:"description" api:"nullable"`
// When this directory expires and is eligible for cleanup.
ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
// Reserved system-managed metadata.
SystemMetadata map[string]any `json:"system_metadata" api:"nullable"`
// Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
//
// Any of "user", "index", "ephemeral", "system_ephemeral".
Type BetaDirectoryNewResponseType `json:"type" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
Description respjson.Field
ExpiresAt respjson.Field
SystemMetadata respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory.
func (BetaDirectoryNewResponse) RawJSON ¶
func (r BetaDirectoryNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryNewResponse) UnmarshalJSON ¶
func (r *BetaDirectoryNewResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryNewResponseType ¶
type BetaDirectoryNewResponseType string
Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
const ( BetaDirectoryNewResponseTypeUser BetaDirectoryNewResponseType = "user" BetaDirectoryNewResponseTypeIndex BetaDirectoryNewResponseType = "index" BetaDirectoryNewResponseTypeEphemeral BetaDirectoryNewResponseType = "ephemeral" BetaDirectoryNewResponseTypeSystemEphemeral BetaDirectoryNewResponseType = "system_ephemeral" )
type BetaDirectoryService ¶
type BetaDirectoryService struct {
Files BetaDirectoryFileService
// contains filtered or unexported fields
}
BetaDirectoryService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaDirectoryService method instead.
func NewBetaDirectoryService ¶
func NewBetaDirectoryService(opts ...option.RequestOption) (r BetaDirectoryService)
NewBetaDirectoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaDirectoryService) Delete ¶
func (r *BetaDirectoryService) Delete(ctx context.Context, directoryID string, body BetaDirectoryDeleteParams, opts ...option.RequestOption) (err error)
Permanently delete a directory.
func (*BetaDirectoryService) Get ¶
func (r *BetaDirectoryService) Get(ctx context.Context, directoryID string, query BetaDirectoryGetParams, opts ...option.RequestOption) (res *BetaDirectoryGetResponse, err error)
Retrieve a directory by its identifier.
func (*BetaDirectoryService) List ¶
func (r *BetaDirectoryService) List(ctx context.Context, query BetaDirectoryListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BetaDirectoryListResponse], err error)
List Directories
func (*BetaDirectoryService) ListAutoPaging ¶
func (r *BetaDirectoryService) ListAutoPaging(ctx context.Context, query BetaDirectoryListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BetaDirectoryListResponse]
List Directories
func (*BetaDirectoryService) New ¶
func (r *BetaDirectoryService) New(ctx context.Context, params BetaDirectoryNewParams, opts ...option.RequestOption) (res *BetaDirectoryNewResponse, err error)
Create a new directory within the specified project.
func (*BetaDirectoryService) Update ¶
func (r *BetaDirectoryService) Update(ctx context.Context, directoryID string, params BetaDirectoryUpdateParams, opts ...option.RequestOption) (res *BetaDirectoryUpdateResponse, err error)
Update directory metadata.
type BetaDirectoryUpdateParams ¶
type BetaDirectoryUpdateParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Updated description for the directory.
Description param.Opt[string] `json:"description,omitzero"`
// Updated name for the directory.
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
func (BetaDirectoryUpdateParams) MarshalJSON ¶
func (r BetaDirectoryUpdateParams) MarshalJSON() (data []byte, err error)
func (BetaDirectoryUpdateParams) URLQuery ¶
func (r BetaDirectoryUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaDirectoryUpdateParams's query parameters as `url.Values`.
func (*BetaDirectoryUpdateParams) UnmarshalJSON ¶
func (r *BetaDirectoryUpdateParams) UnmarshalJSON(data []byte) error
type BetaDirectoryUpdateResponse ¶
type BetaDirectoryUpdateResponse struct {
// Unique identifier for the directory.
ID string `json:"id" api:"required"`
// Human-readable name for the directory.
Name string `json:"name" api:"required"`
// Project the directory belongs to.
ProjectID string `json:"project_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Optional timestamp of when the directory was deleted. Null if not deleted.
DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
// Optional description shown to users.
Description string `json:"description" api:"nullable"`
// When this directory expires and is eligible for cleanup.
ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
// Reserved system-managed metadata.
SystemMetadata map[string]any `json:"system_metadata" api:"nullable"`
// Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
//
// Any of "user", "index", "ephemeral", "system_ephemeral".
Type BetaDirectoryUpdateResponseType `json:"type" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
Description respjson.Field
ExpiresAt respjson.Field
SystemMetadata respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API response schema for a directory.
func (BetaDirectoryUpdateResponse) RawJSON ¶
func (r BetaDirectoryUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaDirectoryUpdateResponse) UnmarshalJSON ¶
func (r *BetaDirectoryUpdateResponse) UnmarshalJSON(data []byte) error
type BetaDirectoryUpdateResponseType ¶
type BetaDirectoryUpdateResponseType string
Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
const ( BetaDirectoryUpdateResponseTypeUser BetaDirectoryUpdateResponseType = "user" BetaDirectoryUpdateResponseTypeIndex BetaDirectoryUpdateResponseType = "index" BetaDirectoryUpdateResponseTypeEphemeral BetaDirectoryUpdateResponseType = "ephemeral" BetaDirectoryUpdateResponseTypeSystemEphemeral BetaDirectoryUpdateResponseType = "system_ephemeral" )
type BetaIndexDeleteParams ¶
type BetaIndexDeleteParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaIndexDeleteParams) URLQuery ¶
func (r BetaIndexDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaIndexDeleteParams's query parameters as `url.Values`.
type BetaIndexGetParams ¶
type BetaIndexGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaIndexGetParams) URLQuery ¶
func (r BetaIndexGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaIndexGetParams's query parameters as `url.Values`.
type BetaIndexGetResponse ¶
type BetaIndexGetResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// ID of the export configuration.
ExportConfigID string `json:"export_config_id" api:"required"`
// Index name.
Name string `json:"name" api:"required"`
// Project this index belongs to.
ProjectID string `json:"project_id" api:"required"`
// ID of the source directory.
SourceDirectoryID string `json:"source_directory_id" api:"required"`
// ID of the sync configuration.
SyncConfigID string `json:"sync_config_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Index description.
Description string `json:"description" api:"nullable"`
// Last export time.
LastExportedAt time.Time `json:"last_exported_at" api:"nullable" format:"date-time"`
// Last sync time.
LastSyncedAt time.Time `json:"last_synced_at" api:"nullable" format:"date-time"`
// Build state and diagnostic info.
Metadata map[string]any `json:"metadata"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExportConfigID respjson.Field
Name respjson.Field
ProjectID respjson.Field
SourceDirectoryID respjson.Field
SyncConfigID respjson.Field
CreatedAt respjson.Field
Description respjson.Field
LastExportedAt respjson.Field
LastSyncedAt respjson.Field
Metadata respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A searchable index over a directory of documents.
func (BetaIndexGetResponse) RawJSON ¶
func (r BetaIndexGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaIndexGetResponse) UnmarshalJSON ¶
func (r *BetaIndexGetResponse) UnmarshalJSON(data []byte) error
type BetaIndexListParams ¶
type BetaIndexListParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
SourceDirectoryID param.Opt[string] `query:"source_directory_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaIndexListParams) URLQuery ¶
func (r BetaIndexListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaIndexListParams's query parameters as `url.Values`.
type BetaIndexListResponse ¶
type BetaIndexListResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// ID of the export configuration.
ExportConfigID string `json:"export_config_id" api:"required"`
// Index name.
Name string `json:"name" api:"required"`
// Project this index belongs to.
ProjectID string `json:"project_id" api:"required"`
// ID of the source directory.
SourceDirectoryID string `json:"source_directory_id" api:"required"`
// ID of the sync configuration.
SyncConfigID string `json:"sync_config_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Index description.
Description string `json:"description" api:"nullable"`
// Last export time.
LastExportedAt time.Time `json:"last_exported_at" api:"nullable" format:"date-time"`
// Last sync time.
LastSyncedAt time.Time `json:"last_synced_at" api:"nullable" format:"date-time"`
// Build state and diagnostic info.
Metadata map[string]any `json:"metadata"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExportConfigID respjson.Field
Name respjson.Field
ProjectID respjson.Field
SourceDirectoryID respjson.Field
SyncConfigID respjson.Field
CreatedAt respjson.Field
Description respjson.Field
LastExportedAt respjson.Field
LastSyncedAt respjson.Field
Metadata respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A searchable index over a directory of documents.
func (BetaIndexListResponse) RawJSON ¶
func (r BetaIndexListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaIndexListResponse) UnmarshalJSON ¶
func (r *BetaIndexListResponse) UnmarshalJSON(data []byte) error
type BetaIndexNewParams ¶
type BetaIndexNewParams struct {
// ID of the source directory containing your documents.
SourceDirectoryID string `json:"source_directory_id" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Optional description of the index.
Description param.Opt[string] `json:"description,omitzero"`
// Optional display name for the index. If omitted, the index is named after the
// source directory.
Name param.Opt[string] `json:"name,omitzero"`
// How often to re-run the sync. One of: manual, daily, on_source_change. Defaults
// to manual.
SyncFrequency param.Opt[string] `json:"sync_frequency,omitzero"`
// Product configurations for syncing. Omit to use a default parse configuration.
// Include an explicit entry per product type (e.g. parse, extract) to override the
// default.
Products []BetaIndexNewParamsProduct `json:"products,omitzero"`
// Attachment kinds to store alongside parsed output. Each entry must be one of:
// screenshots, items. For example, ['screenshots'] renders and stores per-page
// screenshots; ['items'] stores structured items with bounding boxes. Omit or pass
// an empty list to skip attachments.
StoreAttachments []string `json:"store_attachments,omitzero"`
// Vector export destination for the index. 'DEFAULT' exports to the managed vector
// DB destination resolved from configuration. 'DISABLED' skips vector export — the
// export destination falls back to 'Download'.
//
// Any of "DEFAULT", "DISABLED".
VectorTarget BetaIndexNewParamsVectorTarget `json:"vector_target,omitzero"`
// contains filtered or unexported fields
}
func (BetaIndexNewParams) MarshalJSON ¶
func (r BetaIndexNewParams) MarshalJSON() (data []byte, err error)
func (BetaIndexNewParams) URLQuery ¶
func (r BetaIndexNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaIndexNewParams's query parameters as `url.Values`.
func (*BetaIndexNewParams) UnmarshalJSON ¶
func (r *BetaIndexNewParams) UnmarshalJSON(data []byte) error
type BetaIndexNewParamsProduct ¶
type BetaIndexNewParamsProduct struct {
// ID of the product configuration.
ProductConfigID string `json:"product_config_id" api:"required"`
// Product type. One of: parse, extract.
ProductType string `json:"product_type" api:"required"`
// contains filtered or unexported fields
}
A product configuration to include in an index's sync.
Structurally mirrors `directory_sync.SyncProductEntryRequest` but is a distinct class so the Index API surface stays SDK-gen-isolated from directory-sync internals. Translation between the two happens in `index/api_utils.py`.
The properties ProductConfigID, ProductType are required.
func (BetaIndexNewParamsProduct) MarshalJSON ¶
func (r BetaIndexNewParamsProduct) MarshalJSON() (data []byte, err error)
func (*BetaIndexNewParamsProduct) UnmarshalJSON ¶
func (r *BetaIndexNewParamsProduct) UnmarshalJSON(data []byte) error
type BetaIndexNewParamsVectorTarget ¶
type BetaIndexNewParamsVectorTarget string
Vector export destination for the index. 'DEFAULT' exports to the managed vector DB destination resolved from configuration. 'DISABLED' skips vector export — the export destination falls back to 'Download'.
const ( BetaIndexNewParamsVectorTargetDefault BetaIndexNewParamsVectorTarget = "DEFAULT" BetaIndexNewParamsVectorTargetDisabled BetaIndexNewParamsVectorTarget = "DISABLED" )
type BetaIndexNewResponse ¶
type BetaIndexNewResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// ID of the export configuration.
ExportConfigID string `json:"export_config_id" api:"required"`
// Index name.
Name string `json:"name" api:"required"`
// Project this index belongs to.
ProjectID string `json:"project_id" api:"required"`
// ID of the source directory.
SourceDirectoryID string `json:"source_directory_id" api:"required"`
// ID of the sync configuration.
SyncConfigID string `json:"sync_config_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Index description.
Description string `json:"description" api:"nullable"`
// Last export time.
LastExportedAt time.Time `json:"last_exported_at" api:"nullable" format:"date-time"`
// Last sync time.
LastSyncedAt time.Time `json:"last_synced_at" api:"nullable" format:"date-time"`
// Build state and diagnostic info.
Metadata map[string]any `json:"metadata"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExportConfigID respjson.Field
Name respjson.Field
ProjectID respjson.Field
SourceDirectoryID respjson.Field
SyncConfigID respjson.Field
CreatedAt respjson.Field
Description respjson.Field
LastExportedAt respjson.Field
LastSyncedAt respjson.Field
Metadata respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A searchable index over a directory of documents.
func (BetaIndexNewResponse) RawJSON ¶
func (r BetaIndexNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaIndexNewResponse) UnmarshalJSON ¶
func (r *BetaIndexNewResponse) UnmarshalJSON(data []byte) error
type BetaIndexService ¶
type BetaIndexService struct {
// contains filtered or unexported fields
}
BetaIndexService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaIndexService method instead.
func NewBetaIndexService ¶
func NewBetaIndexService(opts ...option.RequestOption) (r BetaIndexService)
NewBetaIndexService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaIndexService) Delete ¶
func (r *BetaIndexService) Delete(ctx context.Context, indexID string, body BetaIndexDeleteParams, opts ...option.RequestOption) (err error)
Delete an index.
func (*BetaIndexService) Get ¶
func (r *BetaIndexService) Get(ctx context.Context, indexID string, query BetaIndexGetParams, opts ...option.RequestOption) (res *BetaIndexGetResponse, err error)
Get an index by ID.
func (*BetaIndexService) List ¶
func (r *BetaIndexService) List(ctx context.Context, query BetaIndexListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BetaIndexListResponse], err error)
List indexes for the current project.
func (*BetaIndexService) ListAutoPaging ¶
func (r *BetaIndexService) ListAutoPaging(ctx context.Context, query BetaIndexListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BetaIndexListResponse]
List indexes for the current project.
func (*BetaIndexService) New ¶
func (r *BetaIndexService) New(ctx context.Context, params BetaIndexNewParams, opts ...option.RequestOption) (res *BetaIndexNewResponse, err error)
Create a searchable index over a source directory.
func (*BetaIndexService) Sync ¶
func (r *BetaIndexService) Sync(ctx context.Context, indexID string, body BetaIndexSyncParams, opts ...option.RequestOption) (res *BetaIndexSyncResponse, err error)
Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.
type BetaIndexSyncParams ¶
type BetaIndexSyncParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaIndexSyncParams) URLQuery ¶
func (r BetaIndexSyncParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaIndexSyncParams's query parameters as `url.Values`.
type BetaIndexSyncResponse ¶
type BetaIndexSyncResponse = any
type BetaRetrievalFindParams ¶
type BetaRetrievalFindParams struct {
// ID of the index to search within.
IndexID string `json:"index_id" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Exact file name to match.
FileName param.Opt[string] `json:"file_name,omitzero"`
// Substring match on file name (case-insensitive).
FileNameContains param.Opt[string] `json:"file_name_contains,omitzero"`
// The maximum number of items to return. The service may return fewer than this
// value. If unspecified, a default page size will be used. The maximum value is
// typically 1000; values above this will be coerced to the maximum.
PageSize param.Opt[int64] `json:"page_size,omitzero"`
// A page token, received from a previous list call. Provide this to retrieve the
// subsequent page.
PageToken param.Opt[string] `json:"page_token,omitzero"`
// contains filtered or unexported fields
}
func (BetaRetrievalFindParams) MarshalJSON ¶
func (r BetaRetrievalFindParams) MarshalJSON() (data []byte, err error)
func (BetaRetrievalFindParams) URLQuery ¶
func (r BetaRetrievalFindParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaRetrievalFindParams's query parameters as `url.Values`.
func (*BetaRetrievalFindParams) UnmarshalJSON ¶
func (r *BetaRetrievalFindParams) UnmarshalJSON(data []byte) error
type BetaRetrievalFindResponse ¶
type BetaRetrievalFindResponse struct {
// ID of the file.
FileID string `json:"file_id" api:"required"`
// Display name of the file.
FileName string `json:"file_name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FileID respjson.Field
FileName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A file returned by find.
func (BetaRetrievalFindResponse) RawJSON ¶
func (r BetaRetrievalFindResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaRetrievalFindResponse) UnmarshalJSON ¶
func (r *BetaRetrievalFindResponse) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParams ¶
type BetaRetrievalGetParams struct {
// ID of the index to retrieve against.
IndexID string `json:"index_id" api:"required"`
// Natural-language query to retrieve relevant chunks.
Query string `json:"query" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Weight of the full-text search pipeline (0-1).
FullTextPipelineWeight param.Opt[float64] `json:"full_text_pipeline_weight,omitzero"`
// Number of candidates for approximate nearest neighbor search.
NumCandidates param.Opt[int64] `json:"num_candidates,omitzero"`
// Minimum score threshold for returned results.
ScoreThreshold param.Opt[float64] `json:"score_threshold,omitzero"`
// Maximum number of results to return.
TopK param.Opt[int64] `json:"top_k,omitzero"`
// Weight of the vector search pipeline (0-1).
VectorPipelineWeight param.Opt[float64] `json:"vector_pipeline_weight,omitzero"`
// Filters on user-defined metadata fields.
CustomFilters map[string]*BetaRetrievalGetParamsCustomFilterUnion `json:"custom_filters,omitzero"`
// Filters on built-in document fields (page range, chunk index, etc.).
StaticFilters BetaRetrievalGetParamsStaticFilters `json:"static_filters,omitzero"`
// Reranking configuration applied after hybrid search. Enabled by default.
Rerank BetaRetrievalGetParamsRerank `json:"rerank,omitzero"`
// contains filtered or unexported fields
}
func (BetaRetrievalGetParams) MarshalJSON ¶
func (r BetaRetrievalGetParams) MarshalJSON() (data []byte, err error)
func (BetaRetrievalGetParams) URLQuery ¶
func (r BetaRetrievalGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaRetrievalGetParams's query parameters as `url.Values`.
func (*BetaRetrievalGetParams) UnmarshalJSON ¶
func (r *BetaRetrievalGetParams) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsCustomFilterArrayItem ¶
type BetaRetrievalGetParamsCustomFilterArrayItem struct {
// Any of "eq", "ne", "gt", "lt", "gte", "lte", "in", "nin".
Operator string `json:"operator,omitzero" api:"required"`
Value BetaRetrievalGetParamsCustomFilterArrayItemValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Operator, Value are required.
func (BetaRetrievalGetParamsCustomFilterArrayItem) MarshalJSON ¶
func (r BetaRetrievalGetParamsCustomFilterArrayItem) MarshalJSON() (data []byte, err error)
func (*BetaRetrievalGetParamsCustomFilterArrayItem) UnmarshalJSON ¶
func (r *BetaRetrievalGetParamsCustomFilterArrayItem) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsCustomFilterArrayItemValueUnion ¶
type BetaRetrievalGetParamsCustomFilterArrayItemValueUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfFloatArray []float64 `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaRetrievalGetParamsCustomFilterArrayItemValueUnion) MarshalJSON ¶
func (u BetaRetrievalGetParamsCustomFilterArrayItemValueUnion) MarshalJSON() ([]byte, error)
func (*BetaRetrievalGetParamsCustomFilterArrayItemValueUnion) UnmarshalJSON ¶
func (u *BetaRetrievalGetParamsCustomFilterArrayItemValueUnion) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat ¶
type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat struct {
// Any of "eq", "ne", "gt", "lt", "gte", "lte", "in", "nin".
Operator string `json:"operator,omitzero" api:"required"`
Value BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Operator, Value are required.
func (BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat) MarshalJSON ¶
func (r BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat) MarshalJSON() (data []byte, err error)
func (*BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat) UnmarshalJSON ¶
func (r *BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion ¶
type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion) MarshalJSON ¶
func (u BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion) MarshalJSON() ([]byte, error)
func (*BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion) UnmarshalJSON ¶
func (u *BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion ¶
type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBetaRetrievalGetsCustomFilterFilterTypeUnionStrIntBoolFloatValueArray []BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion) MarshalJSON ¶
func (u BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion) MarshalJSON() ([]byte, error)
func (*BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion) UnmarshalJSON ¶
func (u *BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsCustomFilterUnion ¶
type BetaRetrievalGetParamsCustomFilterUnion struct {
OfFilterTypeUnionStrIntBoolFloat *BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat `json:",omitzero,inline"`
OfBetaRetrievalGetsCustomFilterArray []BetaRetrievalGetParamsCustomFilterArrayItem `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaRetrievalGetParamsCustomFilterUnion) MarshalJSON ¶
func (u BetaRetrievalGetParamsCustomFilterUnion) MarshalJSON() ([]byte, error)
func (*BetaRetrievalGetParamsCustomFilterUnion) UnmarshalJSON ¶
func (u *BetaRetrievalGetParamsCustomFilterUnion) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsRerank ¶
type BetaRetrievalGetParamsRerank struct {
// Number of results to return after reranking.
TopN param.Opt[int64] `json:"top_n,omitzero"`
// Set to false to disable reranking.
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// contains filtered or unexported fields
}
Reranking configuration applied after hybrid search. Enabled by default.
func (BetaRetrievalGetParamsRerank) MarshalJSON ¶
func (r BetaRetrievalGetParamsRerank) MarshalJSON() (data []byte, err error)
func (*BetaRetrievalGetParamsRerank) UnmarshalJSON ¶
func (r *BetaRetrievalGetParamsRerank) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsStaticFilters ¶
type BetaRetrievalGetParamsStaticFilters struct {
ParsedDirectoryFileID BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID `json:"parsed_directory_file_id,omitzero"`
// contains filtered or unexported fields
}
Filters on built-in document fields (page range, chunk index, etc.).
func (BetaRetrievalGetParamsStaticFilters) MarshalJSON ¶
func (r BetaRetrievalGetParamsStaticFilters) MarshalJSON() (data []byte, err error)
func (*BetaRetrievalGetParamsStaticFilters) UnmarshalJSON ¶
func (r *BetaRetrievalGetParamsStaticFilters) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID ¶
type BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID struct {
// Any of "eq", "ne", "gt", "lt", "gte", "lte", "in", "nin".
Operator string `json:"operator,omitzero" api:"required"`
Value BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Operator, Value are required.
func (BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID) MarshalJSON ¶
func (r BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID) MarshalJSON() (data []byte, err error)
func (*BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID) UnmarshalJSON ¶
func (r *BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID) UnmarshalJSON(data []byte) error
type BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion ¶
type BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion) MarshalJSON ¶
func (u BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion) MarshalJSON() ([]byte, error)
func (*BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion) UnmarshalJSON ¶
func (u *BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion) UnmarshalJSON(data []byte) error
type BetaRetrievalGetResponse ¶
type BetaRetrievalGetResponse struct {
// Ordered list of retrieved chunks.
Results []BetaRetrievalGetResponseResult `json:"results" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Results respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response containing retrieval results.
func (BetaRetrievalGetResponse) RawJSON ¶
func (r BetaRetrievalGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaRetrievalGetResponse) UnmarshalJSON ¶
func (r *BetaRetrievalGetResponse) UnmarshalJSON(data []byte) error
type BetaRetrievalGetResponseResult ¶
type BetaRetrievalGetResponseResult struct {
// Text content of the retrieved chunk.
Content string `json:"content" api:"required"`
// User-defined metadata associated with the chunk.
Metadata map[string]BetaRetrievalGetResponseResultMetadataUnion `json:"metadata" api:"nullable"`
// Relevance score from the reranker, if reranking was applied.
RerankScore float64 `json:"rerank_score" api:"nullable"`
// Hybrid search relevance score.
Score float64 `json:"score" api:"nullable"`
// Built-in fields stored for every exported chunk.
StaticFields BetaRetrievalGetResponseResultStaticFields `json:"static_fields"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Content respjson.Field
Metadata respjson.Field
RerankScore respjson.Field
Score respjson.Field
StaticFields respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single retrieval result.
func (BetaRetrievalGetResponseResult) RawJSON ¶
func (r BetaRetrievalGetResponseResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaRetrievalGetResponseResult) UnmarshalJSON ¶
func (r *BetaRetrievalGetResponseResult) UnmarshalJSON(data []byte) error
type BetaRetrievalGetResponseResultMetadataUnion ¶
type BetaRetrievalGetResponseResultMetadataUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BetaRetrievalGetResponseResultMetadataUnion contains all possible properties and values from [string], [int64], [float64], [bool], [[]string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt OfFloat OfBool OfStringArray]
func (BetaRetrievalGetResponseResultMetadataUnion) AsBool ¶
func (u BetaRetrievalGetResponseResultMetadataUnion) AsBool() (v bool)
func (BetaRetrievalGetResponseResultMetadataUnion) AsFloat ¶
func (u BetaRetrievalGetResponseResultMetadataUnion) AsFloat() (v float64)
func (BetaRetrievalGetResponseResultMetadataUnion) AsInt ¶
func (u BetaRetrievalGetResponseResultMetadataUnion) AsInt() (v int64)
func (BetaRetrievalGetResponseResultMetadataUnion) AsString ¶
func (u BetaRetrievalGetResponseResultMetadataUnion) AsString() (v string)
func (BetaRetrievalGetResponseResultMetadataUnion) AsStringArray ¶
func (u BetaRetrievalGetResponseResultMetadataUnion) AsStringArray() (v []string)
func (BetaRetrievalGetResponseResultMetadataUnion) RawJSON ¶
func (u BetaRetrievalGetResponseResultMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaRetrievalGetResponseResultMetadataUnion) UnmarshalJSON ¶
func (r *BetaRetrievalGetResponseResultMetadataUnion) UnmarshalJSON(data []byte) error
type BetaRetrievalGetResponseResultStaticFields ¶
type BetaRetrievalGetResponseResultStaticFields struct {
// Attachments associated with the chunk
Attachments []BetaRetrievalGetResponseResultStaticFieldsAttachment `json:"attachments"`
// End character offset of the chunk.
ChunkEndChar int64 `json:"chunk_end_char" api:"nullable"`
// Index of the chunk within the file.
ChunkIndex int64 `json:"chunk_index" api:"nullable"`
// Start character offset of the chunk.
ChunkStartChar int64 `json:"chunk_start_char" api:"nullable"`
// Token count of the chunk.
ChunkTokenCount int64 `json:"chunk_token_count" api:"nullable"`
// Last page number covered by this chunk.
PageRangeEnd int64 `json:"page_range_end" api:"nullable"`
// First page number covered by this chunk.
PageRangeStart int64 `json:"page_range_start" api:"nullable"`
// ID of the parsed file.
ParsedDirectoryFileID string `json:"parsed_directory_file_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Attachments respjson.Field
ChunkEndChar respjson.Field
ChunkIndex respjson.Field
ChunkStartChar respjson.Field
ChunkTokenCount respjson.Field
PageRangeEnd respjson.Field
PageRangeStart respjson.Field
ParsedDirectoryFileID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Built-in fields stored for every exported chunk.
func (BetaRetrievalGetResponseResultStaticFields) RawJSON ¶
func (r BetaRetrievalGetResponseResultStaticFields) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaRetrievalGetResponseResultStaticFields) UnmarshalJSON ¶
func (r *BetaRetrievalGetResponseResultStaticFields) UnmarshalJSON(data []byte) error
type BetaRetrievalGetResponseResultStaticFieldsAttachment ¶
type BetaRetrievalGetResponseResultStaticFieldsAttachment struct {
// Attachment-relative path, e.g. 'screenshots/page_7.jpg'.
AttachmentName string `json:"attachment_name" api:"required"`
// File ID to pass as source_id when fetching the attachment.
SourceID string `json:"source_id" api:"required"`
// Attachment kind, e.g. 'screenshot', 'items'.
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AttachmentName respjson.Field
SourceID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Reference to a file attachment, retrievable via `GET /api/v1/beta/attachments/{attachment_name}?source_id=...`.
func (BetaRetrievalGetResponseResultStaticFieldsAttachment) RawJSON ¶
func (r BetaRetrievalGetResponseResultStaticFieldsAttachment) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaRetrievalGetResponseResultStaticFieldsAttachment) UnmarshalJSON ¶
func (r *BetaRetrievalGetResponseResultStaticFieldsAttachment) UnmarshalJSON(data []byte) error
type BetaRetrievalGrepParams ¶
type BetaRetrievalGrepParams struct {
// ID of the file to grep.
FileID string `json:"file_id" api:"required"`
// ID of the index the file belongs to.
IndexID string `json:"index_id" api:"required"`
// Regex pattern to search for.
Pattern string `json:"pattern" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Number of characters of context to include before and after the matched pattern
// in the content field of the response
ContextChars param.Opt[int64] `json:"context_chars,omitzero"`
// The maximum number of items to return. The service may return fewer than this
// value. If unspecified, a default page size will be used. The maximum value is
// typically 1000; values above this will be coerced to the maximum.
PageSize param.Opt[int64] `json:"page_size,omitzero"`
// A page token, received from a previous list call. Provide this to retrieve the
// subsequent page.
PageToken param.Opt[string] `json:"page_token,omitzero"`
// contains filtered or unexported fields
}
func (BetaRetrievalGrepParams) MarshalJSON ¶
func (r BetaRetrievalGrepParams) MarshalJSON() (data []byte, err error)
func (BetaRetrievalGrepParams) URLQuery ¶
func (r BetaRetrievalGrepParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaRetrievalGrepParams's query parameters as `url.Values`.
func (*BetaRetrievalGrepParams) UnmarshalJSON ¶
func (r *BetaRetrievalGrepParams) UnmarshalJSON(data []byte) error
type BetaRetrievalGrepResponse ¶
type BetaRetrievalGrepResponse struct {
// Matched text content.
Content string `json:"content" api:"required"`
// End character offset of the match.
EndChar int64 `json:"end_char" api:"required"`
// Start character offset of the match.
StartChar int64 `json:"start_char" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Content respjson.Field
EndChar respjson.Field
StartChar respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single grep match within a file.
func (BetaRetrievalGrepResponse) RawJSON ¶
func (r BetaRetrievalGrepResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaRetrievalGrepResponse) UnmarshalJSON ¶
func (r *BetaRetrievalGrepResponse) UnmarshalJSON(data []byte) error
type BetaRetrievalReadParams ¶
type BetaRetrievalReadParams struct {
// ID of the file to read.
FileID string `json:"file_id" api:"required"`
// ID of the index the file belongs to.
IndexID string `json:"index_id" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Maximum number of characters to read from the offset.
MaxLength param.Opt[int64] `json:"max_length,omitzero"`
// Starting character offset.
Offset param.Opt[int64] `json:"offset,omitzero"`
// contains filtered or unexported fields
}
func (BetaRetrievalReadParams) MarshalJSON ¶
func (r BetaRetrievalReadParams) MarshalJSON() (data []byte, err error)
func (BetaRetrievalReadParams) URLQuery ¶
func (r BetaRetrievalReadParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaRetrievalReadParams's query parameters as `url.Values`.
func (*BetaRetrievalReadParams) UnmarshalJSON ¶
func (r *BetaRetrievalReadParams) UnmarshalJSON(data []byte) error
type BetaRetrievalReadResponse ¶
type BetaRetrievalReadResponse struct {
// Parsed text content of the file.
Content string `json:"content" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Content respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
File read result.
func (BetaRetrievalReadResponse) RawJSON ¶
func (r BetaRetrievalReadResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaRetrievalReadResponse) UnmarshalJSON ¶
func (r *BetaRetrievalReadResponse) UnmarshalJSON(data []byte) error
type BetaRetrievalService ¶
type BetaRetrievalService struct {
// contains filtered or unexported fields
}
BetaRetrievalService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaRetrievalService method instead.
func NewBetaRetrievalService ¶
func NewBetaRetrievalService(opts ...option.RequestOption) (r BetaRetrievalService)
NewBetaRetrievalService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaRetrievalService) Find ¶
func (r *BetaRetrievalService) Find(ctx context.Context, params BetaRetrievalFindParams, opts ...option.RequestOption) (res *pagination.PaginatedCursorPost[BetaRetrievalFindResponse], err error)
Search for files by name.
func (*BetaRetrievalService) FindAutoPaging ¶
func (r *BetaRetrievalService) FindAutoPaging(ctx context.Context, params BetaRetrievalFindParams, opts ...option.RequestOption) *pagination.PaginatedCursorPostAutoPager[BetaRetrievalFindResponse]
Search for files by name.
func (*BetaRetrievalService) Get ¶
func (r *BetaRetrievalService) Get(ctx context.Context, params BetaRetrievalGetParams, opts ...option.RequestOption) (res *BetaRetrievalGetResponse, err error)
Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.
func (*BetaRetrievalService) Grep ¶
func (r *BetaRetrievalService) Grep(ctx context.Context, params BetaRetrievalGrepParams, opts ...option.RequestOption) (res *pagination.PaginatedCursorPost[BetaRetrievalGrepResponse], err error)
Grep within a file's parsed content using a regex pattern.
func (*BetaRetrievalService) GrepAutoPaging ¶
func (r *BetaRetrievalService) GrepAutoPaging(ctx context.Context, params BetaRetrievalGrepParams, opts ...option.RequestOption) *pagination.PaginatedCursorPostAutoPager[BetaRetrievalGrepResponse]
Grep within a file's parsed content using a regex pattern.
func (*BetaRetrievalService) Read ¶
func (r *BetaRetrievalService) Read(ctx context.Context, params BetaRetrievalReadParams, opts ...option.RequestOption) (res *BetaRetrievalReadResponse, err error)
Read the parsed text content of a specific file.
type BetaService ¶
type BetaService struct {
Indexes BetaIndexService
Retrieval BetaRetrievalService
Chat BetaChatService
AgentData BetaAgentDataService
Sheets BetaSheetService
Directories BetaDirectoryService
Batch BetaBatchService
Split BetaSplitService
// contains filtered or unexported fields
}
BetaService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaService method instead.
func NewBetaService ¶
func NewBetaService(opts ...option.RequestOption) (r BetaService)
NewBetaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BetaSheetDeleteJobParams ¶
type BetaSheetDeleteJobParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaSheetDeleteJobParams) URLQuery ¶
func (r BetaSheetDeleteJobParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaSheetDeleteJobParams's query parameters as `url.Values`.
type BetaSheetDeleteJobResponse ¶
type BetaSheetDeleteJobResponse = any
type BetaSheetGetParams ¶
type BetaSheetGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
IncludeResults param.Opt[bool] `query:"include_results,omitzero" json:"-"`
// Optional fields to populate on the response. Valid values:
// metadata_state_transitions.
Expand []string `query:"expand,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaSheetGetParams) URLQuery ¶
func (r BetaSheetGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaSheetGetParams's query parameters as `url.Values`.
type BetaSheetGetResultTableParams ¶
type BetaSheetGetResultTableParams struct {
SpreadsheetJobID string `path:"spreadsheet_job_id" api:"required" json:"-"`
RegionID string `path:"region_id" api:"required" json:"-"`
ExpiresAtSeconds param.Opt[int64] `query:"expires_at_seconds,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaSheetGetResultTableParams) URLQuery ¶
func (r BetaSheetGetResultTableParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaSheetGetResultTableParams's query parameters as `url.Values`.
type BetaSheetGetResultTableParamsRegionType ¶
type BetaSheetGetResultTableParamsRegionType string
const ( BetaSheetGetResultTableParamsRegionTypeTable BetaSheetGetResultTableParamsRegionType = "table" BetaSheetGetResultTableParamsRegionTypeExtra BetaSheetGetResultTableParamsRegionType = "extra" BetaSheetGetResultTableParamsRegionTypeCellMetadata BetaSheetGetResultTableParamsRegionType = "cell_metadata" )
type BetaSheetListParams ¶
type BetaSheetListParams struct {
// Filter by saved configuration ID
ConfigurationID param.Opt[string] `query:"configuration_id,omitzero" json:"-"`
// Include items created at or after this timestamp (inclusive)
CreatedAtOnOrAfter param.Opt[time.Time] `query:"created_at_on_or_after,omitzero" format:"date-time" json:"-"`
// Include items created at or before this timestamp (inclusive)
CreatedAtOnOrBefore param.Opt[time.Time] `query:"created_at_on_or_before,omitzero" format:"date-time" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
IncludeResults param.Opt[bool] `query:"include_results,omitzero" json:"-"`
// Filter by specific job IDs
JobIDs []string `query:"job_ids,omitzero" json:"-"`
// Filter by job status
//
// Any of "PENDING", "SUCCESS", "ERROR", "PARTIAL_SUCCESS", "CANCELLED".
Status BetaSheetListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaSheetListParams) URLQuery ¶
func (r BetaSheetListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaSheetListParams's query parameters as `url.Values`.
type BetaSheetListParamsStatus ¶
type BetaSheetListParamsStatus string
Filter by job status
const ( BetaSheetListParamsStatusPending BetaSheetListParamsStatus = "PENDING" BetaSheetListParamsStatusSuccess BetaSheetListParamsStatus = "SUCCESS" BetaSheetListParamsStatusError BetaSheetListParamsStatus = "ERROR" BetaSheetListParamsStatusPartialSuccess BetaSheetListParamsStatus = "PARTIAL_SUCCESS" BetaSheetListParamsStatusCancelled BetaSheetListParamsStatus = "CANCELLED" )
type BetaSheetNewParams ¶
type BetaSheetNewParams struct {
// The ID of the file to parse
FileID string `json:"file_id" api:"required" format:"uuid"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Saved configuration ID
ConfigurationID param.Opt[string] `json:"configuration_id,omitzero"`
// Outbound webhook endpoints to notify on job status changes
WebhookConfigurations []BetaSheetNewParamsWebhookConfiguration `json:"webhook_configurations,omitzero"`
// Configuration for spreadsheet parsing and region extraction
Config SheetsParsingConfigParam `json:"config,omitzero"`
// Configuration for spreadsheet parsing and region extraction
Configuration SheetsParsingConfigParam `json:"configuration,omitzero"`
// contains filtered or unexported fields
}
func (BetaSheetNewParams) MarshalJSON ¶
func (r BetaSheetNewParams) MarshalJSON() (data []byte, err error)
func (BetaSheetNewParams) URLQuery ¶
func (r BetaSheetNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaSheetNewParams's query parameters as `url.Values`.
func (*BetaSheetNewParams) UnmarshalJSON ¶
func (r *BetaSheetNewParams) UnmarshalJSON(data []byte) error
type BetaSheetNewParamsWebhookConfiguration ¶
type BetaSheetNewParamsWebhookConfiguration struct {
// Response format sent to the webhook: 'string' (default) or 'json'
WebhookOutputFormat param.Opt[string] `json:"webhook_output_format,omitzero"`
// URL to receive webhook POST notifications
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
// events are delivered.
//
// Any of "extract.pending", "extract.success", "extract.error",
// "extract.partial_success", "extract.cancelled", "parse.pending",
// "parse.running", "parse.success", "parse.error", "parse.partial_success",
// "parse.cancelled", "classify.pending", "classify.running", "classify.success",
// "classify.error", "classify.partial_success", "classify.cancelled",
// "sheets.pending", "sheets.success", "sheets.error", "sheets.partial_success",
// "sheets.cancelled", "unmapped_event".
WebhookEvents []string `json:"webhook_events,omitzero"`
// Custom HTTP headers sent with each webhook request (e.g. auth tokens)
WebhookHeaders map[string]string `json:"webhook_headers,omitzero"`
// contains filtered or unexported fields
}
Configuration for a single outbound webhook endpoint.
func (BetaSheetNewParamsWebhookConfiguration) MarshalJSON ¶
func (r BetaSheetNewParamsWebhookConfiguration) MarshalJSON() (data []byte, err error)
func (*BetaSheetNewParamsWebhookConfiguration) UnmarshalJSON ¶
func (r *BetaSheetNewParamsWebhookConfiguration) UnmarshalJSON(data []byte) error
type BetaSheetService ¶
type BetaSheetService struct {
// contains filtered or unexported fields
}
BetaSheetService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaSheetService method instead.
func NewBetaSheetService ¶
func NewBetaSheetService(opts ...option.RequestOption) (r BetaSheetService)
NewBetaSheetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaSheetService) DeleteJob ¶
func (r *BetaSheetService) DeleteJob(ctx context.Context, spreadsheetJobID string, body BetaSheetDeleteJobParams, opts ...option.RequestOption) (res *BetaSheetDeleteJobResponse, err error)
Delete a spreadsheet parsing job and its associated data. Experimental: not production-ready and subject to change.
func (*BetaSheetService) Get ¶
func (r *BetaSheetService) Get(ctx context.Context, spreadsheetJobID string, query BetaSheetGetParams, opts ...option.RequestOption) (res *SheetsJob, err error)
Get a spreadsheet parsing job. When `include_results=True` (default), embeds extracted regions and results if complete, skipping the separate `/results` call. Experimental: not production-ready and subject to change.
func (*BetaSheetService) GetResultTable ¶
func (r *BetaSheetService) GetResultTable(ctx context.Context, regionType BetaSheetGetResultTableParamsRegionType, params BetaSheetGetResultTableParams, opts ...option.RequestOption) (res *PresignedURL, err error)
Generate a presigned URL to download a specific extracted region. Experimental: not production-ready and subject to change.
func (*BetaSheetService) List ¶
func (r *BetaSheetService) List(ctx context.Context, query BetaSheetListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[SheetsJob], err error)
List spreadsheet parsing jobs. Experimental: not production-ready and subject to change.
func (*BetaSheetService) ListAutoPaging ¶
func (r *BetaSheetService) ListAutoPaging(ctx context.Context, query BetaSheetListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[SheetsJob]
List spreadsheet parsing jobs. Experimental: not production-ready and subject to change.
func (*BetaSheetService) New ¶
func (r *BetaSheetService) New(ctx context.Context, params BetaSheetNewParams, opts ...option.RequestOption) (res *SheetsJob, err error)
Create a spreadsheet parsing job.
Provide at most one of `configuration` (an inline parsing configuration) or `configuration_id` (a saved configuration preset). If neither is provided, a default configuration is used. Optionally include `webhook_configurations` to receive `sheets.*` status notifications.
Experimental: not production-ready and subject to change.
type BetaSplitGetParams ¶
type BetaSplitGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (BetaSplitGetParams) URLQuery ¶
func (r BetaSplitGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaSplitGetParams's query parameters as `url.Values`.
type BetaSplitGetResponse ¶
type BetaSplitGetResponse struct {
// Unique identifier for the split job.
ID string `json:"id" api:"required"`
// Categories used for splitting.
Categories []SplitCategory `json:"categories" api:"required"`
// Document that was split.
DocumentInput SplitDocumentInput `json:"document_input" api:"required"`
// Project ID this job belongs to.
ProjectID string `json:"project_id" api:"required"`
// Current status of the job. Valid values are: pending, processing, completed,
// failed, cancelled.
Status string `json:"status" api:"required"`
// User ID who created this job.
UserID string `json:"user_id" api:"required"`
// Split configuration ID used for this job.
ConfigurationID string `json:"configuration_id" api:"nullable"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error message if the job failed.
ErrorMessage string `json:"error_message" api:"nullable"`
// Result of a completed split job.
Result SplitResultResponse `json:"result" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Categories respjson.Field
DocumentInput respjson.Field
ProjectID respjson.Field
Status respjson.Field
UserID respjson.Field
ConfigurationID respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
Result respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Beta response — uses nested document_input object.
func (BetaSplitGetResponse) RawJSON ¶
func (r BetaSplitGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaSplitGetResponse) UnmarshalJSON ¶
func (r *BetaSplitGetResponse) UnmarshalJSON(data []byte) error
type BetaSplitListParams ¶
type BetaSplitListParams struct {
// Include items created at or after this timestamp (inclusive)
CreatedAtOnOrAfter param.Opt[time.Time] `query:"created_at_on_or_after,omitzero" format:"date-time" json:"-"`
// Include items created at or before this timestamp (inclusive)
CreatedAtOnOrBefore param.Opt[time.Time] `query:"created_at_on_or_before,omitzero" format:"date-time" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Filter by specific job IDs
JobIDs []string `query:"job_ids,omitzero" json:"-"`
// Filter by job status (pending, processing, completed, failed, cancelled)
//
// Any of "pending", "processing", "completed", "failed", "cancelled".
Status BetaSplitListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (BetaSplitListParams) URLQuery ¶
func (r BetaSplitListParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaSplitListParams's query parameters as `url.Values`.
type BetaSplitListParamsStatus ¶
type BetaSplitListParamsStatus string
Filter by job status (pending, processing, completed, failed, cancelled)
const ( BetaSplitListParamsStatusPending BetaSplitListParamsStatus = "pending" BetaSplitListParamsStatusProcessing BetaSplitListParamsStatus = "processing" BetaSplitListParamsStatusCompleted BetaSplitListParamsStatus = "completed" BetaSplitListParamsStatusFailed BetaSplitListParamsStatus = "failed" BetaSplitListParamsStatusCancelled BetaSplitListParamsStatus = "cancelled" )
type BetaSplitListResponse ¶
type BetaSplitListResponse struct {
// Unique identifier for the split job.
ID string `json:"id" api:"required"`
// Categories used for splitting.
Categories []SplitCategory `json:"categories" api:"required"`
// Document that was split.
DocumentInput SplitDocumentInput `json:"document_input" api:"required"`
// Project ID this job belongs to.
ProjectID string `json:"project_id" api:"required"`
// Current status of the job. Valid values are: pending, processing, completed,
// failed, cancelled.
Status string `json:"status" api:"required"`
// User ID who created this job.
UserID string `json:"user_id" api:"required"`
// Split configuration ID used for this job.
ConfigurationID string `json:"configuration_id" api:"nullable"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error message if the job failed.
ErrorMessage string `json:"error_message" api:"nullable"`
// Result of a completed split job.
Result SplitResultResponse `json:"result" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Categories respjson.Field
DocumentInput respjson.Field
ProjectID respjson.Field
Status respjson.Field
UserID respjson.Field
ConfigurationID respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
Result respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Beta response — uses nested document_input object.
func (BetaSplitListResponse) RawJSON ¶
func (r BetaSplitListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaSplitListResponse) UnmarshalJSON ¶
func (r *BetaSplitListResponse) UnmarshalJSON(data []byte) error
type BetaSplitNewParams ¶
type BetaSplitNewParams struct {
// Document to be split.
DocumentInput SplitDocumentInputParam `json:"document_input,omitzero" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Saved split configuration ID.
ConfigurationID param.Opt[string] `json:"configuration_id,omitzero"`
// Split configuration with categories and splitting strategy.
Configuration BetaSplitNewParamsConfiguration `json:"configuration,omitzero"`
// contains filtered or unexported fields
}
func (BetaSplitNewParams) MarshalJSON ¶
func (r BetaSplitNewParams) MarshalJSON() (data []byte, err error)
func (BetaSplitNewParams) URLQuery ¶
func (r BetaSplitNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes BetaSplitNewParams's query parameters as `url.Values`.
func (*BetaSplitNewParams) UnmarshalJSON ¶
func (r *BetaSplitNewParams) UnmarshalJSON(data []byte) error
type BetaSplitNewParamsConfiguration ¶
type BetaSplitNewParamsConfiguration struct {
// Categories to split documents into.
Categories []SplitCategoryParam `json:"categories,omitzero" api:"required"`
// Strategy for splitting documents.
SplittingStrategy BetaSplitNewParamsConfigurationSplittingStrategy `json:"splitting_strategy,omitzero"`
// contains filtered or unexported fields
}
Split configuration with categories and splitting strategy.
The property Categories is required.
func (BetaSplitNewParamsConfiguration) MarshalJSON ¶
func (r BetaSplitNewParamsConfiguration) MarshalJSON() (data []byte, err error)
func (*BetaSplitNewParamsConfiguration) UnmarshalJSON ¶
func (r *BetaSplitNewParamsConfiguration) UnmarshalJSON(data []byte) error
type BetaSplitNewParamsConfigurationSplittingStrategy ¶
type BetaSplitNewParamsConfigurationSplittingStrategy struct {
// Controls handling of pages that don't match any category. 'include': pages can
// be grouped as 'uncategorized' and included in results. 'forbid': all pages must
// be assigned to a defined category. 'omit': pages can be classified as
// 'uncategorized' but are excluded from results.
//
// Any of "include", "forbid", "omit".
AllowUncategorized string `json:"allow_uncategorized,omitzero"`
// contains filtered or unexported fields
}
Strategy for splitting documents.
func (BetaSplitNewParamsConfigurationSplittingStrategy) MarshalJSON ¶
func (r BetaSplitNewParamsConfigurationSplittingStrategy) MarshalJSON() (data []byte, err error)
func (*BetaSplitNewParamsConfigurationSplittingStrategy) UnmarshalJSON ¶
func (r *BetaSplitNewParamsConfigurationSplittingStrategy) UnmarshalJSON(data []byte) error
type BetaSplitNewResponse ¶
type BetaSplitNewResponse struct {
// Unique identifier for the split job.
ID string `json:"id" api:"required"`
// Categories used for splitting.
Categories []SplitCategory `json:"categories" api:"required"`
// Document that was split.
DocumentInput SplitDocumentInput `json:"document_input" api:"required"`
// Project ID this job belongs to.
ProjectID string `json:"project_id" api:"required"`
// Current status of the job. Valid values are: pending, processing, completed,
// failed, cancelled.
Status string `json:"status" api:"required"`
// User ID who created this job.
UserID string `json:"user_id" api:"required"`
// Split configuration ID used for this job.
ConfigurationID string `json:"configuration_id" api:"nullable"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error message if the job failed.
ErrorMessage string `json:"error_message" api:"nullable"`
// Result of a completed split job.
Result SplitResultResponse `json:"result" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Categories respjson.Field
DocumentInput respjson.Field
ProjectID respjson.Field
Status respjson.Field
UserID respjson.Field
ConfigurationID respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
Result respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Beta response — uses nested document_input object.
func (BetaSplitNewResponse) RawJSON ¶
func (r BetaSplitNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BetaSplitNewResponse) UnmarshalJSON ¶
func (r *BetaSplitNewResponse) UnmarshalJSON(data []byte) error
type BetaSplitService ¶
type BetaSplitService struct {
// contains filtered or unexported fields
}
BetaSplitService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBetaSplitService method instead.
func NewBetaSplitService ¶
func NewBetaSplitService(opts ...option.RequestOption) (r BetaSplitService)
NewBetaSplitService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BetaSplitService) Get ¶
func (r *BetaSplitService) Get(ctx context.Context, splitJobID string, query BetaSplitGetParams, opts ...option.RequestOption) (res *BetaSplitGetResponse, err error)
Get a document split job.
func (*BetaSplitService) List ¶
func (r *BetaSplitService) List(ctx context.Context, query BetaSplitListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[BetaSplitListResponse], err error)
List document split jobs.
func (*BetaSplitService) ListAutoPaging ¶
func (r *BetaSplitService) ListAutoPaging(ctx context.Context, query BetaSplitListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[BetaSplitListResponse]
List document split jobs.
func (*BetaSplitService) New ¶
func (r *BetaSplitService) New(ctx context.Context, params BetaSplitNewParams, opts ...option.RequestOption) (res *BetaSplitNewResponse, err error)
Create a document split job.
type ClassifierJobGetParams ¶
type ClassifierJobGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ClassifierJobGetParams) URLQuery ¶
func (r ClassifierJobGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClassifierJobGetParams's query parameters as `url.Values`.
type ClassifierJobGetResultsParams ¶
type ClassifierJobGetResultsParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ClassifierJobGetResultsParams) URLQuery ¶
func (r ClassifierJobGetResultsParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClassifierJobGetResultsParams's query parameters as `url.Values`.
type ClassifierJobGetResultsResponse ¶
type ClassifierJobGetResultsResponse struct {
// The list of items.
Items []ClassifierJobGetResultsResponseItem `json:"items" api:"required"`
// A token, which can be sent as page_token to retrieve the next page. If this
// field is omitted, there are no subsequent pages.
NextPageToken string `json:"next_page_token" api:"nullable"`
// The total number of items available. This is only populated when specifically
// requested. The value may be an estimate and can be used for display purposes
// only.
TotalSize int64 `json:"total_size" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
NextPageToken respjson.Field
TotalSize respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response model for the classify endpoint following AIP-132 pagination standard.
func (ClassifierJobGetResultsResponse) RawJSON ¶
func (r ClassifierJobGetResultsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifierJobGetResultsResponse) UnmarshalJSON ¶
func (r *ClassifierJobGetResultsResponse) UnmarshalJSON(data []byte) error
type ClassifierJobGetResultsResponseItem ¶
type ClassifierJobGetResultsResponseItem struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// The ID of the classify job
ClassifyJobID string `json:"classify_job_id" api:"required" format:"uuid"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// The ID of the classified file
FileID string `json:"file_id" api:"nullable" format:"uuid"`
// Result of classifying a single file.
Result ClassifierJobGetResultsResponseItemResult `json:"result" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ClassifyJobID respjson.Field
CreatedAt respjson.Field
FileID respjson.Field
Result respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A file classification.
func (ClassifierJobGetResultsResponseItem) RawJSON ¶
func (r ClassifierJobGetResultsResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifierJobGetResultsResponseItem) UnmarshalJSON ¶
func (r *ClassifierJobGetResultsResponseItem) UnmarshalJSON(data []byte) error
type ClassifierJobGetResultsResponseItemResult ¶
type ClassifierJobGetResultsResponseItemResult struct {
// Confidence score of the classification (0.0-1.0)
Confidence float64 `json:"confidence" api:"required"`
// Step-by-step explanation of why this classification was chosen and the
// confidence score assigned
Reasoning string `json:"reasoning" api:"required"`
// The document type that best matches, or null if no match.
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Confidence respjson.Field
Reasoning respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Result of classifying a single file.
func (ClassifierJobGetResultsResponseItemResult) RawJSON ¶
func (r ClassifierJobGetResultsResponseItemResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifierJobGetResultsResponseItemResult) UnmarshalJSON ¶
func (r *ClassifierJobGetResultsResponseItemResult) UnmarshalJSON(data []byte) error
type ClassifierJobListParams ¶
type ClassifierJobListParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ClassifierJobListParams) URLQuery ¶
func (r ClassifierJobListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClassifierJobListParams's query parameters as `url.Values`.
type ClassifierJobNewParams ¶
type ClassifierJobNewParams struct {
// The IDs of the files to classify
FileIDs []string `json:"file_ids,omitzero" api:"required" format:"uuid"`
// The rules to classify the files
Rules []ClassifierRuleParam `json:"rules,omitzero" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// The classification mode to use
//
// Any of "FAST", "MULTIMODAL".
Mode ClassifierJobNewParamsMode `json:"mode,omitzero"`
// The configuration for the parsing job
ParsingConfiguration ClassifyParsingConfigurationParam `json:"parsing_configuration,omitzero"`
// List of webhook configurations for notifications
WebhookConfigurations []ClassifierJobNewParamsWebhookConfiguration `json:"webhook_configurations,omitzero"`
// contains filtered or unexported fields
}
func (ClassifierJobNewParams) MarshalJSON ¶
func (r ClassifierJobNewParams) MarshalJSON() (data []byte, err error)
func (ClassifierJobNewParams) URLQuery ¶
func (r ClassifierJobNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClassifierJobNewParams's query parameters as `url.Values`.
func (*ClassifierJobNewParams) UnmarshalJSON ¶
func (r *ClassifierJobNewParams) UnmarshalJSON(data []byte) error
type ClassifierJobNewParamsMode ¶
type ClassifierJobNewParamsMode string
The classification mode to use
const ( ClassifierJobNewParamsModeFast ClassifierJobNewParamsMode = "FAST" ClassifierJobNewParamsModeMultimodal ClassifierJobNewParamsMode = "MULTIMODAL" )
type ClassifierJobNewParamsWebhookConfiguration ¶
type ClassifierJobNewParamsWebhookConfiguration struct {
// HTTPS URL to receive webhook POST requests. Must be publicly accessible
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Events that trigger this webhook. Options: 'parse.success' (job completed),
// 'parse.error' (job failed), 'parse.partial_success' (some pages failed),
// 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook
// fires for all events
WebhookEvents []string `json:"webhook_events,omitzero"`
// Custom HTTP headers to include in webhook requests. Use for authentication
// tokens or custom routing. Example: {'Authorization': 'Bearer xyz'}
WebhookHeaders map[string]any `json:"webhook_headers,omitzero"`
// Format of the webhook payload body. 'string' (default) sends the payload as a
// JSON-encoded string; 'json' sends it as a JSON object.
//
// Any of "string", "json".
WebhookOutputFormat string `json:"webhook_output_format,omitzero"`
// contains filtered or unexported fields
}
Webhook configuration for receiving parsing job notifications.
Webhooks are called when specified events occur during job processing. Configure multiple webhook configurations to send to different endpoints.
func (ClassifierJobNewParamsWebhookConfiguration) MarshalJSON ¶
func (r ClassifierJobNewParamsWebhookConfiguration) MarshalJSON() (data []byte, err error)
func (*ClassifierJobNewParamsWebhookConfiguration) UnmarshalJSON ¶
func (r *ClassifierJobNewParamsWebhookConfiguration) UnmarshalJSON(data []byte) error
type ClassifierJobService ¶
type ClassifierJobService struct {
// contains filtered or unexported fields
}
ClassifierJobService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClassifierJobService method instead.
func NewClassifierJobService ¶
func NewClassifierJobService(opts ...option.RequestOption) (r ClassifierJobService)
NewClassifierJobService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClassifierJobService) Get
deprecated
func (r *ClassifierJobService) Get(ctx context.Context, classifyJobID string, query ClassifierJobGetParams, opts ...option.RequestOption) (res *ClassifyJob, err error)
Get a classify job. Experimental: not production-ready and subject to change.
Deprecated: Please use `client.classify.get()`
func (*ClassifierJobService) GetResults
deprecated
func (r *ClassifierJobService) GetResults(ctx context.Context, classifyJobID string, query ClassifierJobGetResultsParams, opts ...option.RequestOption) (res *ClassifierJobGetResultsResponse, err error)
Get the results of a classify job. Experimental: not production-ready and subject to change.
Deprecated: Please use `client.classify.get()`
func (*ClassifierJobService) List
deprecated
func (r *ClassifierJobService) List(ctx context.Context, query ClassifierJobListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[ClassifyJob], err error)
List classify jobs. Experimental: not production-ready and subject to change.
Deprecated: Please use `client.classify.list()`
func (*ClassifierJobService) ListAutoPaging
deprecated
func (r *ClassifierJobService) ListAutoPaging(ctx context.Context, query ClassifierJobListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[ClassifyJob]
List classify jobs. Experimental: not production-ready and subject to change.
Deprecated: Please use `client.classify.list()`
func (*ClassifierJobService) New
deprecated
func (r *ClassifierJobService) New(ctx context.Context, params ClassifierJobNewParams, opts ...option.RequestOption) (res *ClassifyJob, err error)
Create a classify job. Experimental: not production-ready and subject to change.
Deprecated: Please use `client.classify.create()`
type ClassifierRule ¶
type ClassifierRule struct {
// Natural language description of what to classify. Be specific about the content
// characteristics that identify this document type.
Description string `json:"description" api:"required"`
// The document type to assign when this rule matches (e.g., 'invoice', 'receipt',
// 'contract')
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A rule for classifying documents - v0 simplified version.
This represents a single classification rule that will be applied to documents. All rules are content-based and use natural language descriptions.
func (ClassifierRule) RawJSON ¶
func (r ClassifierRule) RawJSON() string
Returns the unmodified JSON received from the API
func (ClassifierRule) ToParam ¶
func (r ClassifierRule) ToParam() ClassifierRuleParam
ToParam converts this ClassifierRule to a ClassifierRuleParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ClassifierRuleParam.Overrides()
func (*ClassifierRule) UnmarshalJSON ¶
func (r *ClassifierRule) UnmarshalJSON(data []byte) error
type ClassifierRuleParam ¶
type ClassifierRuleParam struct {
// Natural language description of what to classify. Be specific about the content
// characteristics that identify this document type.
Description string `json:"description" api:"required"`
// The document type to assign when this rule matches (e.g., 'invoice', 'receipt',
// 'contract')
Type string `json:"type" api:"required"`
// contains filtered or unexported fields
}
A rule for classifying documents - v0 simplified version.
This represents a single classification rule that will be applied to documents. All rules are content-based and use natural language descriptions.
The properties Description, Type are required.
func (ClassifierRuleParam) MarshalJSON ¶
func (r ClassifierRuleParam) MarshalJSON() (data []byte, err error)
func (*ClassifierRuleParam) UnmarshalJSON ¶
func (r *ClassifierRuleParam) UnmarshalJSON(data []byte) error
type ClassifierService ¶
type ClassifierService struct {
Jobs ClassifierJobService
// contains filtered or unexported fields
}
ClassifierService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClassifierService method instead.
func NewClassifierService ¶
func NewClassifierService(opts ...option.RequestOption) (r ClassifierService)
NewClassifierService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ClassifyConfiguration ¶
type ClassifyConfiguration struct {
// Classify rules to evaluate against the document (at least one required)
Rules []ClassifyConfigurationRule `json:"rules" api:"required"`
// Classify execution mode
//
// Any of "FAST".
Mode ClassifyConfigurationMode `json:"mode"`
// Parsing configuration for classify jobs.
ParsingConfiguration ClassifyConfigurationParsingConfiguration `json:"parsing_configuration" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Rules respjson.Field
Mode respjson.Field
ParsingConfiguration respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for a classify job.
func (ClassifyConfiguration) RawJSON ¶
func (r ClassifyConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (ClassifyConfiguration) ToParam ¶
func (r ClassifyConfiguration) ToParam() ClassifyConfigurationParam
ToParam converts this ClassifyConfiguration to a ClassifyConfigurationParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ClassifyConfigurationParam.Overrides()
func (*ClassifyConfiguration) UnmarshalJSON ¶
func (r *ClassifyConfiguration) UnmarshalJSON(data []byte) error
type ClassifyConfigurationMode ¶
type ClassifyConfigurationMode string
Classify execution mode
const (
ClassifyConfigurationModeFast ClassifyConfigurationMode = "FAST"
)
type ClassifyConfigurationParam ¶
type ClassifyConfigurationParam struct {
// Classify rules to evaluate against the document (at least one required)
Rules []ClassifyConfigurationRuleParam `json:"rules,omitzero" api:"required"`
// Parsing configuration for classify jobs.
ParsingConfiguration ClassifyConfigurationParsingConfigurationParam `json:"parsing_configuration,omitzero"`
// Classify execution mode
//
// Any of "FAST".
Mode ClassifyConfigurationMode `json:"mode,omitzero"`
// contains filtered or unexported fields
}
Configuration for a classify job.
The property Rules is required.
func (ClassifyConfigurationParam) MarshalJSON ¶
func (r ClassifyConfigurationParam) MarshalJSON() (data []byte, err error)
func (*ClassifyConfigurationParam) UnmarshalJSON ¶
func (r *ClassifyConfigurationParam) UnmarshalJSON(data []byte) error
type ClassifyConfigurationParsingConfiguration ¶
type ClassifyConfigurationParsingConfiguration struct {
// ISO 639-1 language code for the document
Lang string `json:"lang"`
// Maximum number of pages to process. Omit for no limit.
MaxPages int64 `json:"max_pages" api:"nullable"`
// Comma-separated page numbers or ranges to process (1-based). Omit to process all
// pages.
TargetPages string `json:"target_pages" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Lang respjson.Field
MaxPages respjson.Field
TargetPages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parsing configuration for classify jobs.
func (ClassifyConfigurationParsingConfiguration) RawJSON ¶
func (r ClassifyConfigurationParsingConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifyConfigurationParsingConfiguration) UnmarshalJSON ¶
func (r *ClassifyConfigurationParsingConfiguration) UnmarshalJSON(data []byte) error
type ClassifyConfigurationParsingConfigurationParam ¶
type ClassifyConfigurationParsingConfigurationParam struct {
// Maximum number of pages to process. Omit for no limit.
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
// Comma-separated page numbers or ranges to process (1-based). Omit to process all
// pages.
TargetPages param.Opt[string] `json:"target_pages,omitzero"`
// ISO 639-1 language code for the document
Lang param.Opt[string] `json:"lang,omitzero"`
// contains filtered or unexported fields
}
Parsing configuration for classify jobs.
func (ClassifyConfigurationParsingConfigurationParam) MarshalJSON ¶
func (r ClassifyConfigurationParsingConfigurationParam) MarshalJSON() (data []byte, err error)
func (*ClassifyConfigurationParsingConfigurationParam) UnmarshalJSON ¶
func (r *ClassifyConfigurationParsingConfigurationParam) UnmarshalJSON(data []byte) error
type ClassifyConfigurationRule ¶
type ClassifyConfigurationRule struct {
// Natural language criteria for matching this rule
Description string `json:"description" api:"required"`
// Document type to assign when rule matches
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A rule for classifying documents.
func (ClassifyConfigurationRule) RawJSON ¶
func (r ClassifyConfigurationRule) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifyConfigurationRule) UnmarshalJSON ¶
func (r *ClassifyConfigurationRule) UnmarshalJSON(data []byte) error
type ClassifyConfigurationRuleParam ¶
type ClassifyConfigurationRuleParam struct {
// Natural language criteria for matching this rule
Description string `json:"description" api:"required"`
// Document type to assign when rule matches
Type string `json:"type" api:"required"`
// contains filtered or unexported fields
}
A rule for classifying documents.
The properties Description, Type are required.
func (ClassifyConfigurationRuleParam) MarshalJSON ¶
func (r ClassifyConfigurationRuleParam) MarshalJSON() (data []byte, err error)
func (*ClassifyConfigurationRuleParam) UnmarshalJSON ¶
func (r *ClassifyConfigurationRuleParam) UnmarshalJSON(data []byte) error
type ClassifyCreateRequestParam ¶
type ClassifyCreateRequestParam struct {
// Saved configuration ID
ConfigurationID param.Opt[string] `json:"configuration_id,omitzero"`
// Deprecated: use file_input instead
//
// Deprecated: deprecated
FileID param.Opt[string] `json:"file_id,omitzero"`
// File ID or parse job ID to classify
FileInput param.Opt[string] `json:"file_input,omitzero"`
// Deprecated: use file_input instead
//
// Deprecated: deprecated
ParseJobID param.Opt[string] `json:"parse_job_id,omitzero"`
// Idempotency key scoped to the project
TransactionID param.Opt[string] `json:"transaction_id,omitzero"`
// Outbound webhook endpoints to notify on job status changes
WebhookConfigurations []ClassifyCreateRequestWebhookConfigurationParam `json:"webhook_configurations,omitzero"`
// Configuration for a classify job.
Configuration ClassifyConfigurationParam `json:"configuration,omitzero"`
// contains filtered or unexported fields
}
Request to create a classify job.
func (ClassifyCreateRequestParam) MarshalJSON ¶
func (r ClassifyCreateRequestParam) MarshalJSON() (data []byte, err error)
func (*ClassifyCreateRequestParam) UnmarshalJSON ¶
func (r *ClassifyCreateRequestParam) UnmarshalJSON(data []byte) error
type ClassifyCreateRequestWebhookConfigurationParam ¶
type ClassifyCreateRequestWebhookConfigurationParam struct {
// Response format sent to the webhook: 'string' (default) or 'json'
WebhookOutputFormat param.Opt[string] `json:"webhook_output_format,omitzero"`
// URL to receive webhook POST notifications
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
// events are delivered.
//
// Any of "extract.pending", "extract.success", "extract.error",
// "extract.partial_success", "extract.cancelled", "parse.pending",
// "parse.running", "parse.success", "parse.error", "parse.partial_success",
// "parse.cancelled", "classify.pending", "classify.running", "classify.success",
// "classify.error", "classify.partial_success", "classify.cancelled",
// "sheets.pending", "sheets.success", "sheets.error", "sheets.partial_success",
// "sheets.cancelled", "unmapped_event".
WebhookEvents []string `json:"webhook_events,omitzero"`
// Custom HTTP headers sent with each webhook request (e.g. auth tokens)
WebhookHeaders map[string]string `json:"webhook_headers,omitzero"`
// contains filtered or unexported fields
}
Configuration for a single outbound webhook endpoint.
func (ClassifyCreateRequestWebhookConfigurationParam) MarshalJSON ¶
func (r ClassifyCreateRequestWebhookConfigurationParam) MarshalJSON() (data []byte, err error)
func (*ClassifyCreateRequestWebhookConfigurationParam) UnmarshalJSON ¶
func (r *ClassifyCreateRequestWebhookConfigurationParam) UnmarshalJSON(data []byte) error
type ClassifyGetParams ¶
type ClassifyGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ClassifyGetParams) URLQuery ¶
func (r ClassifyGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClassifyGetParams's query parameters as `url.Values`.
type ClassifyGetResponse ¶
type ClassifyGetResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// Classify configuration used for this job
Configuration ClassifyConfiguration `json:"configuration" api:"required"`
// Whether the input was a file or parse job (FILE or PARSE_JOB)
//
// Any of "url", "file_id", "parse_job_id".
DocumentInputType ClassifyGetResponseDocumentInputType `json:"document_input_type" api:"required"`
// ID of the input file or parse job
FileInput string `json:"file_input" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status: PENDING, RUNNING, COMPLETED, or FAILED
//
// Any of "PENDING", "RUNNING", "COMPLETED", "FAILED".
Status ClassifyGetResponseStatus `json:"status" api:"required"`
// User who created this job
UserID string `json:"user_id" api:"required"`
// Product configuration ID
ConfigurationID string `json:"configuration_id" api:"nullable"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error message if job failed
ErrorMessage string `json:"error_message" api:"nullable"`
// Associated parse job ID
ParseJobID string `json:"parse_job_id" api:"nullable"`
// Result of classifying a document.
Result ClassifyResult `json:"result" api:"nullable"`
// Idempotency key
TransactionID string `json:"transaction_id" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Configuration respjson.Field
DocumentInputType respjson.Field
FileInput respjson.Field
ProjectID respjson.Field
Status respjson.Field
UserID respjson.Field
ConfigurationID respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
ParseJobID respjson.Field
Result respjson.Field
TransactionID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for a classify job.
func (ClassifyGetResponse) RawJSON ¶
func (r ClassifyGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifyGetResponse) UnmarshalJSON ¶
func (r *ClassifyGetResponse) UnmarshalJSON(data []byte) error
type ClassifyGetResponseDocumentInputType ¶
type ClassifyGetResponseDocumentInputType string
Whether the input was a file or parse job (FILE or PARSE_JOB)
const ( ClassifyGetResponseDocumentInputTypeURL ClassifyGetResponseDocumentInputType = "url" ClassifyGetResponseDocumentInputTypeFileID ClassifyGetResponseDocumentInputType = "file_id" ClassifyGetResponseDocumentInputTypeParseJobID ClassifyGetResponseDocumentInputType = "parse_job_id" )
type ClassifyGetResponseStatus ¶
type ClassifyGetResponseStatus string
Current job status: PENDING, RUNNING, COMPLETED, or FAILED
const ( ClassifyGetResponseStatusPending ClassifyGetResponseStatus = "PENDING" ClassifyGetResponseStatusRunning ClassifyGetResponseStatus = "RUNNING" ClassifyGetResponseStatusCompleted ClassifyGetResponseStatus = "COMPLETED" ClassifyGetResponseStatusFailed ClassifyGetResponseStatus = "FAILED" )
type ClassifyJob ¶
type ClassifyJob struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// The ID of the project
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// The rules to classify the files
Rules []ClassifierRule `json:"rules" api:"required"`
// The status of the classify job
//
// Any of "PENDING", "SUCCESS", "ERROR", "PARTIAL_SUCCESS", "CANCELLED".
Status StatusEnum `json:"status" api:"required"`
// The ID of the user
UserID string `json:"user_id" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
EffectiveAt time.Time `json:"effective_at" format:"date-time"`
// Error message for the latest job attempt, if any.
ErrorMessage string `json:"error_message" api:"nullable"`
// The job record ID associated with this status, if any.
JobRecordID string `json:"job_record_id" api:"nullable"`
// The classification mode to use
//
// Any of "FAST", "MULTIMODAL".
Mode ClassifyJobMode `json:"mode"`
// The configuration for the parsing job
ParsingConfiguration ClassifyParsingConfiguration `json:"parsing_configuration"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ProjectID respjson.Field
Rules respjson.Field
Status respjson.Field
UserID respjson.Field
CreatedAt respjson.Field
EffectiveAt respjson.Field
ErrorMessage respjson.Field
JobRecordID respjson.Field
Mode respjson.Field
ParsingConfiguration respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A classify job.
func (ClassifyJob) RawJSON ¶
func (r ClassifyJob) RawJSON() string
Returns the unmodified JSON received from the API
func (ClassifyJob) ToParam ¶
func (r ClassifyJob) ToParam() ClassifyJobParam
ToParam converts this ClassifyJob to a ClassifyJobParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ClassifyJobParam.Overrides()
func (*ClassifyJob) UnmarshalJSON ¶
func (r *ClassifyJob) UnmarshalJSON(data []byte) error
type ClassifyJobMode ¶
type ClassifyJobMode string
The classification mode to use
const ( ClassifyJobModeFast ClassifyJobMode = "FAST" ClassifyJobModeMultimodal ClassifyJobMode = "MULTIMODAL" )
type ClassifyJobParam ¶
type ClassifyJobParam struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// The ID of the project
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// The rules to classify the files
Rules []ClassifierRuleParam `json:"rules,omitzero" api:"required"`
// The status of the classify job
//
// Any of "PENDING", "SUCCESS", "ERROR", "PARTIAL_SUCCESS", "CANCELLED".
Status StatusEnum `json:"status,omitzero" api:"required"`
// The ID of the user
UserID string `json:"user_id" api:"required"`
// Creation datetime
CreatedAt param.Opt[time.Time] `json:"created_at,omitzero" format:"date-time"`
// Error message for the latest job attempt, if any.
ErrorMessage param.Opt[string] `json:"error_message,omitzero"`
// The job record ID associated with this status, if any.
JobRecordID param.Opt[string] `json:"job_record_id,omitzero"`
// Update datetime
UpdatedAt param.Opt[time.Time] `json:"updated_at,omitzero" format:"date-time"`
EffectiveAt param.Opt[time.Time] `json:"effective_at,omitzero" format:"date-time"`
// The classification mode to use
//
// Any of "FAST", "MULTIMODAL".
Mode ClassifyJobMode `json:"mode,omitzero"`
// The configuration for the parsing job
ParsingConfiguration ClassifyParsingConfigurationParam `json:"parsing_configuration,omitzero"`
// contains filtered or unexported fields
}
A classify job.
The properties ID, ProjectID, Rules, Status, UserID are required.
func (ClassifyJobParam) MarshalJSON ¶
func (r ClassifyJobParam) MarshalJSON() (data []byte, err error)
func (*ClassifyJobParam) UnmarshalJSON ¶
func (r *ClassifyJobParam) UnmarshalJSON(data []byte) error
type ClassifyListParams ¶
type ClassifyListParams struct {
// Filter by configuration ID
ConfigurationID param.Opt[string] `query:"configuration_id,omitzero" json:"-"`
// Include items created at or after this timestamp (inclusive)
CreatedAtOnOrAfter param.Opt[time.Time] `query:"created_at_on_or_after,omitzero" format:"date-time" json:"-"`
// Include items created at or before this timestamp (inclusive)
CreatedAtOnOrBefore param.Opt[time.Time] `query:"created_at_on_or_before,omitzero" format:"date-time" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
// Number of items per page
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
// Token for pagination
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Filter by specific job IDs
JobIDs []string `query:"job_ids,omitzero" json:"-"`
// Filter by job status
//
// Any of "PENDING", "RUNNING", "COMPLETED", "FAILED".
Status ClassifyListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ClassifyListParams) URLQuery ¶
func (r ClassifyListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClassifyListParams's query parameters as `url.Values`.
type ClassifyListParamsStatus ¶
type ClassifyListParamsStatus string
Filter by job status
const ( ClassifyListParamsStatusPending ClassifyListParamsStatus = "PENDING" ClassifyListParamsStatusRunning ClassifyListParamsStatus = "RUNNING" ClassifyListParamsStatusCompleted ClassifyListParamsStatus = "COMPLETED" ClassifyListParamsStatusFailed ClassifyListParamsStatus = "FAILED" )
type ClassifyListResponse ¶
type ClassifyListResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// Classify configuration used for this job
Configuration ClassifyConfiguration `json:"configuration" api:"required"`
// Whether the input was a file or parse job (FILE or PARSE_JOB)
//
// Any of "url", "file_id", "parse_job_id".
DocumentInputType ClassifyListResponseDocumentInputType `json:"document_input_type" api:"required"`
// ID of the input file or parse job
FileInput string `json:"file_input" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status: PENDING, RUNNING, COMPLETED, or FAILED
//
// Any of "PENDING", "RUNNING", "COMPLETED", "FAILED".
Status ClassifyListResponseStatus `json:"status" api:"required"`
// User who created this job
UserID string `json:"user_id" api:"required"`
// Product configuration ID
ConfigurationID string `json:"configuration_id" api:"nullable"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error message if job failed
ErrorMessage string `json:"error_message" api:"nullable"`
// Associated parse job ID
ParseJobID string `json:"parse_job_id" api:"nullable"`
// Result of classifying a document.
Result ClassifyResult `json:"result" api:"nullable"`
// Idempotency key
TransactionID string `json:"transaction_id" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Configuration respjson.Field
DocumentInputType respjson.Field
FileInput respjson.Field
ProjectID respjson.Field
Status respjson.Field
UserID respjson.Field
ConfigurationID respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
ParseJobID respjson.Field
Result respjson.Field
TransactionID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for a classify job.
func (ClassifyListResponse) RawJSON ¶
func (r ClassifyListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifyListResponse) UnmarshalJSON ¶
func (r *ClassifyListResponse) UnmarshalJSON(data []byte) error
type ClassifyListResponseDocumentInputType ¶
type ClassifyListResponseDocumentInputType string
Whether the input was a file or parse job (FILE or PARSE_JOB)
const ( ClassifyListResponseDocumentInputTypeURL ClassifyListResponseDocumentInputType = "url" ClassifyListResponseDocumentInputTypeFileID ClassifyListResponseDocumentInputType = "file_id" ClassifyListResponseDocumentInputTypeParseJobID ClassifyListResponseDocumentInputType = "parse_job_id" )
type ClassifyListResponseStatus ¶
type ClassifyListResponseStatus string
Current job status: PENDING, RUNNING, COMPLETED, or FAILED
const ( ClassifyListResponseStatusPending ClassifyListResponseStatus = "PENDING" ClassifyListResponseStatusRunning ClassifyListResponseStatus = "RUNNING" ClassifyListResponseStatusCompleted ClassifyListResponseStatus = "COMPLETED" ClassifyListResponseStatusFailed ClassifyListResponseStatus = "FAILED" )
type ClassifyNewParams ¶
type ClassifyNewParams struct {
// Request to create a classify job.
ClassifyCreateRequest ClassifyCreateRequestParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ClassifyNewParams) MarshalJSON ¶
func (r ClassifyNewParams) MarshalJSON() (data []byte, err error)
func (ClassifyNewParams) URLQuery ¶
func (r ClassifyNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes ClassifyNewParams's query parameters as `url.Values`.
func (*ClassifyNewParams) UnmarshalJSON ¶
func (r *ClassifyNewParams) UnmarshalJSON(data []byte) error
type ClassifyNewResponse ¶
type ClassifyNewResponse struct {
// Unique identifier
ID string `json:"id" api:"required"`
// Classify configuration used for this job
Configuration ClassifyConfiguration `json:"configuration" api:"required"`
// Whether the input was a file or parse job (FILE or PARSE_JOB)
//
// Any of "url", "file_id", "parse_job_id".
DocumentInputType ClassifyNewResponseDocumentInputType `json:"document_input_type" api:"required"`
// ID of the input file or parse job
FileInput string `json:"file_input" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status: PENDING, RUNNING, COMPLETED, or FAILED
//
// Any of "PENDING", "RUNNING", "COMPLETED", "FAILED".
Status ClassifyNewResponseStatus `json:"status" api:"required"`
// User who created this job
UserID string `json:"user_id" api:"required"`
// Product configuration ID
ConfigurationID string `json:"configuration_id" api:"nullable"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error message if job failed
ErrorMessage string `json:"error_message" api:"nullable"`
// Associated parse job ID
ParseJobID string `json:"parse_job_id" api:"nullable"`
// Result of classifying a document.
Result ClassifyResult `json:"result" api:"nullable"`
// Idempotency key
TransactionID string `json:"transaction_id" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Configuration respjson.Field
DocumentInputType respjson.Field
FileInput respjson.Field
ProjectID respjson.Field
Status respjson.Field
UserID respjson.Field
ConfigurationID respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
ParseJobID respjson.Field
Result respjson.Field
TransactionID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for a classify job.
func (ClassifyNewResponse) RawJSON ¶
func (r ClassifyNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifyNewResponse) UnmarshalJSON ¶
func (r *ClassifyNewResponse) UnmarshalJSON(data []byte) error
type ClassifyNewResponseDocumentInputType ¶
type ClassifyNewResponseDocumentInputType string
Whether the input was a file or parse job (FILE or PARSE_JOB)
const ( ClassifyNewResponseDocumentInputTypeURL ClassifyNewResponseDocumentInputType = "url" ClassifyNewResponseDocumentInputTypeFileID ClassifyNewResponseDocumentInputType = "file_id" ClassifyNewResponseDocumentInputTypeParseJobID ClassifyNewResponseDocumentInputType = "parse_job_id" )
type ClassifyNewResponseStatus ¶
type ClassifyNewResponseStatus string
Current job status: PENDING, RUNNING, COMPLETED, or FAILED
const ( ClassifyNewResponseStatusPending ClassifyNewResponseStatus = "PENDING" ClassifyNewResponseStatusRunning ClassifyNewResponseStatus = "RUNNING" ClassifyNewResponseStatusCompleted ClassifyNewResponseStatus = "COMPLETED" ClassifyNewResponseStatusFailed ClassifyNewResponseStatus = "FAILED" )
type ClassifyParsingConfiguration ¶
type ClassifyParsingConfiguration struct {
// The language to parse the files in
//
// Any of "af", "az", "bs", "cs", "cy", "da", "de", "en", "es", "et", "fr", "ga",
// "hr", "hu", "id", "is", "it", "ku", "la", "lt", "lv", "mi", "ms", "mt", "nl",
// "no", "oc", "pi", "pl", "pt", "ro", "rs_latin", "sk", "sl", "sq", "sv", "sw",
// "tl", "tr", "uz", "vi", "ar", "fa", "ug", "ur", "bn", "as", "mni", "ru",
// "rs_cyrillic", "be", "bg", "uk", "mn", "abq", "ady", "kbd", "ava", "dar", "inh",
// "che", "lbe", "lez", "tab", "tjk", "hi", "mr", "ne", "bh", "mai", "ang", "bho",
// "mah", "sck", "new", "gom", "sa", "bgc", "th", "ch_sim", "ch_tra", "ja", "ko",
// "ta", "te", "kn".
Lang ParsingLanguages `json:"lang"`
// The maximum number of pages to parse
MaxPages int64 `json:"max_pages" api:"nullable"`
// The pages to target for parsing (0-indexed, so first page is at 0)
TargetPages []int64 `json:"target_pages" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Lang respjson.Field
MaxPages respjson.Field
TargetPages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parsing configuration for a classify job.
func (ClassifyParsingConfiguration) RawJSON ¶
func (r ClassifyParsingConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (ClassifyParsingConfiguration) ToParam ¶
func (r ClassifyParsingConfiguration) ToParam() ClassifyParsingConfigurationParam
ToParam converts this ClassifyParsingConfiguration to a ClassifyParsingConfigurationParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ClassifyParsingConfigurationParam.Overrides()
func (*ClassifyParsingConfiguration) UnmarshalJSON ¶
func (r *ClassifyParsingConfiguration) UnmarshalJSON(data []byte) error
type ClassifyParsingConfigurationParam ¶
type ClassifyParsingConfigurationParam struct {
// The maximum number of pages to parse
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
// The pages to target for parsing (0-indexed, so first page is at 0)
TargetPages []int64 `json:"target_pages,omitzero"`
// The language to parse the files in
//
// Any of "af", "az", "bs", "cs", "cy", "da", "de", "en", "es", "et", "fr", "ga",
// "hr", "hu", "id", "is", "it", "ku", "la", "lt", "lv", "mi", "ms", "mt", "nl",
// "no", "oc", "pi", "pl", "pt", "ro", "rs_latin", "sk", "sl", "sq", "sv", "sw",
// "tl", "tr", "uz", "vi", "ar", "fa", "ug", "ur", "bn", "as", "mni", "ru",
// "rs_cyrillic", "be", "bg", "uk", "mn", "abq", "ady", "kbd", "ava", "dar", "inh",
// "che", "lbe", "lez", "tab", "tjk", "hi", "mr", "ne", "bh", "mai", "ang", "bho",
// "mah", "sck", "new", "gom", "sa", "bgc", "th", "ch_sim", "ch_tra", "ja", "ko",
// "ta", "te", "kn".
Lang ParsingLanguages `json:"lang,omitzero"`
// contains filtered or unexported fields
}
Parsing configuration for a classify job.
func (ClassifyParsingConfigurationParam) MarshalJSON ¶
func (r ClassifyParsingConfigurationParam) MarshalJSON() (data []byte, err error)
func (*ClassifyParsingConfigurationParam) UnmarshalJSON ¶
func (r *ClassifyParsingConfigurationParam) UnmarshalJSON(data []byte) error
type ClassifyResult ¶
type ClassifyResult struct {
// Confidence score between 0.0 and 1.0
Confidence float64 `json:"confidence" api:"required"`
// Why the document matched (or didn't match) the returned rule
Reasoning string `json:"reasoning" api:"required"`
// Matched rule type, or null if no rule matched
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Confidence respjson.Field
Reasoning respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Result of classifying a document.
func (ClassifyResult) RawJSON ¶
func (r ClassifyResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifyResult) UnmarshalJSON ¶
func (r *ClassifyResult) UnmarshalJSON(data []byte) error
type ClassifyService ¶
type ClassifyService struct {
// contains filtered or unexported fields
}
ClassifyService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClassifyService method instead.
func NewClassifyService ¶
func NewClassifyService(opts ...option.RequestOption) (r ClassifyService)
NewClassifyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ClassifyService) Get ¶
func (r *ClassifyService) Get(ctx context.Context, jobID string, query ClassifyGetParams, opts ...option.RequestOption) (res *ClassifyGetResponse, err error)
Get a classify job by ID.
Returns the job status, configuration, and classify result when complete. The result includes the matched document type, confidence score, and reasoning.
func (*ClassifyService) List ¶
func (r *ClassifyService) List(ctx context.Context, query ClassifyListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[ClassifyListResponse], err error)
List classify jobs with optional filtering and pagination.
Filter by `status`, `configuration_id`, specific `job_ids`, or creation date range.
func (*ClassifyService) ListAutoPaging ¶
func (r *ClassifyService) ListAutoPaging(ctx context.Context, query ClassifyListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[ClassifyListResponse]
List classify jobs with optional filtering and pagination.
Filter by `status`, `configuration_id`, specific `job_ids`, or creation date range.
func (*ClassifyService) New ¶
func (r *ClassifyService) New(ctx context.Context, params ClassifyNewParams, opts ...option.RequestOption) (res *ClassifyNewResponse, err error)
Create a classify job.
Classifies a document against a set of rules. Set `file_input` to a file ID (`dfl-...`) or parse job ID (`pjb-...`), and provide either inline `configuration` with rules or a `configuration_id` referencing a saved preset.
Each rule has a `type` (the label to assign) and a `description` (natural language criteria). The classifier returns the best matching rule with a confidence score.
The job runs asynchronously. Poll `GET /classify/{job_id}` to check status and retrieve results.
type ClassifyV2Parameters ¶
type ClassifyV2Parameters struct {
// Classify rules to evaluate against the document (at least one required)
Rules []ClassifyV2ParametersRule `json:"rules,omitzero" api:"required"`
// Parsing configuration for classify jobs.
ParsingConfiguration ClassifyV2ParametersParsingConfiguration `json:"parsing_configuration,omitzero"`
// Classify execution mode
//
// Any of "FAST".
Mode ClassifyV2ParametersMode `json:"mode,omitzero"`
// Product type.
//
// This field can be elided, and will marshal its zero value as "classify_v2".
ProductType constant.ClassifyV2 `json:"product_type" default:"classify_v2"`
// contains filtered or unexported fields
}
Typed parameters for a _classify v2_ product configuration.
The properties ProductType, Rules are required.
func (ClassifyV2Parameters) MarshalJSON ¶
func (r ClassifyV2Parameters) MarshalJSON() (data []byte, err error)
func (*ClassifyV2Parameters) UnmarshalJSON ¶
func (r *ClassifyV2Parameters) UnmarshalJSON(data []byte) error
type ClassifyV2ParametersMode ¶
type ClassifyV2ParametersMode string
Classify execution mode
const (
ClassifyV2ParametersModeFast ClassifyV2ParametersMode = "FAST"
)
type ClassifyV2ParametersParsingConfiguration ¶
type ClassifyV2ParametersParsingConfiguration struct {
// Maximum number of pages to process. Omit for no limit.
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
// Comma-separated page numbers or ranges to process (1-based). Omit to process all
// pages.
TargetPages param.Opt[string] `json:"target_pages,omitzero"`
// ISO 639-1 language code for the document
Lang param.Opt[string] `json:"lang,omitzero"`
// contains filtered or unexported fields
}
Parsing configuration for classify jobs.
func (ClassifyV2ParametersParsingConfiguration) MarshalJSON ¶
func (r ClassifyV2ParametersParsingConfiguration) MarshalJSON() (data []byte, err error)
func (*ClassifyV2ParametersParsingConfiguration) UnmarshalJSON ¶
func (r *ClassifyV2ParametersParsingConfiguration) UnmarshalJSON(data []byte) error
type ClassifyV2ParametersParsingConfigurationResp ¶
type ClassifyV2ParametersParsingConfigurationResp struct {
// ISO 639-1 language code for the document
Lang string `json:"lang"`
// Maximum number of pages to process. Omit for no limit.
MaxPages int64 `json:"max_pages" api:"nullable"`
// Comma-separated page numbers or ranges to process (1-based). Omit to process all
// pages.
TargetPages string `json:"target_pages" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Lang respjson.Field
MaxPages respjson.Field
TargetPages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parsing configuration for classify jobs.
func (ClassifyV2ParametersParsingConfigurationResp) RawJSON ¶
func (r ClassifyV2ParametersParsingConfigurationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifyV2ParametersParsingConfigurationResp) UnmarshalJSON ¶
func (r *ClassifyV2ParametersParsingConfigurationResp) UnmarshalJSON(data []byte) error
type ClassifyV2ParametersResp ¶
type ClassifyV2ParametersResp struct {
// Product type.
ProductType constant.ClassifyV2 `json:"product_type" default:"classify_v2"`
// Classify rules to evaluate against the document (at least one required)
Rules []ClassifyV2ParametersRuleResp `json:"rules" api:"required"`
// Classify execution mode
//
// Any of "FAST".
Mode ClassifyV2ParametersMode `json:"mode"`
// Parsing configuration for classify jobs.
ParsingConfiguration ClassifyV2ParametersParsingConfigurationResp `json:"parsing_configuration" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ProductType respjson.Field
Rules respjson.Field
Mode respjson.Field
ParsingConfiguration respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Typed parameters for a _classify v2_ product configuration.
func (ClassifyV2ParametersResp) RawJSON ¶
func (r ClassifyV2ParametersResp) RawJSON() string
Returns the unmodified JSON received from the API
func (ClassifyV2ParametersResp) ToParam ¶
func (r ClassifyV2ParametersResp) ToParam() ClassifyV2Parameters
ToParam converts this ClassifyV2ParametersResp to a ClassifyV2Parameters.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ClassifyV2Parameters.Overrides()
func (*ClassifyV2ParametersResp) UnmarshalJSON ¶
func (r *ClassifyV2ParametersResp) UnmarshalJSON(data []byte) error
type ClassifyV2ParametersRule ¶
type ClassifyV2ParametersRule struct {
// Natural language criteria for matching this rule
Description string `json:"description" api:"required"`
// Document type to assign when rule matches
Type string `json:"type" api:"required"`
// contains filtered or unexported fields
}
A rule for classifying documents.
The properties Description, Type are required.
func (ClassifyV2ParametersRule) MarshalJSON ¶
func (r ClassifyV2ParametersRule) MarshalJSON() (data []byte, err error)
func (*ClassifyV2ParametersRule) UnmarshalJSON ¶
func (r *ClassifyV2ParametersRule) UnmarshalJSON(data []byte) error
type ClassifyV2ParametersRuleResp ¶
type ClassifyV2ParametersRuleResp struct {
// Natural language criteria for matching this rule
Description string `json:"description" api:"required"`
// Document type to assign when rule matches
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A rule for classifying documents.
func (ClassifyV2ParametersRuleResp) RawJSON ¶
func (r ClassifyV2ParametersRuleResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ClassifyV2ParametersRuleResp) UnmarshalJSON ¶
func (r *ClassifyV2ParametersRuleResp) UnmarshalJSON(data []byte) error
type Client ¶
type Client struct {
Files FileService
Parsing ParsingService
Extract ExtractService
Classifier ClassifierService
Batches BatchService
Classify ClassifyService
Configurations ConfigurationService
Projects ProjectService
DataSinks DataSinkService
DataSources DataSourceService
Pipelines PipelineService
Retrievers RetrieverService
Beta BetaService
// contains filtered or unexported fields
}
Client creates a struct with services and top level methods that help with interacting with the llama-cloud API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (LLAMA_CLOUD_API_KEY, LLAMA_CLOUD_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type CloudAstraDBVectorStore ¶
type CloudAstraDBVectorStore = shared.CloudAstraDBVectorStore
Cloud AstraDB Vector Store.
This class is used to store the configuration for an AstraDB vector store, so that it can be created and used in LlamaCloud.
Args: token (str): The Astra DB Application Token to use. api_endpoint (str): The Astra DB JSON API endpoint for your database. collection_name (str): Collection name to use. If not existing, it will be created. embedding_dimension (int): Length of the embedding vectors in use. keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace'
This is an alias to an internal type.
type CloudAstraDBVectorStoreParam ¶
type CloudAstraDBVectorStoreParam = shared.CloudAstraDBVectorStoreParam
Cloud AstraDB Vector Store.
This class is used to store the configuration for an AstraDB vector store, so that it can be created and used in LlamaCloud.
Args: token (str): The Astra DB Application Token to use. api_endpoint (str): The Astra DB JSON API endpoint for your database. collection_name (str): Collection name to use. If not existing, it will be created. embedding_dimension (int): Length of the embedding vectors in use. keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace'
This is an alias to an internal type.
type CloudAzStorageBlobDataSource ¶
type CloudAzStorageBlobDataSource = shared.CloudAzStorageBlobDataSource
This is an alias to an internal type.
type CloudAzStorageBlobDataSourceParam ¶
type CloudAzStorageBlobDataSourceParam = shared.CloudAzStorageBlobDataSourceParam
This is an alias to an internal type.
type CloudAzureAISearchVectorStore ¶
type CloudAzureAISearchVectorStore = shared.CloudAzureAISearchVectorStore
Cloud Azure AI Search Vector Store.
This is an alias to an internal type.
type CloudAzureAISearchVectorStoreParam ¶
type CloudAzureAISearchVectorStoreParam = shared.CloudAzureAISearchVectorStoreParam
Cloud Azure AI Search Vector Store.
This is an alias to an internal type.
type CloudBoxDataSource ¶
type CloudBoxDataSource = shared.CloudBoxDataSource
This is an alias to an internal type.
type CloudBoxDataSourceAuthenticationMechanism ¶
type CloudBoxDataSourceAuthenticationMechanism = shared.CloudBoxDataSourceAuthenticationMechanism
The type of authentication to use (Developer Token or CCG)
This is an alias to an internal type.
type CloudBoxDataSourceParam ¶
type CloudBoxDataSourceParam = shared.CloudBoxDataSourceParam
This is an alias to an internal type.
type CloudConfluenceDataSource ¶
type CloudConfluenceDataSource = shared.CloudConfluenceDataSource
This is an alias to an internal type.
type CloudConfluenceDataSourceParam ¶
type CloudConfluenceDataSourceParam = shared.CloudConfluenceDataSourceParam
This is an alias to an internal type.
type CloudDocument ¶
type CloudDocument struct {
ID string `json:"id" api:"required"`
Metadata map[string]any `json:"metadata" api:"required"`
Text string `json:"text" api:"required"`
ExcludedEmbedMetadataKeys []string `json:"excluded_embed_metadata_keys"`
ExcludedLlmMetadataKeys []string `json:"excluded_llm_metadata_keys"`
// indices in the CloudDocument.text where a new page begins. e.g. Second page
// starts at index specified by page_positions[1].
PagePositions []int64 `json:"page_positions" api:"nullable"`
StatusMetadata map[string]any `json:"status_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Metadata respjson.Field
Text respjson.Field
ExcludedEmbedMetadataKeys respjson.Field
ExcludedLlmMetadataKeys respjson.Field
PagePositions respjson.Field
StatusMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Cloud document stored in S3.
func (CloudDocument) RawJSON ¶
func (r CloudDocument) RawJSON() string
Returns the unmodified JSON received from the API
func (*CloudDocument) UnmarshalJSON ¶
func (r *CloudDocument) UnmarshalJSON(data []byte) error
type CloudDocumentCreateParam ¶
type CloudDocumentCreateParam struct {
Metadata map[string]any `json:"metadata,omitzero" api:"required"`
Text string `json:"text" api:"required"`
ID param.Opt[string] `json:"id,omitzero"`
// indices in the CloudDocument.text where a new page begins. e.g. Second page
// starts at index specified by page_positions[1].
PagePositions []int64 `json:"page_positions,omitzero"`
ExcludedEmbedMetadataKeys []string `json:"excluded_embed_metadata_keys,omitzero"`
ExcludedLlmMetadataKeys []string `json:"excluded_llm_metadata_keys,omitzero"`
// contains filtered or unexported fields
}
Create a new cloud document.
The properties Metadata, Text are required.
func (CloudDocumentCreateParam) MarshalJSON ¶
func (r CloudDocumentCreateParam) MarshalJSON() (data []byte, err error)
func (*CloudDocumentCreateParam) UnmarshalJSON ¶
func (r *CloudDocumentCreateParam) UnmarshalJSON(data []byte) error
type CloudGoogleDriveDataSource ¶
type CloudGoogleDriveDataSource = shared.CloudGoogleDriveDataSource
This is an alias to an internal type.
type CloudGoogleDriveDataSourceParam ¶
type CloudGoogleDriveDataSourceParam = shared.CloudGoogleDriveDataSourceParam
This is an alias to an internal type.
type CloudJiraDataSource ¶
type CloudJiraDataSource = shared.CloudJiraDataSource
Cloud Jira Data Source integrating JiraReader.
This is an alias to an internal type.
type CloudJiraDataSourceParam ¶
type CloudJiraDataSourceParam = shared.CloudJiraDataSourceParam
Cloud Jira Data Source integrating JiraReader.
This is an alias to an internal type.
type CloudJiraDataSourceV2 ¶
type CloudJiraDataSourceV2 = shared.CloudJiraDataSourceV2
Cloud Jira Data Source integrating JiraReaderV2.
This is an alias to an internal type.
type CloudJiraDataSourceV2APIVersion ¶
type CloudJiraDataSourceV2APIVersion = shared.CloudJiraDataSourceV2APIVersion
Jira REST API version to use (2 or 3). 3 supports Atlassian Document Format (ADF).
This is an alias to an internal type.
type CloudJiraDataSourceV2Param ¶
type CloudJiraDataSourceV2Param = shared.CloudJiraDataSourceV2Param
Cloud Jira Data Source integrating JiraReaderV2.
This is an alias to an internal type.
type CloudMilvusVectorStore ¶
type CloudMilvusVectorStore = shared.CloudMilvusVectorStore
Cloud Milvus Vector Store.
This is an alias to an internal type.
type CloudMilvusVectorStoreParam ¶
type CloudMilvusVectorStoreParam = shared.CloudMilvusVectorStoreParam
Cloud Milvus Vector Store.
This is an alias to an internal type.
type CloudMongoDBAtlasVectorSearch ¶
type CloudMongoDBAtlasVectorSearch = shared.CloudMongoDBAtlasVectorSearch
Cloud MongoDB Atlas Vector Store.
This class is used to store the configuration for a MongoDB Atlas vector store, so that it can be created and used in LlamaCloud.
Args: mongodb_uri (str): URI for connecting to MongoDB Atlas db_name (str): name of the MongoDB database collection_name (str): name of the MongoDB collection vector_index_name (str): name of the MongoDB Atlas vector index fulltext_index_name (str): name of the MongoDB Atlas full-text index
This is an alias to an internal type.
type CloudMongoDBAtlasVectorSearchParam ¶
type CloudMongoDBAtlasVectorSearchParam = shared.CloudMongoDBAtlasVectorSearchParam
Cloud MongoDB Atlas Vector Store.
This class is used to store the configuration for a MongoDB Atlas vector store, so that it can be created and used in LlamaCloud.
Args: mongodb_uri (str): URI for connecting to MongoDB Atlas db_name (str): name of the MongoDB database collection_name (str): name of the MongoDB collection vector_index_name (str): name of the MongoDB Atlas vector index fulltext_index_name (str): name of the MongoDB Atlas full-text index
This is an alias to an internal type.
type CloudNotionPageDataSource ¶
type CloudNotionPageDataSource = shared.CloudNotionPageDataSource
This is an alias to an internal type.
type CloudNotionPageDataSourceParam ¶
type CloudNotionPageDataSourceParam = shared.CloudNotionPageDataSourceParam
This is an alias to an internal type.
type CloudOneDriveDataSource ¶
type CloudOneDriveDataSource = shared.CloudOneDriveDataSource
This is an alias to an internal type.
type CloudOneDriveDataSourceParam ¶
type CloudOneDriveDataSourceParam = shared.CloudOneDriveDataSourceParam
This is an alias to an internal type.
type CloudPineconeVectorStore ¶
type CloudPineconeVectorStore = shared.CloudPineconeVectorStore
Cloud Pinecone Vector Store.
This class is used to store the configuration for a Pinecone vector store, so that it can be created and used in LlamaCloud.
Args: api_key (str): API key for authenticating with Pinecone index_name (str): name of the Pinecone index namespace (optional[str]): namespace to use in the Pinecone index insert_kwargs (optional[dict]): additional kwargs to pass during insertion
This is an alias to an internal type.
type CloudPineconeVectorStoreParam ¶
type CloudPineconeVectorStoreParam = shared.CloudPineconeVectorStoreParam
Cloud Pinecone Vector Store.
This class is used to store the configuration for a Pinecone vector store, so that it can be created and used in LlamaCloud.
Args: api_key (str): API key for authenticating with Pinecone index_name (str): name of the Pinecone index namespace (optional[str]): namespace to use in the Pinecone index insert_kwargs (optional[dict]): additional kwargs to pass during insertion
This is an alias to an internal type.
type CloudPostgresVectorStore ¶
type CloudPostgresVectorStore = shared.CloudPostgresVectorStore
This is an alias to an internal type.
type CloudPostgresVectorStoreParam ¶
type CloudPostgresVectorStoreParam = shared.CloudPostgresVectorStoreParam
This is an alias to an internal type.
type CloudQdrantVectorStore ¶
type CloudQdrantVectorStore = shared.CloudQdrantVectorStore
Cloud Qdrant Vector Store.
This class is used to store the configuration for a Qdrant vector store, so that it can be created and used in LlamaCloud.
Args: collection_name (str): name of the Qdrant collection url (str): url of the Qdrant instance api_key (str): API key for authenticating with Qdrant max_retries (int): maximum number of retries in case of a failure. Defaults to 3 client_kwargs (dict): additional kwargs to pass to the Qdrant client
This is an alias to an internal type.
type CloudQdrantVectorStoreParam ¶
type CloudQdrantVectorStoreParam = shared.CloudQdrantVectorStoreParam
Cloud Qdrant Vector Store.
This class is used to store the configuration for a Qdrant vector store, so that it can be created and used in LlamaCloud.
Args: collection_name (str): name of the Qdrant collection url (str): url of the Qdrant instance api_key (str): API key for authenticating with Qdrant max_retries (int): maximum number of retries in case of a failure. Defaults to 3 client_kwargs (dict): additional kwargs to pass to the Qdrant client
This is an alias to an internal type.
type CloudS3DataSource ¶
type CloudS3DataSource = shared.CloudS3DataSource
This is an alias to an internal type.
type CloudS3DataSourceParam ¶
type CloudS3DataSourceParam = shared.CloudS3DataSourceParam
This is an alias to an internal type.
type CloudSharepointDataSource ¶
type CloudSharepointDataSource = shared.CloudSharepointDataSource
This is an alias to an internal type.
type CloudSharepointDataSourceParam ¶
type CloudSharepointDataSourceParam = shared.CloudSharepointDataSourceParam
This is an alias to an internal type.
type CloudSlackDataSource ¶
type CloudSlackDataSource = shared.CloudSlackDataSource
This is an alias to an internal type.
type CloudSlackDataSourceParam ¶
type CloudSlackDataSourceParam = shared.CloudSlackDataSourceParam
This is an alias to an internal type.
type CodeItem ¶
type CodeItem struct {
// Markdown representation preserving formatting
Md string `json:"md" api:"required"`
// Code content
Value string `json:"value" api:"required"`
// List of bounding boxes
Bbox []BBox `json:"bbox" api:"nullable"`
// Programming language identifier
Language string `json:"language" api:"nullable"`
// Code block item type
//
// Any of "code".
Type CodeItemType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Md respjson.Field
Value respjson.Field
Bbox respjson.Field
Language respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*CodeItem) UnmarshalJSON ¶
type CodeItemType ¶
type CodeItemType string
Code block item type
const (
CodeItemTypeCode CodeItemType = "code"
)
type CohereEmbedding ¶
type CohereEmbedding struct {
// The Cohere API key.
APIKey string `json:"api_key" api:"required"`
ClassName string `json:"class_name"`
// The batch size for embedding calls.
EmbedBatchSize int64 `json:"embed_batch_size"`
// Embedding type. If not provided float embedding_type is used when needed.
EmbeddingType string `json:"embedding_type"`
// Model Input type. If not provided, search_document and search_query are used
// when needed.
InputType string `json:"input_type" api:"nullable"`
// The modelId of the Cohere model to use.
ModelName string `json:"model_name"`
// The number of workers to use for async embedding calls.
NumWorkers int64 `json:"num_workers" api:"nullable"`
// Truncation type - START/ END/ NONE
Truncate string `json:"truncate"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
APIKey respjson.Field
ClassName respjson.Field
EmbedBatchSize respjson.Field
EmbeddingType respjson.Field
InputType respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
Truncate respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CohereEmbedding) RawJSON ¶
func (r CohereEmbedding) RawJSON() string
Returns the unmodified JSON received from the API
func (CohereEmbedding) ToParam ¶
func (r CohereEmbedding) ToParam() CohereEmbeddingParam
ToParam converts this CohereEmbedding to a CohereEmbeddingParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with CohereEmbeddingParam.Overrides()
func (*CohereEmbedding) UnmarshalJSON ¶
func (r *CohereEmbedding) UnmarshalJSON(data []byte) error
type CohereEmbeddingConfig ¶
type CohereEmbeddingConfig struct {
// Configuration for the Cohere embedding model.
Component CohereEmbedding `json:"component"`
// Type of the embedding model.
//
// Any of "COHERE_EMBEDDING".
Type CohereEmbeddingConfigType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Component respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CohereEmbeddingConfig) RawJSON ¶
func (r CohereEmbeddingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (CohereEmbeddingConfig) ToParam ¶
func (r CohereEmbeddingConfig) ToParam() CohereEmbeddingConfigParam
ToParam converts this CohereEmbeddingConfig to a CohereEmbeddingConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with CohereEmbeddingConfigParam.Overrides()
func (*CohereEmbeddingConfig) UnmarshalJSON ¶
func (r *CohereEmbeddingConfig) UnmarshalJSON(data []byte) error
type CohereEmbeddingConfigParam ¶
type CohereEmbeddingConfigParam struct {
// Configuration for the Cohere embedding model.
Component CohereEmbeddingParam `json:"component,omitzero"`
// Type of the embedding model.
//
// Any of "COHERE_EMBEDDING".
Type CohereEmbeddingConfigType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (CohereEmbeddingConfigParam) MarshalJSON ¶
func (r CohereEmbeddingConfigParam) MarshalJSON() (data []byte, err error)
func (*CohereEmbeddingConfigParam) UnmarshalJSON ¶
func (r *CohereEmbeddingConfigParam) UnmarshalJSON(data []byte) error
type CohereEmbeddingConfigType ¶
type CohereEmbeddingConfigType string
Type of the embedding model.
const (
CohereEmbeddingConfigTypeCohereEmbedding CohereEmbeddingConfigType = "COHERE_EMBEDDING"
)
type CohereEmbeddingParam ¶
type CohereEmbeddingParam struct {
// The Cohere API key.
APIKey param.Opt[string] `json:"api_key,omitzero" api:"required"`
// Model Input type. If not provided, search_document and search_query are used
// when needed.
InputType param.Opt[string] `json:"input_type,omitzero"`
// The number of workers to use for async embedding calls.
NumWorkers param.Opt[int64] `json:"num_workers,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// The batch size for embedding calls.
EmbedBatchSize param.Opt[int64] `json:"embed_batch_size,omitzero"`
// Embedding type. If not provided float embedding_type is used when needed.
EmbeddingType param.Opt[string] `json:"embedding_type,omitzero"`
// The modelId of the Cohere model to use.
ModelName param.Opt[string] `json:"model_name,omitzero"`
// Truncation type - START/ END/ NONE
Truncate param.Opt[string] `json:"truncate,omitzero"`
// contains filtered or unexported fields
}
The property APIKey is required.
func (CohereEmbeddingParam) MarshalJSON ¶
func (r CohereEmbeddingParam) MarshalJSON() (data []byte, err error)
func (*CohereEmbeddingParam) UnmarshalJSON ¶
func (r *CohereEmbeddingParam) UnmarshalJSON(data []byte) error
type CompositeRetrievalMode ¶
type CompositeRetrievalMode string
Enum for the mode of composite retrieval.
const ( CompositeRetrievalModeRouting CompositeRetrievalMode = "routing" CompositeRetrievalModeFull CompositeRetrievalMode = "full" )
type CompositeRetrievalResult ¶
type CompositeRetrievalResult struct {
// The image nodes retrieved by the pipeline for the given query. Deprecated - will
// soon be replaced with 'page_screenshot_nodes'.
//
// Deprecated: deprecated
ImageNodes []PageScreenshotNodeWithScore `json:"image_nodes"`
// The retrieved nodes from the composite retrieval.
Nodes []CompositeRetrievalResultNode `json:"nodes"`
// The page figure nodes retrieved by the pipeline for the given query.
PageFigureNodes []PageFigureNodeWithScore `json:"page_figure_nodes"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ImageNodes respjson.Field
Nodes respjson.Field
PageFigureNodes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CompositeRetrievalResult) RawJSON ¶
func (r CompositeRetrievalResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompositeRetrievalResult) UnmarshalJSON ¶
func (r *CompositeRetrievalResult) UnmarshalJSON(data []byte) error
type CompositeRetrievalResultNode ¶
type CompositeRetrievalResultNode struct {
Node CompositeRetrievalResultNodeNode `json:"node" api:"required"`
ClassName string `json:"class_name"`
Score float64 `json:"score" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Node respjson.Field
ClassName respjson.Field
Score respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CompositeRetrievalResultNode) RawJSON ¶
func (r CompositeRetrievalResultNode) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompositeRetrievalResultNode) UnmarshalJSON ¶
func (r *CompositeRetrievalResultNode) UnmarshalJSON(data []byte) error
type CompositeRetrievalResultNodeNode ¶
type CompositeRetrievalResultNodeNode struct {
// The ID of the retrieved node.
ID string `json:"id" api:"required" format:"uuid"`
// The end character index of the retrieved node in the document
EndCharIdx int64 `json:"end_char_idx" api:"required"`
// The ID of the pipeline this node was retrieved from.
PipelineID string `json:"pipeline_id" api:"required" format:"uuid"`
// The ID of the retriever this node was retrieved from.
RetrieverID string `json:"retriever_id" api:"required" format:"uuid"`
// The name of the retrieval pipeline this node was retrieved from.
RetrieverPipelineName string `json:"retriever_pipeline_name" api:"required"`
// The start character index of the retrieved node in the document
StartCharIdx int64 `json:"start_char_idx" api:"required"`
// The text of the retrieved node.
Text string `json:"text" api:"required"`
// Metadata associated with the retrieved node.
Metadata map[string]any `json:"metadata"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
EndCharIdx respjson.Field
PipelineID respjson.Field
RetrieverID respjson.Field
RetrieverPipelineName respjson.Field
StartCharIdx respjson.Field
Text respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CompositeRetrievalResultNodeNode) RawJSON ¶
func (r CompositeRetrievalResultNodeNode) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompositeRetrievalResultNodeNode) UnmarshalJSON ¶
func (r *CompositeRetrievalResultNodeNode) UnmarshalJSON(data []byte) error
type ConfigurationCreate ¶
type ConfigurationCreate struct {
// Human-readable name for this configuration.
Name string `json:"name" api:"required"`
// Product-specific configuration parameters.
Parameters ConfigurationCreateParametersUnion `json:"parameters" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Parameters respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Request body for creating a product configuration.
func (ConfigurationCreate) RawJSON ¶
func (r ConfigurationCreate) RawJSON() string
Returns the unmodified JSON received from the API
func (ConfigurationCreate) ToParam ¶
func (r ConfigurationCreate) ToParam() ConfigurationCreateParam
ToParam converts this ConfigurationCreate to a ConfigurationCreateParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ConfigurationCreateParam.Overrides()
func (*ConfigurationCreate) UnmarshalJSON ¶
func (r *ConfigurationCreate) UnmarshalJSON(data []byte) error
type ConfigurationCreateParam ¶
type ConfigurationCreateParam struct {
// Human-readable name for this configuration.
Name string `json:"name" api:"required"`
// Product-specific configuration parameters.
Parameters ConfigurationCreateParametersUnionParam `json:"parameters,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request body for creating a product configuration.
The properties Name, Parameters are required.
func (ConfigurationCreateParam) MarshalJSON ¶
func (r ConfigurationCreateParam) MarshalJSON() (data []byte, err error)
func (*ConfigurationCreateParam) UnmarshalJSON ¶
func (r *ConfigurationCreateParam) UnmarshalJSON(data []byte) error
type ConfigurationCreateParametersSpreadsheetV1 ¶
type ConfigurationCreateParametersSpreadsheetV1 struct {
// Product type.
ProductType constant.SpreadsheetV1 `json:"product_type" default:"spreadsheet_v1"`
// A1 notation of the range to extract a single region from. If None, the entire
// sheet is used.
ExtractionRange string `json:"extraction_range" api:"nullable"`
// Return a flattened dataframe when a detected table is recognized as
// hierarchical.
FlattenHierarchicalTables bool `json:"flatten_hierarchical_tables"`
// Whether to generate additional metadata (title, description) for each extracted
// region.
GenerateAdditionalMetadata bool `json:"generate_additional_metadata"`
// Whether to include hidden cells when extracting regions from the spreadsheet.
IncludeHiddenCells bool `json:"include_hidden_cells"`
// The names of the sheets to extract regions from. If empty, all sheets will be
// processed.
SheetNames []string `json:"sheet_names" api:"nullable"`
// Optional specialization mode for domain-specific extraction. Supported values:
// 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None
// uses the general-purpose pipeline.
Specialization string `json:"specialization" api:"nullable"`
// Influences how likely similar-looking regions are merged into a single table.
// Useful for spreadsheets that either have sparse tables (strong merging) or many
// distinct tables close together (weak merging).
//
// Any of "strong", "weak".
TableMergeSensitivity string `json:"table_merge_sensitivity"`
// Enables experimental processing. Accuracy may be impacted.
UseExperimentalProcessing bool `json:"use_experimental_processing"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ProductType respjson.Field
ExtractionRange respjson.Field
FlattenHierarchicalTables respjson.Field
GenerateAdditionalMetadata respjson.Field
IncludeHiddenCells respjson.Field
SheetNames respjson.Field
Specialization respjson.Field
TableMergeSensitivity respjson.Field
UseExperimentalProcessing respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Typed parameters for a _spreadsheet v1_ product configuration.
func (ConfigurationCreateParametersSpreadsheetV1) RawJSON ¶
func (r ConfigurationCreateParametersSpreadsheetV1) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConfigurationCreateParametersSpreadsheetV1) UnmarshalJSON ¶
func (r *ConfigurationCreateParametersSpreadsheetV1) UnmarshalJSON(data []byte) error
type ConfigurationCreateParametersSpreadsheetV1Param ¶
type ConfigurationCreateParametersSpreadsheetV1Param struct {
// A1 notation of the range to extract a single region from. If None, the entire
// sheet is used.
ExtractionRange param.Opt[string] `json:"extraction_range,omitzero"`
// Optional specialization mode for domain-specific extraction. Supported values:
// 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None
// uses the general-purpose pipeline.
Specialization param.Opt[string] `json:"specialization,omitzero"`
// Return a flattened dataframe when a detected table is recognized as
// hierarchical.
FlattenHierarchicalTables param.Opt[bool] `json:"flatten_hierarchical_tables,omitzero"`
// Whether to generate additional metadata (title, description) for each extracted
// region.
GenerateAdditionalMetadata param.Opt[bool] `json:"generate_additional_metadata,omitzero"`
// Whether to include hidden cells when extracting regions from the spreadsheet.
IncludeHiddenCells param.Opt[bool] `json:"include_hidden_cells,omitzero"`
// Enables experimental processing. Accuracy may be impacted.
UseExperimentalProcessing param.Opt[bool] `json:"use_experimental_processing,omitzero"`
// The names of the sheets to extract regions from. If empty, all sheets will be
// processed.
SheetNames []string `json:"sheet_names,omitzero"`
// Influences how likely similar-looking regions are merged into a single table.
// Useful for spreadsheets that either have sparse tables (strong merging) or many
// distinct tables close together (weak merging).
//
// Any of "strong", "weak".
TableMergeSensitivity string `json:"table_merge_sensitivity,omitzero"`
// Product type.
//
// This field can be elided, and will marshal its zero value as "spreadsheet_v1".
ProductType constant.SpreadsheetV1 `json:"product_type" default:"spreadsheet_v1"`
// contains filtered or unexported fields
}
Typed parameters for a _spreadsheet v1_ product configuration.
The property ProductType is required.
func (ConfigurationCreateParametersSpreadsheetV1Param) MarshalJSON ¶
func (r ConfigurationCreateParametersSpreadsheetV1Param) MarshalJSON() (data []byte, err error)
func (*ConfigurationCreateParametersSpreadsheetV1Param) UnmarshalJSON ¶
func (r *ConfigurationCreateParametersSpreadsheetV1Param) UnmarshalJSON(data []byte) error
type ConfigurationCreateParametersUnion ¶
type ConfigurationCreateParametersUnion struct {
// This field is from variant [SplitV1ParametersResp].
Categories []SplitCategory `json:"categories"`
// Any of "split_v1", "extract_v2", "classify_v2", "parse_v2", "spreadsheet_v1",
// "unknown".
ProductType string `json:"product_type"`
// This field is from variant [SplitV1ParametersResp].
SplittingStrategy SplitV1ParametersSplittingStrategyResp `json:"splitting_strategy"`
// This field is from variant [ExtractV2ParametersResp].
DataSchema map[string]*ExtractV2ParametersDataSchemaUnionResp `json:"data_schema"`
// This field is from variant [ExtractV2ParametersResp].
CiteSources bool `json:"cite_sources"`
// This field is from variant [ExtractV2ParametersResp].
ConfidenceScores bool `json:"confidence_scores"`
// This field is from variant [ExtractV2ParametersResp].
ExtractionTarget ExtractV2ParametersExtractionTarget `json:"extraction_target"`
// This field is from variant [ExtractV2ParametersResp].
MaxPages int64 `json:"max_pages"`
// This field is from variant [ExtractV2ParametersResp].
ParseConfigID string `json:"parse_config_id"`
// This field is from variant [ExtractV2ParametersResp].
ParseTier string `json:"parse_tier"`
// This field is from variant [ExtractV2ParametersResp].
SystemPrompt string `json:"system_prompt"`
// This field is from variant [ExtractV2ParametersResp].
TargetPages string `json:"target_pages"`
Tier string `json:"tier"`
Version string `json:"version"`
// This field is from variant [ClassifyV2ParametersResp].
Rules []ClassifyV2ParametersRuleResp `json:"rules"`
// This field is from variant [ClassifyV2ParametersResp].
Mode ClassifyV2ParametersMode `json:"mode"`
// This field is from variant [ClassifyV2ParametersResp].
ParsingConfiguration ClassifyV2ParametersParsingConfigurationResp `json:"parsing_configuration"`
// This field is from variant [ParseV2ParametersResp].
AgenticOptions ParseV2ParametersAgenticOptionsResp `json:"agentic_options"`
// This field is from variant [ParseV2ParametersResp].
ClientName string `json:"client_name"`
// This field is from variant [ParseV2ParametersResp].
CropBox ParseV2ParametersCropBoxResp `json:"crop_box"`
// This field is from variant [ParseV2ParametersResp].
DisableCache bool `json:"disable_cache"`
// This field is from variant [ParseV2ParametersResp].
FastOptions any `json:"fast_options"`
// This field is from variant [ParseV2ParametersResp].
InputOptions ParseV2ParametersInputOptionsResp `json:"input_options"`
// This field is from variant [ParseV2ParametersResp].
OutputOptions ParseV2ParametersOutputOptionsResp `json:"output_options"`
// This field is from variant [ParseV2ParametersResp].
PageRanges ParseV2ParametersPageRangesResp `json:"page_ranges"`
// This field is from variant [ParseV2ParametersResp].
ProcessingControl ParseV2ParametersProcessingControlResp `json:"processing_control"`
// This field is from variant [ParseV2ParametersResp].
ProcessingOptions ParseV2ParametersProcessingOptionsResp `json:"processing_options"`
// This field is from variant [ParseV2ParametersResp].
WebhookConfigurations []ParseV2ParametersWebhookConfigurationResp `json:"webhook_configurations"`
// This field is from variant [ConfigurationCreateParametersSpreadsheetV1].
ExtractionRange string `json:"extraction_range"`
// This field is from variant [ConfigurationCreateParametersSpreadsheetV1].
FlattenHierarchicalTables bool `json:"flatten_hierarchical_tables"`
// This field is from variant [ConfigurationCreateParametersSpreadsheetV1].
GenerateAdditionalMetadata bool `json:"generate_additional_metadata"`
// This field is from variant [ConfigurationCreateParametersSpreadsheetV1].
IncludeHiddenCells bool `json:"include_hidden_cells"`
// This field is from variant [ConfigurationCreateParametersSpreadsheetV1].
SheetNames []string `json:"sheet_names"`
// This field is from variant [ConfigurationCreateParametersSpreadsheetV1].
Specialization string `json:"specialization"`
// This field is from variant [ConfigurationCreateParametersSpreadsheetV1].
TableMergeSensitivity string `json:"table_merge_sensitivity"`
// This field is from variant [ConfigurationCreateParametersSpreadsheetV1].
UseExperimentalProcessing bool `json:"use_experimental_processing"`
JSON struct {
Categories respjson.Field
ProductType respjson.Field
SplittingStrategy respjson.Field
DataSchema respjson.Field
CiteSources respjson.Field
ConfidenceScores respjson.Field
ExtractionTarget respjson.Field
MaxPages respjson.Field
ParseConfigID respjson.Field
ParseTier respjson.Field
SystemPrompt respjson.Field
TargetPages respjson.Field
Tier respjson.Field
Version respjson.Field
Rules respjson.Field
Mode respjson.Field
ParsingConfiguration respjson.Field
AgenticOptions respjson.Field
ClientName respjson.Field
CropBox respjson.Field
DisableCache respjson.Field
FastOptions respjson.Field
InputOptions respjson.Field
OutputOptions respjson.Field
PageRanges respjson.Field
ProcessingControl respjson.Field
ProcessingOptions respjson.Field
WebhookConfigurations respjson.Field
ExtractionRange respjson.Field
FlattenHierarchicalTables respjson.Field
GenerateAdditionalMetadata respjson.Field
IncludeHiddenCells respjson.Field
SheetNames respjson.Field
Specialization respjson.Field
TableMergeSensitivity respjson.Field
UseExperimentalProcessing respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ConfigurationCreateParametersUnion contains all possible properties and values from SplitV1ParametersResp, ExtractV2ParametersResp, ClassifyV2ParametersResp, ParseV2ParametersResp, ConfigurationCreateParametersSpreadsheetV1, UntypedParametersResp.
Use the ConfigurationCreateParametersUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ConfigurationCreateParametersUnion) AsAny ¶
func (u ConfigurationCreateParametersUnion) AsAny() anyConfigurationCreateParameters
Use the following switch statement to find the correct variant
switch variant := ConfigurationCreateParametersUnion.AsAny().(type) {
case llamacloudprod.SplitV1ParametersResp:
case llamacloudprod.ExtractV2ParametersResp:
case llamacloudprod.ClassifyV2ParametersResp:
case llamacloudprod.ParseV2ParametersResp:
case llamacloudprod.ConfigurationCreateParametersSpreadsheetV1:
case llamacloudprod.UntypedParametersResp:
default:
fmt.Errorf("no variant present")
}
func (ConfigurationCreateParametersUnion) AsClassifyV2 ¶
func (u ConfigurationCreateParametersUnion) AsClassifyV2() (v ClassifyV2ParametersResp)
func (ConfigurationCreateParametersUnion) AsExtractV2 ¶
func (u ConfigurationCreateParametersUnion) AsExtractV2() (v ExtractV2ParametersResp)
func (ConfigurationCreateParametersUnion) AsParseV2 ¶
func (u ConfigurationCreateParametersUnion) AsParseV2() (v ParseV2ParametersResp)
func (ConfigurationCreateParametersUnion) AsSplitV1 ¶
func (u ConfigurationCreateParametersUnion) AsSplitV1() (v SplitV1ParametersResp)
func (ConfigurationCreateParametersUnion) AsSpreadsheetV1 ¶
func (u ConfigurationCreateParametersUnion) AsSpreadsheetV1() (v ConfigurationCreateParametersSpreadsheetV1)
func (ConfigurationCreateParametersUnion) AsUnknown ¶
func (u ConfigurationCreateParametersUnion) AsUnknown() (v UntypedParametersResp)
func (ConfigurationCreateParametersUnion) RawJSON ¶
func (u ConfigurationCreateParametersUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConfigurationCreateParametersUnion) UnmarshalJSON ¶
func (r *ConfigurationCreateParametersUnion) UnmarshalJSON(data []byte) error
type ConfigurationCreateParametersUnionParam ¶
type ConfigurationCreateParametersUnionParam struct {
OfSplitV1 *SplitV1Parameters `json:",omitzero,inline"`
OfExtractV2 *ExtractV2Parameters `json:",omitzero,inline"`
OfClassifyV2 *ClassifyV2Parameters `json:",omitzero,inline"`
OfParseV2 *ParseV2Parameters `json:",omitzero,inline"`
OfSpreadsheetV1 *ConfigurationCreateParametersSpreadsheetV1Param `json:",omitzero,inline"`
OfUnknown *UntypedParameters `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ConfigurationCreateParametersUnionParam) MarshalJSON ¶
func (u ConfigurationCreateParametersUnionParam) MarshalJSON() ([]byte, error)
func (*ConfigurationCreateParametersUnionParam) UnmarshalJSON ¶
func (u *ConfigurationCreateParametersUnionParam) UnmarshalJSON(data []byte) error
type ConfigurationDeleteParams ¶
type ConfigurationDeleteParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ConfigurationDeleteParams) URLQuery ¶
func (r ConfigurationDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes ConfigurationDeleteParams's query parameters as `url.Values`.
type ConfigurationGetParams ¶
type ConfigurationGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ConfigurationGetParams) URLQuery ¶
func (r ConfigurationGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes ConfigurationGetParams's query parameters as `url.Values`.
type ConfigurationListParams ¶
type ConfigurationListParams struct {
// Filter by configuration name.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
// Number of items per page.
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
// Pagination token.
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Return only the latest version per configuration name.
LatestOnly param.Opt[bool] `query:"latest_only,omitzero" json:"-"`
// Filter by one or more product types. Repeat the parameter for multiple values.
//
// Any of "split_v1", "extract_v2", "classify_v2", "parse_v2", "spreadsheet_v1",
// "unknown".
ProductType []string `query:"product_type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ConfigurationListParams) URLQuery ¶
func (r ConfigurationListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ConfigurationListParams's query parameters as `url.Values`.
type ConfigurationNewParams ¶
type ConfigurationNewParams struct {
// Request body for creating a product configuration.
ConfigurationCreate ConfigurationCreateParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ConfigurationNewParams) MarshalJSON ¶
func (r ConfigurationNewParams) MarshalJSON() (data []byte, err error)
func (ConfigurationNewParams) URLQuery ¶
func (r ConfigurationNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes ConfigurationNewParams's query parameters as `url.Values`.
func (*ConfigurationNewParams) UnmarshalJSON ¶
func (r *ConfigurationNewParams) UnmarshalJSON(data []byte) error
type ConfigurationResponse ¶
type ConfigurationResponse struct {
// Unique configuration ID.
ID string `json:"id" api:"required"`
// Configuration name.
Name string `json:"name" api:"required"`
// Product-specific configuration parameters.
Parameters ConfigurationResponseParametersUnion `json:"parameters" api:"required"`
// Product type.
//
// Any of "split_v1", "extract_v2", "classify_v2", "parse_v2", "spreadsheet_v1",
// "unknown".
ProductType ConfigurationResponseProductType `json:"product_type" api:"required"`
// Version identifier (datetime string).
Version string `json:"version" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
Parameters respjson.Field
ProductType respjson.Field
Version respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response schema for a single product configuration.
func (ConfigurationResponse) RawJSON ¶
func (r ConfigurationResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConfigurationResponse) UnmarshalJSON ¶
func (r *ConfigurationResponse) UnmarshalJSON(data []byte) error
type ConfigurationResponseParametersSpreadsheetV1 ¶
type ConfigurationResponseParametersSpreadsheetV1 struct {
// Product type.
ProductType constant.SpreadsheetV1 `json:"product_type" default:"spreadsheet_v1"`
// A1 notation of the range to extract a single region from. If None, the entire
// sheet is used.
ExtractionRange string `json:"extraction_range" api:"nullable"`
// Return a flattened dataframe when a detected table is recognized as
// hierarchical.
FlattenHierarchicalTables bool `json:"flatten_hierarchical_tables"`
// Whether to generate additional metadata (title, description) for each extracted
// region.
GenerateAdditionalMetadata bool `json:"generate_additional_metadata"`
// Whether to include hidden cells when extracting regions from the spreadsheet.
IncludeHiddenCells bool `json:"include_hidden_cells"`
// The names of the sheets to extract regions from. If empty, all sheets will be
// processed.
SheetNames []string `json:"sheet_names" api:"nullable"`
// Optional specialization mode for domain-specific extraction. Supported values:
// 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None
// uses the general-purpose pipeline.
Specialization string `json:"specialization" api:"nullable"`
// Influences how likely similar-looking regions are merged into a single table.
// Useful for spreadsheets that either have sparse tables (strong merging) or many
// distinct tables close together (weak merging).
//
// Any of "strong", "weak".
TableMergeSensitivity string `json:"table_merge_sensitivity"`
// Enables experimental processing. Accuracy may be impacted.
UseExperimentalProcessing bool `json:"use_experimental_processing"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ProductType respjson.Field
ExtractionRange respjson.Field
FlattenHierarchicalTables respjson.Field
GenerateAdditionalMetadata respjson.Field
IncludeHiddenCells respjson.Field
SheetNames respjson.Field
Specialization respjson.Field
TableMergeSensitivity respjson.Field
UseExperimentalProcessing respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Typed parameters for a _spreadsheet v1_ product configuration.
func (ConfigurationResponseParametersSpreadsheetV1) RawJSON ¶
func (r ConfigurationResponseParametersSpreadsheetV1) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConfigurationResponseParametersSpreadsheetV1) UnmarshalJSON ¶
func (r *ConfigurationResponseParametersSpreadsheetV1) UnmarshalJSON(data []byte) error
type ConfigurationResponseParametersUnion ¶
type ConfigurationResponseParametersUnion struct {
// This field is from variant [SplitV1ParametersResp].
Categories []SplitCategory `json:"categories"`
// Any of "split_v1", "extract_v2", "classify_v2", "parse_v2", "spreadsheet_v1",
// "unknown".
ProductType string `json:"product_type"`
// This field is from variant [SplitV1ParametersResp].
SplittingStrategy SplitV1ParametersSplittingStrategyResp `json:"splitting_strategy"`
// This field is from variant [ExtractV2ParametersResp].
DataSchema map[string]*ExtractV2ParametersDataSchemaUnionResp `json:"data_schema"`
// This field is from variant [ExtractV2ParametersResp].
CiteSources bool `json:"cite_sources"`
// This field is from variant [ExtractV2ParametersResp].
ConfidenceScores bool `json:"confidence_scores"`
// This field is from variant [ExtractV2ParametersResp].
ExtractionTarget ExtractV2ParametersExtractionTarget `json:"extraction_target"`
// This field is from variant [ExtractV2ParametersResp].
MaxPages int64 `json:"max_pages"`
// This field is from variant [ExtractV2ParametersResp].
ParseConfigID string `json:"parse_config_id"`
// This field is from variant [ExtractV2ParametersResp].
ParseTier string `json:"parse_tier"`
// This field is from variant [ExtractV2ParametersResp].
SystemPrompt string `json:"system_prompt"`
// This field is from variant [ExtractV2ParametersResp].
TargetPages string `json:"target_pages"`
Tier string `json:"tier"`
Version string `json:"version"`
// This field is from variant [ClassifyV2ParametersResp].
Rules []ClassifyV2ParametersRuleResp `json:"rules"`
// This field is from variant [ClassifyV2ParametersResp].
Mode ClassifyV2ParametersMode `json:"mode"`
// This field is from variant [ClassifyV2ParametersResp].
ParsingConfiguration ClassifyV2ParametersParsingConfigurationResp `json:"parsing_configuration"`
// This field is from variant [ParseV2ParametersResp].
AgenticOptions ParseV2ParametersAgenticOptionsResp `json:"agentic_options"`
// This field is from variant [ParseV2ParametersResp].
ClientName string `json:"client_name"`
// This field is from variant [ParseV2ParametersResp].
CropBox ParseV2ParametersCropBoxResp `json:"crop_box"`
// This field is from variant [ParseV2ParametersResp].
DisableCache bool `json:"disable_cache"`
// This field is from variant [ParseV2ParametersResp].
FastOptions any `json:"fast_options"`
// This field is from variant [ParseV2ParametersResp].
InputOptions ParseV2ParametersInputOptionsResp `json:"input_options"`
// This field is from variant [ParseV2ParametersResp].
OutputOptions ParseV2ParametersOutputOptionsResp `json:"output_options"`
// This field is from variant [ParseV2ParametersResp].
PageRanges ParseV2ParametersPageRangesResp `json:"page_ranges"`
// This field is from variant [ParseV2ParametersResp].
ProcessingControl ParseV2ParametersProcessingControlResp `json:"processing_control"`
// This field is from variant [ParseV2ParametersResp].
ProcessingOptions ParseV2ParametersProcessingOptionsResp `json:"processing_options"`
// This field is from variant [ParseV2ParametersResp].
WebhookConfigurations []ParseV2ParametersWebhookConfigurationResp `json:"webhook_configurations"`
// This field is from variant [ConfigurationResponseParametersSpreadsheetV1].
ExtractionRange string `json:"extraction_range"`
// This field is from variant [ConfigurationResponseParametersSpreadsheetV1].
FlattenHierarchicalTables bool `json:"flatten_hierarchical_tables"`
// This field is from variant [ConfigurationResponseParametersSpreadsheetV1].
GenerateAdditionalMetadata bool `json:"generate_additional_metadata"`
// This field is from variant [ConfigurationResponseParametersSpreadsheetV1].
IncludeHiddenCells bool `json:"include_hidden_cells"`
// This field is from variant [ConfigurationResponseParametersSpreadsheetV1].
SheetNames []string `json:"sheet_names"`
// This field is from variant [ConfigurationResponseParametersSpreadsheetV1].
Specialization string `json:"specialization"`
// This field is from variant [ConfigurationResponseParametersSpreadsheetV1].
TableMergeSensitivity string `json:"table_merge_sensitivity"`
// This field is from variant [ConfigurationResponseParametersSpreadsheetV1].
UseExperimentalProcessing bool `json:"use_experimental_processing"`
JSON struct {
Categories respjson.Field
ProductType respjson.Field
SplittingStrategy respjson.Field
DataSchema respjson.Field
CiteSources respjson.Field
ConfidenceScores respjson.Field
ExtractionTarget respjson.Field
MaxPages respjson.Field
ParseConfigID respjson.Field
ParseTier respjson.Field
SystemPrompt respjson.Field
TargetPages respjson.Field
Tier respjson.Field
Version respjson.Field
Rules respjson.Field
Mode respjson.Field
ParsingConfiguration respjson.Field
AgenticOptions respjson.Field
ClientName respjson.Field
CropBox respjson.Field
DisableCache respjson.Field
FastOptions respjson.Field
InputOptions respjson.Field
OutputOptions respjson.Field
PageRanges respjson.Field
ProcessingControl respjson.Field
ProcessingOptions respjson.Field
WebhookConfigurations respjson.Field
ExtractionRange respjson.Field
FlattenHierarchicalTables respjson.Field
GenerateAdditionalMetadata respjson.Field
IncludeHiddenCells respjson.Field
SheetNames respjson.Field
Specialization respjson.Field
TableMergeSensitivity respjson.Field
UseExperimentalProcessing respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ConfigurationResponseParametersUnion contains all possible properties and values from SplitV1ParametersResp, ExtractV2ParametersResp, ClassifyV2ParametersResp, ParseV2ParametersResp, ConfigurationResponseParametersSpreadsheetV1, UntypedParametersResp.
Use the ConfigurationResponseParametersUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ConfigurationResponseParametersUnion) AsAny ¶
func (u ConfigurationResponseParametersUnion) AsAny() anyConfigurationResponseParameters
Use the following switch statement to find the correct variant
switch variant := ConfigurationResponseParametersUnion.AsAny().(type) {
case llamacloudprod.SplitV1ParametersResp:
case llamacloudprod.ExtractV2ParametersResp:
case llamacloudprod.ClassifyV2ParametersResp:
case llamacloudprod.ParseV2ParametersResp:
case llamacloudprod.ConfigurationResponseParametersSpreadsheetV1:
case llamacloudprod.UntypedParametersResp:
default:
fmt.Errorf("no variant present")
}
func (ConfigurationResponseParametersUnion) AsClassifyV2 ¶
func (u ConfigurationResponseParametersUnion) AsClassifyV2() (v ClassifyV2ParametersResp)
func (ConfigurationResponseParametersUnion) AsExtractV2 ¶
func (u ConfigurationResponseParametersUnion) AsExtractV2() (v ExtractV2ParametersResp)
func (ConfigurationResponseParametersUnion) AsParseV2 ¶
func (u ConfigurationResponseParametersUnion) AsParseV2() (v ParseV2ParametersResp)
func (ConfigurationResponseParametersUnion) AsSplitV1 ¶
func (u ConfigurationResponseParametersUnion) AsSplitV1() (v SplitV1ParametersResp)
func (ConfigurationResponseParametersUnion) AsSpreadsheetV1 ¶
func (u ConfigurationResponseParametersUnion) AsSpreadsheetV1() (v ConfigurationResponseParametersSpreadsheetV1)
func (ConfigurationResponseParametersUnion) AsUnknown ¶
func (u ConfigurationResponseParametersUnion) AsUnknown() (v UntypedParametersResp)
func (ConfigurationResponseParametersUnion) RawJSON ¶
func (u ConfigurationResponseParametersUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConfigurationResponseParametersUnion) UnmarshalJSON ¶
func (r *ConfigurationResponseParametersUnion) UnmarshalJSON(data []byte) error
type ConfigurationResponseProductType ¶
type ConfigurationResponseProductType string
Product type.
const ( ConfigurationResponseProductTypeSplitV1 ConfigurationResponseProductType = "split_v1" ConfigurationResponseProductTypeExtractV2 ConfigurationResponseProductType = "extract_v2" ConfigurationResponseProductTypeClassifyV2 ConfigurationResponseProductType = "classify_v2" ConfigurationResponseProductTypeParseV2 ConfigurationResponseProductType = "parse_v2" ConfigurationResponseProductTypeSpreadsheetV1 ConfigurationResponseProductType = "spreadsheet_v1" ConfigurationResponseProductTypeUnknown ConfigurationResponseProductType = "unknown" )
type ConfigurationService ¶
type ConfigurationService struct {
// contains filtered or unexported fields
}
ConfigurationService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConfigurationService method instead.
func NewConfigurationService ¶
func NewConfigurationService(opts ...option.RequestOption) (r ConfigurationService)
NewConfigurationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConfigurationService) Delete ¶
func (r *ConfigurationService) Delete(ctx context.Context, configID string, body ConfigurationDeleteParams, opts ...option.RequestOption) (err error)
Delete a product configuration.
func (*ConfigurationService) Get ¶
func (r *ConfigurationService) Get(ctx context.Context, configID string, query ConfigurationGetParams, opts ...option.RequestOption) (res *ConfigurationResponse, err error)
Get a single product configuration by ID.
func (*ConfigurationService) List ¶
func (r *ConfigurationService) List(ctx context.Context, query ConfigurationListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[ConfigurationResponse], err error)
List product configurations for the current project.
func (*ConfigurationService) ListAutoPaging ¶
func (r *ConfigurationService) ListAutoPaging(ctx context.Context, query ConfigurationListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[ConfigurationResponse]
List product configurations for the current project.
func (*ConfigurationService) New ¶
func (r *ConfigurationService) New(ctx context.Context, params ConfigurationNewParams, opts ...option.RequestOption) (res *ConfigurationResponse, err error)
Upsert a product configuration; updates if one with the same name + product type + project exists, otherwise creates.
func (*ConfigurationService) Update ¶
func (r *ConfigurationService) Update(ctx context.Context, configID string, params ConfigurationUpdateParams, opts ...option.RequestOption) (res *ConfigurationResponse, err error)
Update an existing product configuration.
type ConfigurationUpdateParams ¶
type ConfigurationUpdateParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Updated name (omit to leave unchanged).
Name param.Opt[string] `json:"name,omitzero"`
// Updated parameters (omit to leave unchanged).
Parameters ConfigurationUpdateParamsParametersUnion `json:"parameters,omitzero"`
// contains filtered or unexported fields
}
func (ConfigurationUpdateParams) MarshalJSON ¶
func (r ConfigurationUpdateParams) MarshalJSON() (data []byte, err error)
func (ConfigurationUpdateParams) URLQuery ¶
func (r ConfigurationUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes ConfigurationUpdateParams's query parameters as `url.Values`.
func (*ConfigurationUpdateParams) UnmarshalJSON ¶
func (r *ConfigurationUpdateParams) UnmarshalJSON(data []byte) error
type ConfigurationUpdateParamsParametersSpreadsheetV1 ¶
type ConfigurationUpdateParamsParametersSpreadsheetV1 struct {
// A1 notation of the range to extract a single region from. If None, the entire
// sheet is used.
ExtractionRange param.Opt[string] `json:"extraction_range,omitzero"`
// Optional specialization mode for domain-specific extraction. Supported values:
// 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None
// uses the general-purpose pipeline.
Specialization param.Opt[string] `json:"specialization,omitzero"`
// Return a flattened dataframe when a detected table is recognized as
// hierarchical.
FlattenHierarchicalTables param.Opt[bool] `json:"flatten_hierarchical_tables,omitzero"`
// Whether to generate additional metadata (title, description) for each extracted
// region.
GenerateAdditionalMetadata param.Opt[bool] `json:"generate_additional_metadata,omitzero"`
// Whether to include hidden cells when extracting regions from the spreadsheet.
IncludeHiddenCells param.Opt[bool] `json:"include_hidden_cells,omitzero"`
// Enables experimental processing. Accuracy may be impacted.
UseExperimentalProcessing param.Opt[bool] `json:"use_experimental_processing,omitzero"`
// The names of the sheets to extract regions from. If empty, all sheets will be
// processed.
SheetNames []string `json:"sheet_names,omitzero"`
// Influences how likely similar-looking regions are merged into a single table.
// Useful for spreadsheets that either have sparse tables (strong merging) or many
// distinct tables close together (weak merging).
//
// Any of "strong", "weak".
TableMergeSensitivity string `json:"table_merge_sensitivity,omitzero"`
// Product type.
//
// This field can be elided, and will marshal its zero value as "spreadsheet_v1".
ProductType constant.SpreadsheetV1 `json:"product_type" default:"spreadsheet_v1"`
// contains filtered or unexported fields
}
Typed parameters for a _spreadsheet v1_ product configuration.
The property ProductType is required.
func (ConfigurationUpdateParamsParametersSpreadsheetV1) MarshalJSON ¶
func (r ConfigurationUpdateParamsParametersSpreadsheetV1) MarshalJSON() (data []byte, err error)
func (*ConfigurationUpdateParamsParametersSpreadsheetV1) UnmarshalJSON ¶
func (r *ConfigurationUpdateParamsParametersSpreadsheetV1) UnmarshalJSON(data []byte) error
type ConfigurationUpdateParamsParametersUnion ¶
type ConfigurationUpdateParamsParametersUnion struct {
OfSplitV1 *SplitV1Parameters `json:",omitzero,inline"`
OfExtractV2 *ExtractV2Parameters `json:",omitzero,inline"`
OfClassifyV2 *ClassifyV2Parameters `json:",omitzero,inline"`
OfParseV2 *ParseV2Parameters `json:",omitzero,inline"`
OfSpreadsheetV1 *ConfigurationUpdateParamsParametersSpreadsheetV1 `json:",omitzero,inline"`
OfUnknown *UntypedParameters `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ConfigurationUpdateParamsParametersUnion) MarshalJSON ¶
func (u ConfigurationUpdateParamsParametersUnion) MarshalJSON() ([]byte, error)
func (*ConfigurationUpdateParamsParametersUnion) UnmarshalJSON ¶
func (u *ConfigurationUpdateParamsParametersUnion) UnmarshalJSON(data []byte) error
type DataSink ¶
type DataSink struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// Component that implements the data sink
Component DataSinkComponentUnion `json:"component" api:"required"`
// The name of the data sink.
Name string `json:"name" api:"required"`
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Any of "PINECONE", "POSTGRES", "QDRANT", "AZUREAI_SEARCH", "MONGODB_ATLAS",
// "MILVUS", "ASTRA_DB".
SinkType DataSinkSinkType `json:"sink_type" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Component respjson.Field
Name respjson.Field
ProjectID respjson.Field
SinkType respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for a data sink.
func (*DataSink) UnmarshalJSON ¶
type DataSinkComponentUnion ¶
type DataSinkComponentUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfDataSinkComponentMapItem any `json:",inline"`
APIKey string `json:"api_key"`
IndexName string `json:"index_name"`
ClassName string `json:"class_name"`
// This field is from variant [shared.CloudPineconeVectorStore].
InsertKwargs map[string]any `json:"insert_kwargs"`
// This field is from variant [shared.CloudPineconeVectorStore].
Namespace string `json:"namespace"`
SupportsNestedMetadataFilters bool `json:"supports_nested_metadata_filters"`
// This field is from variant [shared.CloudPostgresVectorStore].
Database string `json:"database"`
// This field is from variant [shared.CloudPostgresVectorStore].
EmbedDim int64 `json:"embed_dim"`
// This field is from variant [shared.CloudPostgresVectorStore].
Host string `json:"host"`
// This field is from variant [shared.CloudPostgresVectorStore].
Password string `json:"password"`
// This field is from variant [shared.CloudPostgresVectorStore].
Port int64 `json:"port"`
// This field is from variant [shared.CloudPostgresVectorStore].
SchemaName string `json:"schema_name"`
// This field is from variant [shared.CloudPostgresVectorStore].
TableName string `json:"table_name"`
// This field is from variant [shared.CloudPostgresVectorStore].
User string `json:"user"`
// This field is from variant [shared.CloudPostgresVectorStore].
HnswSettings shared.PgVectorHnswSettings `json:"hnsw_settings"`
// This field is from variant [shared.CloudPostgresVectorStore].
HybridSearch bool `json:"hybrid_search"`
// This field is from variant [shared.CloudPostgresVectorStore].
PerformSetup bool `json:"perform_setup"`
CollectionName string `json:"collection_name"`
// This field is from variant [shared.CloudQdrantVectorStore].
URL string `json:"url"`
// This field is from variant [shared.CloudQdrantVectorStore].
ClientKwargs map[string]any `json:"client_kwargs"`
// This field is from variant [shared.CloudQdrantVectorStore].
MaxRetries int64 `json:"max_retries"`
// This field is from variant [shared.CloudAzureAISearchVectorStore].
SearchServiceAPIKey string `json:"search_service_api_key"`
// This field is from variant [shared.CloudAzureAISearchVectorStore].
SearchServiceEndpoint string `json:"search_service_endpoint"`
// This field is from variant [shared.CloudAzureAISearchVectorStore].
ClientID string `json:"client_id"`
// This field is from variant [shared.CloudAzureAISearchVectorStore].
ClientSecret string `json:"client_secret"`
EmbeddingDimension int64 `json:"embedding_dimension"`
// This field is from variant [shared.CloudAzureAISearchVectorStore].
FilterableMetadataFieldKeys map[string]any `json:"filterable_metadata_field_keys"`
// This field is from variant [shared.CloudAzureAISearchVectorStore].
SearchServiceAPIVersion string `json:"search_service_api_version"`
// This field is from variant [shared.CloudAzureAISearchVectorStore].
TenantID string `json:"tenant_id"`
// This field is from variant [shared.CloudMongoDBAtlasVectorSearch].
DBName string `json:"db_name"`
// This field is from variant [shared.CloudMongoDBAtlasVectorSearch].
MongoDBUri string `json:"mongodb_uri"`
// This field is from variant [shared.CloudMongoDBAtlasVectorSearch].
FulltextIndexName string `json:"fulltext_index_name"`
// This field is from variant [shared.CloudMongoDBAtlasVectorSearch].
VectorIndexName string `json:"vector_index_name"`
// This field is from variant [shared.CloudMilvusVectorStore].
Uri string `json:"uri"`
Token string `json:"token"`
// This field is from variant [shared.CloudAstraDBVectorStore].
APIEndpoint string `json:"api_endpoint"`
// This field is from variant [shared.CloudAstraDBVectorStore].
Keyspace string `json:"keyspace"`
JSON struct {
OfDataSinkComponentMapItem respjson.Field
APIKey respjson.Field
IndexName respjson.Field
ClassName respjson.Field
InsertKwargs respjson.Field
Namespace respjson.Field
SupportsNestedMetadataFilters respjson.Field
Database respjson.Field
EmbedDim respjson.Field
Host respjson.Field
Password respjson.Field
Port respjson.Field
SchemaName respjson.Field
TableName respjson.Field
User respjson.Field
HnswSettings respjson.Field
HybridSearch respjson.Field
PerformSetup respjson.Field
CollectionName respjson.Field
URL respjson.Field
ClientKwargs respjson.Field
MaxRetries respjson.Field
SearchServiceAPIKey respjson.Field
SearchServiceEndpoint respjson.Field
ClientID respjson.Field
ClientSecret respjson.Field
EmbeddingDimension respjson.Field
FilterableMetadataFieldKeys respjson.Field
SearchServiceAPIVersion respjson.Field
TenantID respjson.Field
DBName respjson.Field
MongoDBUri respjson.Field
FulltextIndexName respjson.Field
VectorIndexName respjson.Field
Uri respjson.Field
Token respjson.Field
APIEndpoint respjson.Field
Keyspace respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
DataSinkComponentUnion contains all possible properties and values from [map[string]any], shared.CloudPineconeVectorStore, shared.CloudPostgresVectorStore, shared.CloudQdrantVectorStore, shared.CloudAzureAISearchVectorStore, shared.CloudMongoDBAtlasVectorSearch, shared.CloudMilvusVectorStore, shared.CloudAstraDBVectorStore.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfDataSinkComponentMapItem]
func (DataSinkComponentUnion) AsAnyMap ¶
func (u DataSinkComponentUnion) AsAnyMap() (v map[string]any)
func (DataSinkComponentUnion) AsCloudAstraDBVectorStore ¶
func (u DataSinkComponentUnion) AsCloudAstraDBVectorStore() (v shared.CloudAstraDBVectorStore)
func (DataSinkComponentUnion) AsCloudAzureAISearchVectorStore ¶
func (u DataSinkComponentUnion) AsCloudAzureAISearchVectorStore() (v shared.CloudAzureAISearchVectorStore)
func (DataSinkComponentUnion) AsCloudMilvusVectorStore ¶
func (u DataSinkComponentUnion) AsCloudMilvusVectorStore() (v shared.CloudMilvusVectorStore)
func (DataSinkComponentUnion) AsCloudMongoDBAtlasVectorSearch ¶
func (u DataSinkComponentUnion) AsCloudMongoDBAtlasVectorSearch() (v shared.CloudMongoDBAtlasVectorSearch)
func (DataSinkComponentUnion) AsCloudPineconeVectorStore ¶
func (u DataSinkComponentUnion) AsCloudPineconeVectorStore() (v shared.CloudPineconeVectorStore)
func (DataSinkComponentUnion) AsCloudPostgresVectorStore ¶
func (u DataSinkComponentUnion) AsCloudPostgresVectorStore() (v shared.CloudPostgresVectorStore)
func (DataSinkComponentUnion) AsCloudQdrantVectorStore ¶
func (u DataSinkComponentUnion) AsCloudQdrantVectorStore() (v shared.CloudQdrantVectorStore)
func (DataSinkComponentUnion) RawJSON ¶
func (u DataSinkComponentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DataSinkComponentUnion) UnmarshalJSON ¶
func (r *DataSinkComponentUnion) UnmarshalJSON(data []byte) error
type DataSinkCreateComponentUnionParam ¶
type DataSinkCreateComponentUnionParam struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfCloudPineconeVectorStore *shared.CloudPineconeVectorStoreParam `json:",omitzero,inline"`
OfCloudPostgresVectorStore *shared.CloudPostgresVectorStoreParam `json:",omitzero,inline"`
OfCloudQdrantVectorStore *shared.CloudQdrantVectorStoreParam `json:",omitzero,inline"`
OfCloudAzureAISearchVectorStore *shared.CloudAzureAISearchVectorStoreParam `json:",omitzero,inline"`
OfCloudMongoDBAtlasVectorSearch *shared.CloudMongoDBAtlasVectorSearchParam `json:",omitzero,inline"`
OfCloudMilvusVectorStore *shared.CloudMilvusVectorStoreParam `json:",omitzero,inline"`
OfCloudAstraDBVectorStore *shared.CloudAstraDBVectorStoreParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DataSinkCreateComponentUnionParam) MarshalJSON ¶
func (u DataSinkCreateComponentUnionParam) MarshalJSON() ([]byte, error)
func (*DataSinkCreateComponentUnionParam) UnmarshalJSON ¶
func (u *DataSinkCreateComponentUnionParam) UnmarshalJSON(data []byte) error
type DataSinkCreateParam ¶
type DataSinkCreateParam struct {
// Component that implements the data sink
Component DataSinkCreateComponentUnionParam `json:"component,omitzero" api:"required"`
// The name of the data sink.
Name string `json:"name" api:"required"`
// Any of "PINECONE", "POSTGRES", "QDRANT", "AZUREAI_SEARCH", "MONGODB_ATLAS",
// "MILVUS", "ASTRA_DB".
SinkType DataSinkCreateSinkType `json:"sink_type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Schema for creating a data sink.
The properties Component, Name, SinkType are required.
func (DataSinkCreateParam) MarshalJSON ¶
func (r DataSinkCreateParam) MarshalJSON() (data []byte, err error)
func (*DataSinkCreateParam) UnmarshalJSON ¶
func (r *DataSinkCreateParam) UnmarshalJSON(data []byte) error
type DataSinkCreateSinkType ¶
type DataSinkCreateSinkType string
const ( DataSinkCreateSinkTypePinecone DataSinkCreateSinkType = "PINECONE" DataSinkCreateSinkTypePostgres DataSinkCreateSinkType = "POSTGRES" DataSinkCreateSinkTypeQdrant DataSinkCreateSinkType = "QDRANT" DataSinkCreateSinkTypeAzureaiSearch DataSinkCreateSinkType = "AZUREAI_SEARCH" DataSinkCreateSinkTypeMongoDBAtlas DataSinkCreateSinkType = "MONGODB_ATLAS" DataSinkCreateSinkTypeMilvus DataSinkCreateSinkType = "MILVUS" DataSinkCreateSinkTypeAstraDB DataSinkCreateSinkType = "ASTRA_DB" )
type DataSinkListParams ¶
type DataSinkListParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (DataSinkListParams) URLQuery ¶
func (r DataSinkListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DataSinkListParams's query parameters as `url.Values`.
type DataSinkNewParams ¶
type DataSinkNewParams struct {
// Schema for creating a data sink.
DataSinkCreate DataSinkCreateParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (DataSinkNewParams) MarshalJSON ¶
func (r DataSinkNewParams) MarshalJSON() (data []byte, err error)
func (DataSinkNewParams) URLQuery ¶
func (r DataSinkNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes DataSinkNewParams's query parameters as `url.Values`.
func (*DataSinkNewParams) UnmarshalJSON ¶
func (r *DataSinkNewParams) UnmarshalJSON(data []byte) error
type DataSinkService ¶
type DataSinkService struct {
// contains filtered or unexported fields
}
DataSinkService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDataSinkService method instead.
func NewDataSinkService ¶
func NewDataSinkService(opts ...option.RequestOption) (r DataSinkService)
NewDataSinkService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DataSinkService) Delete ¶
func (r *DataSinkService) Delete(ctx context.Context, dataSinkID string, opts ...option.RequestOption) (err error)
Delete a data sink by ID.
func (*DataSinkService) Get ¶
func (r *DataSinkService) Get(ctx context.Context, dataSinkID string, opts ...option.RequestOption) (res *DataSink, err error)
Get a data sink by ID.
func (*DataSinkService) List ¶
func (r *DataSinkService) List(ctx context.Context, query DataSinkListParams, opts ...option.RequestOption) (res *[]DataSink, err error)
List data sinks for a given project.
func (*DataSinkService) New ¶
func (r *DataSinkService) New(ctx context.Context, params DataSinkNewParams, opts ...option.RequestOption) (res *DataSink, err error)
Create a new data sink.
func (*DataSinkService) Update ¶
func (r *DataSinkService) Update(ctx context.Context, dataSinkID string, body DataSinkUpdateParams, opts ...option.RequestOption) (res *DataSink, err error)
Update a data sink by ID.
type DataSinkSinkType ¶
type DataSinkSinkType string
const ( DataSinkSinkTypePinecone DataSinkSinkType = "PINECONE" DataSinkSinkTypePostgres DataSinkSinkType = "POSTGRES" DataSinkSinkTypeQdrant DataSinkSinkType = "QDRANT" DataSinkSinkTypeAzureaiSearch DataSinkSinkType = "AZUREAI_SEARCH" DataSinkSinkTypeMongoDBAtlas DataSinkSinkType = "MONGODB_ATLAS" DataSinkSinkTypeMilvus DataSinkSinkType = "MILVUS" DataSinkSinkTypeAstraDB DataSinkSinkType = "ASTRA_DB" )
type DataSinkUpdateParams ¶
type DataSinkUpdateParams struct {
// Any of "PINECONE", "POSTGRES", "QDRANT", "AZUREAI_SEARCH", "MONGODB_ATLAS",
// "MILVUS", "ASTRA_DB".
SinkType DataSinkUpdateParamsSinkType `json:"sink_type,omitzero" api:"required"`
// The name of the data sink.
Name param.Opt[string] `json:"name,omitzero"`
// Component that implements the data sink
Component DataSinkUpdateParamsComponentUnion `json:"component,omitzero"`
// contains filtered or unexported fields
}
func (DataSinkUpdateParams) MarshalJSON ¶
func (r DataSinkUpdateParams) MarshalJSON() (data []byte, err error)
func (*DataSinkUpdateParams) UnmarshalJSON ¶
func (r *DataSinkUpdateParams) UnmarshalJSON(data []byte) error
type DataSinkUpdateParamsComponentUnion ¶
type DataSinkUpdateParamsComponentUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfCloudPineconeVectorStore *shared.CloudPineconeVectorStoreParam `json:",omitzero,inline"`
OfCloudPostgresVectorStore *shared.CloudPostgresVectorStoreParam `json:",omitzero,inline"`
OfCloudQdrantVectorStore *shared.CloudQdrantVectorStoreParam `json:",omitzero,inline"`
OfCloudAzureAISearchVectorStore *shared.CloudAzureAISearchVectorStoreParam `json:",omitzero,inline"`
OfCloudMongoDBAtlasVectorSearch *shared.CloudMongoDBAtlasVectorSearchParam `json:",omitzero,inline"`
OfCloudMilvusVectorStore *shared.CloudMilvusVectorStoreParam `json:",omitzero,inline"`
OfCloudAstraDBVectorStore *shared.CloudAstraDBVectorStoreParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DataSinkUpdateParamsComponentUnion) MarshalJSON ¶
func (u DataSinkUpdateParamsComponentUnion) MarshalJSON() ([]byte, error)
func (*DataSinkUpdateParamsComponentUnion) UnmarshalJSON ¶
func (u *DataSinkUpdateParamsComponentUnion) UnmarshalJSON(data []byte) error
type DataSinkUpdateParamsSinkType ¶
type DataSinkUpdateParamsSinkType string
const ( DataSinkUpdateParamsSinkTypePinecone DataSinkUpdateParamsSinkType = "PINECONE" DataSinkUpdateParamsSinkTypePostgres DataSinkUpdateParamsSinkType = "POSTGRES" DataSinkUpdateParamsSinkTypeQdrant DataSinkUpdateParamsSinkType = "QDRANT" DataSinkUpdateParamsSinkTypeAzureaiSearch DataSinkUpdateParamsSinkType = "AZUREAI_SEARCH" DataSinkUpdateParamsSinkTypeMongoDBAtlas DataSinkUpdateParamsSinkType = "MONGODB_ATLAS" DataSinkUpdateParamsSinkTypeMilvus DataSinkUpdateParamsSinkType = "MILVUS" DataSinkUpdateParamsSinkTypeAstraDB DataSinkUpdateParamsSinkType = "ASTRA_DB" )
type DataSource ¶
type DataSource struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// Component that implements the data source
Component DataSourceComponentUnion `json:"component" api:"required"`
// The name of the data source.
Name string `json:"name" api:"required"`
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Any of "S3", "AZURE_STORAGE_BLOB", "GOOGLE_DRIVE", "MICROSOFT_ONEDRIVE",
// "MICROSOFT_SHAREPOINT", "SLACK", "NOTION_PAGE", "CONFLUENCE", "JIRA", "JIRA_V2",
// "BOX".
SourceType DataSourceSourceType `json:"source_type" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Custom metadata that will be present on all data loaded from the data source
CustomMetadata map[string]*DataSourceCustomMetadataUnion `json:"custom_metadata" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// Version metadata for the data source
VersionMetadata DataSourceReaderVersionMetadata `json:"version_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Component respjson.Field
Name respjson.Field
ProjectID respjson.Field
SourceType respjson.Field
CreatedAt respjson.Field
CustomMetadata respjson.Field
UpdatedAt respjson.Field
VersionMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for a data source.
func (DataSource) RawJSON ¶
func (r DataSource) RawJSON() string
Returns the unmodified JSON received from the API
func (*DataSource) UnmarshalJSON ¶
func (r *DataSource) UnmarshalJSON(data []byte) error
type DataSourceComponentUnion ¶
type DataSourceComponentUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfDataSourceComponentMapItem any `json:",inline"`
// This field is from variant [shared.CloudS3DataSource].
Bucket string `json:"bucket"`
// This field is from variant [shared.CloudS3DataSource].
AwsAccessID string `json:"aws_access_id"`
// This field is from variant [shared.CloudS3DataSource].
AwsAccessSecret string `json:"aws_access_secret"`
ClassName string `json:"class_name"`
Prefix string `json:"prefix"`
// This field is from variant [shared.CloudS3DataSource].
RegexPattern string `json:"regex_pattern"`
// This field is from variant [shared.CloudS3DataSource].
S3EndpointURL string `json:"s3_endpoint_url"`
SupportsAccessControl bool `json:"supports_access_control"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
AccountURL string `json:"account_url"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
ContainerName string `json:"container_name"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
AccountKey string `json:"account_key"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
AccountName string `json:"account_name"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
Blob string `json:"blob"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
TenantID string `json:"tenant_id"`
FolderID string `json:"folder_id"`
// This field is from variant [shared.CloudGoogleDriveDataSource].
ServiceAccountKey map[string]string `json:"service_account_key"`
// This field is from variant [shared.CloudOneDriveDataSource].
UserPrincipalName string `json:"user_principal_name"`
FolderPath string `json:"folder_path"`
RequiredExts []string `json:"required_exts"`
// This field is from variant [shared.CloudSharepointDataSource].
DriveName string `json:"drive_name"`
// This field is from variant [shared.CloudSharepointDataSource].
ExcludePathPatterns []string `json:"exclude_path_patterns"`
GetPermissions bool `json:"get_permissions"`
// This field is from variant [shared.CloudSharepointDataSource].
IncludePathPatterns []string `json:"include_path_patterns"`
// This field is from variant [shared.CloudSharepointDataSource].
SiteID string `json:"site_id"`
// This field is from variant [shared.CloudSharepointDataSource].
SiteName string `json:"site_name"`
// This field is from variant [shared.CloudSlackDataSource].
SlackToken string `json:"slack_token"`
// This field is from variant [shared.CloudSlackDataSource].
ChannelIDs string `json:"channel_ids"`
// This field is from variant [shared.CloudSlackDataSource].
ChannelPatterns string `json:"channel_patterns"`
// This field is from variant [shared.CloudSlackDataSource].
EarliestDate string `json:"earliest_date"`
// This field is from variant [shared.CloudSlackDataSource].
EarliestDateTimestamp float64 `json:"earliest_date_timestamp"`
// This field is from variant [shared.CloudSlackDataSource].
LatestDate string `json:"latest_date"`
// This field is from variant [shared.CloudSlackDataSource].
LatestDateTimestamp float64 `json:"latest_date_timestamp"`
// This field is from variant [shared.CloudNotionPageDataSource].
IntegrationToken string `json:"integration_token"`
// This field is from variant [shared.CloudNotionPageDataSource].
DatabaseIDs string `json:"database_ids"`
PageIDs string `json:"page_ids"`
AuthenticationMechanism string `json:"authentication_mechanism"`
ServerURL string `json:"server_url"`
APIToken string `json:"api_token"`
// This field is from variant [shared.CloudConfluenceDataSource].
Cql string `json:"cql"`
// This field is from variant [shared.CloudConfluenceDataSource].
FailureHandling shared.FailureHandlingConfig `json:"failure_handling"`
// This field is from variant [shared.CloudConfluenceDataSource].
IndexRestrictedPages bool `json:"index_restricted_pages"`
// This field is from variant [shared.CloudConfluenceDataSource].
KeepMarkdownFormat bool `json:"keep_markdown_format"`
// This field is from variant [shared.CloudConfluenceDataSource].
Label string `json:"label"`
// This field is from variant [shared.CloudConfluenceDataSource].
SpaceKey string `json:"space_key"`
// This field is from variant [shared.CloudConfluenceDataSource].
UserName string `json:"user_name"`
Query string `json:"query"`
CloudID string `json:"cloud_id"`
Email string `json:"email"`
// This field is from variant [shared.CloudJiraDataSourceV2].
APIVersion shared.CloudJiraDataSourceV2APIVersion `json:"api_version"`
// This field is from variant [shared.CloudJiraDataSourceV2].
Expand string `json:"expand"`
// This field is from variant [shared.CloudJiraDataSourceV2].
Fields []string `json:"fields"`
// This field is from variant [shared.CloudJiraDataSourceV2].
RequestsPerMinute int64 `json:"requests_per_minute"`
// This field is from variant [shared.CloudBoxDataSource].
DeveloperToken string `json:"developer_token"`
// This field is from variant [shared.CloudBoxDataSource].
EnterpriseID string `json:"enterprise_id"`
// This field is from variant [shared.CloudBoxDataSource].
UserID string `json:"user_id"`
JSON struct {
OfDataSourceComponentMapItem respjson.Field
Bucket respjson.Field
AwsAccessID respjson.Field
AwsAccessSecret respjson.Field
ClassName respjson.Field
Prefix respjson.Field
RegexPattern respjson.Field
S3EndpointURL respjson.Field
SupportsAccessControl respjson.Field
AccountURL respjson.Field
ContainerName respjson.Field
AccountKey respjson.Field
AccountName respjson.Field
Blob respjson.Field
ClientID respjson.Field
ClientSecret respjson.Field
TenantID respjson.Field
FolderID respjson.Field
ServiceAccountKey respjson.Field
UserPrincipalName respjson.Field
FolderPath respjson.Field
RequiredExts respjson.Field
DriveName respjson.Field
ExcludePathPatterns respjson.Field
GetPermissions respjson.Field
IncludePathPatterns respjson.Field
SiteID respjson.Field
SiteName respjson.Field
SlackToken respjson.Field
ChannelIDs respjson.Field
ChannelPatterns respjson.Field
EarliestDate respjson.Field
EarliestDateTimestamp respjson.Field
LatestDate respjson.Field
LatestDateTimestamp respjson.Field
IntegrationToken respjson.Field
DatabaseIDs respjson.Field
PageIDs respjson.Field
AuthenticationMechanism respjson.Field
ServerURL respjson.Field
APIToken respjson.Field
Cql respjson.Field
FailureHandling respjson.Field
IndexRestrictedPages respjson.Field
KeepMarkdownFormat respjson.Field
Label respjson.Field
SpaceKey respjson.Field
UserName respjson.Field
Query respjson.Field
CloudID respjson.Field
Email respjson.Field
APIVersion respjson.Field
Expand respjson.Field
Fields respjson.Field
RequestsPerMinute respjson.Field
DeveloperToken respjson.Field
EnterpriseID respjson.Field
UserID respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
DataSourceComponentUnion contains all possible properties and values from [map[string]any], shared.CloudS3DataSource, shared.CloudAzStorageBlobDataSource, shared.CloudGoogleDriveDataSource, shared.CloudOneDriveDataSource, shared.CloudSharepointDataSource, shared.CloudSlackDataSource, shared.CloudNotionPageDataSource, shared.CloudConfluenceDataSource, shared.CloudJiraDataSource, shared.CloudJiraDataSourceV2, shared.CloudBoxDataSource.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfDataSourceComponentMapItem]
func (DataSourceComponentUnion) AsAnyMap ¶
func (u DataSourceComponentUnion) AsAnyMap() (v map[string]any)
func (DataSourceComponentUnion) AsCloudAzStorageBlobDataSource ¶
func (u DataSourceComponentUnion) AsCloudAzStorageBlobDataSource() (v shared.CloudAzStorageBlobDataSource)
func (DataSourceComponentUnion) AsCloudBoxDataSource ¶
func (u DataSourceComponentUnion) AsCloudBoxDataSource() (v shared.CloudBoxDataSource)
func (DataSourceComponentUnion) AsCloudConfluenceDataSource ¶
func (u DataSourceComponentUnion) AsCloudConfluenceDataSource() (v shared.CloudConfluenceDataSource)
func (DataSourceComponentUnion) AsCloudGoogleDriveDataSource ¶
func (u DataSourceComponentUnion) AsCloudGoogleDriveDataSource() (v shared.CloudGoogleDriveDataSource)
func (DataSourceComponentUnion) AsCloudJiraDataSource ¶
func (u DataSourceComponentUnion) AsCloudJiraDataSource() (v shared.CloudJiraDataSource)
func (DataSourceComponentUnion) AsCloudJiraDataSourceV2 ¶
func (u DataSourceComponentUnion) AsCloudJiraDataSourceV2() (v shared.CloudJiraDataSourceV2)
func (DataSourceComponentUnion) AsCloudNotionPageDataSource ¶
func (u DataSourceComponentUnion) AsCloudNotionPageDataSource() (v shared.CloudNotionPageDataSource)
func (DataSourceComponentUnion) AsCloudOneDriveDataSource ¶
func (u DataSourceComponentUnion) AsCloudOneDriveDataSource() (v shared.CloudOneDriveDataSource)
func (DataSourceComponentUnion) AsCloudS3DataSource ¶
func (u DataSourceComponentUnion) AsCloudS3DataSource() (v shared.CloudS3DataSource)
func (DataSourceComponentUnion) AsCloudSharepointDataSource ¶
func (u DataSourceComponentUnion) AsCloudSharepointDataSource() (v shared.CloudSharepointDataSource)
func (DataSourceComponentUnion) AsCloudSlackDataSource ¶
func (u DataSourceComponentUnion) AsCloudSlackDataSource() (v shared.CloudSlackDataSource)
func (DataSourceComponentUnion) RawJSON ¶
func (u DataSourceComponentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DataSourceComponentUnion) UnmarshalJSON ¶
func (r *DataSourceComponentUnion) UnmarshalJSON(data []byte) error
type DataSourceCustomMetadataUnion ¶
type DataSourceCustomMetadataUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfDataSourceCustomMetadataMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfDataSourceCustomMetadataMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
DataSourceCustomMetadataUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfDataSourceCustomMetadataMapItem OfAnyArray OfString OfFloat OfBool]
func (DataSourceCustomMetadataUnion) AsAnyArray ¶
func (u DataSourceCustomMetadataUnion) AsAnyArray() (v []any)
func (DataSourceCustomMetadataUnion) AsAnyMap ¶
func (u DataSourceCustomMetadataUnion) AsAnyMap() (v map[string]any)
func (DataSourceCustomMetadataUnion) AsBool ¶
func (u DataSourceCustomMetadataUnion) AsBool() (v bool)
func (DataSourceCustomMetadataUnion) AsFloat ¶
func (u DataSourceCustomMetadataUnion) AsFloat() (v float64)
func (DataSourceCustomMetadataUnion) AsString ¶
func (u DataSourceCustomMetadataUnion) AsString() (v string)
func (DataSourceCustomMetadataUnion) RawJSON ¶
func (u DataSourceCustomMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DataSourceCustomMetadataUnion) UnmarshalJSON ¶
func (r *DataSourceCustomMetadataUnion) UnmarshalJSON(data []byte) error
type DataSourceListParams ¶
type DataSourceListParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (DataSourceListParams) URLQuery ¶
func (r DataSourceListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DataSourceListParams's query parameters as `url.Values`.
type DataSourceNewParams ¶
type DataSourceNewParams struct {
// Component that implements the data source
Component DataSourceNewParamsComponentUnion `json:"component,omitzero" api:"required"`
// The name of the data source.
Name string `json:"name" api:"required"`
// Any of "S3", "AZURE_STORAGE_BLOB", "GOOGLE_DRIVE", "MICROSOFT_ONEDRIVE",
// "MICROSOFT_SHAREPOINT", "SLACK", "NOTION_PAGE", "CONFLUENCE", "JIRA", "JIRA_V2",
// "BOX".
SourceType DataSourceNewParamsSourceType `json:"source_type,omitzero" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Custom metadata that will be present on all data loaded from the data source
CustomMetadata map[string]*DataSourceNewParamsCustomMetadataUnion `json:"custom_metadata,omitzero"`
// contains filtered or unexported fields
}
func (DataSourceNewParams) MarshalJSON ¶
func (r DataSourceNewParams) MarshalJSON() (data []byte, err error)
func (DataSourceNewParams) URLQuery ¶
func (r DataSourceNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes DataSourceNewParams's query parameters as `url.Values`.
func (*DataSourceNewParams) UnmarshalJSON ¶
func (r *DataSourceNewParams) UnmarshalJSON(data []byte) error
type DataSourceNewParamsComponentUnion ¶
type DataSourceNewParamsComponentUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfCloudS3DataSource *shared.CloudS3DataSourceParam `json:",omitzero,inline"`
OfCloudAzStorageBlobDataSource *shared.CloudAzStorageBlobDataSourceParam `json:",omitzero,inline"`
OfCloudGoogleDriveDataSource *shared.CloudGoogleDriveDataSourceParam `json:",omitzero,inline"`
OfCloudOneDriveDataSource *shared.CloudOneDriveDataSourceParam `json:",omitzero,inline"`
OfCloudSlackDataSource *shared.CloudSlackDataSourceParam `json:",omitzero,inline"`
OfCloudNotionPageDataSource *shared.CloudNotionPageDataSourceParam `json:",omitzero,inline"`
OfCloudConfluenceDataSource *shared.CloudConfluenceDataSourceParam `json:",omitzero,inline"`
OfCloudJiraDataSource *shared.CloudJiraDataSourceParam `json:",omitzero,inline"`
OfCloudJiraDataSourceV2 *shared.CloudJiraDataSourceV2Param `json:",omitzero,inline"`
OfCloudBoxDataSource *shared.CloudBoxDataSourceParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DataSourceNewParamsComponentUnion) MarshalJSON ¶
func (u DataSourceNewParamsComponentUnion) MarshalJSON() ([]byte, error)
func (*DataSourceNewParamsComponentUnion) UnmarshalJSON ¶
func (u *DataSourceNewParamsComponentUnion) UnmarshalJSON(data []byte) error
type DataSourceNewParamsCustomMetadataUnion ¶
type DataSourceNewParamsCustomMetadataUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DataSourceNewParamsCustomMetadataUnion) MarshalJSON ¶
func (u DataSourceNewParamsCustomMetadataUnion) MarshalJSON() ([]byte, error)
func (*DataSourceNewParamsCustomMetadataUnion) UnmarshalJSON ¶
func (u *DataSourceNewParamsCustomMetadataUnion) UnmarshalJSON(data []byte) error
type DataSourceNewParamsSourceType ¶
type DataSourceNewParamsSourceType string
const ( DataSourceNewParamsSourceTypeS3 DataSourceNewParamsSourceType = "S3" DataSourceNewParamsSourceTypeAzureStorageBlob DataSourceNewParamsSourceType = "AZURE_STORAGE_BLOB" DataSourceNewParamsSourceTypeGoogleDrive DataSourceNewParamsSourceType = "GOOGLE_DRIVE" DataSourceNewParamsSourceTypeMicrosoftOnedrive DataSourceNewParamsSourceType = "MICROSOFT_ONEDRIVE" DataSourceNewParamsSourceTypeSlack DataSourceNewParamsSourceType = "SLACK" DataSourceNewParamsSourceTypeNotionPage DataSourceNewParamsSourceType = "NOTION_PAGE" DataSourceNewParamsSourceTypeConfluence DataSourceNewParamsSourceType = "CONFLUENCE" DataSourceNewParamsSourceTypeJira DataSourceNewParamsSourceType = "JIRA" DataSourceNewParamsSourceTypeJiraV2 DataSourceNewParamsSourceType = "JIRA_V2" DataSourceNewParamsSourceTypeBox DataSourceNewParamsSourceType = "BOX" )
type DataSourceReaderVersionMetadata ¶
type DataSourceReaderVersionMetadata struct {
// The version of the reader to use for this data source.
//
// Any of "1.0", "2.0", "2.1".
ReaderVersion DataSourceReaderVersionMetadataReaderVersion `json:"reader_version" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ReaderVersion respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DataSourceReaderVersionMetadata) RawJSON ¶
func (r DataSourceReaderVersionMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*DataSourceReaderVersionMetadata) UnmarshalJSON ¶
func (r *DataSourceReaderVersionMetadata) UnmarshalJSON(data []byte) error
type DataSourceReaderVersionMetadataReaderVersion ¶
type DataSourceReaderVersionMetadataReaderVersion string
The version of the reader to use for this data source.
const ( DataSourceReaderVersionMetadataReaderVersion1_0 DataSourceReaderVersionMetadataReaderVersion = "1.0" DataSourceReaderVersionMetadataReaderVersion2_0 DataSourceReaderVersionMetadataReaderVersion = "2.0" DataSourceReaderVersionMetadataReaderVersion2_1 DataSourceReaderVersionMetadataReaderVersion = "2.1" )
type DataSourceService ¶
type DataSourceService struct {
// contains filtered or unexported fields
}
DataSourceService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDataSourceService method instead.
func NewDataSourceService ¶
func NewDataSourceService(opts ...option.RequestOption) (r DataSourceService)
NewDataSourceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DataSourceService) Delete ¶
func (r *DataSourceService) Delete(ctx context.Context, dataSourceID string, opts ...option.RequestOption) (err error)
Delete a data source by ID.
func (*DataSourceService) Get ¶
func (r *DataSourceService) Get(ctx context.Context, dataSourceID string, opts ...option.RequestOption) (res *DataSource, err error)
Get a data source by ID.
func (*DataSourceService) List ¶
func (r *DataSourceService) List(ctx context.Context, query DataSourceListParams, opts ...option.RequestOption) (res *[]DataSource, err error)
List data sources for a given project. If project_id is not provided, uses the default project.
func (*DataSourceService) New ¶
func (r *DataSourceService) New(ctx context.Context, params DataSourceNewParams, opts ...option.RequestOption) (res *DataSource, err error)
Create a new data source.
func (*DataSourceService) Update ¶
func (r *DataSourceService) Update(ctx context.Context, dataSourceID string, body DataSourceUpdateParams, opts ...option.RequestOption) (res *DataSource, err error)
Update a data source by ID.
type DataSourceSourceType ¶
type DataSourceSourceType string
const ( DataSourceSourceTypeS3 DataSourceSourceType = "S3" DataSourceSourceTypeAzureStorageBlob DataSourceSourceType = "AZURE_STORAGE_BLOB" DataSourceSourceTypeGoogleDrive DataSourceSourceType = "GOOGLE_DRIVE" DataSourceSourceTypeMicrosoftOnedrive DataSourceSourceType = "MICROSOFT_ONEDRIVE" DataSourceSourceTypeSlack DataSourceSourceType = "SLACK" DataSourceSourceTypeNotionPage DataSourceSourceType = "NOTION_PAGE" DataSourceSourceTypeConfluence DataSourceSourceType = "CONFLUENCE" DataSourceSourceTypeJira DataSourceSourceType = "JIRA" DataSourceSourceTypeJiraV2 DataSourceSourceType = "JIRA_V2" DataSourceSourceTypeBox DataSourceSourceType = "BOX" )
type DataSourceUpdateParams ¶
type DataSourceUpdateParams struct {
// Any of "S3", "AZURE_STORAGE_BLOB", "GOOGLE_DRIVE", "MICROSOFT_ONEDRIVE",
// "MICROSOFT_SHAREPOINT", "SLACK", "NOTION_PAGE", "CONFLUENCE", "JIRA", "JIRA_V2",
// "BOX".
SourceType DataSourceUpdateParamsSourceType `json:"source_type,omitzero" api:"required"`
// The name of the data source.
Name param.Opt[string] `json:"name,omitzero"`
// Component that implements the data source
Component DataSourceUpdateParamsComponentUnion `json:"component,omitzero"`
// Custom metadata that will be present on all data loaded from the data source
CustomMetadata map[string]*DataSourceUpdateParamsCustomMetadataUnion `json:"custom_metadata,omitzero"`
// contains filtered or unexported fields
}
func (DataSourceUpdateParams) MarshalJSON ¶
func (r DataSourceUpdateParams) MarshalJSON() (data []byte, err error)
func (*DataSourceUpdateParams) UnmarshalJSON ¶
func (r *DataSourceUpdateParams) UnmarshalJSON(data []byte) error
type DataSourceUpdateParamsComponentUnion ¶
type DataSourceUpdateParamsComponentUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfCloudS3DataSource *shared.CloudS3DataSourceParam `json:",omitzero,inline"`
OfCloudAzStorageBlobDataSource *shared.CloudAzStorageBlobDataSourceParam `json:",omitzero,inline"`
OfCloudGoogleDriveDataSource *shared.CloudGoogleDriveDataSourceParam `json:",omitzero,inline"`
OfCloudOneDriveDataSource *shared.CloudOneDriveDataSourceParam `json:",omitzero,inline"`
OfCloudSlackDataSource *shared.CloudSlackDataSourceParam `json:",omitzero,inline"`
OfCloudNotionPageDataSource *shared.CloudNotionPageDataSourceParam `json:",omitzero,inline"`
OfCloudConfluenceDataSource *shared.CloudConfluenceDataSourceParam `json:",omitzero,inline"`
OfCloudJiraDataSource *shared.CloudJiraDataSourceParam `json:",omitzero,inline"`
OfCloudJiraDataSourceV2 *shared.CloudJiraDataSourceV2Param `json:",omitzero,inline"`
OfCloudBoxDataSource *shared.CloudBoxDataSourceParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DataSourceUpdateParamsComponentUnion) MarshalJSON ¶
func (u DataSourceUpdateParamsComponentUnion) MarshalJSON() ([]byte, error)
func (*DataSourceUpdateParamsComponentUnion) UnmarshalJSON ¶
func (u *DataSourceUpdateParamsComponentUnion) UnmarshalJSON(data []byte) error
type DataSourceUpdateParamsCustomMetadataUnion ¶
type DataSourceUpdateParamsCustomMetadataUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DataSourceUpdateParamsCustomMetadataUnion) MarshalJSON ¶
func (u DataSourceUpdateParamsCustomMetadataUnion) MarshalJSON() ([]byte, error)
func (*DataSourceUpdateParamsCustomMetadataUnion) UnmarshalJSON ¶
func (u *DataSourceUpdateParamsCustomMetadataUnion) UnmarshalJSON(data []byte) error
type DataSourceUpdateParamsSourceType ¶
type DataSourceUpdateParamsSourceType string
const ( DataSourceUpdateParamsSourceTypeS3 DataSourceUpdateParamsSourceType = "S3" DataSourceUpdateParamsSourceTypeAzureStorageBlob DataSourceUpdateParamsSourceType = "AZURE_STORAGE_BLOB" DataSourceUpdateParamsSourceTypeGoogleDrive DataSourceUpdateParamsSourceType = "GOOGLE_DRIVE" DataSourceUpdateParamsSourceTypeMicrosoftOnedrive DataSourceUpdateParamsSourceType = "MICROSOFT_ONEDRIVE" DataSourceUpdateParamsSourceTypeSlack DataSourceUpdateParamsSourceType = "SLACK" DataSourceUpdateParamsSourceTypeNotionPage DataSourceUpdateParamsSourceType = "NOTION_PAGE" DataSourceUpdateParamsSourceTypeConfluence DataSourceUpdateParamsSourceType = "CONFLUENCE" DataSourceUpdateParamsSourceTypeJira DataSourceUpdateParamsSourceType = "JIRA" DataSourceUpdateParamsSourceTypeJiraV2 DataSourceUpdateParamsSourceType = "JIRA_V2" DataSourceUpdateParamsSourceTypeBox DataSourceUpdateParamsSourceType = "BOX" )
type ExtractConfiguration ¶
type ExtractConfiguration struct {
// JSON Schema defining the fields to extract. Validate with the /schema/validate
// endpoint first.
DataSchema map[string]*ExtractConfigurationDataSchemaUnion `json:"data_schema" api:"required"`
// Include citations in results
CiteSources bool `json:"cite_sources"`
// Include confidence scores in results
ConfidenceScores bool `json:"confidence_scores"`
// Granularity of extraction: per_doc returns one object per document, per_page
// returns one object per page, per_table_row returns one object per table row
//
// Any of "per_doc", "per_page", "per_table_row".
ExtractionTarget ExtractConfigurationExtractionTarget `json:"extraction_target"`
// Maximum number of pages to process. Omit for no limit.
MaxPages int64 `json:"max_pages" api:"nullable"`
// Saved parse configuration ID to control how the document is parsed before
// extraction
ParseConfigID string `json:"parse_config_id" api:"nullable"`
// Parse tier to use before extraction. Defaults to the extract tier if not
// specified.
ParseTier string `json:"parse_tier" api:"nullable"`
// Custom system prompt to guide extraction behavior
SystemPrompt string `json:"system_prompt" api:"nullable"`
// Comma-separated page numbers or ranges to process (1-based). Omit to process all
// pages.
TargetPages string `json:"target_pages" api:"nullable"`
// Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
//
// Any of "cost_effective", "agentic".
Tier ExtractConfigurationTier `json:"tier"`
// Use 'latest' for the latest release for the selected tier or a date string
// (YYYY-MM-DD format) to pin to the nearest release at or before that date.
Version string `json:"version"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DataSchema respjson.Field
CiteSources respjson.Field
ConfidenceScores respjson.Field
ExtractionTarget respjson.Field
MaxPages respjson.Field
ParseConfigID respjson.Field
ParseTier respjson.Field
SystemPrompt respjson.Field
TargetPages respjson.Field
Tier respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Extract configuration combining parse and extract settings.
func (ExtractConfiguration) RawJSON ¶
func (r ExtractConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (ExtractConfiguration) ToParam ¶
func (r ExtractConfiguration) ToParam() ExtractConfigurationParam
ToParam converts this ExtractConfiguration to a ExtractConfigurationParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ExtractConfigurationParam.Overrides()
func (*ExtractConfiguration) UnmarshalJSON ¶
func (r *ExtractConfiguration) UnmarshalJSON(data []byte) error
type ExtractConfigurationDataSchemaUnion ¶
type ExtractConfigurationDataSchemaUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractConfigurationDataSchemaMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfExtractConfigurationDataSchemaMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractConfigurationDataSchemaUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractConfigurationDataSchemaMapItem OfAnyArray OfString OfFloat OfBool]
func (ExtractConfigurationDataSchemaUnion) AsAnyArray ¶
func (u ExtractConfigurationDataSchemaUnion) AsAnyArray() (v []any)
func (ExtractConfigurationDataSchemaUnion) AsAnyMap ¶
func (u ExtractConfigurationDataSchemaUnion) AsAnyMap() (v map[string]any)
func (ExtractConfigurationDataSchemaUnion) AsBool ¶
func (u ExtractConfigurationDataSchemaUnion) AsBool() (v bool)
func (ExtractConfigurationDataSchemaUnion) AsFloat ¶
func (u ExtractConfigurationDataSchemaUnion) AsFloat() (v float64)
func (ExtractConfigurationDataSchemaUnion) AsString ¶
func (u ExtractConfigurationDataSchemaUnion) AsString() (v string)
func (ExtractConfigurationDataSchemaUnion) RawJSON ¶
func (u ExtractConfigurationDataSchemaUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractConfigurationDataSchemaUnion) UnmarshalJSON ¶
func (r *ExtractConfigurationDataSchemaUnion) UnmarshalJSON(data []byte) error
type ExtractConfigurationDataSchemaUnionParam ¶
type ExtractConfigurationDataSchemaUnionParam struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtractConfigurationDataSchemaUnionParam) MarshalJSON ¶
func (u ExtractConfigurationDataSchemaUnionParam) MarshalJSON() ([]byte, error)
func (*ExtractConfigurationDataSchemaUnionParam) UnmarshalJSON ¶
func (u *ExtractConfigurationDataSchemaUnionParam) UnmarshalJSON(data []byte) error
type ExtractConfigurationExtractionTarget ¶
type ExtractConfigurationExtractionTarget string
Granularity of extraction: per_doc returns one object per document, per_page returns one object per page, per_table_row returns one object per table row
const ( ExtractConfigurationExtractionTargetPerDoc ExtractConfigurationExtractionTarget = "per_doc" ExtractConfigurationExtractionTargetPerPage ExtractConfigurationExtractionTarget = "per_page" ExtractConfigurationExtractionTargetPerTableRow ExtractConfigurationExtractionTarget = "per_table_row" )
type ExtractConfigurationParam ¶
type ExtractConfigurationParam struct {
// JSON Schema defining the fields to extract. Validate with the /schema/validate
// endpoint first.
DataSchema map[string]*ExtractConfigurationDataSchemaUnionParam `json:"data_schema,omitzero" api:"required"`
// Maximum number of pages to process. Omit for no limit.
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
// Saved parse configuration ID to control how the document is parsed before
// extraction
ParseConfigID param.Opt[string] `json:"parse_config_id,omitzero"`
// Parse tier to use before extraction. Defaults to the extract tier if not
// specified.
ParseTier param.Opt[string] `json:"parse_tier,omitzero"`
// Custom system prompt to guide extraction behavior
SystemPrompt param.Opt[string] `json:"system_prompt,omitzero"`
// Comma-separated page numbers or ranges to process (1-based). Omit to process all
// pages.
TargetPages param.Opt[string] `json:"target_pages,omitzero"`
// Include citations in results
CiteSources param.Opt[bool] `json:"cite_sources,omitzero"`
// Include confidence scores in results
ConfidenceScores param.Opt[bool] `json:"confidence_scores,omitzero"`
// Use 'latest' for the latest release for the selected tier or a date string
// (YYYY-MM-DD format) to pin to the nearest release at or before that date.
Version param.Opt[string] `json:"version,omitzero"`
// Granularity of extraction: per_doc returns one object per document, per_page
// returns one object per page, per_table_row returns one object per table row
//
// Any of "per_doc", "per_page", "per_table_row".
ExtractionTarget ExtractConfigurationExtractionTarget `json:"extraction_target,omitzero"`
// Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
//
// Any of "cost_effective", "agentic".
Tier ExtractConfigurationTier `json:"tier,omitzero"`
// contains filtered or unexported fields
}
Extract configuration combining parse and extract settings.
The property DataSchema is required.
func (ExtractConfigurationParam) MarshalJSON ¶
func (r ExtractConfigurationParam) MarshalJSON() (data []byte, err error)
func (*ExtractConfigurationParam) UnmarshalJSON ¶
func (r *ExtractConfigurationParam) UnmarshalJSON(data []byte) error
type ExtractConfigurationTier ¶
type ExtractConfigurationTier string
Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
const ( ExtractConfigurationTierCostEffective ExtractConfigurationTier = "cost_effective" ExtractConfigurationTierAgentic ExtractConfigurationTier = "agentic" )
type ExtractDeleteParams ¶
type ExtractDeleteParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ExtractDeleteParams) URLQuery ¶
func (r ExtractDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes ExtractDeleteParams's query parameters as `url.Values`.
type ExtractDeleteResponse ¶
type ExtractDeleteResponse = any
type ExtractGenerateSchemaParams ¶
type ExtractGenerateSchemaParams struct {
// Request schema for generating an extraction schema.
ExtractV2SchemaGenerateRequest ExtractV2SchemaGenerateRequestParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ExtractGenerateSchemaParams) MarshalJSON ¶
func (r ExtractGenerateSchemaParams) MarshalJSON() (data []byte, err error)
func (ExtractGenerateSchemaParams) URLQuery ¶
func (r ExtractGenerateSchemaParams) URLQuery() (v url.Values, err error)
URLQuery serializes ExtractGenerateSchemaParams's query parameters as `url.Values`.
func (*ExtractGenerateSchemaParams) UnmarshalJSON ¶
func (r *ExtractGenerateSchemaParams) UnmarshalJSON(data []byte) error
type ExtractGetParams ¶
type ExtractGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Additional fields to include: configuration, extract_metadata
Expand []string `query:"expand,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ExtractGetParams) URLQuery ¶
func (r ExtractGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes ExtractGetParams's query parameters as `url.Values`.
type ExtractJobMetadata ¶
type ExtractJobMetadata struct {
// Metadata for extracted fields including document, page, and row level info.
FieldMetadata ExtractedFieldMetadata `json:"field_metadata" api:"nullable"`
// Reference to the ParseJob ID used for parsing
ParseJobID string `json:"parse_job_id" api:"nullable"`
// Parse tier used for parsing the document
ParseTier string `json:"parse_tier" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FieldMetadata respjson.Field
ParseJobID respjson.Field
ParseTier respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Extraction metadata.
func (ExtractJobMetadata) RawJSON ¶
func (r ExtractJobMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractJobMetadata) UnmarshalJSON ¶
func (r *ExtractJobMetadata) UnmarshalJSON(data []byte) error
type ExtractJobUsage ¶
type ExtractJobUsage struct {
// Number of pages extracted
NumPagesExtracted int64 `json:"num_pages_extracted" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
NumPagesExtracted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Extraction usage metrics.
func (ExtractJobUsage) RawJSON ¶
func (r ExtractJobUsage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractJobUsage) UnmarshalJSON ¶
func (r *ExtractJobUsage) UnmarshalJSON(data []byte) error
type ExtractListParams ¶
type ExtractListParams struct {
// Filter by configuration ID
ConfigurationID param.Opt[string] `query:"configuration_id,omitzero" json:"-"`
// Include items created at or after this timestamp (inclusive)
CreatedAtOnOrAfter param.Opt[time.Time] `query:"created_at_on_or_after,omitzero" format:"date-time" json:"-"`
// Include items created at or before this timestamp (inclusive)
CreatedAtOnOrBefore param.Opt[time.Time] `query:"created_at_on_or_before,omitzero" format:"date-time" json:"-"`
// Filter by document input type (file_id or parse_job_id)
DocumentInputType param.Opt[string] `query:"document_input_type,omitzero" json:"-"`
// Deprecated: use file_input instead
DocumentInputValue param.Opt[string] `query:"document_input_value,omitzero" json:"-"`
// Filter by file input value
FileInput param.Opt[string] `query:"file_input,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
// Number of items per page
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
// Token for pagination
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Filter by specific job IDs
JobIDs []string `query:"job_ids,omitzero" json:"-"`
// Filter by status
//
// Any of "PENDING", "THROTTLED", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status ExtractListParamsStatus `query:"status,omitzero" json:"-"`
// Additional fields to include: configuration, extract_metadata
Expand []string `query:"expand,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ExtractListParams) URLQuery ¶
func (r ExtractListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ExtractListParams's query parameters as `url.Values`.
type ExtractListParamsStatus ¶
type ExtractListParamsStatus string
Filter by status
const ( ExtractListParamsStatusPending ExtractListParamsStatus = "PENDING" ExtractListParamsStatusThrottled ExtractListParamsStatus = "THROTTLED" ExtractListParamsStatusRunning ExtractListParamsStatus = "RUNNING" ExtractListParamsStatusCompleted ExtractListParamsStatus = "COMPLETED" ExtractListParamsStatusFailed ExtractListParamsStatus = "FAILED" ExtractListParamsStatusCancelled ExtractListParamsStatus = "CANCELLED" )
type ExtractNewParams ¶
type ExtractNewParams struct {
// Request to create an extraction job. Provide configuration_id or inline
// configuration.
ExtractV2JobCreate ExtractV2JobCreateParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ExtractNewParams) MarshalJSON ¶
func (r ExtractNewParams) MarshalJSON() (data []byte, err error)
func (ExtractNewParams) URLQuery ¶
func (r ExtractNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes ExtractNewParams's query parameters as `url.Values`.
func (*ExtractNewParams) UnmarshalJSON ¶
func (r *ExtractNewParams) UnmarshalJSON(data []byte) error
type ExtractService ¶
type ExtractService struct {
// contains filtered or unexported fields
}
ExtractService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewExtractService method instead.
func NewExtractService ¶
func NewExtractService(opts ...option.RequestOption) (r ExtractService)
NewExtractService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ExtractService) Delete ¶
func (r *ExtractService) Delete(ctx context.Context, jobID string, body ExtractDeleteParams, opts ...option.RequestOption) (res *ExtractDeleteResponse, err error)
Delete an extraction job and its results.
func (*ExtractService) GenerateSchema ¶
func (r *ExtractService) GenerateSchema(ctx context.Context, params ExtractGenerateSchemaParams, opts ...option.RequestOption) (res *ConfigurationCreate, err error)
Generate a JSON schema and return a product configuration request.
func (*ExtractService) Get ¶
func (r *ExtractService) Get(ctx context.Context, jobID string, query ExtractGetParams, opts ...option.RequestOption) (res *ExtractV2Job, err error)
Get a single extraction job by ID.
Returns the job status and results when complete. Use `expand=configuration` to include the full configuration used, and `expand=extract_metadata` for per-field metadata.
func (*ExtractService) List ¶
func (r *ExtractService) List(ctx context.Context, query ExtractListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[ExtractV2Job], err error)
List extraction jobs with optional filtering and pagination.
Filter by `configuration_id`, `status`, `file_input`, or creation date range. Results are returned newest-first. Use `expand=configuration` to include the full configuration used, and `expand=extract_metadata` for per-field metadata.
func (*ExtractService) ListAutoPaging ¶
func (r *ExtractService) ListAutoPaging(ctx context.Context, query ExtractListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[ExtractV2Job]
List extraction jobs with optional filtering and pagination.
Filter by `configuration_id`, `status`, `file_input`, or creation date range. Results are returned newest-first. Use `expand=configuration` to include the full configuration used, and `expand=extract_metadata` for per-field metadata.
func (*ExtractService) New ¶
func (r *ExtractService) New(ctx context.Context, params ExtractNewParams, opts ...option.RequestOption) (res *ExtractV2Job, err error)
Create an extraction job.
Extracts structured data from a document using either a saved configuration or an inline JSON Schema.
## Input
Provide exactly one of:
- `configuration_id` — reference a saved extraction config - `configuration` — inline configuration with a `data_schema`
## Document input
Set `file_input` to a file ID (`dfl-...`) or a completed parse job ID (`pjb-...`).
The job runs asynchronously. Poll `GET /extract/{job_id}` or register a webhook to monitor completion.
func (*ExtractService) ValidateSchema ¶
func (r *ExtractService) ValidateSchema(ctx context.Context, body ExtractValidateSchemaParams, opts ...option.RequestOption) (res *ExtractV2SchemaValidateResponse, err error)
Validate a JSON schema for extraction.
type ExtractV2Job ¶
type ExtractV2Job struct {
// Unique job identifier (job_id)
ID string `json:"id" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// File ID or parse job ID that was extracted
FileInput string `json:"file_input" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status.
//
// - `PENDING` — queued, not yet started
// - `RUNNING` — actively processing
// - `COMPLETED` — finished successfully
// - `FAILED` — terminated with an error
// - `CANCELLED` — cancelled by user
Status string `json:"status" api:"required"`
// Last update timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Extract configuration combining parse and extract settings.
Configuration ExtractConfiguration `json:"configuration" api:"nullable"`
// Saved extract configuration ID used for this job, if any
ConfigurationID string `json:"configuration_id" api:"nullable"`
// Error details when status is FAILED
ErrorMessage string `json:"error_message" api:"nullable"`
// Extraction metadata.
ExtractMetadata ExtractJobMetadata `json:"extract_metadata" api:"nullable"`
// Extracted data conforming to the data_schema. Returns a single object for
// per_doc, or an array for per_page / per_table_row.
ExtractResult ExtractV2JobExtractResultUnion `json:"extract_result" api:"nullable"`
// Job-level metadata.
Metadata ExtractV2JobMetadata `json:"metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
FileInput respjson.Field
ProjectID respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
Configuration respjson.Field
ConfigurationID respjson.Field
ErrorMessage respjson.Field
ExtractMetadata respjson.Field
ExtractResult respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An extraction job.
func (ExtractV2Job) RawJSON ¶
func (r ExtractV2Job) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2Job) UnmarshalJSON ¶
func (r *ExtractV2Job) UnmarshalJSON(data []byte) error
type ExtractV2JobCreateParam ¶
type ExtractV2JobCreateParam struct {
// File ID or parse job ID to extract from
FileInput string `json:"file_input" api:"required"`
// Saved configuration ID
ConfigurationID param.Opt[string] `json:"configuration_id,omitzero"`
// Outbound webhook endpoints to notify on job status changes
WebhookConfigurations []ExtractV2JobCreateWebhookConfigurationParam `json:"webhook_configurations,omitzero"`
// Extract configuration combining parse and extract settings.
Configuration ExtractConfigurationParam `json:"configuration,omitzero"`
// contains filtered or unexported fields
}
Request to create an extraction job. Provide configuration_id or inline configuration.
The property FileInput is required.
func (ExtractV2JobCreateParam) MarshalJSON ¶
func (r ExtractV2JobCreateParam) MarshalJSON() (data []byte, err error)
func (*ExtractV2JobCreateParam) UnmarshalJSON ¶
func (r *ExtractV2JobCreateParam) UnmarshalJSON(data []byte) error
type ExtractV2JobCreateWebhookConfigurationParam ¶
type ExtractV2JobCreateWebhookConfigurationParam struct {
// Response format sent to the webhook: 'string' (default) or 'json'
WebhookOutputFormat param.Opt[string] `json:"webhook_output_format,omitzero"`
// URL to receive webhook POST notifications
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
// events are delivered.
//
// Any of "extract.pending", "extract.success", "extract.error",
// "extract.partial_success", "extract.cancelled", "parse.pending",
// "parse.running", "parse.success", "parse.error", "parse.partial_success",
// "parse.cancelled", "classify.pending", "classify.running", "classify.success",
// "classify.error", "classify.partial_success", "classify.cancelled",
// "sheets.pending", "sheets.success", "sheets.error", "sheets.partial_success",
// "sheets.cancelled", "unmapped_event".
WebhookEvents []string `json:"webhook_events,omitzero"`
// Custom HTTP headers sent with each webhook request (e.g. auth tokens)
WebhookHeaders map[string]string `json:"webhook_headers,omitzero"`
// contains filtered or unexported fields
}
Configuration for a single outbound webhook endpoint.
func (ExtractV2JobCreateWebhookConfigurationParam) MarshalJSON ¶
func (r ExtractV2JobCreateWebhookConfigurationParam) MarshalJSON() (data []byte, err error)
func (*ExtractV2JobCreateWebhookConfigurationParam) UnmarshalJSON ¶
func (r *ExtractV2JobCreateWebhookConfigurationParam) UnmarshalJSON(data []byte) error
type ExtractV2JobExtractResultArrayItemUnion ¶
type ExtractV2JobExtractResultArrayItemUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractV2JobExtractResultArrayItemMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfExtractV2JobExtractResultArrayItemMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractV2JobExtractResultArrayItemUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractV2JobExtractResultArrayItemMapItem OfAnyArray OfString OfFloat OfBool]
func (ExtractV2JobExtractResultArrayItemUnion) AsAnyArray ¶
func (u ExtractV2JobExtractResultArrayItemUnion) AsAnyArray() (v []any)
func (ExtractV2JobExtractResultArrayItemUnion) AsAnyMap ¶
func (u ExtractV2JobExtractResultArrayItemUnion) AsAnyMap() (v map[string]any)
func (ExtractV2JobExtractResultArrayItemUnion) AsBool ¶
func (u ExtractV2JobExtractResultArrayItemUnion) AsBool() (v bool)
func (ExtractV2JobExtractResultArrayItemUnion) AsFloat ¶
func (u ExtractV2JobExtractResultArrayItemUnion) AsFloat() (v float64)
func (ExtractV2JobExtractResultArrayItemUnion) AsString ¶
func (u ExtractV2JobExtractResultArrayItemUnion) AsString() (v string)
func (ExtractV2JobExtractResultArrayItemUnion) RawJSON ¶
func (u ExtractV2JobExtractResultArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2JobExtractResultArrayItemUnion) UnmarshalJSON ¶
func (r *ExtractV2JobExtractResultArrayItemUnion) UnmarshalJSON(data []byte) error
type ExtractV2JobExtractResultMapItemUnion ¶
type ExtractV2JobExtractResultMapItemUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractV2JobExtractResultMapItemMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfExtractV2JobExtractResultMapItemMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractV2JobExtractResultMapItemUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractV2JobExtractResultMapItemMapItem OfAnyArray OfString OfFloat OfBool]
func (ExtractV2JobExtractResultMapItemUnion) AsAnyArray ¶
func (u ExtractV2JobExtractResultMapItemUnion) AsAnyArray() (v []any)
func (ExtractV2JobExtractResultMapItemUnion) AsAnyMap ¶
func (u ExtractV2JobExtractResultMapItemUnion) AsAnyMap() (v map[string]any)
func (ExtractV2JobExtractResultMapItemUnion) AsBool ¶
func (u ExtractV2JobExtractResultMapItemUnion) AsBool() (v bool)
func (ExtractV2JobExtractResultMapItemUnion) AsFloat ¶
func (u ExtractV2JobExtractResultMapItemUnion) AsFloat() (v float64)
func (ExtractV2JobExtractResultMapItemUnion) AsString ¶
func (u ExtractV2JobExtractResultMapItemUnion) AsString() (v string)
func (ExtractV2JobExtractResultMapItemUnion) RawJSON ¶
func (u ExtractV2JobExtractResultMapItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2JobExtractResultMapItemUnion) UnmarshalJSON ¶
func (r *ExtractV2JobExtractResultMapItemUnion) UnmarshalJSON(data []byte) error
type ExtractV2JobExtractResultUnion ¶
type ExtractV2JobExtractResultUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractV2JobExtractResultMapItemMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a
// [[]map[string]\*ExtractV2JobExtractResultArrayItemUnion] instead of an object.
OfMapOfExtractV2JobExtractResultArrayItemMap []map[string]*ExtractV2JobExtractResultArrayItemUnion `json:",inline"`
JSON struct {
OfExtractV2JobExtractResultMapItemMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfMapOfExtractV2JobExtractResultArrayItemMap respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractV2JobExtractResultUnion contains all possible properties and values from [map[string]*ExtractV2JobExtractResultMapItemUnion], [[]map[string]*ExtractV2JobExtractResultArrayItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractV2JobExtractResultMapItemMapItem OfAnyArray OfString OfFloat OfBool OfMapOfExtractV2JobExtractResultArrayItemMap]
func (ExtractV2JobExtractResultUnion) AsExtractV2JobExtractResultMapMap ¶
func (u ExtractV2JobExtractResultUnion) AsExtractV2JobExtractResultMapMap() (v map[string]*ExtractV2JobExtractResultMapItemUnion)
func (ExtractV2JobExtractResultUnion) AsMapOfExtractV2JobExtractResultArrayItemMap ¶
func (u ExtractV2JobExtractResultUnion) AsMapOfExtractV2JobExtractResultArrayItemMap() (v []map[string]*ExtractV2JobExtractResultArrayItemUnion)
func (ExtractV2JobExtractResultUnion) RawJSON ¶
func (u ExtractV2JobExtractResultUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2JobExtractResultUnion) UnmarshalJSON ¶
func (r *ExtractV2JobExtractResultUnion) UnmarshalJSON(data []byte) error
type ExtractV2JobMetadata ¶
type ExtractV2JobMetadata struct {
// Extraction usage metrics.
Usage ExtractJobUsage `json:"usage" api:"nullable"`
ExtraFields map[string]any `json:"" api:"extrafields"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Usage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Job-level metadata.
func (ExtractV2JobMetadata) RawJSON ¶
func (r ExtractV2JobMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2JobMetadata) UnmarshalJSON ¶
func (r *ExtractV2JobMetadata) UnmarshalJSON(data []byte) error
type ExtractV2JobQueryResponse ¶
type ExtractV2JobQueryResponse struct {
// The list of items.
Items []ExtractV2Job `json:"items" api:"required"`
// A token, which can be sent as page_token to retrieve the next page. If this
// field is omitted, there are no subsequent pages.
NextPageToken string `json:"next_page_token" api:"nullable"`
// The total number of items available. This is only populated when specifically
// requested. The value may be an estimate and can be used for display purposes
// only.
TotalSize int64 `json:"total_size" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
NextPageToken respjson.Field
TotalSize respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Paginated list of extraction jobs.
func (ExtractV2JobQueryResponse) RawJSON ¶
func (r ExtractV2JobQueryResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2JobQueryResponse) UnmarshalJSON ¶
func (r *ExtractV2JobQueryResponse) UnmarshalJSON(data []byte) error
type ExtractV2Parameters ¶
type ExtractV2Parameters struct {
// JSON Schema defining the fields to extract. Validate with the /schema/validate
// endpoint first.
DataSchema map[string]*ExtractV2ParametersDataSchemaUnion `json:"data_schema,omitzero" api:"required"`
// Maximum number of pages to process. Omit for no limit.
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
// Saved parse configuration ID to control how the document is parsed before
// extraction
ParseConfigID param.Opt[string] `json:"parse_config_id,omitzero"`
// Parse tier to use before extraction. Defaults to the extract tier if not
// specified.
ParseTier param.Opt[string] `json:"parse_tier,omitzero"`
// Custom system prompt to guide extraction behavior
SystemPrompt param.Opt[string] `json:"system_prompt,omitzero"`
// Comma-separated page numbers or ranges to process (1-based). Omit to process all
// pages.
TargetPages param.Opt[string] `json:"target_pages,omitzero"`
// Include citations in results
CiteSources param.Opt[bool] `json:"cite_sources,omitzero"`
// Include confidence scores in results
ConfidenceScores param.Opt[bool] `json:"confidence_scores,omitzero"`
// Use 'latest' for the latest release for the selected tier or a date string
// (YYYY-MM-DD format) to pin to the nearest release at or before that date.
Version param.Opt[string] `json:"version,omitzero"`
// Granularity of extraction: per_doc returns one object per document, per_page
// returns one object per page, per_table_row returns one object per table row
//
// Any of "per_doc", "per_page", "per_table_row".
ExtractionTarget ExtractV2ParametersExtractionTarget `json:"extraction_target,omitzero"`
// Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
//
// Any of "cost_effective", "agentic".
Tier ExtractV2ParametersTier `json:"tier,omitzero"`
// Product type.
//
// This field can be elided, and will marshal its zero value as "extract_v2".
ProductType constant.ExtractV2 `json:"product_type" default:"extract_v2"`
// contains filtered or unexported fields
}
Typed parameters for an _extract v2_ product configuration.
The properties DataSchema, ProductType are required.
func (ExtractV2Parameters) MarshalJSON ¶
func (r ExtractV2Parameters) MarshalJSON() (data []byte, err error)
func (*ExtractV2Parameters) UnmarshalJSON ¶
func (r *ExtractV2Parameters) UnmarshalJSON(data []byte) error
type ExtractV2ParametersDataSchemaUnion ¶
type ExtractV2ParametersDataSchemaUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtractV2ParametersDataSchemaUnion) MarshalJSON ¶
func (u ExtractV2ParametersDataSchemaUnion) MarshalJSON() ([]byte, error)
func (*ExtractV2ParametersDataSchemaUnion) UnmarshalJSON ¶
func (u *ExtractV2ParametersDataSchemaUnion) UnmarshalJSON(data []byte) error
type ExtractV2ParametersDataSchemaUnionResp ¶
type ExtractV2ParametersDataSchemaUnionResp struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractV2etersDataSchemaMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfExtractV2etersDataSchemaMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractV2ParametersDataSchemaUnionResp contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractV2etersDataSchemaMapItem OfAnyArray OfString OfFloat OfBool]
func (ExtractV2ParametersDataSchemaUnionResp) AsAnyArray ¶
func (u ExtractV2ParametersDataSchemaUnionResp) AsAnyArray() (v []any)
func (ExtractV2ParametersDataSchemaUnionResp) AsAnyMap ¶
func (u ExtractV2ParametersDataSchemaUnionResp) AsAnyMap() (v map[string]any)
func (ExtractV2ParametersDataSchemaUnionResp) AsBool ¶
func (u ExtractV2ParametersDataSchemaUnionResp) AsBool() (v bool)
func (ExtractV2ParametersDataSchemaUnionResp) AsFloat ¶
func (u ExtractV2ParametersDataSchemaUnionResp) AsFloat() (v float64)
func (ExtractV2ParametersDataSchemaUnionResp) AsString ¶
func (u ExtractV2ParametersDataSchemaUnionResp) AsString() (v string)
func (ExtractV2ParametersDataSchemaUnionResp) RawJSON ¶
func (u ExtractV2ParametersDataSchemaUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2ParametersDataSchemaUnionResp) UnmarshalJSON ¶
func (r *ExtractV2ParametersDataSchemaUnionResp) UnmarshalJSON(data []byte) error
type ExtractV2ParametersExtractionTarget ¶
type ExtractV2ParametersExtractionTarget string
Granularity of extraction: per_doc returns one object per document, per_page returns one object per page, per_table_row returns one object per table row
const ( ExtractV2ParametersExtractionTargetPerDoc ExtractV2ParametersExtractionTarget = "per_doc" ExtractV2ParametersExtractionTargetPerPage ExtractV2ParametersExtractionTarget = "per_page" ExtractV2ParametersExtractionTargetPerTableRow ExtractV2ParametersExtractionTarget = "per_table_row" )
type ExtractV2ParametersResp ¶
type ExtractV2ParametersResp struct {
// JSON Schema defining the fields to extract. Validate with the /schema/validate
// endpoint first.
DataSchema map[string]*ExtractV2ParametersDataSchemaUnionResp `json:"data_schema" api:"required"`
// Product type.
ProductType constant.ExtractV2 `json:"product_type" default:"extract_v2"`
// Include citations in results
CiteSources bool `json:"cite_sources"`
// Include confidence scores in results
ConfidenceScores bool `json:"confidence_scores"`
// Granularity of extraction: per_doc returns one object per document, per_page
// returns one object per page, per_table_row returns one object per table row
//
// Any of "per_doc", "per_page", "per_table_row".
ExtractionTarget ExtractV2ParametersExtractionTarget `json:"extraction_target"`
// Maximum number of pages to process. Omit for no limit.
MaxPages int64 `json:"max_pages" api:"nullable"`
// Saved parse configuration ID to control how the document is parsed before
// extraction
ParseConfigID string `json:"parse_config_id" api:"nullable"`
// Parse tier to use before extraction. Defaults to the extract tier if not
// specified.
ParseTier string `json:"parse_tier" api:"nullable"`
// Custom system prompt to guide extraction behavior
SystemPrompt string `json:"system_prompt" api:"nullable"`
// Comma-separated page numbers or ranges to process (1-based). Omit to process all
// pages.
TargetPages string `json:"target_pages" api:"nullable"`
// Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
//
// Any of "cost_effective", "agentic".
Tier ExtractV2ParametersTier `json:"tier"`
// Use 'latest' for the latest release for the selected tier or a date string
// (YYYY-MM-DD format) to pin to the nearest release at or before that date.
Version string `json:"version"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DataSchema respjson.Field
ProductType respjson.Field
CiteSources respjson.Field
ConfidenceScores respjson.Field
ExtractionTarget respjson.Field
MaxPages respjson.Field
ParseConfigID respjson.Field
ParseTier respjson.Field
SystemPrompt respjson.Field
TargetPages respjson.Field
Tier respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Typed parameters for an _extract v2_ product configuration.
func (ExtractV2ParametersResp) RawJSON ¶
func (r ExtractV2ParametersResp) RawJSON() string
Returns the unmodified JSON received from the API
func (ExtractV2ParametersResp) ToParam ¶
func (r ExtractV2ParametersResp) ToParam() ExtractV2Parameters
ToParam converts this ExtractV2ParametersResp to a ExtractV2Parameters.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ExtractV2Parameters.Overrides()
func (*ExtractV2ParametersResp) UnmarshalJSON ¶
func (r *ExtractV2ParametersResp) UnmarshalJSON(data []byte) error
type ExtractV2ParametersTier ¶
type ExtractV2ParametersTier string
Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
const ( ExtractV2ParametersTierCostEffective ExtractV2ParametersTier = "cost_effective" ExtractV2ParametersTierAgentic ExtractV2ParametersTier = "agentic" )
type ExtractV2SchemaGenerateRequestDataSchemaUnionParam ¶
type ExtractV2SchemaGenerateRequestDataSchemaUnionParam struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtractV2SchemaGenerateRequestDataSchemaUnionParam) MarshalJSON ¶
func (u ExtractV2SchemaGenerateRequestDataSchemaUnionParam) MarshalJSON() ([]byte, error)
func (*ExtractV2SchemaGenerateRequestDataSchemaUnionParam) UnmarshalJSON ¶
func (u *ExtractV2SchemaGenerateRequestDataSchemaUnionParam) UnmarshalJSON(data []byte) error
type ExtractV2SchemaGenerateRequestParam ¶
type ExtractV2SchemaGenerateRequestParam struct {
// Optional file ID to analyze for schema generation
FileID param.Opt[string] `json:"file_id,omitzero"`
// Name for the generated configuration (auto-generated if omitted)
Name param.Opt[string] `json:"name,omitzero"`
// Natural language description of the data structure to extract
Prompt param.Opt[string] `json:"prompt,omitzero"`
// Optional schema to validate, refine, or extend
DataSchema map[string]*ExtractV2SchemaGenerateRequestDataSchemaUnionParam `json:"data_schema,omitzero"`
// contains filtered or unexported fields
}
Request schema for generating an extraction schema.
func (ExtractV2SchemaGenerateRequestParam) MarshalJSON ¶
func (r ExtractV2SchemaGenerateRequestParam) MarshalJSON() (data []byte, err error)
func (*ExtractV2SchemaGenerateRequestParam) UnmarshalJSON ¶
func (r *ExtractV2SchemaGenerateRequestParam) UnmarshalJSON(data []byte) error
type ExtractV2SchemaValidateRequestDataSchemaUnionParam ¶
type ExtractV2SchemaValidateRequestDataSchemaUnionParam struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtractV2SchemaValidateRequestDataSchemaUnionParam) MarshalJSON ¶
func (u ExtractV2SchemaValidateRequestDataSchemaUnionParam) MarshalJSON() ([]byte, error)
func (*ExtractV2SchemaValidateRequestDataSchemaUnionParam) UnmarshalJSON ¶
func (u *ExtractV2SchemaValidateRequestDataSchemaUnionParam) UnmarshalJSON(data []byte) error
type ExtractV2SchemaValidateRequestParam ¶
type ExtractV2SchemaValidateRequestParam struct {
// JSON Schema to validate for use with extract jobs
DataSchema map[string]*ExtractV2SchemaValidateRequestDataSchemaUnionParam `json:"data_schema,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request schema for validating an extraction schema.
The property DataSchema is required.
func (ExtractV2SchemaValidateRequestParam) MarshalJSON ¶
func (r ExtractV2SchemaValidateRequestParam) MarshalJSON() (data []byte, err error)
func (*ExtractV2SchemaValidateRequestParam) UnmarshalJSON ¶
func (r *ExtractV2SchemaValidateRequestParam) UnmarshalJSON(data []byte) error
type ExtractV2SchemaValidateResponse ¶
type ExtractV2SchemaValidateResponse struct {
// Validated JSON Schema, ready for use in extract jobs
DataSchema map[string]*ExtractV2SchemaValidateResponseDataSchemaUnion `json:"data_schema" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DataSchema respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response schema for schema validation.
func (ExtractV2SchemaValidateResponse) RawJSON ¶
func (r ExtractV2SchemaValidateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2SchemaValidateResponse) UnmarshalJSON ¶
func (r *ExtractV2SchemaValidateResponse) UnmarshalJSON(data []byte) error
type ExtractV2SchemaValidateResponseDataSchemaUnion ¶
type ExtractV2SchemaValidateResponseDataSchemaUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractV2SchemaValidateResponseDataSchemaMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfExtractV2SchemaValidateResponseDataSchemaMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractV2SchemaValidateResponseDataSchemaUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractV2SchemaValidateResponseDataSchemaMapItem OfAnyArray OfString OfFloat OfBool]
func (ExtractV2SchemaValidateResponseDataSchemaUnion) AsAnyArray ¶
func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsAnyArray() (v []any)
func (ExtractV2SchemaValidateResponseDataSchemaUnion) AsAnyMap ¶
func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsAnyMap() (v map[string]any)
func (ExtractV2SchemaValidateResponseDataSchemaUnion) AsBool ¶
func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsBool() (v bool)
func (ExtractV2SchemaValidateResponseDataSchemaUnion) AsFloat ¶
func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsFloat() (v float64)
func (ExtractV2SchemaValidateResponseDataSchemaUnion) AsString ¶
func (u ExtractV2SchemaValidateResponseDataSchemaUnion) AsString() (v string)
func (ExtractV2SchemaValidateResponseDataSchemaUnion) RawJSON ¶
func (u ExtractV2SchemaValidateResponseDataSchemaUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractV2SchemaValidateResponseDataSchemaUnion) UnmarshalJSON ¶
func (r *ExtractV2SchemaValidateResponseDataSchemaUnion) UnmarshalJSON(data []byte) error
type ExtractValidateSchemaParams ¶
type ExtractValidateSchemaParams struct {
// Request schema for validating an extraction schema.
ExtractV2SchemaValidateRequest ExtractV2SchemaValidateRequestParam
// contains filtered or unexported fields
}
func (ExtractValidateSchemaParams) MarshalJSON ¶
func (r ExtractValidateSchemaParams) MarshalJSON() (data []byte, err error)
func (*ExtractValidateSchemaParams) UnmarshalJSON ¶
func (r *ExtractValidateSchemaParams) UnmarshalJSON(data []byte) error
type ExtractedFieldMetadata ¶
type ExtractedFieldMetadata struct {
// Per-field metadata keyed by field name from your schema. Scalar fields (e.g.
// `vendor`) map to a FieldMetadataEntry with citation and confidence. Array fields
// (e.g. `items`) map to a list where each element contains per-sub-field
// FieldMetadataEntry objects, indexed by array position. Nested objects contain
// sub-field entries recursively.
DocumentMetadata map[string]*ExtractedFieldMetadataDocumentMetadataUnion `json:"document_metadata" api:"nullable"`
// Per-page metadata when extraction_target is per_page
PageMetadata []map[string]*ExtractedFieldMetadataPageMetadataUnion `json:"page_metadata" api:"nullable"`
// Per-row metadata when extraction_target is per_table_row
RowMetadata []map[string]*ExtractedFieldMetadataRowMetadataUnion `json:"row_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DocumentMetadata respjson.Field
PageMetadata respjson.Field
RowMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Metadata for extracted fields including document, page, and row level info.
func (ExtractedFieldMetadata) RawJSON ¶
func (r ExtractedFieldMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractedFieldMetadata) UnmarshalJSON ¶
func (r *ExtractedFieldMetadata) UnmarshalJSON(data []byte) error
type ExtractedFieldMetadataDocumentMetadataUnion ¶
type ExtractedFieldMetadataDocumentMetadataUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractedFieldMetadataDocumentMetadataMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfExtractedFieldMetadataDocumentMetadataMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractedFieldMetadataDocumentMetadataUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractedFieldMetadataDocumentMetadataMapItem OfAnyArray OfString OfFloat OfBool]
func (ExtractedFieldMetadataDocumentMetadataUnion) AsAnyArray ¶
func (u ExtractedFieldMetadataDocumentMetadataUnion) AsAnyArray() (v []any)
func (ExtractedFieldMetadataDocumentMetadataUnion) AsAnyMap ¶
func (u ExtractedFieldMetadataDocumentMetadataUnion) AsAnyMap() (v map[string]any)
func (ExtractedFieldMetadataDocumentMetadataUnion) AsBool ¶
func (u ExtractedFieldMetadataDocumentMetadataUnion) AsBool() (v bool)
func (ExtractedFieldMetadataDocumentMetadataUnion) AsFloat ¶
func (u ExtractedFieldMetadataDocumentMetadataUnion) AsFloat() (v float64)
func (ExtractedFieldMetadataDocumentMetadataUnion) AsString ¶
func (u ExtractedFieldMetadataDocumentMetadataUnion) AsString() (v string)
func (ExtractedFieldMetadataDocumentMetadataUnion) RawJSON ¶
func (u ExtractedFieldMetadataDocumentMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractedFieldMetadataDocumentMetadataUnion) UnmarshalJSON ¶
func (r *ExtractedFieldMetadataDocumentMetadataUnion) UnmarshalJSON(data []byte) error
type ExtractedFieldMetadataPageMetadataUnion ¶
type ExtractedFieldMetadataPageMetadataUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractedFieldMetadataPageMetadataMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfExtractedFieldMetadataPageMetadataMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractedFieldMetadataPageMetadataUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractedFieldMetadataPageMetadataMapItem OfAnyArray OfString OfFloat OfBool]
func (ExtractedFieldMetadataPageMetadataUnion) AsAnyArray ¶
func (u ExtractedFieldMetadataPageMetadataUnion) AsAnyArray() (v []any)
func (ExtractedFieldMetadataPageMetadataUnion) AsAnyMap ¶
func (u ExtractedFieldMetadataPageMetadataUnion) AsAnyMap() (v map[string]any)
func (ExtractedFieldMetadataPageMetadataUnion) AsBool ¶
func (u ExtractedFieldMetadataPageMetadataUnion) AsBool() (v bool)
func (ExtractedFieldMetadataPageMetadataUnion) AsFloat ¶
func (u ExtractedFieldMetadataPageMetadataUnion) AsFloat() (v float64)
func (ExtractedFieldMetadataPageMetadataUnion) AsString ¶
func (u ExtractedFieldMetadataPageMetadataUnion) AsString() (v string)
func (ExtractedFieldMetadataPageMetadataUnion) RawJSON ¶
func (u ExtractedFieldMetadataPageMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractedFieldMetadataPageMetadataUnion) UnmarshalJSON ¶
func (r *ExtractedFieldMetadataPageMetadataUnion) UnmarshalJSON(data []byte) error
type ExtractedFieldMetadataRowMetadataUnion ¶
type ExtractedFieldMetadataRowMetadataUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfExtractedFieldMetadataRowMetadataMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfExtractedFieldMetadataRowMetadataMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtractedFieldMetadataRowMetadataUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfExtractedFieldMetadataRowMetadataMapItem OfAnyArray OfString OfFloat OfBool]
func (ExtractedFieldMetadataRowMetadataUnion) AsAnyArray ¶
func (u ExtractedFieldMetadataRowMetadataUnion) AsAnyArray() (v []any)
func (ExtractedFieldMetadataRowMetadataUnion) AsAnyMap ¶
func (u ExtractedFieldMetadataRowMetadataUnion) AsAnyMap() (v map[string]any)
func (ExtractedFieldMetadataRowMetadataUnion) AsBool ¶
func (u ExtractedFieldMetadataRowMetadataUnion) AsBool() (v bool)
func (ExtractedFieldMetadataRowMetadataUnion) AsFloat ¶
func (u ExtractedFieldMetadataRowMetadataUnion) AsFloat() (v float64)
func (ExtractedFieldMetadataRowMetadataUnion) AsString ¶
func (u ExtractedFieldMetadataRowMetadataUnion) AsString() (v string)
func (ExtractedFieldMetadataRowMetadataUnion) RawJSON ¶
func (u ExtractedFieldMetadataRowMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtractedFieldMetadataRowMetadataUnion) UnmarshalJSON ¶
func (r *ExtractedFieldMetadataRowMetadataUnion) UnmarshalJSON(data []byte) error
type FailPageMode ¶
type FailPageMode string
Enum for representing the different available page error handling modes.
const ( FailPageModeRawText FailPageMode = "raw_text" FailPageModeBlankPage FailPageMode = "blank_page" FailPageModeErrorMessage FailPageMode = "error_message" )
type FailureHandlingConfig ¶
type FailureHandlingConfig = shared.FailureHandlingConfig
Configuration for handling different types of failures during data source processing.
This is an alias to an internal type.
type FailureHandlingConfigParam ¶
type FailureHandlingConfigParam = shared.FailureHandlingConfigParam
Configuration for handling different types of failures during data source processing.
This is an alias to an internal type.
type File ¶
type File struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
// The ID of the project that the file belongs to
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// The ID of the data source that the file belongs to
DataSourceID string `json:"data_source_id" api:"nullable" format:"uuid"`
// The expiration date for the file. Files past this date can be deleted.
ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
// The ID of the file in the external system
ExternalFileID string `json:"external_file_id" api:"nullable"`
// Size of the file in bytes
FileSize int64 `json:"file_size" api:"nullable"`
// File type (e.g. pdf, docx, etc.)
FileType string `json:"file_type" api:"nullable"`
// The last modified time of the file
LastModifiedAt time.Time `json:"last_modified_at" api:"nullable" format:"date-time"`
// Permission information for the file
PermissionInfo map[string]*FilePermissionInfoUnion `json:"permission_info" api:"nullable"`
// The intended purpose of the file (e.g., 'user_data', 'parse', 'extract',
// 'split', 'classify')
Purpose string `json:"purpose" api:"nullable"`
// Resource information for the file
ResourceInfo map[string]*FileResourceInfoUnion `json:"resource_info" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
CreatedAt respjson.Field
DataSourceID respjson.Field
ExpiresAt respjson.Field
ExternalFileID respjson.Field
FileSize respjson.Field
FileType respjson.Field
LastModifiedAt respjson.Field
PermissionInfo respjson.Field
Purpose respjson.Field
ResourceInfo respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for a file.
func (*File) UnmarshalJSON ¶
type FileDeleteParams ¶
type FileDeleteParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (FileDeleteParams) URLQuery ¶
func (r FileDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes FileDeleteParams's query parameters as `url.Values`.
type FileGetParams ¶
type FileGetParams struct {
ExpiresAtSeconds param.Opt[int64] `query:"expires_at_seconds,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (FileGetParams) URLQuery ¶
func (r FileGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes FileGetParams's query parameters as `url.Values`.
type FileListParams ¶
type FileListParams struct {
// Filter by external file ID.
ExternalFileID param.Opt[string] `query:"external_file_id,omitzero" json:"-"`
// Filter by file name (exact match).
FileName param.Opt[string] `query:"file_name,omitzero" json:"-"`
// A comma-separated list of fields to order by, sorted in ascending order. Use
// 'field_name desc' to specify descending order.
OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
// The maximum number of items to return. Defaults to 50, maximum is 1000.
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
// A page token received from a previous list call. Provide this to retrieve the
// subsequent page.
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Fields to expand on each file.
Expand []string `query:"expand,omitzero" json:"-"`
// Filter by specific file IDs.
FileIDs []string `query:"file_ids,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (FileListParams) URLQuery ¶
func (r FileListParams) URLQuery() (v url.Values, err error)
URLQuery serializes FileListParams's query parameters as `url.Values`.
type FileListResponse ¶
type FileListResponse struct {
// Unique file identifier
ID string `json:"id" api:"required"`
// File name including extension
Name string `json:"name" api:"required"`
// Project this file belongs to
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Schema for a presigned URL.
DownloadURL PresignedURL `json:"download_url" api:"nullable"`
// When the file expires and may be automatically removed. Null means no
// expiration.
ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
// Optional ID for correlating with an external system
ExternalFileID string `json:"external_file_id" api:"nullable"`
// File extension (pdf, docx, png, etc.)
FileType string `json:"file_type" api:"nullable"`
// When the file was last modified (ISO 8601)
LastModifiedAt time.Time `json:"last_modified_at" api:"nullable" format:"date-time"`
// How the file will be used: user_data, parse, extract, classify, split, sheet, or
// agent_app
Purpose string `json:"purpose" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
DownloadURL respjson.Field
ExpiresAt respjson.Field
ExternalFileID respjson.Field
FileType respjson.Field
LastModifiedAt respjson.Field
Purpose respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An uploaded file.
func (FileListResponse) RawJSON ¶
func (r FileListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileListResponse) UnmarshalJSON ¶
func (r *FileListResponse) UnmarshalJSON(data []byte) error
type FileNewParams ¶
type FileNewParams struct {
// The file to upload
File io.Reader `json:"file,omitzero" api:"required" format:"binary"`
// The intended purpose of the file. Valid values: 'user_data', 'parse', 'extract',
// 'split', 'classify', 'sheet', 'agent_app'. This determines the storage and
// retention policy for the file.
Purpose string `json:"purpose" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// The ID of the file in the external system
ExternalFileID param.Opt[string] `json:"external_file_id,omitzero"`
// contains filtered or unexported fields
}
func (FileNewParams) MarshalMultipart ¶
func (r FileNewParams) MarshalMultipart() (data []byte, contentType string, err error)
func (FileNewParams) URLQuery ¶
func (r FileNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes FileNewParams's query parameters as `url.Values`.
type FileNewResponse ¶
type FileNewResponse struct {
// Unique file identifier
ID string `json:"id" api:"required"`
// File name including extension
Name string `json:"name" api:"required"`
// Project this file belongs to
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Schema for a presigned URL.
DownloadURL PresignedURL `json:"download_url" api:"nullable"`
// When the file expires and may be automatically removed. Null means no
// expiration.
ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
// Optional ID for correlating with an external system
ExternalFileID string `json:"external_file_id" api:"nullable"`
// File extension (pdf, docx, png, etc.)
FileType string `json:"file_type" api:"nullable"`
// When the file was last modified (ISO 8601)
LastModifiedAt time.Time `json:"last_modified_at" api:"nullable" format:"date-time"`
// How the file will be used: user_data, parse, extract, classify, split, sheet, or
// agent_app
Purpose string `json:"purpose" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
DownloadURL respjson.Field
ExpiresAt respjson.Field
ExternalFileID respjson.Field
FileType respjson.Field
LastModifiedAt respjson.Field
Purpose respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An uploaded file.
func (FileNewResponse) RawJSON ¶
func (r FileNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileNewResponse) UnmarshalJSON ¶
func (r *FileNewResponse) UnmarshalJSON(data []byte) error
type FilePermissionInfoUnion ¶
type FilePermissionInfoUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfFilePermissionInfoMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfFilePermissionInfoMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
FilePermissionInfoUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfFilePermissionInfoMapItem OfAnyArray OfString OfFloat OfBool]
func (FilePermissionInfoUnion) AsAnyArray ¶
func (u FilePermissionInfoUnion) AsAnyArray() (v []any)
func (FilePermissionInfoUnion) AsAnyMap ¶
func (u FilePermissionInfoUnion) AsAnyMap() (v map[string]any)
func (FilePermissionInfoUnion) AsBool ¶
func (u FilePermissionInfoUnion) AsBool() (v bool)
func (FilePermissionInfoUnion) AsFloat ¶
func (u FilePermissionInfoUnion) AsFloat() (v float64)
func (FilePermissionInfoUnion) AsString ¶
func (u FilePermissionInfoUnion) AsString() (v string)
func (FilePermissionInfoUnion) RawJSON ¶
func (u FilePermissionInfoUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*FilePermissionInfoUnion) UnmarshalJSON ¶
func (r *FilePermissionInfoUnion) UnmarshalJSON(data []byte) error
type FileQueryParams ¶
type FileQueryParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// A comma-separated list of fields to order by, sorted in ascending order. Use
// 'field_name desc' to specify descending order.
OrderBy param.Opt[string] `json:"order_by,omitzero"`
// The maximum number of items to return. The service may return fewer than this
// value. If unspecified, a default page size will be used. The maximum value is
// typically 1000; values above this will be coerced to the maximum.
PageSize param.Opt[int64] `json:"page_size,omitzero"`
// A page token, received from a previous list call. Provide this to retrieve the
// subsequent page.
PageToken param.Opt[string] `json:"page_token,omitzero"`
// Filter parameters for file queries.
Filter FileQueryParamsFilter `json:"filter,omitzero"`
// contains filtered or unexported fields
}
func (FileQueryParams) MarshalJSON ¶
func (r FileQueryParams) MarshalJSON() (data []byte, err error)
func (FileQueryParams) URLQuery ¶
func (r FileQueryParams) URLQuery() (v url.Values, err error)
URLQuery serializes FileQueryParams's query parameters as `url.Values`.
func (*FileQueryParams) UnmarshalJSON ¶
func (r *FileQueryParams) UnmarshalJSON(data []byte) error
type FileQueryParamsFilter ¶
type FileQueryParamsFilter struct {
// Filter by data source ID
DataSourceID param.Opt[string] `json:"data_source_id,omitzero" format:"uuid"`
// Filter by external file ID
ExternalFileID param.Opt[string] `json:"external_file_id,omitzero"`
// Filter by file name
FileName param.Opt[string] `json:"file_name,omitzero"`
// Filter only manually uploaded files (data_source_id is null)
OnlyManuallyUploaded param.Opt[bool] `json:"only_manually_uploaded,omitzero"`
// Filter by project ID
ProjectID param.Opt[string] `json:"project_id,omitzero" format:"uuid"`
// Filter by specific file IDs
FileIDs []string `json:"file_ids,omitzero" format:"uuid"`
// contains filtered or unexported fields
}
Filter parameters for file queries.
func (FileQueryParamsFilter) MarshalJSON ¶
func (r FileQueryParamsFilter) MarshalJSON() (data []byte, err error)
func (*FileQueryParamsFilter) UnmarshalJSON ¶
func (r *FileQueryParamsFilter) UnmarshalJSON(data []byte) error
type FileQueryResponse ¶
type FileQueryResponse struct {
// The list of items.
Items []FileQueryResponseItem `json:"items" api:"required"`
// A token, which can be sent as page_token to retrieve the next page. If this
// field is omitted, there are no subsequent pages.
NextPageToken string `json:"next_page_token" api:"nullable"`
// The total number of items available. This is only populated when specifically
// requested. The value may be an estimate and can be used for display purposes
// only.
TotalSize int64 `json:"total_size" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
NextPageToken respjson.Field
TotalSize respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Paginated list of files.
func (FileQueryResponse) RawJSON ¶
func (r FileQueryResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileQueryResponse) UnmarshalJSON ¶
func (r *FileQueryResponse) UnmarshalJSON(data []byte) error
type FileQueryResponseItem ¶
type FileQueryResponseItem struct {
// Unique file identifier
ID string `json:"id" api:"required"`
// File name including extension
Name string `json:"name" api:"required"`
// Project this file belongs to
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Schema for a presigned URL.
DownloadURL PresignedURL `json:"download_url" api:"nullable"`
// When the file expires and may be automatically removed. Null means no
// expiration.
ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
// Optional ID for correlating with an external system
ExternalFileID string `json:"external_file_id" api:"nullable"`
// File extension (pdf, docx, png, etc.)
FileType string `json:"file_type" api:"nullable"`
// When the file was last modified (ISO 8601)
LastModifiedAt time.Time `json:"last_modified_at" api:"nullable" format:"date-time"`
// How the file will be used: user_data, parse, extract, classify, split, sheet, or
// agent_app
Purpose string `json:"purpose" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
DownloadURL respjson.Field
ExpiresAt respjson.Field
ExternalFileID respjson.Field
FileType respjson.Field
LastModifiedAt respjson.Field
Purpose respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An uploaded file.
func (FileQueryResponseItem) RawJSON ¶
func (r FileQueryResponseItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileQueryResponseItem) UnmarshalJSON ¶
func (r *FileQueryResponseItem) UnmarshalJSON(data []byte) error
type FileResourceInfoUnion ¶
type FileResourceInfoUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfFileResourceInfoMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfFileResourceInfoMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
FileResourceInfoUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfFileResourceInfoMapItem OfAnyArray OfString OfFloat OfBool]
func (FileResourceInfoUnion) AsAnyArray ¶
func (u FileResourceInfoUnion) AsAnyArray() (v []any)
func (FileResourceInfoUnion) AsAnyMap ¶
func (u FileResourceInfoUnion) AsAnyMap() (v map[string]any)
func (FileResourceInfoUnion) AsBool ¶
func (u FileResourceInfoUnion) AsBool() (v bool)
func (FileResourceInfoUnion) AsFloat ¶
func (u FileResourceInfoUnion) AsFloat() (v float64)
func (FileResourceInfoUnion) AsString ¶
func (u FileResourceInfoUnion) AsString() (v string)
func (FileResourceInfoUnion) RawJSON ¶
func (u FileResourceInfoUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileResourceInfoUnion) UnmarshalJSON ¶
func (r *FileResourceInfoUnion) UnmarshalJSON(data []byte) error
type FileService ¶
type FileService struct {
// contains filtered or unexported fields
}
FileService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileService method instead.
func NewFileService ¶
func NewFileService(opts ...option.RequestOption) (r FileService)
NewFileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FileService) Delete ¶
func (r *FileService) Delete(ctx context.Context, fileID string, body FileDeleteParams, opts ...option.RequestOption) (err error)
Delete a file from the project.
func (*FileService) Get ¶
func (r *FileService) Get(ctx context.Context, fileID string, query FileGetParams, opts ...option.RequestOption) (res *PresignedURL, err error)
Get a presigned URL to download the file content.
func (*FileService) List ¶
func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[FileListResponse], err error)
List files with optional filtering and pagination.
Filter by `file_name`, `file_ids`, or `external_file_id`. Supports cursor-based pagination and custom ordering.
func (*FileService) ListAutoPaging ¶
func (r *FileService) ListAutoPaging(ctx context.Context, query FileListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[FileListResponse]
List files with optional filtering and pagination.
Filter by `file_name`, `file_ids`, or `external_file_id`. Supports cursor-based pagination and custom ordering.
func (*FileService) New ¶
func (r *FileService) New(ctx context.Context, params FileNewParams, opts ...option.RequestOption) (res *FileNewResponse, err error)
Upload a file using multipart/form-data.
Set `purpose` to indicate how the file will be used: `user_data`, `parse`, `extract`, `classify`, `split`, `sheet`, or `agent_app`.
Returns the created file metadata including its ID for use in subsequent parse, extract, or classify operations.
func (*FileService) Query
deprecated
func (r *FileService) Query(ctx context.Context, params FileQueryParams, opts ...option.RequestOption) (res *FileQueryResponse, err error)
Query files with filtering and pagination. Deprecated: use `GET /files`.
Deprecated: Use the GET /files endpoint instead
type FooterItem ¶
type FooterItem struct {
Items []FooterItemItemUnion `json:"items" api:"required"`
Md string `json:"md" api:"required"`
Bbox []BBox `json:"bbox" api:"nullable"`
//
// Any of "footer".
Type FooterItemType `json:"type"`
JSON struct {
Items respjson.Field
Md respjson.Field
Bbox respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FooterItem) RawJSON ¶
func (r FooterItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*FooterItem) UnmarshalJSON ¶
func (r *FooterItem) UnmarshalJSON(data []byte) error
type FooterItemItemUnion ¶
type FooterItemItemUnion struct {
Type string `json:"type"`
Level int64 `json:"level"`
Items []ListItemItemUnion `json:"items"`
Ordered bool `json:"ordered"`
Language string `json:"language"`
Csv string `json:"csv"`
HTML string `json:"html"`
Rows [][]*TableItemRowUnion `json:"rows"`
MergedFromPages []int64 `json:"merged_from_pages"`
MergedIntoPage int64 `json:"merged_into_page"`
ParseConcerns []TableItemParseConcern `json:"parse_concerns"`
// This field is from variant [ImageItem].
// This field is from variant [LinkItem].
Md respjson.Field
Value respjson.Field
Bbox respjson.Field
Type respjson.Field
Level respjson.Field
Items respjson.Field
Ordered respjson.Field
Language respjson.Field
Csv respjson.Field
HTML respjson.Field
Rows respjson.Field
MergedFromPages respjson.Field
MergedIntoPage respjson.Field
ParseConcerns respjson.Field
Caption respjson.Field
URL respjson.Field
Text respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
FooterItemItemUnion contains all possible properties and values from TextItem, HeadingItem, ListItem, CodeItem, TableItem, ImageItem, LinkItem.
Use the FooterItemItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (FooterItemItemUnion) AsAny ¶
func (u FooterItemItemUnion) AsAny() anyFooterItemItem
Use the following switch statement to find the correct variant
switch variant := FooterItemItemUnion.AsAny().(type) {
case llamacloudprod.TextItem:
case llamacloudprod.HeadingItem:
case llamacloudprod.ListItem:
case llamacloudprod.CodeItem:
case llamacloudprod.TableItem:
case llamacloudprod.ImageItem:
case llamacloudprod.LinkItem:
default:
fmt.Errorf("no variant present")
}
func (FooterItemItemUnion) AsCode ¶
func (u FooterItemItemUnion) AsCode() (v CodeItem)
func (FooterItemItemUnion) AsHeading ¶
func (u FooterItemItemUnion) AsHeading() (v HeadingItem)
func (FooterItemItemUnion) AsImage ¶
func (u FooterItemItemUnion) AsImage() (v ImageItem)
func (FooterItemItemUnion) AsLink ¶
func (u FooterItemItemUnion) AsLink() (v LinkItem)
func (FooterItemItemUnion) AsList ¶
func (u FooterItemItemUnion) AsList() (v ListItem)
func (FooterItemItemUnion) AsTable ¶
func (u FooterItemItemUnion) AsTable() (v TableItem)
func (FooterItemItemUnion) AsText ¶
func (u FooterItemItemUnion) AsText() (v TextItem)
func (FooterItemItemUnion) RawJSON ¶
func (u FooterItemItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*FooterItemItemUnion) UnmarshalJSON ¶
func (r *FooterItemItemUnion) UnmarshalJSON(data []byte) error
type GeminiEmbedding ¶
type GeminiEmbedding struct {
// API base to access the model. Defaults to None.
APIBase string `json:"api_base" api:"nullable"`
// API key to access the model. Defaults to None.
APIKey string `json:"api_key" api:"nullable"`
ClassName string `json:"class_name"`
// The batch size for embedding calls.
EmbedBatchSize int64 `json:"embed_batch_size"`
// The modelId of the Gemini model to use.
ModelName string `json:"model_name"`
// The number of workers to use for async embedding calls.
NumWorkers int64 `json:"num_workers" api:"nullable"`
// Optional reduced dimension for output embeddings. Supported by
// models/text-embedding-004 and newer (e.g. gemini-embedding-001). Not supported
// by models/embedding-001.
OutputDimensionality int64 `json:"output_dimensionality" api:"nullable"`
// The task for embedding model.
TaskType string `json:"task_type" api:"nullable"`
// Title is only applicable for retrieval_document tasks, and is used to represent
// a document title. For other tasks, title is invalid.
Title string `json:"title" api:"nullable"`
// Transport to access the model. Defaults to None.
Transport string `json:"transport" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
APIBase respjson.Field
APIKey respjson.Field
ClassName respjson.Field
EmbedBatchSize respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
OutputDimensionality respjson.Field
TaskType respjson.Field
Title respjson.Field
Transport respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GeminiEmbedding) RawJSON ¶
func (r GeminiEmbedding) RawJSON() string
Returns the unmodified JSON received from the API
func (GeminiEmbedding) ToParam ¶
func (r GeminiEmbedding) ToParam() GeminiEmbeddingParam
ToParam converts this GeminiEmbedding to a GeminiEmbeddingParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with GeminiEmbeddingParam.Overrides()
func (*GeminiEmbedding) UnmarshalJSON ¶
func (r *GeminiEmbedding) UnmarshalJSON(data []byte) error
type GeminiEmbeddingConfig ¶
type GeminiEmbeddingConfig struct {
// Configuration for the Gemini embedding model.
Component GeminiEmbedding `json:"component"`
// Type of the embedding model.
//
// Any of "GEMINI_EMBEDDING".
Type GeminiEmbeddingConfigType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Component respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GeminiEmbeddingConfig) RawJSON ¶
func (r GeminiEmbeddingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (GeminiEmbeddingConfig) ToParam ¶
func (r GeminiEmbeddingConfig) ToParam() GeminiEmbeddingConfigParam
ToParam converts this GeminiEmbeddingConfig to a GeminiEmbeddingConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with GeminiEmbeddingConfigParam.Overrides()
func (*GeminiEmbeddingConfig) UnmarshalJSON ¶
func (r *GeminiEmbeddingConfig) UnmarshalJSON(data []byte) error
type GeminiEmbeddingConfigParam ¶
type GeminiEmbeddingConfigParam struct {
// Configuration for the Gemini embedding model.
Component GeminiEmbeddingParam `json:"component,omitzero"`
// Type of the embedding model.
//
// Any of "GEMINI_EMBEDDING".
Type GeminiEmbeddingConfigType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (GeminiEmbeddingConfigParam) MarshalJSON ¶
func (r GeminiEmbeddingConfigParam) MarshalJSON() (data []byte, err error)
func (*GeminiEmbeddingConfigParam) UnmarshalJSON ¶
func (r *GeminiEmbeddingConfigParam) UnmarshalJSON(data []byte) error
type GeminiEmbeddingConfigType ¶
type GeminiEmbeddingConfigType string
Type of the embedding model.
const (
GeminiEmbeddingConfigTypeGeminiEmbedding GeminiEmbeddingConfigType = "GEMINI_EMBEDDING"
)
type GeminiEmbeddingParam ¶
type GeminiEmbeddingParam struct {
// API base to access the model. Defaults to None.
APIBase param.Opt[string] `json:"api_base,omitzero"`
// API key to access the model. Defaults to None.
APIKey param.Opt[string] `json:"api_key,omitzero"`
// The number of workers to use for async embedding calls.
NumWorkers param.Opt[int64] `json:"num_workers,omitzero"`
// Optional reduced dimension for output embeddings. Supported by
// models/text-embedding-004 and newer (e.g. gemini-embedding-001). Not supported
// by models/embedding-001.
OutputDimensionality param.Opt[int64] `json:"output_dimensionality,omitzero"`
// The task for embedding model.
TaskType param.Opt[string] `json:"task_type,omitzero"`
// Title is only applicable for retrieval_document tasks, and is used to represent
// a document title. For other tasks, title is invalid.
Title param.Opt[string] `json:"title,omitzero"`
// Transport to access the model. Defaults to None.
Transport param.Opt[string] `json:"transport,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// The batch size for embedding calls.
EmbedBatchSize param.Opt[int64] `json:"embed_batch_size,omitzero"`
// The modelId of the Gemini model to use.
ModelName param.Opt[string] `json:"model_name,omitzero"`
// contains filtered or unexported fields
}
func (GeminiEmbeddingParam) MarshalJSON ¶
func (r GeminiEmbeddingParam) MarshalJSON() (data []byte, err error)
func (*GeminiEmbeddingParam) UnmarshalJSON ¶
func (r *GeminiEmbeddingParam) UnmarshalJSON(data []byte) error
type HeaderItem ¶
type HeaderItem struct {
// List of items within the header
Items []HeaderItemItemUnion `json:"items" api:"required"`
// Markdown representation preserving formatting
Md string `json:"md" api:"required"`
// List of bounding boxes
Bbox []BBox `json:"bbox" api:"nullable"`
// Page header container
//
// Any of "header".
Type HeaderItemType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Md respjson.Field
Bbox respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (HeaderItem) RawJSON ¶
func (r HeaderItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*HeaderItem) UnmarshalJSON ¶
func (r *HeaderItem) UnmarshalJSON(data []byte) error
type HeaderItemItemUnion ¶
type HeaderItemItemUnion struct {
Md string `json:"md"`
Value string `json:"value"`
Bbox []BBox `json:"bbox"`
// Any of "text", "heading", "list", "code", "table", "image", "link".
Type string `json:"type"`
// This field is from variant [HeadingItem].
Level int64 `json:"level"`
// This field is from variant [ListItem].
Items []ListItemItemUnion `json:"items"`
// This field is from variant [ListItem].
Ordered bool `json:"ordered"`
// This field is from variant [CodeItem].
Language string `json:"language"`
// This field is from variant [TableItem].
Csv string `json:"csv"`
// This field is from variant [TableItem].
HTML string `json:"html"`
// This field is from variant [TableItem].
Rows [][]*TableItemRowUnion `json:"rows"`
// This field is from variant [TableItem].
MergedFromPages []int64 `json:"merged_from_pages"`
// This field is from variant [TableItem].
MergedIntoPage int64 `json:"merged_into_page"`
// This field is from variant [TableItem].
ParseConcerns []TableItemParseConcern `json:"parse_concerns"`
// This field is from variant [ImageItem].
Caption string `json:"caption"`
URL string `json:"url"`
// This field is from variant [LinkItem].
Text string `json:"text"`
JSON struct {
Md respjson.Field
Value respjson.Field
Bbox respjson.Field
Type respjson.Field
Level respjson.Field
Items respjson.Field
Ordered respjson.Field
Language respjson.Field
Csv respjson.Field
HTML respjson.Field
Rows respjson.Field
MergedFromPages respjson.Field
MergedIntoPage respjson.Field
ParseConcerns respjson.Field
Caption respjson.Field
URL respjson.Field
Text respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
HeaderItemItemUnion contains all possible properties and values from TextItem, HeadingItem, ListItem, CodeItem, TableItem, ImageItem, LinkItem.
Use the HeaderItemItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (HeaderItemItemUnion) AsAny ¶
func (u HeaderItemItemUnion) AsAny() anyHeaderItemItem
Use the following switch statement to find the correct variant
switch variant := HeaderItemItemUnion.AsAny().(type) {
case llamacloudprod.TextItem:
case llamacloudprod.HeadingItem:
case llamacloudprod.ListItem:
case llamacloudprod.CodeItem:
case llamacloudprod.TableItem:
case llamacloudprod.ImageItem:
case llamacloudprod.LinkItem:
default:
fmt.Errorf("no variant present")
}
func (HeaderItemItemUnion) AsCode ¶
func (u HeaderItemItemUnion) AsCode() (v CodeItem)
func (HeaderItemItemUnion) AsHeading ¶
func (u HeaderItemItemUnion) AsHeading() (v HeadingItem)
func (HeaderItemItemUnion) AsImage ¶
func (u HeaderItemItemUnion) AsImage() (v ImageItem)
func (HeaderItemItemUnion) AsLink ¶
func (u HeaderItemItemUnion) AsLink() (v LinkItem)
func (HeaderItemItemUnion) AsList ¶
func (u HeaderItemItemUnion) AsList() (v ListItem)
func (HeaderItemItemUnion) AsTable ¶
func (u HeaderItemItemUnion) AsTable() (v TableItem)
func (HeaderItemItemUnion) AsText ¶
func (u HeaderItemItemUnion) AsText() (v TextItem)
func (HeaderItemItemUnion) RawJSON ¶
func (u HeaderItemItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*HeaderItemItemUnion) UnmarshalJSON ¶
func (r *HeaderItemItemUnion) UnmarshalJSON(data []byte) error
type HeaderItemType ¶
type HeaderItemType string
Page header container
const (
HeaderItemTypeHeader HeaderItemType = "header"
)
type HeadingItem ¶
type HeadingItem struct {
// Heading level (1-6)
Level int64 `json:"level" api:"required"`
// Markdown representation preserving formatting
Md string `json:"md" api:"required"`
// Heading text content
Value string `json:"value" api:"required"`
// List of bounding boxes
Bbox []BBox `json:"bbox" api:"nullable"`
// Heading item type
//
// Any of "heading".
Type HeadingItemType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Level respjson.Field
Md respjson.Field
Value respjson.Field
Bbox respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (HeadingItem) RawJSON ¶
func (r HeadingItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*HeadingItem) UnmarshalJSON ¶
func (r *HeadingItem) UnmarshalJSON(data []byte) error
type HeadingItemType ¶
type HeadingItemType string
Heading item type
const (
HeadingItemTypeHeading HeadingItemType = "heading"
)
type HuggingFaceInferenceAPIEmbedding ¶
type HuggingFaceInferenceAPIEmbedding struct {
// Hugging Face token. Will default to the locally saved token. Pass token=False if
// you don’t want to send your token to the server.
Token HuggingFaceInferenceAPIEmbeddingTokenUnion `json:"token" api:"nullable"`
ClassName string `json:"class_name"`
// Additional cookies to send to the server.
Cookies map[string]string `json:"cookies" api:"nullable"`
// The batch size for embedding calls.
EmbedBatchSize int64 `json:"embed_batch_size"`
// Additional headers to send to the server. By default only the authorization and
// user-agent headers are sent. Values in this dictionary will override the default
// values.
Headers map[string]string `json:"headers" api:"nullable"`
// Hugging Face model name. If None, the task will be used.
ModelName string `json:"model_name" api:"nullable"`
// The number of workers to use for async embedding calls.
NumWorkers int64 `json:"num_workers" api:"nullable"`
// Enum of possible pooling choices with pooling behaviors.
//
// Any of "cls", "mean", "last".
Pooling HuggingFaceInferenceAPIEmbeddingPooling `json:"pooling" api:"nullable"`
// Instruction to prepend during query embedding.
QueryInstruction string `json:"query_instruction" api:"nullable"`
// Optional task to pick Hugging Face's recommended model, used when model_name is
// left as default of None.
Task string `json:"task" api:"nullable"`
// Instruction to prepend during text embedding.
TextInstruction string `json:"text_instruction" api:"nullable"`
// The maximum number of seconds to wait for a response from the server. Loading a
// new model in Inference API can take up to several minutes. Defaults to None,
// meaning it will loop until the server is available.
Timeout float64 `json:"timeout" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Token respjson.Field
ClassName respjson.Field
Cookies respjson.Field
EmbedBatchSize respjson.Field
Headers respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
Pooling respjson.Field
QueryInstruction respjson.Field
Task respjson.Field
TextInstruction respjson.Field
Timeout respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (HuggingFaceInferenceAPIEmbedding) RawJSON ¶
func (r HuggingFaceInferenceAPIEmbedding) RawJSON() string
Returns the unmodified JSON received from the API
func (HuggingFaceInferenceAPIEmbedding) ToParam ¶
func (r HuggingFaceInferenceAPIEmbedding) ToParam() HuggingFaceInferenceAPIEmbeddingParam
ToParam converts this HuggingFaceInferenceAPIEmbedding to a HuggingFaceInferenceAPIEmbeddingParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with HuggingFaceInferenceAPIEmbeddingParam.Overrides()
func (*HuggingFaceInferenceAPIEmbedding) UnmarshalJSON ¶
func (r *HuggingFaceInferenceAPIEmbedding) UnmarshalJSON(data []byte) error
type HuggingFaceInferenceAPIEmbeddingConfig ¶
type HuggingFaceInferenceAPIEmbeddingConfig struct {
// Configuration for the HuggingFace Inference API embedding model.
Component HuggingFaceInferenceAPIEmbedding `json:"component"`
// Type of the embedding model.
//
// Any of "HUGGINGFACE_API_EMBEDDING".
Type HuggingFaceInferenceAPIEmbeddingConfigType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Component respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (HuggingFaceInferenceAPIEmbeddingConfig) RawJSON ¶
func (r HuggingFaceInferenceAPIEmbeddingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (HuggingFaceInferenceAPIEmbeddingConfig) ToParam ¶
func (r HuggingFaceInferenceAPIEmbeddingConfig) ToParam() HuggingFaceInferenceAPIEmbeddingConfigParam
ToParam converts this HuggingFaceInferenceAPIEmbeddingConfig to a HuggingFaceInferenceAPIEmbeddingConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with HuggingFaceInferenceAPIEmbeddingConfigParam.Overrides()
func (*HuggingFaceInferenceAPIEmbeddingConfig) UnmarshalJSON ¶
func (r *HuggingFaceInferenceAPIEmbeddingConfig) UnmarshalJSON(data []byte) error
type HuggingFaceInferenceAPIEmbeddingConfigParam ¶
type HuggingFaceInferenceAPIEmbeddingConfigParam struct {
// Configuration for the HuggingFace Inference API embedding model.
Component HuggingFaceInferenceAPIEmbeddingParam `json:"component,omitzero"`
// Type of the embedding model.
//
// Any of "HUGGINGFACE_API_EMBEDDING".
Type HuggingFaceInferenceAPIEmbeddingConfigType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (HuggingFaceInferenceAPIEmbeddingConfigParam) MarshalJSON ¶
func (r HuggingFaceInferenceAPIEmbeddingConfigParam) MarshalJSON() (data []byte, err error)
func (*HuggingFaceInferenceAPIEmbeddingConfigParam) UnmarshalJSON ¶
func (r *HuggingFaceInferenceAPIEmbeddingConfigParam) UnmarshalJSON(data []byte) error
type HuggingFaceInferenceAPIEmbeddingConfigType ¶
type HuggingFaceInferenceAPIEmbeddingConfigType string
Type of the embedding model.
const (
HuggingFaceInferenceAPIEmbeddingConfigTypeHuggingfaceAPIEmbedding HuggingFaceInferenceAPIEmbeddingConfigType = "HUGGINGFACE_API_EMBEDDING"
)
type HuggingFaceInferenceAPIEmbeddingParam ¶
type HuggingFaceInferenceAPIEmbeddingParam struct {
// Hugging Face model name. If None, the task will be used.
ModelName param.Opt[string] `json:"model_name,omitzero"`
// The number of workers to use for async embedding calls.
NumWorkers param.Opt[int64] `json:"num_workers,omitzero"`
// Instruction to prepend during query embedding.
QueryInstruction param.Opt[string] `json:"query_instruction,omitzero"`
// Optional task to pick Hugging Face's recommended model, used when model_name is
// left as default of None.
Task param.Opt[string] `json:"task,omitzero"`
// Instruction to prepend during text embedding.
TextInstruction param.Opt[string] `json:"text_instruction,omitzero"`
// The maximum number of seconds to wait for a response from the server. Loading a
// new model in Inference API can take up to several minutes. Defaults to None,
// meaning it will loop until the server is available.
Timeout param.Opt[float64] `json:"timeout,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// The batch size for embedding calls.
EmbedBatchSize param.Opt[int64] `json:"embed_batch_size,omitzero"`
// Hugging Face token. Will default to the locally saved token. Pass token=False if
// you don’t want to send your token to the server.
Token HuggingFaceInferenceAPIEmbeddingTokenUnionParam `json:"token,omitzero"`
// Additional cookies to send to the server.
Cookies map[string]string `json:"cookies,omitzero"`
// Additional headers to send to the server. By default only the authorization and
// user-agent headers are sent. Values in this dictionary will override the default
// values.
Headers map[string]string `json:"headers,omitzero"`
// Enum of possible pooling choices with pooling behaviors.
//
// Any of "cls", "mean", "last".
Pooling HuggingFaceInferenceAPIEmbeddingPooling `json:"pooling,omitzero"`
// contains filtered or unexported fields
}
func (HuggingFaceInferenceAPIEmbeddingParam) MarshalJSON ¶
func (r HuggingFaceInferenceAPIEmbeddingParam) MarshalJSON() (data []byte, err error)
func (*HuggingFaceInferenceAPIEmbeddingParam) UnmarshalJSON ¶
func (r *HuggingFaceInferenceAPIEmbeddingParam) UnmarshalJSON(data []byte) error
type HuggingFaceInferenceAPIEmbeddingPooling ¶
type HuggingFaceInferenceAPIEmbeddingPooling string
Enum of possible pooling choices with pooling behaviors.
const ( HuggingFaceInferenceAPIEmbeddingPoolingCls HuggingFaceInferenceAPIEmbeddingPooling = "cls" HuggingFaceInferenceAPIEmbeddingPoolingMean HuggingFaceInferenceAPIEmbeddingPooling = "mean" HuggingFaceInferenceAPIEmbeddingPoolingLast HuggingFaceInferenceAPIEmbeddingPooling = "last" )
type HuggingFaceInferenceAPIEmbeddingTokenUnion ¶
type HuggingFaceInferenceAPIEmbeddingTokenUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfString respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
HuggingFaceInferenceAPIEmbeddingTokenUnion contains all possible properties and values from [string], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfBool]
func (HuggingFaceInferenceAPIEmbeddingTokenUnion) AsBool ¶
func (u HuggingFaceInferenceAPIEmbeddingTokenUnion) AsBool() (v bool)
func (HuggingFaceInferenceAPIEmbeddingTokenUnion) AsString ¶
func (u HuggingFaceInferenceAPIEmbeddingTokenUnion) AsString() (v string)
func (HuggingFaceInferenceAPIEmbeddingTokenUnion) RawJSON ¶
func (u HuggingFaceInferenceAPIEmbeddingTokenUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*HuggingFaceInferenceAPIEmbeddingTokenUnion) UnmarshalJSON ¶
func (r *HuggingFaceInferenceAPIEmbeddingTokenUnion) UnmarshalJSON(data []byte) error
type HuggingFaceInferenceAPIEmbeddingTokenUnionParam ¶
type HuggingFaceInferenceAPIEmbeddingTokenUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (HuggingFaceInferenceAPIEmbeddingTokenUnionParam) MarshalJSON ¶
func (u HuggingFaceInferenceAPIEmbeddingTokenUnionParam) MarshalJSON() ([]byte, error)
func (*HuggingFaceInferenceAPIEmbeddingTokenUnionParam) UnmarshalJSON ¶
func (u *HuggingFaceInferenceAPIEmbeddingTokenUnionParam) UnmarshalJSON(data []byte) error
type ImageItem ¶
type ImageItem struct {
// Image caption
Caption string `json:"caption" api:"required"`
// Markdown representation preserving formatting
Md string `json:"md" api:"required"`
// URL to the image
URL string `json:"url" api:"required"`
// List of bounding boxes
Bbox []BBox `json:"bbox" api:"nullable"`
// Image item type
//
// Any of "image".
Type ImageItemType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caption respjson.Field
Md respjson.Field
URL respjson.Field
Bbox respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*ImageItem) UnmarshalJSON ¶
type ImageItemType ¶
type ImageItemType string
Image item type
const (
ImageItemTypeImage ImageItemType = "image"
)
type LinkItem ¶
type LinkItem struct {
// Markdown representation preserving formatting
Md string `json:"md" api:"required"`
// Display text of the link
Text string `json:"text" api:"required"`
// URL of the link
URL string `json:"url" api:"required"`
// List of bounding boxes
Bbox []BBox `json:"bbox" api:"nullable"`
// Link item type
//
// Any of "link".
Type LinkItemType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Md respjson.Field
Text respjson.Field
URL respjson.Field
Bbox respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*LinkItem) UnmarshalJSON ¶
type LinkItemType ¶
type LinkItemType string
Link item type
const (
LinkItemTypeLink LinkItemType = "link"
)
type ListItem ¶
type ListItem struct {
// List of nested text or list items
Items []ListItemItemUnion `json:"items" api:"required"`
// Markdown representation preserving formatting
Md string `json:"md" api:"required"`
// Whether the list is ordered or unordered
Ordered bool `json:"ordered" api:"required"`
// List of bounding boxes
Bbox []BBox `json:"bbox" api:"nullable"`
// List item type
//
// Any of "list".
Type ListItemType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Md respjson.Field
Ordered respjson.Field
Bbox respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*ListItem) UnmarshalJSON ¶
type ListItemItemUnion ¶
type ListItemItemUnion struct {
Md string `json:"md"`
// This field is from variant [TextItem].
Value string `json:"value"`
Bbox []BBox `json:"bbox"`
Type string `json:"type"`
// This field is from variant [ListItem].
Items []ListItemItemUnion `json:"items"`
// This field is from variant [ListItem].
Ordered bool `json:"ordered"`
JSON struct {
Md respjson.Field
Value respjson.Field
Bbox respjson.Field
Type respjson.Field
Items respjson.Field
Ordered respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ListItemItemUnion contains all possible properties and values from TextItem, ListItem.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ListItemItemUnion) AsListItem ¶
func (u ListItemItemUnion) AsListItem() (v ListItem)
func (ListItemItemUnion) AsTextItem ¶
func (u ListItemItemUnion) AsTextItem() (v TextItem)
func (ListItemItemUnion) RawJSON ¶
func (u ListItemItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListItemItemUnion) UnmarshalJSON ¶
func (r *ListItemItemUnion) UnmarshalJSON(data []byte) error
type ListItemType ¶
type ListItemType string
List item type
const (
ListItemTypeList ListItemType = "list"
)
type LlamaParseParameters ¶
type LlamaParseParameters struct {
AdaptiveLongTable param.Opt[bool] `json:"adaptive_long_table,omitzero"`
AggressiveTableExtraction param.Opt[bool] `json:"aggressive_table_extraction,omitzero"`
AnnotateLinks param.Opt[bool] `json:"annotate_links,omitzero"`
AutoMode param.Opt[bool] `json:"auto_mode,omitzero"`
AutoModeConfigurationJson param.Opt[string] `json:"auto_mode_configuration_json,omitzero"`
AutoModeTriggerOnImageInPage param.Opt[bool] `json:"auto_mode_trigger_on_image_in_page,omitzero"`
AutoModeTriggerOnRegexpInPage param.Opt[string] `json:"auto_mode_trigger_on_regexp_in_page,omitzero"`
AutoModeTriggerOnTableInPage param.Opt[bool] `json:"auto_mode_trigger_on_table_in_page,omitzero"`
AutoModeTriggerOnTextInPage param.Opt[string] `json:"auto_mode_trigger_on_text_in_page,omitzero"`
AzureOpenAIAPIVersion param.Opt[string] `json:"azure_openai_api_version,omitzero"`
AzureOpenAIDeploymentName param.Opt[string] `json:"azure_openai_deployment_name,omitzero"`
AzureOpenAIEndpoint param.Opt[string] `json:"azure_openai_endpoint,omitzero"`
AzureOpenAIKey param.Opt[string] `json:"azure_openai_key,omitzero"`
BboxBottom param.Opt[float64] `json:"bbox_bottom,omitzero"`
BboxLeft param.Opt[float64] `json:"bbox_left,omitzero"`
BboxRight param.Opt[float64] `json:"bbox_right,omitzero"`
BboxTop param.Opt[float64] `json:"bbox_top,omitzero"`
BoundingBox param.Opt[string] `json:"bounding_box,omitzero"`
CompactMarkdownTable param.Opt[bool] `json:"compact_markdown_table,omitzero"`
ComplementalFormattingInstruction param.Opt[string] `json:"complemental_formatting_instruction,omitzero"`
ContentGuidelineInstruction param.Opt[string] `json:"content_guideline_instruction,omitzero"`
ContinuousMode param.Opt[bool] `json:"continuous_mode,omitzero"`
DisableImageExtraction param.Opt[bool] `json:"disable_image_extraction,omitzero"`
DisableOcr param.Opt[bool] `json:"disable_ocr,omitzero"`
DisableReconstruction param.Opt[bool] `json:"disable_reconstruction,omitzero"`
DoNotCache param.Opt[bool] `json:"do_not_cache,omitzero"`
DoNotUnrollColumns param.Opt[bool] `json:"do_not_unroll_columns,omitzero"`
EnableCostOptimizer param.Opt[bool] `json:"enable_cost_optimizer,omitzero"`
ExtractCharts param.Opt[bool] `json:"extract_charts,omitzero"`
ExtractLayout param.Opt[bool] `json:"extract_layout,omitzero"`
ExtractPrintedPageNumber param.Opt[bool] `json:"extract_printed_page_number,omitzero"`
FastMode param.Opt[bool] `json:"fast_mode,omitzero"`
FormattingInstruction param.Opt[string] `json:"formatting_instruction,omitzero"`
Gpt4oAPIKey param.Opt[string] `json:"gpt4o_api_key,omitzero"`
Gpt4oMode param.Opt[bool] `json:"gpt4o_mode,omitzero"`
GuessXlsxSheetName param.Opt[bool] `json:"guess_xlsx_sheet_name,omitzero"`
HideHeaders param.Opt[bool] `json:"hide_headers,omitzero"`
HighResOcr param.Opt[bool] `json:"high_res_ocr,omitzero"`
HTMLMakeAllElementsVisible param.Opt[bool] `json:"html_make_all_elements_visible,omitzero"`
HTMLRemoveFixedElements param.Opt[bool] `json:"html_remove_fixed_elements,omitzero"`
HTTPProxy param.Opt[string] `json:"http_proxy,omitzero"`
IgnoreDocumentElementsForLayoutDetection param.Opt[bool] `json:"ignore_document_elements_for_layout_detection,omitzero"`
InlineImagesInMarkdown param.Opt[bool] `json:"inline_images_in_markdown,omitzero"`
InputS3Path param.Opt[string] `json:"input_s3_path,omitzero"`
InputS3Region param.Opt[string] `json:"input_s3_region,omitzero"`
InputURL param.Opt[string] `json:"input_url,omitzero"`
InternalIsScreenshotJob param.Opt[bool] `json:"internal_is_screenshot_job,omitzero"`
InvalidateCache param.Opt[bool] `json:"invalidate_cache,omitzero"`
IsFormattingInstruction param.Opt[bool] `json:"is_formatting_instruction,omitzero"`
JobTimeoutExtraTimePerPageInSeconds param.Opt[float64] `json:"job_timeout_extra_time_per_page_in_seconds,omitzero"`
JobTimeoutInSeconds param.Opt[float64] `json:"job_timeout_in_seconds,omitzero"`
KeepPageSeparatorWhenMergingTables param.Opt[bool] `json:"keep_page_separator_when_merging_tables,omitzero"`
LayoutAware param.Opt[bool] `json:"layout_aware,omitzero"`
LineLevelBoundingBox param.Opt[bool] `json:"line_level_bounding_box,omitzero"`
MarkdownTableMultilineHeaderSeparator param.Opt[string] `json:"markdown_table_multiline_header_separator,omitzero"`
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
MaxPagesEnforced param.Opt[int64] `json:"max_pages_enforced,omitzero"`
MergeTablesAcrossPagesInMarkdown param.Opt[bool] `json:"merge_tables_across_pages_in_markdown,omitzero"`
Model param.Opt[string] `json:"model,omitzero"`
OutlinedTableExtraction param.Opt[bool] `json:"outlined_table_extraction,omitzero"`
OutputPdfOfDocument param.Opt[bool] `json:"output_pdf_of_document,omitzero"`
OutputS3PathPrefix param.Opt[string] `json:"output_s3_path_prefix,omitzero"`
OutputS3Region param.Opt[string] `json:"output_s3_region,omitzero"`
OutputTablesAsHTML param.Opt[bool] `json:"output_tables_as_HTML,omitzero"`
PageErrorTolerance param.Opt[float64] `json:"page_error_tolerance,omitzero"`
PageHeaderPrefix param.Opt[string] `json:"page_header_prefix,omitzero"`
PageHeaderSuffix param.Opt[string] `json:"page_header_suffix,omitzero"`
PagePrefix param.Opt[string] `json:"page_prefix,omitzero"`
PageSeparator param.Opt[string] `json:"page_separator,omitzero"`
PageSuffix param.Opt[string] `json:"page_suffix,omitzero"`
ParsingInstruction param.Opt[string] `json:"parsing_instruction,omitzero"`
PreciseBoundingBox param.Opt[bool] `json:"precise_bounding_box,omitzero"`
PremiumMode param.Opt[bool] `json:"premium_mode,omitzero"`
PresentationOutOfBoundsContent param.Opt[bool] `json:"presentation_out_of_bounds_content,omitzero"`
PresentationSkipEmbeddedData param.Opt[bool] `json:"presentation_skip_embedded_data,omitzero"`
PreserveLayoutAlignmentAcrossPages param.Opt[bool] `json:"preserve_layout_alignment_across_pages,omitzero"`
PreserveVerySmallText param.Opt[bool] `json:"preserve_very_small_text,omitzero"`
Preset param.Opt[string] `json:"preset,omitzero"`
ProjectID param.Opt[string] `json:"project_id,omitzero"`
RemoveHiddenText param.Opt[bool] `json:"remove_hidden_text,omitzero"`
ReplaceFailedPageWithErrorMessagePrefix param.Opt[string] `json:"replace_failed_page_with_error_message_prefix,omitzero"`
ReplaceFailedPageWithErrorMessageSuffix param.Opt[string] `json:"replace_failed_page_with_error_message_suffix,omitzero"`
SaveImages param.Opt[bool] `json:"save_images,omitzero"`
SkipDiagonalText param.Opt[bool] `json:"skip_diagonal_text,omitzero"`
SpecializedChartParsingAgentic param.Opt[bool] `json:"specialized_chart_parsing_agentic,omitzero"`
SpecializedChartParsingEfficient param.Opt[bool] `json:"specialized_chart_parsing_efficient,omitzero"`
SpecializedChartParsingPlus param.Opt[bool] `json:"specialized_chart_parsing_plus,omitzero"`
SpecializedImageParsing param.Opt[bool] `json:"specialized_image_parsing,omitzero"`
SpreadsheetExtractSubTables param.Opt[bool] `json:"spreadsheet_extract_sub_tables,omitzero"`
SpreadsheetForceFormulaComputation param.Opt[bool] `json:"spreadsheet_force_formula_computation,omitzero"`
SpreadsheetIncludeHiddenSheets param.Opt[bool] `json:"spreadsheet_include_hidden_sheets,omitzero"`
StrictModeBuggyFont param.Opt[bool] `json:"strict_mode_buggy_font,omitzero"`
StrictModeImageExtraction param.Opt[bool] `json:"strict_mode_image_extraction,omitzero"`
StrictModeImageOcr param.Opt[bool] `json:"strict_mode_image_ocr,omitzero"`
StrictModeReconstruction param.Opt[bool] `json:"strict_mode_reconstruction,omitzero"`
StructuredOutput param.Opt[bool] `json:"structured_output,omitzero"`
StructuredOutputJsonSchema param.Opt[string] `json:"structured_output_json_schema,omitzero"`
StructuredOutputJsonSchemaName param.Opt[string] `json:"structured_output_json_schema_name,omitzero"`
SystemPrompt param.Opt[string] `json:"system_prompt,omitzero"`
SystemPromptAppend param.Opt[string] `json:"system_prompt_append,omitzero"`
TakeScreenshot param.Opt[bool] `json:"take_screenshot,omitzero"`
TargetPages param.Opt[string] `json:"target_pages,omitzero"`
Tier param.Opt[string] `json:"tier,omitzero"`
UseVendorMultimodalModel param.Opt[bool] `json:"use_vendor_multimodal_model,omitzero"`
UserPrompt param.Opt[string] `json:"user_prompt,omitzero"`
VendorMultimodalAPIKey param.Opt[string] `json:"vendor_multimodal_api_key,omitzero"`
VendorMultimodalModelName param.Opt[string] `json:"vendor_multimodal_model_name,omitzero"`
Version param.Opt[string] `json:"version,omitzero"`
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Any of "screenshot", "embedded", "layout".
ImagesToSave []string `json:"images_to_save,omitzero"`
// The priority for the request. This field may be ignored or overwritten depending
// on the organization tier.
//
// Any of "low", "medium", "high", "critical".
Priority LlamaParseParametersPriority `json:"priority,omitzero"`
// Outbound webhook endpoints to notify on job status changes
WebhookConfigurations []LlamaParseParametersWebhookConfiguration `json:"webhook_configurations,omitzero"`
Languages []ParsingLanguages `json:"languages,omitzero"`
// Enum for representing the mode of parsing to be used.
//
// Any of "parse_page_without_llm", "parse_page_with_llm", "parse_page_with_lvm",
// "parse_page_with_agent", "parse_page_with_layout_agent",
// "parse_document_with_llm", "parse_document_with_lvm",
// "parse_document_with_agent".
ParseMode ParsingMode `json:"parse_mode,omitzero"`
// Enum for representing the different available page error handling modes.
//
// Any of "raw_text", "blank_page", "error_message".
ReplaceFailedPageMode FailPageMode `json:"replace_failed_page_mode,omitzero"`
// contains filtered or unexported fields
}
func (LlamaParseParameters) MarshalJSON ¶
func (r LlamaParseParameters) MarshalJSON() (data []byte, err error)
func (*LlamaParseParameters) UnmarshalJSON ¶
func (r *LlamaParseParameters) UnmarshalJSON(data []byte) error
type LlamaParseParametersPriority ¶
type LlamaParseParametersPriority string
The priority for the request. This field may be ignored or overwritten depending on the organization tier.
const ( LlamaParseParametersPriorityLow LlamaParseParametersPriority = "low" LlamaParseParametersPriorityMedium LlamaParseParametersPriority = "medium" LlamaParseParametersPriorityHigh LlamaParseParametersPriority = "high" LlamaParseParametersPriorityCritical LlamaParseParametersPriority = "critical" )
type LlamaParseParametersResp ¶
type LlamaParseParametersResp struct {
AdaptiveLongTable bool `json:"adaptive_long_table" api:"nullable"`
AggressiveTableExtraction bool `json:"aggressive_table_extraction" api:"nullable"`
AnnotateLinks bool `json:"annotate_links" api:"nullable"`
AutoMode bool `json:"auto_mode" api:"nullable"`
AutoModeConfigurationJson string `json:"auto_mode_configuration_json" api:"nullable"`
AutoModeTriggerOnImageInPage bool `json:"auto_mode_trigger_on_image_in_page" api:"nullable"`
AutoModeTriggerOnRegexpInPage string `json:"auto_mode_trigger_on_regexp_in_page" api:"nullable"`
AutoModeTriggerOnTableInPage bool `json:"auto_mode_trigger_on_table_in_page" api:"nullable"`
AutoModeTriggerOnTextInPage string `json:"auto_mode_trigger_on_text_in_page" api:"nullable"`
AzureOpenAIAPIVersion string `json:"azure_openai_api_version" api:"nullable"`
AzureOpenAIDeploymentName string `json:"azure_openai_deployment_name" api:"nullable"`
AzureOpenAIEndpoint string `json:"azure_openai_endpoint" api:"nullable"`
AzureOpenAIKey string `json:"azure_openai_key" api:"nullable"`
BboxBottom float64 `json:"bbox_bottom" api:"nullable"`
BboxLeft float64 `json:"bbox_left" api:"nullable"`
BboxRight float64 `json:"bbox_right" api:"nullable"`
BboxTop float64 `json:"bbox_top" api:"nullable"`
BoundingBox string `json:"bounding_box" api:"nullable"`
CompactMarkdownTable bool `json:"compact_markdown_table" api:"nullable"`
ComplementalFormattingInstruction string `json:"complemental_formatting_instruction" api:"nullable"`
ContentGuidelineInstruction string `json:"content_guideline_instruction" api:"nullable"`
ContinuousMode bool `json:"continuous_mode" api:"nullable"`
DisableImageExtraction bool `json:"disable_image_extraction" api:"nullable"`
DisableOcr bool `json:"disable_ocr" api:"nullable"`
DisableReconstruction bool `json:"disable_reconstruction" api:"nullable"`
DoNotCache bool `json:"do_not_cache" api:"nullable"`
DoNotUnrollColumns bool `json:"do_not_unroll_columns" api:"nullable"`
EnableCostOptimizer bool `json:"enable_cost_optimizer" api:"nullable"`
ExtractCharts bool `json:"extract_charts" api:"nullable"`
ExtractLayout bool `json:"extract_layout" api:"nullable"`
ExtractPrintedPageNumber bool `json:"extract_printed_page_number" api:"nullable"`
FastMode bool `json:"fast_mode" api:"nullable"`
FormattingInstruction string `json:"formatting_instruction" api:"nullable"`
Gpt4oAPIKey string `json:"gpt4o_api_key" api:"nullable"`
Gpt4oMode bool `json:"gpt4o_mode" api:"nullable"`
GuessXlsxSheetName bool `json:"guess_xlsx_sheet_name" api:"nullable"`
HideHeaders bool `json:"hide_headers" api:"nullable"`
HighResOcr bool `json:"high_res_ocr" api:"nullable"`
HTMLMakeAllElementsVisible bool `json:"html_make_all_elements_visible" api:"nullable"`
HTMLRemoveFixedElements bool `json:"html_remove_fixed_elements" api:"nullable"`
HTTPProxy string `json:"http_proxy" api:"nullable"`
IgnoreDocumentElementsForLayoutDetection bool `json:"ignore_document_elements_for_layout_detection" api:"nullable"`
// Any of "screenshot", "embedded", "layout".
ImagesToSave []string `json:"images_to_save" api:"nullable"`
InlineImagesInMarkdown bool `json:"inline_images_in_markdown" api:"nullable"`
InputS3Path string `json:"input_s3_path" api:"nullable"`
InputS3Region string `json:"input_s3_region" api:"nullable"`
InputURL string `json:"input_url" api:"nullable"`
InternalIsScreenshotJob bool `json:"internal_is_screenshot_job" api:"nullable"`
InvalidateCache bool `json:"invalidate_cache" api:"nullable"`
IsFormattingInstruction bool `json:"is_formatting_instruction" api:"nullable"`
JobTimeoutExtraTimePerPageInSeconds float64 `json:"job_timeout_extra_time_per_page_in_seconds" api:"nullable"`
JobTimeoutInSeconds float64 `json:"job_timeout_in_seconds" api:"nullable"`
KeepPageSeparatorWhenMergingTables bool `json:"keep_page_separator_when_merging_tables" api:"nullable"`
Languages []ParsingLanguages `json:"languages"`
LayoutAware bool `json:"layout_aware" api:"nullable"`
LineLevelBoundingBox bool `json:"line_level_bounding_box" api:"nullable"`
MarkdownTableMultilineHeaderSeparator string `json:"markdown_table_multiline_header_separator" api:"nullable"`
MaxPages int64 `json:"max_pages" api:"nullable"`
MaxPagesEnforced int64 `json:"max_pages_enforced" api:"nullable"`
MergeTablesAcrossPagesInMarkdown bool `json:"merge_tables_across_pages_in_markdown" api:"nullable"`
Model string `json:"model" api:"nullable"`
OutlinedTableExtraction bool `json:"outlined_table_extraction" api:"nullable"`
OutputPdfOfDocument bool `json:"output_pdf_of_document" api:"nullable"`
OutputS3PathPrefix string `json:"output_s3_path_prefix" api:"nullable"`
OutputS3Region string `json:"output_s3_region" api:"nullable"`
OutputTablesAsHTML bool `json:"output_tables_as_HTML" api:"nullable"`
PageErrorTolerance float64 `json:"page_error_tolerance" api:"nullable"`
PageHeaderPrefix string `json:"page_header_prefix" api:"nullable"`
PageHeaderSuffix string `json:"page_header_suffix" api:"nullable"`
PagePrefix string `json:"page_prefix" api:"nullable"`
PageSeparator string `json:"page_separator" api:"nullable"`
PageSuffix string `json:"page_suffix" api:"nullable"`
// Enum for representing the mode of parsing to be used.
//
// Any of "parse_page_without_llm", "parse_page_with_llm", "parse_page_with_lvm",
// "parse_page_with_agent", "parse_page_with_layout_agent",
// "parse_document_with_llm", "parse_document_with_lvm",
// "parse_document_with_agent".
ParseMode ParsingMode `json:"parse_mode" api:"nullable"`
ParsingInstruction string `json:"parsing_instruction" api:"nullable"`
PreciseBoundingBox bool `json:"precise_bounding_box" api:"nullable"`
PremiumMode bool `json:"premium_mode" api:"nullable"`
PresentationOutOfBoundsContent bool `json:"presentation_out_of_bounds_content" api:"nullable"`
PresentationSkipEmbeddedData bool `json:"presentation_skip_embedded_data" api:"nullable"`
PreserveLayoutAlignmentAcrossPages bool `json:"preserve_layout_alignment_across_pages" api:"nullable"`
PreserveVerySmallText bool `json:"preserve_very_small_text" api:"nullable"`
Preset string `json:"preset" api:"nullable"`
// The priority for the request. This field may be ignored or overwritten depending
// on the organization tier.
//
// Any of "low", "medium", "high", "critical".
Priority LlamaParseParametersPriority `json:"priority" api:"nullable"`
ProjectID string `json:"project_id" api:"nullable"`
RemoveHiddenText bool `json:"remove_hidden_text" api:"nullable"`
// Enum for representing the different available page error handling modes.
//
// Any of "raw_text", "blank_page", "error_message".
ReplaceFailedPageMode FailPageMode `json:"replace_failed_page_mode" api:"nullable"`
ReplaceFailedPageWithErrorMessagePrefix string `json:"replace_failed_page_with_error_message_prefix" api:"nullable"`
ReplaceFailedPageWithErrorMessageSuffix string `json:"replace_failed_page_with_error_message_suffix" api:"nullable"`
SaveImages bool `json:"save_images" api:"nullable"`
SkipDiagonalText bool `json:"skip_diagonal_text" api:"nullable"`
SpecializedChartParsingAgentic bool `json:"specialized_chart_parsing_agentic" api:"nullable"`
SpecializedChartParsingEfficient bool `json:"specialized_chart_parsing_efficient" api:"nullable"`
SpecializedChartParsingPlus bool `json:"specialized_chart_parsing_plus" api:"nullable"`
SpecializedImageParsing bool `json:"specialized_image_parsing" api:"nullable"`
SpreadsheetExtractSubTables bool `json:"spreadsheet_extract_sub_tables" api:"nullable"`
SpreadsheetForceFormulaComputation bool `json:"spreadsheet_force_formula_computation" api:"nullable"`
SpreadsheetIncludeHiddenSheets bool `json:"spreadsheet_include_hidden_sheets" api:"nullable"`
StrictModeBuggyFont bool `json:"strict_mode_buggy_font" api:"nullable"`
StrictModeImageExtraction bool `json:"strict_mode_image_extraction" api:"nullable"`
StrictModeImageOcr bool `json:"strict_mode_image_ocr" api:"nullable"`
StrictModeReconstruction bool `json:"strict_mode_reconstruction" api:"nullable"`
StructuredOutput bool `json:"structured_output" api:"nullable"`
StructuredOutputJsonSchema string `json:"structured_output_json_schema" api:"nullable"`
StructuredOutputJsonSchemaName string `json:"structured_output_json_schema_name" api:"nullable"`
SystemPrompt string `json:"system_prompt" api:"nullable"`
SystemPromptAppend string `json:"system_prompt_append" api:"nullable"`
TakeScreenshot bool `json:"take_screenshot" api:"nullable"`
TargetPages string `json:"target_pages" api:"nullable"`
Tier string `json:"tier" api:"nullable"`
UseVendorMultimodalModel bool `json:"use_vendor_multimodal_model" api:"nullable"`
UserPrompt string `json:"user_prompt" api:"nullable"`
VendorMultimodalAPIKey string `json:"vendor_multimodal_api_key" api:"nullable"`
VendorMultimodalModelName string `json:"vendor_multimodal_model_name" api:"nullable"`
Version string `json:"version" api:"nullable"`
// Outbound webhook endpoints to notify on job status changes
WebhookConfigurations []LlamaParseParametersWebhookConfigurationResp `json:"webhook_configurations" api:"nullable"`
WebhookURL string `json:"webhook_url" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdaptiveLongTable respjson.Field
AggressiveTableExtraction respjson.Field
AnnotateLinks respjson.Field
AutoMode respjson.Field
AutoModeConfigurationJson respjson.Field
AutoModeTriggerOnImageInPage respjson.Field
AutoModeTriggerOnRegexpInPage respjson.Field
AutoModeTriggerOnTableInPage respjson.Field
AutoModeTriggerOnTextInPage respjson.Field
AzureOpenAIAPIVersion respjson.Field
AzureOpenAIDeploymentName respjson.Field
AzureOpenAIEndpoint respjson.Field
AzureOpenAIKey respjson.Field
BboxBottom respjson.Field
BboxLeft respjson.Field
BboxRight respjson.Field
BboxTop respjson.Field
BoundingBox respjson.Field
CompactMarkdownTable respjson.Field
ComplementalFormattingInstruction respjson.Field
ContentGuidelineInstruction respjson.Field
ContinuousMode respjson.Field
DisableImageExtraction respjson.Field
DisableOcr respjson.Field
DisableReconstruction respjson.Field
DoNotCache respjson.Field
DoNotUnrollColumns respjson.Field
EnableCostOptimizer respjson.Field
ExtractCharts respjson.Field
ExtractLayout respjson.Field
ExtractPrintedPageNumber respjson.Field
FastMode respjson.Field
FormattingInstruction respjson.Field
Gpt4oAPIKey respjson.Field
Gpt4oMode respjson.Field
GuessXlsxSheetName respjson.Field
HideFooters respjson.Field
HideHeaders respjson.Field
HighResOcr respjson.Field
HTMLMakeAllElementsVisible respjson.Field
HTMLRemoveFixedElements respjson.Field
HTMLRemoveNavigationElements respjson.Field
HTTPProxy respjson.Field
IgnoreDocumentElementsForLayoutDetection respjson.Field
ImagesToSave respjson.Field
InlineImagesInMarkdown respjson.Field
InputS3Path respjson.Field
InputS3Region respjson.Field
InputURL respjson.Field
InternalIsScreenshotJob respjson.Field
InvalidateCache respjson.Field
IsFormattingInstruction respjson.Field
JobTimeoutExtraTimePerPageInSeconds respjson.Field
JobTimeoutInSeconds respjson.Field
KeepPageSeparatorWhenMergingTables respjson.Field
Languages respjson.Field
LayoutAware respjson.Field
LineLevelBoundingBox respjson.Field
MarkdownTableMultilineHeaderSeparator respjson.Field
MaxPages respjson.Field
MaxPagesEnforced respjson.Field
MergeTablesAcrossPagesInMarkdown respjson.Field
Model respjson.Field
OutlinedTableExtraction respjson.Field
OutputPdfOfDocument respjson.Field
OutputS3PathPrefix respjson.Field
OutputS3Region respjson.Field
OutputTablesAsHTML respjson.Field
PageErrorTolerance respjson.Field
PageFooterPrefix respjson.Field
PageFooterSuffix respjson.Field
PageHeaderPrefix respjson.Field
PageHeaderSuffix respjson.Field
PagePrefix respjson.Field
PageSeparator respjson.Field
PageSuffix respjson.Field
ParseMode respjson.Field
ParsingInstruction respjson.Field
PreciseBoundingBox respjson.Field
PremiumMode respjson.Field
PresentationOutOfBoundsContent respjson.Field
PresentationSkipEmbeddedData respjson.Field
PreserveLayoutAlignmentAcrossPages respjson.Field
PreserveVerySmallText respjson.Field
Preset respjson.Field
Priority respjson.Field
ProjectID respjson.Field
RemoveHiddenText respjson.Field
ReplaceFailedPageMode respjson.Field
ReplaceFailedPageWithErrorMessagePrefix respjson.Field
ReplaceFailedPageWithErrorMessageSuffix respjson.Field
SaveImages respjson.Field
SkipDiagonalText respjson.Field
SpecializedChartParsingAgentic respjson.Field
SpecializedChartParsingEfficient respjson.Field
SpecializedChartParsingPlus respjson.Field
SpecializedImageParsing respjson.Field
SpreadsheetExtractSubTables respjson.Field
SpreadsheetForceFormulaComputation respjson.Field
SpreadsheetIncludeHiddenSheets respjson.Field
StrictModeBuggyFont respjson.Field
StrictModeImageExtraction respjson.Field
StrictModeImageOcr respjson.Field
StrictModeReconstruction respjson.Field
StructuredOutput respjson.Field
StructuredOutputJsonSchema respjson.Field
StructuredOutputJsonSchemaName respjson.Field
SystemPrompt respjson.Field
SystemPromptAppend respjson.Field
TakeScreenshot respjson.Field
TargetPages respjson.Field
Tier respjson.Field
UseVendorMultimodalModel respjson.Field
UserPrompt respjson.Field
VendorMultimodalAPIKey respjson.Field
VendorMultimodalModelName respjson.Field
Version respjson.Field
WebhookConfigurations respjson.Field
WebhookURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LlamaParseParametersResp) RawJSON ¶
func (r LlamaParseParametersResp) RawJSON() string
Returns the unmodified JSON received from the API
func (LlamaParseParametersResp) ToParam ¶
func (r LlamaParseParametersResp) ToParam() LlamaParseParameters
ToParam converts this LlamaParseParametersResp to a LlamaParseParameters.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with LlamaParseParameters.Overrides()
func (*LlamaParseParametersResp) UnmarshalJSON ¶
func (r *LlamaParseParametersResp) UnmarshalJSON(data []byte) error
type LlamaParseParametersWebhookConfiguration ¶
type LlamaParseParametersWebhookConfiguration struct {
// Response format sent to the webhook: 'string' (default) or 'json'
WebhookOutputFormat param.Opt[string] `json:"webhook_output_format,omitzero"`
// URL to receive webhook POST notifications
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
// events are delivered.
//
// Any of "extract.pending", "extract.success", "extract.error",
// "extract.partial_success", "extract.cancelled", "parse.pending",
// "parse.running", "parse.success", "parse.error", "parse.partial_success",
// "parse.cancelled", "classify.pending", "classify.running", "classify.success",
// "classify.error", "classify.partial_success", "classify.cancelled",
// "sheets.pending", "sheets.success", "sheets.error", "sheets.partial_success",
// "sheets.cancelled", "unmapped_event".
WebhookEvents []string `json:"webhook_events,omitzero"`
// Custom HTTP headers sent with each webhook request (e.g. auth tokens)
WebhookHeaders map[string]string `json:"webhook_headers,omitzero"`
// contains filtered or unexported fields
}
Configuration for a single outbound webhook endpoint.
func (LlamaParseParametersWebhookConfiguration) MarshalJSON ¶
func (r LlamaParseParametersWebhookConfiguration) MarshalJSON() (data []byte, err error)
func (*LlamaParseParametersWebhookConfiguration) UnmarshalJSON ¶
func (r *LlamaParseParametersWebhookConfiguration) UnmarshalJSON(data []byte) error
type LlamaParseParametersWebhookConfigurationResp ¶
type LlamaParseParametersWebhookConfigurationResp struct {
// Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
// events are delivered.
//
// Any of "extract.pending", "extract.success", "extract.error",
// "extract.partial_success", "extract.cancelled", "parse.pending",
// "parse.running", "parse.success", "parse.error", "parse.partial_success",
// "parse.cancelled", "classify.pending", "classify.running", "classify.success",
// "classify.error", "classify.partial_success", "classify.cancelled",
// "sheets.pending", "sheets.success", "sheets.error", "sheets.partial_success",
// "sheets.cancelled", "unmapped_event".
WebhookEvents []string `json:"webhook_events" api:"nullable"`
// Custom HTTP headers sent with each webhook request (e.g. auth tokens)
WebhookHeaders map[string]string `json:"webhook_headers" api:"nullable"`
// Response format sent to the webhook: 'string' (default) or 'json'
WebhookOutputFormat string `json:"webhook_output_format" api:"nullable"`
// URL to receive webhook POST notifications
WebhookURL string `json:"webhook_url" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
WebhookEvents respjson.Field
WebhookHeaders respjson.Field
WebhookOutputFormat respjson.Field
WebhookURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for a single outbound webhook endpoint.
func (LlamaParseParametersWebhookConfigurationResp) RawJSON ¶
func (r LlamaParseParametersWebhookConfigurationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*LlamaParseParametersWebhookConfigurationResp) UnmarshalJSON ¶
func (r *LlamaParseParametersWebhookConfigurationResp) UnmarshalJSON(data []byte) error
type ManagedIngestionStatusResponse ¶
type ManagedIngestionStatusResponse struct {
// Status of the ingestion.
//
// Any of "NOT_STARTED", "IN_PROGRESS", "SUCCESS", "ERROR", "PARTIAL_SUCCESS",
// "CANCELLED".
Status ManagedIngestionStatusResponseStatus `json:"status" api:"required"`
// Date of the deployment.
DeploymentDate time.Time `json:"deployment_date" api:"nullable" format:"date-time"`
// When the status is effective
EffectiveAt time.Time `json:"effective_at" api:"nullable" format:"date-time"`
// List of errors that occurred during ingestion.
Error []ManagedIngestionStatusResponseError `json:"error" api:"nullable"`
// ID of the latest job.
JobID string `json:"job_id" api:"nullable" format:"uuid"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Status respjson.Field
DeploymentDate respjson.Field
EffectiveAt respjson.Field
Error respjson.Field
JobID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ManagedIngestionStatusResponse) RawJSON ¶
func (r ManagedIngestionStatusResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ManagedIngestionStatusResponse) UnmarshalJSON ¶
func (r *ManagedIngestionStatusResponse) UnmarshalJSON(data []byte) error
type ManagedIngestionStatusResponseError ¶
type ManagedIngestionStatusResponseError struct {
// ID of the job that failed.
JobID string `json:"job_id" api:"required" format:"uuid"`
// List of errors that occurred during ingestion.
Message string `json:"message" api:"required"`
// Name of the job that failed.
//
// Any of "MANAGED_INGESTION", "DATA_SOURCE", "FILE_UPDATER", "PARSE", "TRANSFORM",
// "INGESTION", "METADATA_UPDATE".
Step string `json:"step" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
JobID respjson.Field
Message respjson.Field
Step respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ManagedIngestionStatusResponseError) RawJSON ¶
func (r ManagedIngestionStatusResponseError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ManagedIngestionStatusResponseError) UnmarshalJSON ¶
func (r *ManagedIngestionStatusResponseError) UnmarshalJSON(data []byte) error
type ManagedIngestionStatusResponseStatus ¶
type ManagedIngestionStatusResponseStatus string
Status of the ingestion.
const ( ManagedIngestionStatusResponseStatusNotStarted ManagedIngestionStatusResponseStatus = "NOT_STARTED" ManagedIngestionStatusResponseStatusInProgress ManagedIngestionStatusResponseStatus = "IN_PROGRESS" ManagedIngestionStatusResponseStatusSuccess ManagedIngestionStatusResponseStatus = "SUCCESS" ManagedIngestionStatusResponseStatusError ManagedIngestionStatusResponseStatus = "ERROR" ManagedIngestionStatusResponseStatusPartialSuccess ManagedIngestionStatusResponseStatus = "PARTIAL_SUCCESS" ManagedIngestionStatusResponseStatusCancelled ManagedIngestionStatusResponseStatus = "CANCELLED" )
type MetadataFilters ¶
type MetadataFilters struct {
Filters []MetadataFiltersFilterUnion `json:"filters" api:"required"`
// Vector store filter conditions to combine different filters.
//
// Any of "and", "or", "not".
Condition MetadataFiltersCondition `json:"condition" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Filters respjson.Field
Condition respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Metadata filters for vector stores.
func (MetadataFilters) RawJSON ¶
func (r MetadataFilters) RawJSON() string
Returns the unmodified JSON received from the API
func (MetadataFilters) ToParam ¶
func (r MetadataFilters) ToParam() MetadataFiltersParam
ToParam converts this MetadataFilters to a MetadataFiltersParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MetadataFiltersParam.Overrides()
func (*MetadataFilters) UnmarshalJSON ¶
func (r *MetadataFilters) UnmarshalJSON(data []byte) error
type MetadataFiltersCondition ¶
type MetadataFiltersCondition string
Vector store filter conditions to combine different filters.
const ( MetadataFiltersConditionAnd MetadataFiltersCondition = "and" MetadataFiltersConditionOr MetadataFiltersCondition = "or" MetadataFiltersConditionNot MetadataFiltersCondition = "not" )
type MetadataFiltersFilterMetadataFilter ¶
type MetadataFiltersFilterMetadataFilter struct {
Key string `json:"key" api:"required"`
Value MetadataFiltersFilterMetadataFilterValueUnion `json:"value" api:"required"`
// Vector store filter operator.
//
// Any of "==", ">", "<", "!=", ">=", "<=", "in", "nin", "any", "all",
// "text_match", "text_match_insensitive", "contains", "is_empty".
Operator string `json:"operator"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Value respjson.Field
Operator respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Comprehensive metadata filter for vector stores to support more operators.
Value uses Strict types, as int, float and str are compatible types and were all converted to string before.
See: https://docs.pydantic.dev/latest/usage/types/#strict-types
func (MetadataFiltersFilterMetadataFilter) RawJSON ¶
func (r MetadataFiltersFilterMetadataFilter) RawJSON() string
Returns the unmodified JSON received from the API
func (*MetadataFiltersFilterMetadataFilter) UnmarshalJSON ¶
func (r *MetadataFiltersFilterMetadataFilter) UnmarshalJSON(data []byte) error
type MetadataFiltersFilterMetadataFilterParam ¶
type MetadataFiltersFilterMetadataFilterParam struct {
Value MetadataFiltersFilterMetadataFilterValueUnionParam `json:"value,omitzero" api:"required"`
Key string `json:"key" api:"required"`
// Vector store filter operator.
//
// Any of "==", ">", "<", "!=", ">=", "<=", "in", "nin", "any", "all",
// "text_match", "text_match_insensitive", "contains", "is_empty".
Operator string `json:"operator,omitzero"`
// contains filtered or unexported fields
}
Comprehensive metadata filter for vector stores to support more operators.
Value uses Strict types, as int, float and str are compatible types and were all converted to string before.
See: https://docs.pydantic.dev/latest/usage/types/#strict-types
The properties Key, Value are required.
func (MetadataFiltersFilterMetadataFilterParam) MarshalJSON ¶
func (r MetadataFiltersFilterMetadataFilterParam) MarshalJSON() (data []byte, err error)
func (*MetadataFiltersFilterMetadataFilterParam) UnmarshalJSON ¶
func (r *MetadataFiltersFilterMetadataFilterParam) UnmarshalJSON(data []byte) error
type MetadataFiltersFilterMetadataFilterValueUnion ¶
type MetadataFiltersFilterMetadataFilterValueUnion struct {
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field will be present if the value is a [[]float64] instead of an object.
OfNumberArray []float64 `json:",inline"`
// This field will be present if the value is a [[]int64] instead of an object.
OfIntegerArray []int64 `json:",inline"`
JSON struct {
OfFloat respjson.Field
OfString respjson.Field
OfStringArray respjson.Field
OfNumberArray respjson.Field
OfIntegerArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
MetadataFiltersFilterMetadataFilterValueUnion contains all possible properties and values from [float64], [string], [[]string], [[]float64], [[]int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfFloat OfString OfStringArray OfNumberArray OfIntegerArray]
func (MetadataFiltersFilterMetadataFilterValueUnion) AsFloat ¶
func (u MetadataFiltersFilterMetadataFilterValueUnion) AsFloat() (v float64)
func (MetadataFiltersFilterMetadataFilterValueUnion) AsIntegerArray ¶
func (u MetadataFiltersFilterMetadataFilterValueUnion) AsIntegerArray() (v []int64)
func (MetadataFiltersFilterMetadataFilterValueUnion) AsNumberArray ¶
func (u MetadataFiltersFilterMetadataFilterValueUnion) AsNumberArray() (v []float64)
func (MetadataFiltersFilterMetadataFilterValueUnion) AsString ¶
func (u MetadataFiltersFilterMetadataFilterValueUnion) AsString() (v string)
func (MetadataFiltersFilterMetadataFilterValueUnion) AsStringArray ¶
func (u MetadataFiltersFilterMetadataFilterValueUnion) AsStringArray() (v []string)
func (MetadataFiltersFilterMetadataFilterValueUnion) RawJSON ¶
func (u MetadataFiltersFilterMetadataFilterValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*MetadataFiltersFilterMetadataFilterValueUnion) UnmarshalJSON ¶
func (r *MetadataFiltersFilterMetadataFilterValueUnion) UnmarshalJSON(data []byte) error
type MetadataFiltersFilterMetadataFilterValueUnionParam ¶
type MetadataFiltersFilterMetadataFilterValueUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
OfNumberArray []float64 `json:",omitzero,inline"`
OfIntegerArray []int64 `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (MetadataFiltersFilterMetadataFilterValueUnionParam) MarshalJSON ¶
func (u MetadataFiltersFilterMetadataFilterValueUnionParam) MarshalJSON() ([]byte, error)
func (*MetadataFiltersFilterMetadataFilterValueUnionParam) UnmarshalJSON ¶
func (u *MetadataFiltersFilterMetadataFilterValueUnionParam) UnmarshalJSON(data []byte) error
type MetadataFiltersFilterUnion ¶
type MetadataFiltersFilterUnion struct {
// This field is from variant [MetadataFiltersFilterMetadataFilter].
Key string `json:"key"`
// This field is from variant [MetadataFiltersFilterMetadataFilter].
Value MetadataFiltersFilterMetadataFilterValueUnion `json:"value"`
// This field is from variant [MetadataFiltersFilterMetadataFilter].
Operator string `json:"operator"`
// This field is from variant [MetadataFilters].
Filters []MetadataFiltersFilterUnion `json:"filters"`
// This field is from variant [MetadataFilters].
Condition MetadataFiltersCondition `json:"condition"`
JSON struct {
Key respjson.Field
Value respjson.Field
Operator respjson.Field
Filters respjson.Field
Condition respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
MetadataFiltersFilterUnion contains all possible properties and values from MetadataFiltersFilterMetadataFilter, MetadataFilters.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (MetadataFiltersFilterUnion) AsMetadataFilter ¶
func (u MetadataFiltersFilterUnion) AsMetadataFilter() (v MetadataFiltersFilterMetadataFilter)
func (MetadataFiltersFilterUnion) AsMetadataFilters ¶
func (u MetadataFiltersFilterUnion) AsMetadataFilters() (v MetadataFilters)
func (MetadataFiltersFilterUnion) RawJSON ¶
func (u MetadataFiltersFilterUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*MetadataFiltersFilterUnion) UnmarshalJSON ¶
func (r *MetadataFiltersFilterUnion) UnmarshalJSON(data []byte) error
type MetadataFiltersFilterUnionParam ¶
type MetadataFiltersFilterUnionParam struct {
OfMetadataFilter *MetadataFiltersFilterMetadataFilterParam `json:",omitzero,inline"`
OfMetadataFilters *MetadataFiltersParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (MetadataFiltersFilterUnionParam) MarshalJSON ¶
func (u MetadataFiltersFilterUnionParam) MarshalJSON() ([]byte, error)
func (*MetadataFiltersFilterUnionParam) UnmarshalJSON ¶
func (u *MetadataFiltersFilterUnionParam) UnmarshalJSON(data []byte) error
type MetadataFiltersParam ¶
type MetadataFiltersParam struct {
Filters []MetadataFiltersFilterUnionParam `json:"filters,omitzero" api:"required"`
// Vector store filter conditions to combine different filters.
//
// Any of "and", "or", "not".
Condition MetadataFiltersCondition `json:"condition,omitzero"`
// contains filtered or unexported fields
}
Metadata filters for vector stores.
The property Filters is required.
func (MetadataFiltersParam) MarshalJSON ¶
func (r MetadataFiltersParam) MarshalJSON() (data []byte, err error)
func (*MetadataFiltersParam) UnmarshalJSON ¶
func (r *MetadataFiltersParam) UnmarshalJSON(data []byte) error
type OpenAIEmbedding ¶
type OpenAIEmbedding struct {
// Additional kwargs for the OpenAI API.
AdditionalKwargs map[string]any `json:"additional_kwargs"`
// The base URL for OpenAI API.
APIBase string `json:"api_base" api:"nullable"`
// The OpenAI API key.
APIKey string `json:"api_key" api:"nullable"`
// The version for OpenAI API.
APIVersion string `json:"api_version" api:"nullable"`
ClassName string `json:"class_name"`
// The default headers for API requests.
DefaultHeaders map[string]string `json:"default_headers" api:"nullable"`
// The number of dimensions on the output embedding vectors. Works only with v3
// embedding models.
Dimensions int64 `json:"dimensions" api:"nullable"`
// The batch size for embedding calls.
EmbedBatchSize int64 `json:"embed_batch_size"`
// Maximum number of retries.
MaxRetries int64 `json:"max_retries"`
// The name of the OpenAI embedding model.
ModelName string `json:"model_name"`
// The number of workers to use for async embedding calls.
NumWorkers int64 `json:"num_workers" api:"nullable"`
// Reuse the OpenAI client between requests. When doing anything with large volumes
// of async API calls, setting this to false can improve stability.
ReuseClient bool `json:"reuse_client"`
// Timeout for each request.
Timeout float64 `json:"timeout"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdditionalKwargs respjson.Field
APIBase respjson.Field
APIKey respjson.Field
APIVersion respjson.Field
ClassName respjson.Field
DefaultHeaders respjson.Field
Dimensions respjson.Field
EmbedBatchSize respjson.Field
MaxRetries respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
ReuseClient respjson.Field
Timeout respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpenAIEmbedding) RawJSON ¶
func (r OpenAIEmbedding) RawJSON() string
Returns the unmodified JSON received from the API
func (OpenAIEmbedding) ToParam ¶
func (r OpenAIEmbedding) ToParam() OpenAIEmbeddingParam
ToParam converts this OpenAIEmbedding to a OpenAIEmbeddingParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OpenAIEmbeddingParam.Overrides()
func (*OpenAIEmbedding) UnmarshalJSON ¶
func (r *OpenAIEmbedding) UnmarshalJSON(data []byte) error
type OpenAIEmbeddingConfig ¶
type OpenAIEmbeddingConfig struct {
// Configuration for the OpenAI embedding model.
Component OpenAIEmbedding `json:"component"`
// Type of the embedding model.
//
// Any of "OPENAI_EMBEDDING".
Type OpenAIEmbeddingConfigType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Component respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpenAIEmbeddingConfig) RawJSON ¶
func (r OpenAIEmbeddingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (OpenAIEmbeddingConfig) ToParam ¶
func (r OpenAIEmbeddingConfig) ToParam() OpenAIEmbeddingConfigParam
ToParam converts this OpenAIEmbeddingConfig to a OpenAIEmbeddingConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OpenAIEmbeddingConfigParam.Overrides()
func (*OpenAIEmbeddingConfig) UnmarshalJSON ¶
func (r *OpenAIEmbeddingConfig) UnmarshalJSON(data []byte) error
type OpenAIEmbeddingConfigParam ¶
type OpenAIEmbeddingConfigParam struct {
// Configuration for the OpenAI embedding model.
Component OpenAIEmbeddingParam `json:"component,omitzero"`
// Type of the embedding model.
//
// Any of "OPENAI_EMBEDDING".
Type OpenAIEmbeddingConfigType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (OpenAIEmbeddingConfigParam) MarshalJSON ¶
func (r OpenAIEmbeddingConfigParam) MarshalJSON() (data []byte, err error)
func (*OpenAIEmbeddingConfigParam) UnmarshalJSON ¶
func (r *OpenAIEmbeddingConfigParam) UnmarshalJSON(data []byte) error
type OpenAIEmbeddingConfigType ¶
type OpenAIEmbeddingConfigType string
Type of the embedding model.
const (
OpenAIEmbeddingConfigTypeOpenAIEmbedding OpenAIEmbeddingConfigType = "OPENAI_EMBEDDING"
)
type OpenAIEmbeddingParam ¶
type OpenAIEmbeddingParam struct {
// The base URL for OpenAI API.
APIBase param.Opt[string] `json:"api_base,omitzero"`
// The OpenAI API key.
APIKey param.Opt[string] `json:"api_key,omitzero"`
// The version for OpenAI API.
APIVersion param.Opt[string] `json:"api_version,omitzero"`
// The number of dimensions on the output embedding vectors. Works only with v3
// embedding models.
Dimensions param.Opt[int64] `json:"dimensions,omitzero"`
// The number of workers to use for async embedding calls.
NumWorkers param.Opt[int64] `json:"num_workers,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// The batch size for embedding calls.
EmbedBatchSize param.Opt[int64] `json:"embed_batch_size,omitzero"`
// Maximum number of retries.
MaxRetries param.Opt[int64] `json:"max_retries,omitzero"`
// The name of the OpenAI embedding model.
ModelName param.Opt[string] `json:"model_name,omitzero"`
// Reuse the OpenAI client between requests. When doing anything with large volumes
// of async API calls, setting this to false can improve stability.
ReuseClient param.Opt[bool] `json:"reuse_client,omitzero"`
// Timeout for each request.
Timeout param.Opt[float64] `json:"timeout,omitzero"`
// The default headers for API requests.
DefaultHeaders map[string]string `json:"default_headers,omitzero"`
// Additional kwargs for the OpenAI API.
AdditionalKwargs map[string]any `json:"additional_kwargs,omitzero"`
// contains filtered or unexported fields
}
func (OpenAIEmbeddingParam) MarshalJSON ¶
func (r OpenAIEmbeddingParam) MarshalJSON() (data []byte, err error)
func (*OpenAIEmbeddingParam) UnmarshalJSON ¶
func (r *OpenAIEmbeddingParam) UnmarshalJSON(data []byte) error
type PageFigureNodeWithScore ¶
type PageFigureNodeWithScore struct {
Node PageFigureNodeWithScoreNode `json:"node" api:"required"`
// The score of the figure node
Score float64 `json:"score" api:"required"`
ClassName string `json:"class_name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Node respjson.Field
Score respjson.Field
ClassName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Page figure metadata with score
func (PageFigureNodeWithScore) RawJSON ¶
func (r PageFigureNodeWithScore) RawJSON() string
Returns the unmodified JSON received from the API
func (*PageFigureNodeWithScore) UnmarshalJSON ¶
func (r *PageFigureNodeWithScore) UnmarshalJSON(data []byte) error
type PageFigureNodeWithScoreNode ¶
type PageFigureNodeWithScoreNode struct {
// The confidence of the figure
Confidence float64 `json:"confidence" api:"required"`
// The name of the figure
FigureName string `json:"figure_name" api:"required"`
// The size of the figure in bytes
FigureSize int64 `json:"figure_size" api:"required"`
// The ID of the file that the figure was taken from
FileID string `json:"file_id" api:"required" format:"uuid"`
// The index of the page for which the figure is taken (0-indexed)
PageIndex int64 `json:"page_index" api:"required"`
// Whether the figure is likely to be noise
IsLikelyNoise bool `json:"is_likely_noise"`
// Metadata for the figure
Metadata map[string]any `json:"metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Confidence respjson.Field
FigureName respjson.Field
FigureSize respjson.Field
FileID respjson.Field
PageIndex respjson.Field
IsLikelyNoise respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PageFigureNodeWithScoreNode) RawJSON ¶
func (r PageFigureNodeWithScoreNode) RawJSON() string
Returns the unmodified JSON received from the API
func (*PageFigureNodeWithScoreNode) UnmarshalJSON ¶
func (r *PageFigureNodeWithScoreNode) UnmarshalJSON(data []byte) error
type PageScreenshotNodeWithScore ¶
type PageScreenshotNodeWithScore struct {
Node PageScreenshotNodeWithScoreNode `json:"node" api:"required"`
// The score of the screenshot node
Score float64 `json:"score" api:"required"`
ClassName string `json:"class_name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Node respjson.Field
Score respjson.Field
ClassName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Page screenshot metadata with score
func (PageScreenshotNodeWithScore) RawJSON ¶
func (r PageScreenshotNodeWithScore) RawJSON() string
Returns the unmodified JSON received from the API
func (*PageScreenshotNodeWithScore) UnmarshalJSON ¶
func (r *PageScreenshotNodeWithScore) UnmarshalJSON(data []byte) error
type PageScreenshotNodeWithScoreNode ¶
type PageScreenshotNodeWithScoreNode struct {
// The ID of the file that the page screenshot was taken from
FileID string `json:"file_id" api:"required" format:"uuid"`
// The size of the image in bytes
ImageSize int64 `json:"image_size" api:"required"`
// The index of the page for which the screenshot is taken (0-indexed)
PageIndex int64 `json:"page_index" api:"required"`
// Metadata for the screenshot
Metadata map[string]any `json:"metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FileID respjson.Field
ImageSize respjson.Field
PageIndex respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PageScreenshotNodeWithScoreNode) RawJSON ¶
func (r PageScreenshotNodeWithScoreNode) RawJSON() string
Returns the unmodified JSON received from the API
func (*PageScreenshotNodeWithScoreNode) UnmarshalJSON ¶
func (r *PageScreenshotNodeWithScoreNode) UnmarshalJSON(data []byte) error
type ParseV2Parameters ¶
type ParseV2Parameters struct {
// Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced),
// 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with
// highest accuracy)
//
// Any of "fast", "cost_effective", "agentic", "agentic_plus".
Tier ParseV2ParametersTier `json:"tier,omitzero" api:"required"`
// Version for the selected tier. Use `latest`, or pin one of that tier's dated
// versions.
//
// Current `latest` by tier:
//
// - `fast`: `2025-12-11`
// - `cost_effective`: `2026-06-05`
// - `agentic`: `2026-06-04`
// - `agentic_plus`: `2026-06-04`
//
// Full list: `GET /api/v2/parse/versions`.
Version ParseV2ParametersVersion `json:"version,omitzero" api:"required"`
// Identifier for the client/application making the request. Used for analytics and
// debugging. Example: 'my-app-v2'
ClientName param.Opt[string] `json:"client_name,omitzero"`
// Bypass result caching and force re-parsing. Use when document content may have
// changed or you need fresh results
DisableCache param.Opt[bool] `json:"disable_cache,omitzero"`
// Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
//
// These options customize how the AI processes and interprets document content.
// Only applicable when using non-fast tiers.
AgenticOptions ParseV2ParametersAgenticOptions `json:"agentic_options,omitzero"`
// Options for fast tier parsing (rule-based, no AI).
//
// Fast tier uses deterministic algorithms for text extraction without AI
// enhancement. It's the fastest and most cost-effective option, best suited for
// simple documents with standard layouts. Currently has no configurable options
// but reserved for future expansion.
FastOptions any `json:"fast_options,omitzero"`
// Crop boundaries to process only a portion of each page. Values are ratios 0-1
// from page edges
CropBox ParseV2ParametersCropBox `json:"crop_box,omitzero"`
// Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on
// detected input file type
InputOptions ParseV2ParametersInputOptions `json:"input_options,omitzero"`
// Output formatting options for markdown, text, and extracted images
OutputOptions ParseV2ParametersOutputOptions `json:"output_options,omitzero"`
// Page selection: limit total pages or specify exact pages to process
PageRanges ParseV2ParametersPageRanges `json:"page_ranges,omitzero"`
// Job execution controls including timeouts and failure thresholds
ProcessingControl ParseV2ParametersProcessingControl `json:"processing_control,omitzero"`
// Document processing options including OCR, table extraction, and chart parsing
ProcessingOptions ParseV2ParametersProcessingOptions `json:"processing_options,omitzero"`
// Webhook endpoints for job status notifications. Multiple webhooks can be
// configured for different events or services
WebhookConfigurations []ParseV2ParametersWebhookConfiguration `json:"webhook_configurations,omitzero"`
// Product type.
//
// This field can be elided, and will marshal its zero value as "parse_v2".
ProductType constant.ParseV2 `json:"product_type" default:"parse_v2"`
// contains filtered or unexported fields
}
Configuration for LlamaParse v2 document parsing.
Includes tier selection, processing options, output formatting, page targeting, and webhook delivery. Refer to the LlamaParse documentation for details on each field.
The properties ProductType, Tier, Version are required.
func (ParseV2Parameters) MarshalJSON ¶
func (r ParseV2Parameters) MarshalJSON() (data []byte, err error)
func (*ParseV2Parameters) UnmarshalJSON ¶
func (r *ParseV2Parameters) UnmarshalJSON(data []byte) error
type ParseV2ParametersAgenticOptions ¶
type ParseV2ParametersAgenticOptions struct {
// Custom instructions for the AI parser. Use to guide extraction behavior, specify
// output formatting, or provide domain-specific context. Example: 'Extract
// financial tables with currency symbols. Format dates as YYYY-MM-DD.'
CustomPrompt param.Opt[string] `json:"custom_prompt,omitzero"`
// contains filtered or unexported fields
}
Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
These options customize how the AI processes and interprets document content. Only applicable when using non-fast tiers.
func (ParseV2ParametersAgenticOptions) MarshalJSON ¶
func (r ParseV2ParametersAgenticOptions) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersAgenticOptions) UnmarshalJSON ¶
func (r *ParseV2ParametersAgenticOptions) UnmarshalJSON(data []byte) error
type ParseV2ParametersAgenticOptionsResp ¶
type ParseV2ParametersAgenticOptionsResp struct {
// Custom instructions for the AI parser. Use to guide extraction behavior, specify
// output formatting, or provide domain-specific context. Example: 'Extract
// financial tables with currency symbols. Format dates as YYYY-MM-DD.'
CustomPrompt string `json:"custom_prompt" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CustomPrompt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
These options customize how the AI processes and interprets document content. Only applicable when using non-fast tiers.
func (ParseV2ParametersAgenticOptionsResp) RawJSON ¶
func (r ParseV2ParametersAgenticOptionsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersAgenticOptionsResp) UnmarshalJSON ¶
func (r *ParseV2ParametersAgenticOptionsResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersCropBox ¶
type ParseV2ParametersCropBox struct {
// Bottom boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content below this
// line is excluded
Bottom param.Opt[float64] `json:"bottom,omitzero"`
// Left boundary as ratio (0-1). 0=left edge, 1=right edge. Content left of this
// line is excluded
Left param.Opt[float64] `json:"left,omitzero"`
// Right boundary as ratio (0-1). 0=left edge, 1=right edge. Content right of this
// line is excluded
Right param.Opt[float64] `json:"right,omitzero"`
// Top boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content above this line
// is excluded
Top param.Opt[float64] `json:"top,omitzero"`
// contains filtered or unexported fields
}
Crop boundaries to process only a portion of each page. Values are ratios 0-1 from page edges
func (ParseV2ParametersCropBox) MarshalJSON ¶
func (r ParseV2ParametersCropBox) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersCropBox) UnmarshalJSON ¶
func (r *ParseV2ParametersCropBox) UnmarshalJSON(data []byte) error
type ParseV2ParametersCropBoxResp ¶
type ParseV2ParametersCropBoxResp struct {
// Bottom boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content below this
// line is excluded
Bottom float64 `json:"bottom" api:"nullable"`
// Left boundary as ratio (0-1). 0=left edge, 1=right edge. Content left of this
// line is excluded
Left float64 `json:"left" api:"nullable"`
// Right boundary as ratio (0-1). 0=left edge, 1=right edge. Content right of this
// line is excluded
Right float64 `json:"right" api:"nullable"`
// Top boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content above this line
// is excluded
Top float64 `json:"top" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Bottom respjson.Field
Left respjson.Field
Right respjson.Field
Top respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Crop boundaries to process only a portion of each page. Values are ratios 0-1 from page edges
func (ParseV2ParametersCropBoxResp) RawJSON ¶
func (r ParseV2ParametersCropBoxResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersCropBoxResp) UnmarshalJSON ¶
func (r *ParseV2ParametersCropBoxResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersInputOptions ¶
type ParseV2ParametersInputOptions struct {
// HTML/web page parsing options (applies to .html, .htm files)
HTML ParseV2ParametersInputOptionsHTML `json:"html,omitzero"`
// PDF-specific parsing options (applies to .pdf files)
Pdf any `json:"pdf,omitzero"`
// Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
Presentation ParseV2ParametersInputOptionsPresentation `json:"presentation,omitzero"`
// Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
Spreadsheet ParseV2ParametersInputOptionsSpreadsheet `json:"spreadsheet,omitzero"`
// contains filtered or unexported fields
}
Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on detected input file type
func (ParseV2ParametersInputOptions) MarshalJSON ¶
func (r ParseV2ParametersInputOptions) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersInputOptions) UnmarshalJSON ¶
func (r *ParseV2ParametersInputOptions) UnmarshalJSON(data []byte) error
type ParseV2ParametersInputOptionsHTML ¶
type ParseV2ParametersInputOptionsHTML struct {
// Force all HTML elements to be visible by overriding CSS display/visibility
// properties. Useful for parsing pages with hidden content or collapsed sections
MakeAllElementsVisible param.Opt[bool] `json:"make_all_elements_visible,omitzero"`
// Remove fixed-position elements (headers, footers, floating buttons) that appear
// on every page render
RemoveFixedElements param.Opt[bool] `json:"remove_fixed_elements,omitzero"`
RemoveNavigationElements param.Opt[bool] `json:"remove_navigation_elements,omitzero"`
// contains filtered or unexported fields
}
HTML/web page parsing options (applies to .html, .htm files)
func (ParseV2ParametersInputOptionsHTML) MarshalJSON ¶
func (r ParseV2ParametersInputOptionsHTML) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersInputOptionsHTML) UnmarshalJSON ¶
func (r *ParseV2ParametersInputOptionsHTML) UnmarshalJSON(data []byte) error
type ParseV2ParametersInputOptionsHTMLResp ¶
type ParseV2ParametersInputOptionsHTMLResp struct {
// Force all HTML elements to be visible by overriding CSS display/visibility
// properties. Useful for parsing pages with hidden content or collapsed sections
MakeAllElementsVisible bool `json:"make_all_elements_visible" api:"nullable"`
// Remove fixed-position elements (headers, footers, floating buttons) that appear
// on every page render
RemoveFixedElements bool `json:"remove_fixed_elements" api:"nullable"`
RemoveNavigationElements bool `json:"remove_navigation_elements" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MakeAllElementsVisible respjson.Field
RemoveFixedElements respjson.Field
RemoveNavigationElements respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
HTML/web page parsing options (applies to .html, .htm files)
func (ParseV2ParametersInputOptionsHTMLResp) RawJSON ¶
func (r ParseV2ParametersInputOptionsHTMLResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersInputOptionsHTMLResp) UnmarshalJSON ¶
func (r *ParseV2ParametersInputOptionsHTMLResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersInputOptionsPresentation ¶
type ParseV2ParametersInputOptionsPresentation struct {
// Extract content positioned outside the visible slide area. Some presentations
// have hidden notes or content that extends beyond slide boundaries
OutOfBoundsContent param.Opt[bool] `json:"out_of_bounds_content,omitzero"`
// Skip extraction of embedded chart data tables. When true, only the visual
// representation of charts is captured, not the underlying data
SkipEmbeddedData param.Opt[bool] `json:"skip_embedded_data,omitzero"`
// contains filtered or unexported fields
}
Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
func (ParseV2ParametersInputOptionsPresentation) MarshalJSON ¶
func (r ParseV2ParametersInputOptionsPresentation) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersInputOptionsPresentation) UnmarshalJSON ¶
func (r *ParseV2ParametersInputOptionsPresentation) UnmarshalJSON(data []byte) error
type ParseV2ParametersInputOptionsPresentationResp ¶
type ParseV2ParametersInputOptionsPresentationResp struct {
// Extract content positioned outside the visible slide area. Some presentations
// have hidden notes or content that extends beyond slide boundaries
OutOfBoundsContent bool `json:"out_of_bounds_content" api:"nullable"`
// Skip extraction of embedded chart data tables. When true, only the visual
// representation of charts is captured, not the underlying data
SkipEmbeddedData bool `json:"skip_embedded_data" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OutOfBoundsContent respjson.Field
SkipEmbeddedData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
func (ParseV2ParametersInputOptionsPresentationResp) RawJSON ¶
func (r ParseV2ParametersInputOptionsPresentationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersInputOptionsPresentationResp) UnmarshalJSON ¶
func (r *ParseV2ParametersInputOptionsPresentationResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersInputOptionsResp ¶
type ParseV2ParametersInputOptionsResp struct {
// HTML/web page parsing options (applies to .html, .htm files)
HTML ParseV2ParametersInputOptionsHTMLResp `json:"html"`
// PDF-specific parsing options (applies to .pdf files)
Pdf any `json:"pdf"`
// Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
Presentation ParseV2ParametersInputOptionsPresentationResp `json:"presentation"`
// Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
Spreadsheet ParseV2ParametersInputOptionsSpreadsheetResp `json:"spreadsheet"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
HTML respjson.Field
Pdf respjson.Field
Presentation respjson.Field
Spreadsheet respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on detected input file type
func (ParseV2ParametersInputOptionsResp) RawJSON ¶
func (r ParseV2ParametersInputOptionsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersInputOptionsResp) UnmarshalJSON ¶
func (r *ParseV2ParametersInputOptionsResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersInputOptionsSpreadsheet ¶
type ParseV2ParametersInputOptionsSpreadsheet struct {
// Detect and extract multiple tables within a single sheet. Useful when
// spreadsheets contain several data regions separated by blank rows/columns
DetectSubTablesInSheets param.Opt[bool] `json:"detect_sub_tables_in_sheets,omitzero"`
// Compute formula results instead of extracting formula text. Use when you need
// calculated values rather than formula definitions
ForceFormulaComputationInSheets param.Opt[bool] `json:"force_formula_computation_in_sheets,omitzero"`
// Parse hidden sheets in addition to visible ones. By default, hidden sheets are
// skipped
IncludeHiddenSheets param.Opt[bool] `json:"include_hidden_sheets,omitzero"`
// contains filtered or unexported fields
}
Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
func (ParseV2ParametersInputOptionsSpreadsheet) MarshalJSON ¶
func (r ParseV2ParametersInputOptionsSpreadsheet) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersInputOptionsSpreadsheet) UnmarshalJSON ¶
func (r *ParseV2ParametersInputOptionsSpreadsheet) UnmarshalJSON(data []byte) error
type ParseV2ParametersInputOptionsSpreadsheetResp ¶
type ParseV2ParametersInputOptionsSpreadsheetResp struct {
// Detect and extract multiple tables within a single sheet. Useful when
// spreadsheets contain several data regions separated by blank rows/columns
DetectSubTablesInSheets bool `json:"detect_sub_tables_in_sheets" api:"nullable"`
// Compute formula results instead of extracting formula text. Use when you need
// calculated values rather than formula definitions
ForceFormulaComputationInSheets bool `json:"force_formula_computation_in_sheets" api:"nullable"`
// Parse hidden sheets in addition to visible ones. By default, hidden sheets are
// skipped
IncludeHiddenSheets bool `json:"include_hidden_sheets" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DetectSubTablesInSheets respjson.Field
ForceFormulaComputationInSheets respjson.Field
IncludeHiddenSheets respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
func (ParseV2ParametersInputOptionsSpreadsheetResp) RawJSON ¶
func (r ParseV2ParametersInputOptionsSpreadsheetResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersInputOptionsSpreadsheetResp) UnmarshalJSON ¶
func (r *ParseV2ParametersInputOptionsSpreadsheetResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptions ¶
type ParseV2ParametersOutputOptions struct {
// Extract the printed page number as it appears in the document (e.g., 'Page 5 of
// 10', 'v', 'A-3'). Useful for referencing original page numbers
ExtractPrintedPageNumber param.Opt[bool] `json:"extract_printed_page_number,omitzero"`
// Optional additional output artifacts to save alongside the primary parse output.
// Each value opts in to generating and persisting one extra file; the empty list
// (default) saves none. The three accepted values are: 'stripped_md' — per-page
// markdown stripped of formatting (links, bold/italic, images, HTML), saved as
// JSON for full-text-search indexing; fetch via
// `expand=stripped_markdown_content_metadata`. 'concatenated_stripped_txt' — all
// stripped pages concatenated into a single plain-text file with `\n\n---\n\n`
// between pages, useful for feeding the document into search or embedding
// pipelines as one blob; fetch via
// `expand=concatenated_stripped_markdown_content_metadata`. 'word_bbox' — raw
// word-level bounding boxes (one JSON object per word, with page number and
// x/y/w/h coordinates) saved as JSONL, useful for highlighting or grounding
// extracted answers back to the source document; fetch via
// `expand=raw_words_content_metadata`.
AdditionalOutputs []string `json:"additional_outputs,omitzero"`
// Bounding-box granularity levels to compute for the parse. 'word' computes one
// bounding box per detected word; 'line' computes one per text line; 'cell'
// computes one per table cell. Multiple levels can be requested. Empty list
// (default) disables granular bboxes — only item-level layout boxes are returned
// on the result. When set, the computed boxes are not inlined on the result items;
// they are written to a separate `grounded_items` sidecar (JSONL, one row per
// page) and exposed as `result_content_metadata.grounded_items` (a presigned
// download URL) on the parse result. Each row matches the `GroundedJsonItem`
// shape.
//
// Any of "cell", "line", "word".
GranularBboxes []string `json:"granular_bboxes,omitzero"`
// Image categories to extract and save. Options: 'screenshot' (full page renders
// useful for visual QA), 'embedded' (images found within the document), 'layout'
// (cropped regions from layout detection like figures and diagrams). Empty list
// saves no images
//
// Any of "screenshot", "embedded", "layout".
ImagesToSave []string `json:"images_to_save,omitzero"`
// Markdown formatting options including table styles and link annotations
Markdown ParseV2ParametersOutputOptionsMarkdown `json:"markdown,omitzero"`
// Spatial text output options for preserving document layout structure
SpatialText ParseV2ParametersOutputOptionsSpatialText `json:"spatial_text,omitzero"`
// Options for exporting tables as XLSX spreadsheets
TablesAsSpreadsheet ParseV2ParametersOutputOptionsTablesAsSpreadsheet `json:"tables_as_spreadsheet,omitzero"`
// contains filtered or unexported fields
}
Output formatting options for markdown, text, and extracted images
func (ParseV2ParametersOutputOptions) MarshalJSON ¶
func (r ParseV2ParametersOutputOptions) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersOutputOptions) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptions) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsMarkdown ¶
type ParseV2ParametersOutputOptionsMarkdown struct {
// Add link annotations to markdown output in the format [text](url). When false,
// only the link text is included
AnnotateLinks param.Opt[bool] `json:"annotate_links,omitzero"`
// Embed images directly in markdown as base64 data URIs instead of extracting them
// as separate files. Useful for self-contained markdown output
InlineImages param.Opt[bool] `json:"inline_images,omitzero"`
// Table formatting options including markdown vs HTML format and merging behavior
Tables ParseV2ParametersOutputOptionsMarkdownTables `json:"tables,omitzero"`
// contains filtered or unexported fields
}
Markdown formatting options including table styles and link annotations
func (ParseV2ParametersOutputOptionsMarkdown) MarshalJSON ¶
func (r ParseV2ParametersOutputOptionsMarkdown) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersOutputOptionsMarkdown) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsMarkdown) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsMarkdownResp ¶
type ParseV2ParametersOutputOptionsMarkdownResp struct {
// Add link annotations to markdown output in the format [text](url). When false,
// only the link text is included
AnnotateLinks bool `json:"annotate_links" api:"nullable"`
// Embed images directly in markdown as base64 data URIs instead of extracting them
// as separate files. Useful for self-contained markdown output
InlineImages bool `json:"inline_images" api:"nullable"`
// Table formatting options including markdown vs HTML format and merging behavior
Tables ParseV2ParametersOutputOptionsMarkdownTablesResp `json:"tables"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AnnotateLinks respjson.Field
InlineImages respjson.Field
Tables respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Markdown formatting options including table styles and link annotations
func (ParseV2ParametersOutputOptionsMarkdownResp) RawJSON ¶
func (r ParseV2ParametersOutputOptionsMarkdownResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersOutputOptionsMarkdownResp) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsMarkdownResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsMarkdownTables ¶
type ParseV2ParametersOutputOptionsMarkdownTables struct {
// Remove extra whitespace padding in markdown table cells for more compact output
CompactMarkdownTables param.Opt[bool] `json:"compact_markdown_tables,omitzero"`
// Separator string for multiline cell content in markdown tables. Example:
// '<br>' to preserve line breaks, ' ' to join with spaces
MarkdownTableMultilineSeparator param.Opt[string] `json:"markdown_table_multiline_separator,omitzero"`
// Automatically merge tables that span multiple pages into a single table. The
// merged table appears on the first page with merged_from_pages metadata
MergeContinuedTables param.Opt[bool] `json:"merge_continued_tables,omitzero"`
// Output tables as markdown pipe tables instead of HTML <table> tags.
// Markdown tables are simpler but cannot represent complex structures like merged
// cells
OutputTablesAsMarkdown param.Opt[bool] `json:"output_tables_as_markdown,omitzero"`
// contains filtered or unexported fields
}
Table formatting options including markdown vs HTML format and merging behavior
func (ParseV2ParametersOutputOptionsMarkdownTables) MarshalJSON ¶
func (r ParseV2ParametersOutputOptionsMarkdownTables) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersOutputOptionsMarkdownTables) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsMarkdownTables) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsMarkdownTablesResp ¶
type ParseV2ParametersOutputOptionsMarkdownTablesResp struct {
// Remove extra whitespace padding in markdown table cells for more compact output
CompactMarkdownTables bool `json:"compact_markdown_tables" api:"nullable"`
// Separator string for multiline cell content in markdown tables. Example:
// '<br>' to preserve line breaks, ' ' to join with spaces
MarkdownTableMultilineSeparator string `json:"markdown_table_multiline_separator" api:"nullable"`
// Automatically merge tables that span multiple pages into a single table. The
// merged table appears on the first page with merged_from_pages metadata
MergeContinuedTables bool `json:"merge_continued_tables" api:"nullable"`
// Output tables as markdown pipe tables instead of HTML <table> tags.
// Markdown tables are simpler but cannot represent complex structures like merged
// cells
OutputTablesAsMarkdown bool `json:"output_tables_as_markdown" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CompactMarkdownTables respjson.Field
MarkdownTableMultilineSeparator respjson.Field
MergeContinuedTables respjson.Field
OutputTablesAsMarkdown respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Table formatting options including markdown vs HTML format and merging behavior
func (ParseV2ParametersOutputOptionsMarkdownTablesResp) RawJSON ¶
func (r ParseV2ParametersOutputOptionsMarkdownTablesResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersOutputOptionsMarkdownTablesResp) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsMarkdownTablesResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsResp ¶
type ParseV2ParametersOutputOptionsResp struct {
// Optional additional output artifacts to save alongside the primary parse output.
// Each value opts in to generating and persisting one extra file; the empty list
// (default) saves none. The three accepted values are: 'stripped_md' — per-page
// markdown stripped of formatting (links, bold/italic, images, HTML), saved as
// JSON for full-text-search indexing; fetch via
// `expand=stripped_markdown_content_metadata`. 'concatenated_stripped_txt' — all
// stripped pages concatenated into a single plain-text file with `\n\n---\n\n`
// between pages, useful for feeding the document into search or embedding
// pipelines as one blob; fetch via
// `expand=concatenated_stripped_markdown_content_metadata`. 'word_bbox' — raw
// word-level bounding boxes (one JSON object per word, with page number and
// x/y/w/h coordinates) saved as JSONL, useful for highlighting or grounding
// extracted answers back to the source document; fetch via
// `expand=raw_words_content_metadata`.
AdditionalOutputs []string `json:"additional_outputs"`
// Extract the printed page number as it appears in the document (e.g., 'Page 5 of
// 10', 'v', 'A-3'). Useful for referencing original page numbers
ExtractPrintedPageNumber bool `json:"extract_printed_page_number" api:"nullable"`
// Bounding-box granularity levels to compute for the parse. 'word' computes one
// bounding box per detected word; 'line' computes one per text line; 'cell'
// computes one per table cell. Multiple levels can be requested. Empty list
// (default) disables granular bboxes — only item-level layout boxes are returned
// on the result. When set, the computed boxes are not inlined on the result items;
// they are written to a separate `grounded_items` sidecar (JSONL, one row per
// page) and exposed as `result_content_metadata.grounded_items` (a presigned
// download URL) on the parse result. Each row matches the `GroundedJsonItem`
// shape.
//
// Any of "cell", "line", "word".
GranularBboxes []string `json:"granular_bboxes"`
// Image categories to extract and save. Options: 'screenshot' (full page renders
// useful for visual QA), 'embedded' (images found within the document), 'layout'
// (cropped regions from layout detection like figures and diagrams). Empty list
// saves no images
//
// Any of "screenshot", "embedded", "layout".
ImagesToSave []string `json:"images_to_save"`
// Markdown formatting options including table styles and link annotations
Markdown ParseV2ParametersOutputOptionsMarkdownResp `json:"markdown"`
// Spatial text output options for preserving document layout structure
SpatialText ParseV2ParametersOutputOptionsSpatialTextResp `json:"spatial_text"`
// Options for exporting tables as XLSX spreadsheets
TablesAsSpreadsheet ParseV2ParametersOutputOptionsTablesAsSpreadsheetResp `json:"tables_as_spreadsheet"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdditionalOutputs respjson.Field
ExtractPrintedPageNumber respjson.Field
GranularBboxes respjson.Field
ImagesToSave respjson.Field
Markdown respjson.Field
SpatialText respjson.Field
TablesAsSpreadsheet respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Output formatting options for markdown, text, and extracted images
func (ParseV2ParametersOutputOptionsResp) RawJSON ¶
func (r ParseV2ParametersOutputOptionsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersOutputOptionsResp) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsSpatialText ¶
type ParseV2ParametersOutputOptionsSpatialText struct {
// Keep multi-column layouts intact instead of linearizing columns into sequential
// text. Automatically enabled for non-fast tiers
DoNotUnrollColumns param.Opt[bool] `json:"do_not_unroll_columns,omitzero"`
// Maintain consistent text column alignment across page boundaries. Automatically
// enabled for document-level parsing modes
PreserveLayoutAlignmentAcrossPages param.Opt[bool] `json:"preserve_layout_alignment_across_pages,omitzero"`
// Include text below the normal size threshold. Useful for footnotes, watermarks,
// or fine print that might otherwise be filtered out
PreserveVerySmallText param.Opt[bool] `json:"preserve_very_small_text,omitzero"`
// contains filtered or unexported fields
}
Spatial text output options for preserving document layout structure
func (ParseV2ParametersOutputOptionsSpatialText) MarshalJSON ¶
func (r ParseV2ParametersOutputOptionsSpatialText) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersOutputOptionsSpatialText) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsSpatialText) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsSpatialTextResp ¶
type ParseV2ParametersOutputOptionsSpatialTextResp struct {
// Keep multi-column layouts intact instead of linearizing columns into sequential
// text. Automatically enabled for non-fast tiers
DoNotUnrollColumns bool `json:"do_not_unroll_columns" api:"nullable"`
// Maintain consistent text column alignment across page boundaries. Automatically
// enabled for document-level parsing modes
PreserveLayoutAlignmentAcrossPages bool `json:"preserve_layout_alignment_across_pages" api:"nullable"`
// Include text below the normal size threshold. Useful for footnotes, watermarks,
// or fine print that might otherwise be filtered out
PreserveVerySmallText bool `json:"preserve_very_small_text" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DoNotUnrollColumns respjson.Field
PreserveLayoutAlignmentAcrossPages respjson.Field
PreserveVerySmallText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Spatial text output options for preserving document layout structure
func (ParseV2ParametersOutputOptionsSpatialTextResp) RawJSON ¶
func (r ParseV2ParametersOutputOptionsSpatialTextResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersOutputOptionsSpatialTextResp) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsSpatialTextResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsTablesAsSpreadsheet ¶
type ParseV2ParametersOutputOptionsTablesAsSpreadsheet struct {
// Whether this option is enabled
Enable param.Opt[bool] `json:"enable,omitzero"`
// Automatically generate descriptive sheet names from table context (headers,
// surrounding text) instead of using generic names like 'Table_1'
GuessSheetName param.Opt[bool] `json:"guess_sheet_name,omitzero"`
// contains filtered or unexported fields
}
Options for exporting tables as XLSX spreadsheets
func (ParseV2ParametersOutputOptionsTablesAsSpreadsheet) MarshalJSON ¶
func (r ParseV2ParametersOutputOptionsTablesAsSpreadsheet) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersOutputOptionsTablesAsSpreadsheet) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsTablesAsSpreadsheet) UnmarshalJSON(data []byte) error
type ParseV2ParametersOutputOptionsTablesAsSpreadsheetResp ¶
type ParseV2ParametersOutputOptionsTablesAsSpreadsheetResp struct {
// Whether this option is enabled
Enable bool `json:"enable" api:"nullable"`
// Automatically generate descriptive sheet names from table context (headers,
// surrounding text) instead of using generic names like 'Table_1'
GuessSheetName bool `json:"guess_sheet_name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enable respjson.Field
GuessSheetName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Options for exporting tables as XLSX spreadsheets
func (ParseV2ParametersOutputOptionsTablesAsSpreadsheetResp) RawJSON ¶
func (r ParseV2ParametersOutputOptionsTablesAsSpreadsheetResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersOutputOptionsTablesAsSpreadsheetResp) UnmarshalJSON ¶
func (r *ParseV2ParametersOutputOptionsTablesAsSpreadsheetResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersPageRanges ¶
type ParseV2ParametersPageRanges struct {
// Maximum number of pages to process. Pages are processed in order starting from
// page 1. If both max_pages and target_pages are set, target_pages takes
// precedence
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
// Comma-separated list of specific pages to process using 1-based indexing.
// Supports individual pages and ranges. Examples: '1,3,5' (pages 1, 3, 5), '1-5'
// (pages 1 through 5 inclusive), '1,3,5-8,10' (pages 1, 3, 5-8, and 10). Pages are
// sorted and deduplicated automatically. Duplicate pages cause an error
TargetPages param.Opt[string] `json:"target_pages,omitzero"`
// contains filtered or unexported fields
}
Page selection: limit total pages or specify exact pages to process
func (ParseV2ParametersPageRanges) MarshalJSON ¶
func (r ParseV2ParametersPageRanges) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersPageRanges) UnmarshalJSON ¶
func (r *ParseV2ParametersPageRanges) UnmarshalJSON(data []byte) error
type ParseV2ParametersPageRangesResp ¶
type ParseV2ParametersPageRangesResp struct {
// Maximum number of pages to process. Pages are processed in order starting from
// page 1. If both max_pages and target_pages are set, target_pages takes
// precedence
MaxPages int64 `json:"max_pages" api:"nullable"`
// Comma-separated list of specific pages to process using 1-based indexing.
// Supports individual pages and ranges. Examples: '1,3,5' (pages 1, 3, 5), '1-5'
// (pages 1 through 5 inclusive), '1,3,5-8,10' (pages 1, 3, 5-8, and 10). Pages are
// sorted and deduplicated automatically. Duplicate pages cause an error
TargetPages string `json:"target_pages" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MaxPages respjson.Field
TargetPages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Page selection: limit total pages or specify exact pages to process
func (ParseV2ParametersPageRangesResp) RawJSON ¶
func (r ParseV2ParametersPageRangesResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersPageRangesResp) UnmarshalJSON ¶
func (r *ParseV2ParametersPageRangesResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingControl ¶
type ParseV2ParametersProcessingControl struct {
// Quality thresholds that determine when a job should fail vs complete with
// partial results
JobFailureConditions ParseV2ParametersProcessingControlJobFailureConditions `json:"job_failure_conditions,omitzero"`
// Timeout settings for job execution. Increase for large or complex documents
Timeouts ParseV2ParametersProcessingControlTimeouts `json:"timeouts,omitzero"`
// contains filtered or unexported fields
}
Job execution controls including timeouts and failure thresholds
func (ParseV2ParametersProcessingControl) MarshalJSON ¶
func (r ParseV2ParametersProcessingControl) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingControl) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingControl) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingControlJobFailureConditions ¶
type ParseV2ParametersProcessingControlJobFailureConditions struct {
// Maximum ratio of pages allowed to fail before the job fails (0-1). Example: 0.1
// means job fails if more than 10% of pages fail. Default is 0.05 (5%)
AllowedPageFailureRatio param.Opt[float64] `json:"allowed_page_failure_ratio,omitzero"`
// Fail the job if a problematic font is detected that may cause incorrect text
// extraction. Buggy fonts can produce garbled or missing characters
FailOnBuggyFont param.Opt[bool] `json:"fail_on_buggy_font,omitzero"`
// Fail the entire job if any embedded image cannot be extracted. By default, image
// extraction errors are logged but don't fail the job
FailOnImageExtractionError param.Opt[bool] `json:"fail_on_image_extraction_error,omitzero"`
// Fail the entire job if OCR fails on any image. By default, OCR errors result in
// empty text for that image
FailOnImageOcrError param.Opt[bool] `json:"fail_on_image_ocr_error,omitzero"`
// Fail the entire job if markdown cannot be reconstructed for any page. By
// default, failed pages use fallback text extraction
FailOnMarkdownReconstructionError param.Opt[bool] `json:"fail_on_markdown_reconstruction_error,omitzero"`
// contains filtered or unexported fields
}
Quality thresholds that determine when a job should fail vs complete with partial results
func (ParseV2ParametersProcessingControlJobFailureConditions) MarshalJSON ¶
func (r ParseV2ParametersProcessingControlJobFailureConditions) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingControlJobFailureConditions) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingControlJobFailureConditions) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingControlJobFailureConditionsResp ¶
type ParseV2ParametersProcessingControlJobFailureConditionsResp struct {
// Maximum ratio of pages allowed to fail before the job fails (0-1). Example: 0.1
// means job fails if more than 10% of pages fail. Default is 0.05 (5%)
AllowedPageFailureRatio float64 `json:"allowed_page_failure_ratio" api:"nullable"`
// Fail the job if a problematic font is detected that may cause incorrect text
// extraction. Buggy fonts can produce garbled or missing characters
FailOnBuggyFont bool `json:"fail_on_buggy_font" api:"nullable"`
// Fail the entire job if any embedded image cannot be extracted. By default, image
// extraction errors are logged but don't fail the job
FailOnImageExtractionError bool `json:"fail_on_image_extraction_error" api:"nullable"`
// Fail the entire job if OCR fails on any image. By default, OCR errors result in
// empty text for that image
FailOnImageOcrError bool `json:"fail_on_image_ocr_error" api:"nullable"`
// Fail the entire job if markdown cannot be reconstructed for any page. By
// default, failed pages use fallback text extraction
FailOnMarkdownReconstructionError bool `json:"fail_on_markdown_reconstruction_error" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AllowedPageFailureRatio respjson.Field
FailOnBuggyFont respjson.Field
FailOnImageExtractionError respjson.Field
FailOnImageOcrError respjson.Field
FailOnMarkdownReconstructionError respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Quality thresholds that determine when a job should fail vs complete with partial results
func (ParseV2ParametersProcessingControlJobFailureConditionsResp) RawJSON ¶
func (r ParseV2ParametersProcessingControlJobFailureConditionsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingControlJobFailureConditionsResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingControlJobFailureConditionsResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingControlResp ¶
type ParseV2ParametersProcessingControlResp struct {
// Quality thresholds that determine when a job should fail vs complete with
// partial results
JobFailureConditions ParseV2ParametersProcessingControlJobFailureConditionsResp `json:"job_failure_conditions"`
// Timeout settings for job execution. Increase for large or complex documents
Timeouts ParseV2ParametersProcessingControlTimeoutsResp `json:"timeouts"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
JobFailureConditions respjson.Field
Timeouts respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Job execution controls including timeouts and failure thresholds
func (ParseV2ParametersProcessingControlResp) RawJSON ¶
func (r ParseV2ParametersProcessingControlResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingControlResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingControlResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingControlTimeouts ¶
type ParseV2ParametersProcessingControlTimeouts struct {
// Base timeout for the job in seconds (max 7200 = 2 hours). This is the minimum
// time allowed regardless of document size
BaseInSeconds param.Opt[int64] `json:"base_in_seconds,omitzero"`
// Additional timeout per page in seconds (max 300 = 5 minutes). Total timeout =
// base + (this value × page count)
ExtraTimePerPageInSeconds param.Opt[int64] `json:"extra_time_per_page_in_seconds,omitzero"`
// contains filtered or unexported fields
}
Timeout settings for job execution. Increase for large or complex documents
func (ParseV2ParametersProcessingControlTimeouts) MarshalJSON ¶
func (r ParseV2ParametersProcessingControlTimeouts) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingControlTimeouts) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingControlTimeouts) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingControlTimeoutsResp ¶
type ParseV2ParametersProcessingControlTimeoutsResp struct {
// Base timeout for the job in seconds (max 7200 = 2 hours). This is the minimum
// time allowed regardless of document size
BaseInSeconds int64 `json:"base_in_seconds" api:"nullable"`
// Additional timeout per page in seconds (max 300 = 5 minutes). Total timeout =
// base + (this value × page count)
ExtraTimePerPageInSeconds int64 `json:"extra_time_per_page_in_seconds" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BaseInSeconds respjson.Field
ExtraTimePerPageInSeconds respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Timeout settings for job execution. Increase for large or complex documents
func (ParseV2ParametersProcessingControlTimeoutsResp) RawJSON ¶
func (r ParseV2ParametersProcessingControlTimeoutsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingControlTimeoutsResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingControlTimeoutsResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptions ¶
type ParseV2ParametersProcessingOptions struct {
// Use aggressive heuristics to detect table boundaries, even without visible
// borders. Useful for documents with borderless or complex tables
AggressiveTableExtraction param.Opt[bool] `json:"aggressive_table_extraction,omitzero"`
// Disable automatic heuristics including outlined table extraction and adaptive
// long table handling. Use when heuristics produce incorrect results
DisableHeuristics param.Opt[bool] `json:"disable_heuristics,omitzero"`
// Conditional processing rules that apply different parsing options based on page
// content, document structure, or filename patterns. Each entry defines trigger
// conditions and the parsing configuration to apply when triggered
AutoModeConfiguration []ParseV2ParametersProcessingOptionsAutoModeConfiguration `json:"auto_mode_configuration,omitzero"`
// Cost optimizer configuration for reducing parsing costs on simpler pages.
//
// When enabled, the parser analyzes each page and routes simpler pages to faster,
// cheaper processing while preserving quality for complex pages. Only works with
// 'agentic' or 'agentic_plus' tiers.
CostOptimizer ParseV2ParametersProcessingOptionsCostOptimizer `json:"cost_optimizer,omitzero"`
// Enable AI-powered chart analysis. Modes: 'efficient' (fast, lower cost),
// 'agentic' (balanced), 'agentic_plus' (highest accuracy). Automatically enables
// extract_layout and precise_bounding_box when set
//
// Any of "agentic_plus", "agentic", "efficient".
SpecializedChartParsing string `json:"specialized_chart_parsing,omitzero"`
// Options for ignoring specific text types (diagonal, hidden, text in images)
Ignore ParseV2ParametersProcessingOptionsIgnore `json:"ignore,omitzero"`
// OCR configuration including language detection settings
OcrParameters ParseV2ParametersProcessingOptionsOcrParameters `json:"ocr_parameters,omitzero"`
// contains filtered or unexported fields
}
Document processing options including OCR, table extraction, and chart parsing
func (ParseV2ParametersProcessingOptions) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptions) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptions) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptions) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfiguration ¶
type ParseV2ParametersProcessingOptionsAutoModeConfiguration struct {
// Parsing configuration to apply when trigger conditions are met
ParsingConf ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConf `json:"parsing_conf,omitzero" api:"required"`
// Single glob pattern to match against filename
FilenameMatchGlob param.Opt[string] `json:"filename_match_glob,omitzero"`
// Regex pattern to match against filename
FilenameRegexp param.Opt[string] `json:"filename_regexp,omitzero"`
// Regex mode flags (e.g., 'i' for case-insensitive)
FilenameRegexpMode param.Opt[string] `json:"filename_regexp_mode,omitzero"`
// Trigger if page contains a full-page image (scanned page detection)
FullPageImageInPage param.Opt[bool] `json:"full_page_image_in_page,omitzero"`
// Trigger if page contains non-screenshot images
ImageInPage param.Opt[bool] `json:"image_in_page,omitzero"`
// Trigger if page contains this layout element type
LayoutElementInPage param.Opt[string] `json:"layout_element_in_page,omitzero"`
// Trigger on pages with markdown extraction errors
PageMdError param.Opt[bool] `json:"page_md_error,omitzero"`
// Regex pattern to match in page content
RegexpInPage param.Opt[string] `json:"regexp_in_page,omitzero"`
// Regex mode flags for regexp_in_page
RegexpInPageMode param.Opt[string] `json:"regexp_in_page_mode,omitzero"`
// Trigger if page contains a table
TableInPage param.Opt[bool] `json:"table_in_page,omitzero"`
// Trigger if page text/markdown contains this string
TextInPage param.Opt[string] `json:"text_in_page,omitzero"`
// How to combine multiple trigger conditions: 'and' (all conditions must match,
// this is the default) or 'or' (any single condition can trigger)
TriggerMode param.Opt[string] `json:"trigger_mode,omitzero"`
// List of glob patterns to match against filename
FilenameMatchGlobList []string `json:"filename_match_glob_list,omitzero"`
// Threshold for full page image detection (0.0-1.0, default 0.8)
FullPageImageInPageThreshold ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion `json:"full_page_image_in_page_threshold,omitzero"`
// Confidence threshold for layout element detection
LayoutElementInPageConfidenceThreshold ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion `json:"layout_element_in_page_confidence_threshold,omitzero"`
// Trigger if page has more than N charts
PageContainsAtLeastNCharts ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion `json:"page_contains_at_least_n_charts,omitzero"`
// Trigger if page has more than N images
PageContainsAtLeastNImages ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion `json:"page_contains_at_least_n_images,omitzero"`
// Trigger if page has more than N layout elements
PageContainsAtLeastNLayoutElements ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion `json:"page_contains_at_least_n_layout_elements,omitzero"`
// Trigger if page has more than N lines
PageContainsAtLeastNLines ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion `json:"page_contains_at_least_n_lines,omitzero"`
// Trigger if page has more than N links
PageContainsAtLeastNLinks ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion `json:"page_contains_at_least_n_links,omitzero"`
// Trigger if page has more than N numeric words
PageContainsAtLeastNNumbers ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion `json:"page_contains_at_least_n_numbers,omitzero"`
// Trigger if page has more than N% numeric words
PageContainsAtLeastNPercentNumbers ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion `json:"page_contains_at_least_n_percent_numbers,omitzero"`
// Trigger if page has more than N tables
PageContainsAtLeastNTables ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion `json:"page_contains_at_least_n_tables,omitzero"`
// Trigger if page has more than N words
PageContainsAtLeastNWords ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion `json:"page_contains_at_least_n_words,omitzero"`
// Trigger if page has fewer than N charts
PageContainsAtMostNCharts ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion `json:"page_contains_at_most_n_charts,omitzero"`
// Trigger if page has fewer than N images
PageContainsAtMostNImages ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion `json:"page_contains_at_most_n_images,omitzero"`
// Trigger if page has fewer than N layout elements
PageContainsAtMostNLayoutElements ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion `json:"page_contains_at_most_n_layout_elements,omitzero"`
// Trigger if page has fewer than N lines
PageContainsAtMostNLines ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion `json:"page_contains_at_most_n_lines,omitzero"`
// Trigger if page has fewer than N links
PageContainsAtMostNLinks ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion `json:"page_contains_at_most_n_links,omitzero"`
// Trigger if page has fewer than N numeric words
PageContainsAtMostNNumbers ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion `json:"page_contains_at_most_n_numbers,omitzero"`
// Trigger if page has fewer than N% numeric words
PageContainsAtMostNPercentNumbers ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion `json:"page_contains_at_most_n_percent_numbers,omitzero"`
// Trigger if page has fewer than N tables
PageContainsAtMostNTables ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion `json:"page_contains_at_most_n_tables,omitzero"`
// Trigger if page has fewer than N words
PageContainsAtMostNWords ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion `json:"page_contains_at_most_n_words,omitzero"`
// Trigger if page has more than N characters
PageLongerThanNChars ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion `json:"page_longer_than_n_chars,omitzero"`
// Trigger if page has fewer than N characters
PageShorterThanNChars ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion `json:"page_shorter_than_n_chars,omitzero"`
// contains filtered or unexported fields
}
A single auto mode rule with trigger conditions and parsing configuration.
Auto mode allows conditional parsing where different configurations are applied based on page content, structure, or filename. When triggers match, the parsing_conf overrides default settings for that page.
The property ParsingConf is required.
func (ParseV2ParametersProcessingOptionsAutoModeConfiguration) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfiguration) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfiguration) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfiguration) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp struct {
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfFloat respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp contains all possible properties and values from [float64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfFloat OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) AsFloat ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp struct {
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfFloat respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp contains all possible properties and values from [float64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfFloat OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) AsFloat ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) AsString ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) AsString ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) AsString ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) AsString ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) AsString ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion) MarshalJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion) MarshalJSON() ([]byte, error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion) UnmarshalJSON ¶
func (u *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp struct {
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfInt respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp contains all possible properties and values from [int64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfInt OfString]
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) AsInt ¶
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) AsString ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) AsString() (v string)
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) RawJSON ¶
func (u ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConf ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConf struct {
// Whether to use adaptive long table handling
AdaptiveLongTable param.Opt[bool] `json:"adaptive_long_table,omitzero"`
// Whether to use aggressive table extraction
AggressiveTableExtraction param.Opt[bool] `json:"aggressive_table_extraction,omitzero"`
// Custom AI instructions for matched pages. Overrides the base custom_prompt
CustomPrompt param.Opt[string] `json:"custom_prompt,omitzero"`
// Whether to extract layout information
ExtractLayout param.Opt[bool] `json:"extract_layout,omitzero"`
// Whether to use high resolution OCR
HighResOcr param.Opt[bool] `json:"high_res_ocr,omitzero"`
// Primary language of the document
Language param.Opt[string] `json:"language,omitzero"`
// Whether to use outlined table extraction
OutlinedTableExtraction param.Opt[bool] `json:"outlined_table_extraction,omitzero"`
// Crop box options for auto mode parsing configuration.
CropBox ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBox `json:"crop_box,omitzero"`
// Ignore options for auto mode parsing configuration.
Ignore ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnore `json:"ignore,omitzero"`
// Presentation-specific options for auto mode parsing configuration.
Presentation ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentation `json:"presentation,omitzero"`
// Spatial text options for auto mode parsing configuration.
SpatialText ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialText `json:"spatial_text,omitzero"`
// Enable specialized chart parsing with the specified mode
//
// Any of "agentic_plus", "agentic", "efficient".
SpecializedChartParsing string `json:"specialized_chart_parsing,omitzero"`
// Override the parsing tier for matched pages. Must be paired with version
//
// Any of "fast", "cost_effective", "agentic", "agentic_plus".
Tier string `json:"tier,omitzero"`
// Version for the override tier. Required when `tier` is set. Use `latest`, or pin
// one of that tier's dated versions.
//
// Current `latest` by tier:
//
// - `fast`: `2025-12-11`
// - `cost_effective`: `2026-06-05`
// - `agentic`: `2026-06-04`
// - `agentic_plus`: `2026-06-04`
//
// Full list: `GET /api/v2/parse/versions`.
Version string `json:"version,omitzero"`
// contains filtered or unexported fields
}
Parsing configuration to apply when trigger conditions are met
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConf) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConf) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConf) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConf) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBox ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBox struct {
// Bottom boundary of crop box as ratio (0-1)
Bottom param.Opt[float64] `json:"bottom,omitzero"`
// Left boundary of crop box as ratio (0-1)
Left param.Opt[float64] `json:"left,omitzero"`
// Right boundary of crop box as ratio (0-1)
Right param.Opt[float64] `json:"right,omitzero"`
// Top boundary of crop box as ratio (0-1)
Top param.Opt[float64] `json:"top,omitzero"`
// contains filtered or unexported fields
}
Crop box options for auto mode parsing configuration.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBox) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBox) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBox) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBox) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBoxResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBoxResp struct {
// Bottom boundary of crop box as ratio (0-1)
Bottom float64 `json:"bottom" api:"nullable"`
// Left boundary of crop box as ratio (0-1)
Left float64 `json:"left" api:"nullable"`
// Right boundary of crop box as ratio (0-1)
Right float64 `json:"right" api:"nullable"`
// Top boundary of crop box as ratio (0-1)
Top float64 `json:"top" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Bottom respjson.Field
Left respjson.Field
Right respjson.Field
Top respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Crop box options for auto mode parsing configuration.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBoxResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBoxResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBoxResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBoxResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnore ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnore struct {
// Whether to ignore diagonal text in the document
IgnoreDiagonalText param.Opt[bool] `json:"ignore_diagonal_text,omitzero"`
// Whether to ignore hidden text in the document
IgnoreHiddenText param.Opt[bool] `json:"ignore_hidden_text,omitzero"`
// contains filtered or unexported fields
}
Ignore options for auto mode parsing configuration.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnore) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnore) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnore) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnore) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnoreResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnoreResp struct {
// Whether to ignore diagonal text in the document
IgnoreDiagonalText bool `json:"ignore_diagonal_text" api:"nullable"`
// Whether to ignore hidden text in the document
IgnoreHiddenText bool `json:"ignore_hidden_text" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IgnoreDiagonalText respjson.Field
IgnoreHiddenText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Ignore options for auto mode parsing configuration.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnoreResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnoreResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnoreResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnoreResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentation ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentation struct {
// Extract out of bounds content in presentation slides
OutOfBoundsContent param.Opt[bool] `json:"out_of_bounds_content,omitzero"`
// Skip extraction of embedded data for charts in presentation slides
SkipEmbeddedData param.Opt[bool] `json:"skip_embedded_data,omitzero"`
// contains filtered or unexported fields
}
Presentation-specific options for auto mode parsing configuration.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentation) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentation) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentation) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentation) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentationResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentationResp struct {
// Extract out of bounds content in presentation slides
OutOfBoundsContent bool `json:"out_of_bounds_content" api:"nullable"`
// Skip extraction of embedded data for charts in presentation slides
SkipEmbeddedData bool `json:"skip_embedded_data" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OutOfBoundsContent respjson.Field
SkipEmbeddedData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Presentation-specific options for auto mode parsing configuration.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentationResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentationResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentationResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfResp struct {
// Whether to use adaptive long table handling
AdaptiveLongTable bool `json:"adaptive_long_table" api:"nullable"`
// Whether to use aggressive table extraction
AggressiveTableExtraction bool `json:"aggressive_table_extraction" api:"nullable"`
// Crop box options for auto mode parsing configuration.
CropBox ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfCropBoxResp `json:"crop_box" api:"nullable"`
// Custom AI instructions for matched pages. Overrides the base custom_prompt
CustomPrompt string `json:"custom_prompt" api:"nullable"`
// Whether to extract layout information
ExtractLayout bool `json:"extract_layout" api:"nullable"`
// Whether to use high resolution OCR
HighResOcr bool `json:"high_res_ocr" api:"nullable"`
// Ignore options for auto mode parsing configuration.
Ignore ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfIgnoreResp `json:"ignore" api:"nullable"`
// Primary language of the document
Language string `json:"language" api:"nullable"`
// Whether to use outlined table extraction
OutlinedTableExtraction bool `json:"outlined_table_extraction" api:"nullable"`
// Presentation-specific options for auto mode parsing configuration.
Presentation ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfPresentationResp `json:"presentation" api:"nullable"`
// Spatial text options for auto mode parsing configuration.
SpatialText ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialTextResp `json:"spatial_text" api:"nullable"`
// Enable specialized chart parsing with the specified mode
//
// Any of "agentic_plus", "agentic", "efficient".
SpecializedChartParsing string `json:"specialized_chart_parsing" api:"nullable"`
// Override the parsing tier for matched pages. Must be paired with version
//
// Any of "fast", "cost_effective", "agentic", "agentic_plus".
Tier string `json:"tier" api:"nullable"`
// Version for the override tier. Required when `tier` is set. Use `latest`, or pin
// one of that tier's dated versions.
//
// Current `latest` by tier:
//
// - `fast`: `2025-12-11`
// - `cost_effective`: `2026-06-05`
// - `agentic`: `2026-06-04`
// - `agentic_plus`: `2026-06-04`
//
// Full list: `GET /api/v2/parse/versions`.
Version string `json:"version" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdaptiveLongTable respjson.Field
AggressiveTableExtraction respjson.Field
CropBox respjson.Field
CustomPrompt respjson.Field
ExtractLayout respjson.Field
HighResOcr respjson.Field
Ignore respjson.Field
Language respjson.Field
OutlinedTableExtraction respjson.Field
Presentation respjson.Field
SpatialText respjson.Field
SpecializedChartParsing respjson.Field
Tier respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parsing configuration to apply when trigger conditions are met
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialText ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialText struct {
// Keep column structure intact without unrolling
DoNotUnrollColumns param.Opt[bool] `json:"do_not_unroll_columns,omitzero"`
// Preserve text alignment across page boundaries
PreserveLayoutAlignmentAcrossPages param.Opt[bool] `json:"preserve_layout_alignment_across_pages,omitzero"`
// Include very small text in spatial output
PreserveVerySmallText param.Opt[bool] `json:"preserve_very_small_text,omitzero"`
// contains filtered or unexported fields
}
Spatial text options for auto mode parsing configuration.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialText) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialText) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialText) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialText) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialTextResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialTextResp struct {
// Keep column structure intact without unrolling
DoNotUnrollColumns bool `json:"do_not_unroll_columns" api:"nullable"`
// Preserve text alignment across page boundaries
PreserveLayoutAlignmentAcrossPages bool `json:"preserve_layout_alignment_across_pages" api:"nullable"`
// Include very small text in spatial output
PreserveVerySmallText bool `json:"preserve_very_small_text" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DoNotUnrollColumns respjson.Field
PreserveLayoutAlignmentAcrossPages respjson.Field
PreserveVerySmallText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Spatial text options for auto mode parsing configuration.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialTextResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialTextResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialTextResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfSpatialTextResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsAutoModeConfigurationResp ¶
type ParseV2ParametersProcessingOptionsAutoModeConfigurationResp struct {
// Parsing configuration to apply when trigger conditions are met
ParsingConf ParseV2ParametersProcessingOptionsAutoModeConfigurationParsingConfResp `json:"parsing_conf" api:"required"`
// Single glob pattern to match against filename
FilenameMatchGlob string `json:"filename_match_glob" api:"nullable"`
// List of glob patterns to match against filename
FilenameMatchGlobList []string `json:"filename_match_glob_list" api:"nullable"`
// Regex pattern to match against filename
FilenameRegexp string `json:"filename_regexp" api:"nullable"`
// Regex mode flags (e.g., 'i' for case-insensitive)
FilenameRegexpMode string `json:"filename_regexp_mode" api:"nullable"`
// Trigger if page contains a full-page image (scanned page detection)
FullPageImageInPage bool `json:"full_page_image_in_page" api:"nullable"`
// Threshold for full page image detection (0.0-1.0, default 0.8)
FullPageImageInPageThreshold ParseV2ParametersProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnionResp `json:"full_page_image_in_page_threshold" api:"nullable"`
// Trigger if page contains non-screenshot images
ImageInPage bool `json:"image_in_page" api:"nullable"`
// Trigger if page contains this layout element type
LayoutElementInPage string `json:"layout_element_in_page" api:"nullable"`
// Confidence threshold for layout element detection
LayoutElementInPageConfidenceThreshold ParseV2ParametersProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnionResp `json:"layout_element_in_page_confidence_threshold" api:"nullable"`
// Trigger if page has more than N charts
PageContainsAtLeastNCharts ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnionResp `json:"page_contains_at_least_n_charts" api:"nullable"`
// Trigger if page has more than N images
PageContainsAtLeastNImages ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnionResp `json:"page_contains_at_least_n_images" api:"nullable"`
// Trigger if page has more than N layout elements
PageContainsAtLeastNLayoutElements ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnionResp `json:"page_contains_at_least_n_layout_elements" api:"nullable"`
// Trigger if page has more than N lines
PageContainsAtLeastNLines ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnionResp `json:"page_contains_at_least_n_lines" api:"nullable"`
// Trigger if page has more than N links
PageContainsAtLeastNLinks ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnionResp `json:"page_contains_at_least_n_links" api:"nullable"`
// Trigger if page has more than N numeric words
PageContainsAtLeastNNumbers ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnionResp `json:"page_contains_at_least_n_numbers" api:"nullable"`
// Trigger if page has more than N% numeric words
PageContainsAtLeastNPercentNumbers ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnionResp `json:"page_contains_at_least_n_percent_numbers" api:"nullable"`
// Trigger if page has more than N tables
PageContainsAtLeastNTables ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnionResp `json:"page_contains_at_least_n_tables" api:"nullable"`
// Trigger if page has more than N words
PageContainsAtLeastNWords ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnionResp `json:"page_contains_at_least_n_words" api:"nullable"`
// Trigger if page has fewer than N charts
PageContainsAtMostNCharts ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnionResp `json:"page_contains_at_most_n_charts" api:"nullable"`
// Trigger if page has fewer than N images
PageContainsAtMostNImages ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnionResp `json:"page_contains_at_most_n_images" api:"nullable"`
// Trigger if page has fewer than N layout elements
PageContainsAtMostNLayoutElements ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnionResp `json:"page_contains_at_most_n_layout_elements" api:"nullable"`
// Trigger if page has fewer than N lines
PageContainsAtMostNLines ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnionResp `json:"page_contains_at_most_n_lines" api:"nullable"`
// Trigger if page has fewer than N links
PageContainsAtMostNLinks ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnionResp `json:"page_contains_at_most_n_links" api:"nullable"`
// Trigger if page has fewer than N numeric words
PageContainsAtMostNNumbers ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnionResp `json:"page_contains_at_most_n_numbers" api:"nullable"`
// Trigger if page has fewer than N% numeric words
PageContainsAtMostNPercentNumbers ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnionResp `json:"page_contains_at_most_n_percent_numbers" api:"nullable"`
// Trigger if page has fewer than N tables
PageContainsAtMostNTables ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnionResp `json:"page_contains_at_most_n_tables" api:"nullable"`
// Trigger if page has fewer than N words
PageContainsAtMostNWords ParseV2ParametersProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnionResp `json:"page_contains_at_most_n_words" api:"nullable"`
// Trigger if page has more than N characters
PageLongerThanNChars ParseV2ParametersProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnionResp `json:"page_longer_than_n_chars" api:"nullable"`
// Trigger on pages with markdown extraction errors
PageMdError bool `json:"page_md_error" api:"nullable"`
// Trigger if page has fewer than N characters
PageShorterThanNChars ParseV2ParametersProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnionResp `json:"page_shorter_than_n_chars" api:"nullable"`
// Regex pattern to match in page content
RegexpInPage string `json:"regexp_in_page" api:"nullable"`
// Regex mode flags for regexp_in_page
RegexpInPageMode string `json:"regexp_in_page_mode" api:"nullable"`
// Trigger if page contains a table
TableInPage bool `json:"table_in_page" api:"nullable"`
// Trigger if page text/markdown contains this string
TextInPage string `json:"text_in_page" api:"nullable"`
// How to combine multiple trigger conditions: 'and' (all conditions must match,
// this is the default) or 'or' (any single condition can trigger)
TriggerMode string `json:"trigger_mode" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ParsingConf respjson.Field
FilenameMatchGlob respjson.Field
FilenameMatchGlobList respjson.Field
FilenameRegexp respjson.Field
FilenameRegexpMode respjson.Field
FullPageImageInPage respjson.Field
FullPageImageInPageThreshold respjson.Field
ImageInPage respjson.Field
LayoutElementInPage respjson.Field
LayoutElementInPageConfidenceThreshold respjson.Field
PageContainsAtLeastNCharts respjson.Field
PageContainsAtLeastNImages respjson.Field
PageContainsAtLeastNLayoutElements respjson.Field
PageContainsAtLeastNLines respjson.Field
PageContainsAtLeastNLinks respjson.Field
PageContainsAtLeastNNumbers respjson.Field
PageContainsAtLeastNPercentNumbers respjson.Field
PageContainsAtLeastNTables respjson.Field
PageContainsAtLeastNWords respjson.Field
PageContainsAtMostNCharts respjson.Field
PageContainsAtMostNImages respjson.Field
PageContainsAtMostNLayoutElements respjson.Field
PageContainsAtMostNLines respjson.Field
PageContainsAtMostNLinks respjson.Field
PageContainsAtMostNNumbers respjson.Field
PageContainsAtMostNPercentNumbers respjson.Field
PageContainsAtMostNTables respjson.Field
PageContainsAtMostNWords respjson.Field
PageLongerThanNChars respjson.Field
PageMdError respjson.Field
PageShorterThanNChars respjson.Field
RegexpInPage respjson.Field
RegexpInPageMode respjson.Field
TableInPage respjson.Field
TextInPage respjson.Field
TriggerMode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single auto mode rule with trigger conditions and parsing configuration.
Auto mode allows conditional parsing where different configurations are applied based on page content, structure, or filename. When triggers match, the parsing_conf overrides default settings for that page.
func (ParseV2ParametersProcessingOptionsAutoModeConfigurationResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsAutoModeConfigurationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsAutoModeConfigurationResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsAutoModeConfigurationResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsCostOptimizer ¶
type ParseV2ParametersProcessingOptionsCostOptimizer struct {
// Enable cost-optimized parsing. Routes simpler pages to faster processing while
// complex pages use full AI analysis. May reduce speed on some documents.
// IMPORTANT: Only available with 'agentic' or 'agentic_plus' tiers
Enable param.Opt[bool] `json:"enable,omitzero"`
// contains filtered or unexported fields
}
Cost optimizer configuration for reducing parsing costs on simpler pages.
When enabled, the parser analyzes each page and routes simpler pages to faster, cheaper processing while preserving quality for complex pages. Only works with 'agentic' or 'agentic_plus' tiers.
func (ParseV2ParametersProcessingOptionsCostOptimizer) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsCostOptimizer) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsCostOptimizer) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsCostOptimizer) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsCostOptimizerResp ¶
type ParseV2ParametersProcessingOptionsCostOptimizerResp struct {
// Enable cost-optimized parsing. Routes simpler pages to faster processing while
// complex pages use full AI analysis. May reduce speed on some documents.
// IMPORTANT: Only available with 'agentic' or 'agentic_plus' tiers
Enable bool `json:"enable" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enable respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Cost optimizer configuration for reducing parsing costs on simpler pages.
When enabled, the parser analyzes each page and routes simpler pages to faster, cheaper processing while preserving quality for complex pages. Only works with 'agentic' or 'agentic_plus' tiers.
func (ParseV2ParametersProcessingOptionsCostOptimizerResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsCostOptimizerResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsCostOptimizerResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsCostOptimizerResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsIgnore ¶
type ParseV2ParametersProcessingOptionsIgnore struct {
// Skip text rotated at an angle (not horizontal/vertical). Useful for ignoring
// watermarks or decorative angled text
IgnoreDiagonalText param.Opt[bool] `json:"ignore_diagonal_text,omitzero"`
// Skip text marked as hidden in the document structure. Some PDFs contain
// invisible text layers used for accessibility or search indexing
IgnoreHiddenText param.Opt[bool] `json:"ignore_hidden_text,omitzero"`
// Skip OCR text extraction from embedded images. Use when images contain
// irrelevant text (watermarks, logos) that shouldn't be in the output
IgnoreTextInImage param.Opt[bool] `json:"ignore_text_in_image,omitzero"`
// contains filtered or unexported fields
}
Options for ignoring specific text types (diagonal, hidden, text in images)
func (ParseV2ParametersProcessingOptionsIgnore) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsIgnore) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsIgnore) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsIgnore) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsIgnoreResp ¶
type ParseV2ParametersProcessingOptionsIgnoreResp struct {
// Skip text rotated at an angle (not horizontal/vertical). Useful for ignoring
// watermarks or decorative angled text
IgnoreDiagonalText bool `json:"ignore_diagonal_text" api:"nullable"`
// Skip text marked as hidden in the document structure. Some PDFs contain
// invisible text layers used for accessibility or search indexing
IgnoreHiddenText bool `json:"ignore_hidden_text" api:"nullable"`
// Skip OCR text extraction from embedded images. Use when images contain
// irrelevant text (watermarks, logos) that shouldn't be in the output
IgnoreTextInImage bool `json:"ignore_text_in_image" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IgnoreDiagonalText respjson.Field
IgnoreHiddenText respjson.Field
IgnoreTextInImage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Options for ignoring specific text types (diagonal, hidden, text in images)
func (ParseV2ParametersProcessingOptionsIgnoreResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsIgnoreResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsIgnoreResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsIgnoreResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsOcrParameters ¶
type ParseV2ParametersProcessingOptionsOcrParameters struct {
// Languages to use for OCR text recognition. Specify multiple languages if
// document contains mixed-language content. Order matters - put primary language
// first. Example: ['en', 'es'] for English with Spanish
Languages []ParsingLanguages `json:"languages,omitzero"`
// contains filtered or unexported fields
}
OCR configuration including language detection settings
func (ParseV2ParametersProcessingOptionsOcrParameters) MarshalJSON ¶
func (r ParseV2ParametersProcessingOptionsOcrParameters) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersProcessingOptionsOcrParameters) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsOcrParameters) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsOcrParametersResp ¶
type ParseV2ParametersProcessingOptionsOcrParametersResp struct {
// Languages to use for OCR text recognition. Specify multiple languages if
// document contains mixed-language content. Order matters - put primary language
// first. Example: ['en', 'es'] for English with Spanish
Languages []ParsingLanguages `json:"languages" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Languages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OCR configuration including language detection settings
func (ParseV2ParametersProcessingOptionsOcrParametersResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsOcrParametersResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsOcrParametersResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsOcrParametersResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersProcessingOptionsResp ¶
type ParseV2ParametersProcessingOptionsResp struct {
// Use aggressive heuristics to detect table boundaries, even without visible
// borders. Useful for documents with borderless or complex tables
AggressiveTableExtraction bool `json:"aggressive_table_extraction" api:"nullable"`
// Conditional processing rules that apply different parsing options based on page
// content, document structure, or filename patterns. Each entry defines trigger
// conditions and the parsing configuration to apply when triggered
AutoModeConfiguration []ParseV2ParametersProcessingOptionsAutoModeConfigurationResp `json:"auto_mode_configuration" api:"nullable"`
// Cost optimizer configuration for reducing parsing costs on simpler pages.
//
// When enabled, the parser analyzes each page and routes simpler pages to faster,
// cheaper processing while preserving quality for complex pages. Only works with
// 'agentic' or 'agentic_plus' tiers.
CostOptimizer ParseV2ParametersProcessingOptionsCostOptimizerResp `json:"cost_optimizer" api:"nullable"`
// Disable automatic heuristics including outlined table extraction and adaptive
// long table handling. Use when heuristics produce incorrect results
DisableHeuristics bool `json:"disable_heuristics" api:"nullable"`
// Options for ignoring specific text types (diagonal, hidden, text in images)
Ignore ParseV2ParametersProcessingOptionsIgnoreResp `json:"ignore"`
// OCR configuration including language detection settings
OcrParameters ParseV2ParametersProcessingOptionsOcrParametersResp `json:"ocr_parameters"`
// Enable AI-powered chart analysis. Modes: 'efficient' (fast, lower cost),
// 'agentic' (balanced), 'agentic_plus' (highest accuracy). Automatically enables
// extract_layout and precise_bounding_box when set
//
// Any of "agentic_plus", "agentic", "efficient".
SpecializedChartParsing string `json:"specialized_chart_parsing" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AggressiveTableExtraction respjson.Field
AutoModeConfiguration respjson.Field
CostOptimizer respjson.Field
DisableHeuristics respjson.Field
Ignore respjson.Field
OcrParameters respjson.Field
SpecializedChartParsing respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Document processing options including OCR, table extraction, and chart parsing
func (ParseV2ParametersProcessingOptionsResp) RawJSON ¶
func (r ParseV2ParametersProcessingOptionsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersProcessingOptionsResp) UnmarshalJSON ¶
func (r *ParseV2ParametersProcessingOptionsResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersResp ¶
type ParseV2ParametersResp struct {
// Product type.
ProductType constant.ParseV2 `json:"product_type" default:"parse_v2"`
// Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced),
// 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with
// highest accuracy)
//
// Any of "fast", "cost_effective", "agentic", "agentic_plus".
Tier ParseV2ParametersTier `json:"tier" api:"required"`
// Version for the selected tier. Use `latest`, or pin one of that tier's dated
// versions.
//
// Current `latest` by tier:
//
// - `fast`: `2025-12-11`
// - `cost_effective`: `2026-06-05`
// - `agentic`: `2026-06-04`
// - `agentic_plus`: `2026-06-04`
//
// Full list: `GET /api/v2/parse/versions`.
Version ParseV2ParametersVersion `json:"version" api:"required"`
// Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
//
// These options customize how the AI processes and interprets document content.
// Only applicable when using non-fast tiers.
AgenticOptions ParseV2ParametersAgenticOptionsResp `json:"agentic_options" api:"nullable"`
// Identifier for the client/application making the request. Used for analytics and
// debugging. Example: 'my-app-v2'
ClientName string `json:"client_name" api:"nullable"`
// Crop boundaries to process only a portion of each page. Values are ratios 0-1
// from page edges
CropBox ParseV2ParametersCropBoxResp `json:"crop_box"`
// Bypass result caching and force re-parsing. Use when document content may have
// changed or you need fresh results
DisableCache bool `json:"disable_cache" api:"nullable"`
// Options for fast tier parsing (rule-based, no AI).
//
// Fast tier uses deterministic algorithms for text extraction without AI
// enhancement. It's the fastest and most cost-effective option, best suited for
// simple documents with standard layouts. Currently has no configurable options
// but reserved for future expansion.
FastOptions any `json:"fast_options" api:"nullable"`
// Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on
// detected input file type
InputOptions ParseV2ParametersInputOptionsResp `json:"input_options"`
// Output formatting options for markdown, text, and extracted images
OutputOptions ParseV2ParametersOutputOptionsResp `json:"output_options"`
// Page selection: limit total pages or specify exact pages to process
PageRanges ParseV2ParametersPageRangesResp `json:"page_ranges"`
// Job execution controls including timeouts and failure thresholds
ProcessingControl ParseV2ParametersProcessingControlResp `json:"processing_control"`
// Document processing options including OCR, table extraction, and chart parsing
ProcessingOptions ParseV2ParametersProcessingOptionsResp `json:"processing_options"`
// Webhook endpoints for job status notifications. Multiple webhooks can be
// configured for different events or services
WebhookConfigurations []ParseV2ParametersWebhookConfigurationResp `json:"webhook_configurations"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ProductType respjson.Field
Tier respjson.Field
Version respjson.Field
AgenticOptions respjson.Field
ClientName respjson.Field
CropBox respjson.Field
DisableCache respjson.Field
FastOptions respjson.Field
InputOptions respjson.Field
OutputOptions respjson.Field
PageRanges respjson.Field
ProcessingControl respjson.Field
ProcessingOptions respjson.Field
WebhookConfigurations respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for LlamaParse v2 document parsing.
Includes tier selection, processing options, output formatting, page targeting, and webhook delivery. Refer to the LlamaParse documentation for details on each field.
func (ParseV2ParametersResp) RawJSON ¶
func (r ParseV2ParametersResp) RawJSON() string
Returns the unmodified JSON received from the API
func (ParseV2ParametersResp) ToParam ¶
func (r ParseV2ParametersResp) ToParam() ParseV2Parameters
ToParam converts this ParseV2ParametersResp to a ParseV2Parameters.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ParseV2Parameters.Overrides()
func (*ParseV2ParametersResp) UnmarshalJSON ¶
func (r *ParseV2ParametersResp) UnmarshalJSON(data []byte) error
type ParseV2ParametersTier ¶
type ParseV2ParametersTier string
Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced), 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with highest accuracy)
const ( ParseV2ParametersTierFast ParseV2ParametersTier = "fast" ParseV2ParametersTierCostEffective ParseV2ParametersTier = "cost_effective" ParseV2ParametersTierAgentic ParseV2ParametersTier = "agentic" ParseV2ParametersTierAgenticPlus ParseV2ParametersTier = "agentic_plus" )
type ParseV2ParametersVersion ¶
type ParseV2ParametersVersion string
Version for the selected tier. Use `latest`, or pin one of that tier's dated versions.
Current `latest` by tier:
- `fast`: `2025-12-11` - `cost_effective`: `2026-06-05` - `agentic`: `2026-06-04` - `agentic_plus`: `2026-06-04`
Full list: `GET /api/v2/parse/versions`.
const ( ParseV2ParametersVersionLatest ParseV2ParametersVersion = "latest" ParseV2ParametersVersion2026_06_05 ParseV2ParametersVersion = "2026-06-05" ParseV2ParametersVersion2026_06_04 ParseV2ParametersVersion = "2026-06-04" ParseV2ParametersVersion2025_12_11 ParseV2ParametersVersion = "2025-12-11" )
type ParseV2ParametersWebhookConfiguration ¶
type ParseV2ParametersWebhookConfiguration struct {
// HTTPS URL to receive webhook POST requests. Must be publicly accessible
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Events that trigger this webhook. Options: 'parse.success' (job completed),
// 'parse.error' (job failed), 'parse.partial_success' (some pages failed),
// 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook
// fires for all events
WebhookEvents []string `json:"webhook_events,omitzero"`
// Custom HTTP headers to include in webhook requests. Use for authentication
// tokens or custom routing. Example: {'Authorization': 'Bearer xyz'}
WebhookHeaders map[string]any `json:"webhook_headers,omitzero"`
// Format of the webhook payload body. 'string' (default) sends the payload as a
// JSON-encoded string; 'json' sends it as a JSON object.
//
// Any of "string", "json".
WebhookOutputFormat string `json:"webhook_output_format,omitzero"`
// contains filtered or unexported fields
}
Webhook configuration for receiving parsing job notifications.
Webhooks are called when specified events occur during job processing. Configure multiple webhook configurations to send to different endpoints.
func (ParseV2ParametersWebhookConfiguration) MarshalJSON ¶
func (r ParseV2ParametersWebhookConfiguration) MarshalJSON() (data []byte, err error)
func (*ParseV2ParametersWebhookConfiguration) UnmarshalJSON ¶
func (r *ParseV2ParametersWebhookConfiguration) UnmarshalJSON(data []byte) error
type ParseV2ParametersWebhookConfigurationResp ¶
type ParseV2ParametersWebhookConfigurationResp struct {
// Events that trigger this webhook. Options: 'parse.success' (job completed),
// 'parse.error' (job failed), 'parse.partial_success' (some pages failed),
// 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook
// fires for all events
WebhookEvents []string `json:"webhook_events" api:"nullable"`
// Custom HTTP headers to include in webhook requests. Use for authentication
// tokens or custom routing. Example: {'Authorization': 'Bearer xyz'}
WebhookHeaders map[string]any `json:"webhook_headers" api:"nullable"`
// Format of the webhook payload body. 'string' (default) sends the payload as a
// JSON-encoded string; 'json' sends it as a JSON object.
//
// Any of "string", "json".
WebhookOutputFormat string `json:"webhook_output_format" api:"nullable"`
// HTTPS URL to receive webhook POST requests. Must be publicly accessible
WebhookURL string `json:"webhook_url" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
WebhookEvents respjson.Field
WebhookHeaders respjson.Field
WebhookOutputFormat respjson.Field
WebhookURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Webhook configuration for receiving parsing job notifications.
Webhooks are called when specified events occur during job processing. Configure multiple webhook configurations to send to different endpoints.
func (ParseV2ParametersWebhookConfigurationResp) RawJSON ¶
func (r ParseV2ParametersWebhookConfigurationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParseV2ParametersWebhookConfigurationResp) UnmarshalJSON ¶
func (r *ParseV2ParametersWebhookConfigurationResp) UnmarshalJSON(data []byte) error
type ParsingGetParams ¶
type ParsingGetParams struct {
// Filter to specific image filenames (optional). Example: image_0.png,image_1.jpg
ImageFilenames param.Opt[string] `query:"image_filenames,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Fields to include: text, markdown, items, metadata, job_metadata,
// text_content_metadata, markdown_content_metadata, items_content_metadata,
// metadata_content_metadata, raw_words_content_metadata, xlsx_content_metadata,
// output_pdf_content_metadata, images_content_metadata. Metadata fields include
// presigned URLs.
Expand []string `query:"expand,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ParsingGetParams) URLQuery ¶
func (r ParsingGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes ParsingGetParams's query parameters as `url.Values`.
type ParsingGetResponse ¶
type ParsingGetResponse struct {
// Parse job status and metadata
Job ParsingGetResponseJob `json:"job" api:"required"`
// Metadata for all extracted images.
ImagesContentMetadata ParsingGetResponseImagesContentMetadata `json:"images_content_metadata" api:"nullable"`
// Structured JSON result (if requested)
Items ParsingGetResponseItems `json:"items" api:"nullable"`
// Job execution metadata (if requested)
JobMetadata map[string]any `json:"job_metadata" api:"nullable"`
// Markdown result (if requested)
Markdown ParsingGetResponseMarkdown `json:"markdown" api:"nullable"`
// Full raw markdown content (if requested)
MarkdownFull string `json:"markdown_full" api:"nullable"`
// Result containing metadata (page level and general) for the parsed document.
Metadata ParsingGetResponseMetadata `json:"metadata" api:"nullable"`
RawParameters map[string]any `json:"raw_parameters" api:"nullable"`
// Metadata including size, existence, and presigned URLs for result files
ResultContentMetadata map[string]ParsingGetResponseResultContentMetadata `json:"result_content_metadata" api:"nullable"`
// Plain text result (if requested)
Text ParsingGetResponseText `json:"text" api:"nullable"`
// Full raw text content (if requested)
TextFull string `json:"text_full" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Job respjson.Field
ImagesContentMetadata respjson.Field
Items respjson.Field
JobMetadata respjson.Field
Markdown respjson.Field
MarkdownFull respjson.Field
Metadata respjson.Field
RawParameters respjson.Field
ResultContentMetadata respjson.Field
Text respjson.Field
TextFull respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parse result response with job status and optional content or metadata.
The job field is always included. Other fields are included based on expand parameters.
func (ParsingGetResponse) RawJSON ¶
func (r ParsingGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponse) UnmarshalJSON ¶
func (r *ParsingGetResponse) UnmarshalJSON(data []byte) error
type ParsingGetResponseImagesContentMetadata ¶
type ParsingGetResponseImagesContentMetadata struct {
// List of image metadata with presigned URLs
Images []ParsingGetResponseImagesContentMetadataImage `json:"images" api:"required"`
// Total number of extracted images
TotalCount int64 `json:"total_count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Images respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Metadata for all extracted images.
func (ParsingGetResponseImagesContentMetadata) RawJSON ¶
func (r ParsingGetResponseImagesContentMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseImagesContentMetadata) UnmarshalJSON ¶
func (r *ParsingGetResponseImagesContentMetadata) UnmarshalJSON(data []byte) error
type ParsingGetResponseImagesContentMetadataImage ¶
type ParsingGetResponseImagesContentMetadataImage struct {
// Image filename (e.g., 'image_0.png')
Filename string `json:"filename" api:"required"`
// Index of the image in the extraction order
Index int64 `json:"index" api:"required"`
// Bounding box for an image on its page.
Bbox ParsingGetResponseImagesContentMetadataImageBbox `json:"bbox" api:"nullable"`
// Image category: 'screenshot' (full page), 'embedded' (images in document), or
// 'layout' (cropped from layout detection)
//
// Any of "screenshot", "embedded", "layout".
Category string `json:"category" api:"nullable"`
// MIME type of the image
ContentType string `json:"content_type" api:"nullable"`
// Presigned URL to download the image
PresignedURL string `json:"presigned_url" api:"nullable"`
// Deprecated: always returns None. Will be removed in a future release.
//
// Deprecated: deprecated
SizeBytes int64 `json:"size_bytes" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Filename respjson.Field
Index respjson.Field
Bbox respjson.Field
Category respjson.Field
ContentType respjson.Field
PresignedURL respjson.Field
SizeBytes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Metadata for a single extracted image.
func (ParsingGetResponseImagesContentMetadataImage) RawJSON ¶
func (r ParsingGetResponseImagesContentMetadataImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseImagesContentMetadataImage) UnmarshalJSON ¶
func (r *ParsingGetResponseImagesContentMetadataImage) UnmarshalJSON(data []byte) error
type ParsingGetResponseImagesContentMetadataImageBbox ¶
type ParsingGetResponseImagesContentMetadataImageBbox struct {
// Height of the bounding box
H int64 `json:"h" api:"required"`
// Width of the bounding box
W int64 `json:"w" api:"required"`
// X coordinate of the bounding box
X int64 `json:"x" api:"required"`
// Y coordinate of the bounding box
Y int64 `json:"y" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
H respjson.Field
W respjson.Field
X respjson.Field
Y respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bounding box for an image on its page.
func (ParsingGetResponseImagesContentMetadataImageBbox) RawJSON ¶
func (r ParsingGetResponseImagesContentMetadataImageBbox) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseImagesContentMetadataImageBbox) UnmarshalJSON ¶
func (r *ParsingGetResponseImagesContentMetadataImageBbox) UnmarshalJSON(data []byte) error
type ParsingGetResponseItems ¶
type ParsingGetResponseItems struct {
// List of structured pages or failed page entries
Pages []ParsingGetResponseItemsPageUnion `json:"pages" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Pages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Structured JSON result (if requested)
func (ParsingGetResponseItems) RawJSON ¶
func (r ParsingGetResponseItems) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseItems) UnmarshalJSON ¶
func (r *ParsingGetResponseItems) UnmarshalJSON(data []byte) error
type ParsingGetResponseItemsPageFailedStructuredPage ¶
type ParsingGetResponseItemsPageFailedStructuredPage struct {
// Error message describing the failure
Error string `json:"error" api:"required"`
// Page number of the document
PageNumber int64 `json:"page_number" api:"required"`
// Failure indicator
Success bool `json:"success" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Error respjson.Field
PageNumber respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ParsingGetResponseItemsPageFailedStructuredPage) RawJSON ¶
func (r ParsingGetResponseItemsPageFailedStructuredPage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseItemsPageFailedStructuredPage) UnmarshalJSON ¶
func (r *ParsingGetResponseItemsPageFailedStructuredPage) UnmarshalJSON(data []byte) error
type ParsingGetResponseItemsPageStructuredResultPage ¶
type ParsingGetResponseItemsPageStructuredResultPage struct {
// List of structured items on the page
Items []ParsingGetResponseItemsPageStructuredResultPageItemUnion `json:"items" api:"required"`
// Height of the page in points
PageHeight float64 `json:"page_height" api:"required"`
// Page number of the document
PageNumber int64 `json:"page_number" api:"required"`
// Width of the page in points
PageWidth float64 `json:"page_width" api:"required"`
// Success indicator
Success bool `json:"success" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
PageHeight respjson.Field
PageNumber respjson.Field
PageWidth respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ParsingGetResponseItemsPageStructuredResultPage) RawJSON ¶
func (r ParsingGetResponseItemsPageStructuredResultPage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseItemsPageStructuredResultPage) UnmarshalJSON ¶
func (r *ParsingGetResponseItemsPageStructuredResultPage) UnmarshalJSON(data []byte) error
type ParsingGetResponseItemsPageStructuredResultPageItemUnion ¶
type ParsingGetResponseItemsPageStructuredResultPageItemUnion struct {
Md string `json:"md"`
Value string `json:"value"`
Bbox []BBox `json:"bbox"`
// Any of "text", "heading", "list", "code", "table", "image", "link", "header",
// "footer".
Type string `json:"type"`
// This field is from variant [HeadingItem].
Level int64 `json:"level"`
// This field is a union of [[]ListItemItemUnion], [[]HeaderItemItemUnion],
// [[]FooterItemItemUnion]
Items ParsingGetResponseItemsPageStructuredResultPageItemUnionItems `json:"items"`
// This field is from variant [ListItem].
Ordered bool `json:"ordered"`
// This field is from variant [CodeItem].
Language string `json:"language"`
// This field is from variant [TableItem].
Csv string `json:"csv"`
// This field is from variant [TableItem].
HTML string `json:"html"`
// This field is from variant [TableItem].
Rows [][]*TableItemRowUnion `json:"rows"`
// This field is from variant [TableItem].
MergedFromPages []int64 `json:"merged_from_pages"`
// This field is from variant [TableItem].
MergedIntoPage int64 `json:"merged_into_page"`
// This field is from variant [TableItem].
ParseConcerns []TableItemParseConcern `json:"parse_concerns"`
// This field is from variant [ImageItem].
Caption string `json:"caption"`
URL string `json:"url"`
// This field is from variant [LinkItem].
Text string `json:"text"`
JSON struct {
Md respjson.Field
Value respjson.Field
Bbox respjson.Field
Type respjson.Field
Level respjson.Field
Items respjson.Field
Ordered respjson.Field
Language respjson.Field
Csv respjson.Field
HTML respjson.Field
Rows respjson.Field
MergedFromPages respjson.Field
MergedIntoPage respjson.Field
ParseConcerns respjson.Field
Caption respjson.Field
URL respjson.Field
Text respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParsingGetResponseItemsPageStructuredResultPageItemUnion contains all possible properties and values from TextItem, HeadingItem, ListItem, CodeItem, TableItem, ImageItem, LinkItem, HeaderItem, FooterItem.
Use the ParsingGetResponseItemsPageStructuredResultPageItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsAny ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsAny() anyParsingGetResponseItemsPageStructuredResultPageItem
Use the following switch statement to find the correct variant
switch variant := ParsingGetResponseItemsPageStructuredResultPageItemUnion.AsAny().(type) {
case llamacloudprod.TextItem:
case llamacloudprod.HeadingItem:
case llamacloudprod.ListItem:
case llamacloudprod.CodeItem:
case llamacloudprod.TableItem:
case llamacloudprod.ImageItem:
case llamacloudprod.LinkItem:
case llamacloudprod.HeaderItem:
case llamacloudprod.FooterItem:
default:
fmt.Errorf("no variant present")
}
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsCode ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsCode() (v CodeItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsFooter ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsFooter() (v FooterItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsHeader ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsHeader() (v HeaderItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsHeading ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsHeading() (v HeadingItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsImage ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsImage() (v ImageItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsLink ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsLink() (v LinkItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsList ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsList() (v ListItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsTable ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsTable() (v TableItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsText ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) AsText() (v TextItem)
func (ParsingGetResponseItemsPageStructuredResultPageItemUnion) RawJSON ¶
func (u ParsingGetResponseItemsPageStructuredResultPageItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseItemsPageStructuredResultPageItemUnion) UnmarshalJSON ¶
func (r *ParsingGetResponseItemsPageStructuredResultPageItemUnion) UnmarshalJSON(data []byte) error
type ParsingGetResponseItemsPageStructuredResultPageItemUnionItems ¶
type ParsingGetResponseItemsPageStructuredResultPageItemUnionItems struct {
// This field will be present if the value is a [[]ListItemItemUnion] instead of an
// object.
OfItems []ListItemItemUnion `json:",inline"`
JSON struct {
OfItems respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParsingGetResponseItemsPageStructuredResultPageItemUnionItems is an implicit subunion of ParsingGetResponseItemsPageStructuredResultPageItemUnion. ParsingGetResponseItemsPageStructuredResultPageItemUnionItems provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ParsingGetResponseItemsPageStructuredResultPageItemUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfItems]
func (*ParsingGetResponseItemsPageStructuredResultPageItemUnionItems) UnmarshalJSON ¶
func (r *ParsingGetResponseItemsPageStructuredResultPageItemUnionItems) UnmarshalJSON(data []byte) error
type ParsingGetResponseItemsPageUnion ¶
type ParsingGetResponseItemsPageUnion struct {
// This field is from variant [ParsingGetResponseItemsPageStructuredResultPage].
Items []ParsingGetResponseItemsPageStructuredResultPageItemUnion `json:"items"`
// This field is from variant [ParsingGetResponseItemsPageStructuredResultPage].
PageHeight float64 `json:"page_height"`
PageNumber int64 `json:"page_number"`
// This field is from variant [ParsingGetResponseItemsPageStructuredResultPage].
PageWidth float64 `json:"page_width"`
Success bool `json:"success"`
// This field is from variant [ParsingGetResponseItemsPageFailedStructuredPage].
Error string `json:"error"`
JSON struct {
Items respjson.Field
PageHeight respjson.Field
PageNumber respjson.Field
PageWidth respjson.Field
Success respjson.Field
Error respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParsingGetResponseItemsPageUnion contains all possible properties and values from ParsingGetResponseItemsPageStructuredResultPage, ParsingGetResponseItemsPageFailedStructuredPage.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ParsingGetResponseItemsPageUnion) AsFailedStructuredPage ¶
func (u ParsingGetResponseItemsPageUnion) AsFailedStructuredPage() (v ParsingGetResponseItemsPageFailedStructuredPage)
func (ParsingGetResponseItemsPageUnion) AsStructuredResultPage ¶
func (u ParsingGetResponseItemsPageUnion) AsStructuredResultPage() (v ParsingGetResponseItemsPageStructuredResultPage)
func (ParsingGetResponseItemsPageUnion) RawJSON ¶
func (u ParsingGetResponseItemsPageUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseItemsPageUnion) UnmarshalJSON ¶
func (r *ParsingGetResponseItemsPageUnion) UnmarshalJSON(data []byte) error
type ParsingGetResponseJob ¶
type ParsingGetResponseJob struct {
// Unique parse job identifier
ID string `json:"id" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED
//
// Any of "PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status string `json:"status" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error details when status is FAILED
ErrorMessage string `json:"error_message" api:"nullable"`
// Optional display name for this parse job
Name string `json:"name" api:"nullable"`
// Parsing tier used for this job
Tier string `json:"tier" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ProjectID respjson.Field
Status respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
Name respjson.Field
Tier respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parse job status and metadata
func (ParsingGetResponseJob) RawJSON ¶
func (r ParsingGetResponseJob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseJob) UnmarshalJSON ¶
func (r *ParsingGetResponseJob) UnmarshalJSON(data []byte) error
type ParsingGetResponseMarkdown ¶
type ParsingGetResponseMarkdown struct {
// List of markdown pages or failed page entries
Pages []ParsingGetResponseMarkdownPageUnion `json:"pages" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Pages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Markdown result (if requested)
func (ParsingGetResponseMarkdown) RawJSON ¶
func (r ParsingGetResponseMarkdown) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseMarkdown) UnmarshalJSON ¶
func (r *ParsingGetResponseMarkdown) UnmarshalJSON(data []byte) error
type ParsingGetResponseMarkdownPageFailedMarkdownPage ¶
type ParsingGetResponseMarkdownPageFailedMarkdownPage struct {
// Error message describing the failure
Error string `json:"error" api:"required"`
// Page number of the document
PageNumber int64 `json:"page_number" api:"required"`
// Failure indicator
Success bool `json:"success" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Error respjson.Field
PageNumber respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ParsingGetResponseMarkdownPageFailedMarkdownPage) RawJSON ¶
func (r ParsingGetResponseMarkdownPageFailedMarkdownPage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseMarkdownPageFailedMarkdownPage) UnmarshalJSON ¶
func (r *ParsingGetResponseMarkdownPageFailedMarkdownPage) UnmarshalJSON(data []byte) error
type ParsingGetResponseMarkdownPageMarkdownResultPage ¶
type ParsingGetResponseMarkdownPageMarkdownResultPage struct {
// Markdown content of the page
Markdown string `json:"markdown" api:"required"`
// Page number of the document
PageNumber int64 `json:"page_number" api:"required"`
// Success indicator
Success bool `json:"success" api:"required"`
Footer string `json:"footer" api:"nullable"`
// Header of the page in markdown
Header string `json:"header" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Markdown respjson.Field
PageNumber respjson.Field
Success respjson.Field
Footer respjson.Field
Header respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ParsingGetResponseMarkdownPageMarkdownResultPage) RawJSON ¶
func (r ParsingGetResponseMarkdownPageMarkdownResultPage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseMarkdownPageMarkdownResultPage) UnmarshalJSON ¶
func (r *ParsingGetResponseMarkdownPageMarkdownResultPage) UnmarshalJSON(data []byte) error
type ParsingGetResponseMarkdownPageUnion ¶
type ParsingGetResponseMarkdownPageUnion struct {
// This field is from variant [ParsingGetResponseMarkdownPageMarkdownResultPage].
Markdown string `json:"markdown"`
PageNumber int64 `json:"page_number"`
Success bool `json:"success"`
Footer string `json:"footer"`
// This field is from variant [ParsingGetResponseMarkdownPageMarkdownResultPage].
Header string `json:"header"`
// This field is from variant [ParsingGetResponseMarkdownPageFailedMarkdownPage].
Error string `json:"error"`
JSON struct {
Markdown respjson.Field
PageNumber respjson.Field
Success respjson.Field
Footer respjson.Field
Header respjson.Field
Error respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ParsingGetResponseMarkdownPageUnion contains all possible properties and values from ParsingGetResponseMarkdownPageMarkdownResultPage, ParsingGetResponseMarkdownPageFailedMarkdownPage.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ParsingGetResponseMarkdownPageUnion) AsFailedMarkdownPage ¶
func (u ParsingGetResponseMarkdownPageUnion) AsFailedMarkdownPage() (v ParsingGetResponseMarkdownPageFailedMarkdownPage)
func (ParsingGetResponseMarkdownPageUnion) AsMarkdownResultPage ¶
func (u ParsingGetResponseMarkdownPageUnion) AsMarkdownResultPage() (v ParsingGetResponseMarkdownPageMarkdownResultPage)
func (ParsingGetResponseMarkdownPageUnion) RawJSON ¶
func (u ParsingGetResponseMarkdownPageUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseMarkdownPageUnion) UnmarshalJSON ¶
func (r *ParsingGetResponseMarkdownPageUnion) UnmarshalJSON(data []byte) error
type ParsingGetResponseMetadata ¶
type ParsingGetResponseMetadata struct {
// List of page metadata entries
Pages []ParsingGetResponseMetadataPage `json:"pages" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Pages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Result containing metadata (page level and general) for the parsed document.
func (ParsingGetResponseMetadata) RawJSON ¶
func (r ParsingGetResponseMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseMetadata) UnmarshalJSON ¶
func (r *ParsingGetResponseMetadata) UnmarshalJSON(data []byte) error
type ParsingGetResponseMetadataPage ¶
type ParsingGetResponseMetadataPage struct {
// Page number of the document
PageNumber int64 `json:"page_number" api:"required"`
// Confidence score for the page parsing (0-1)
Confidence float64 `json:"confidence" api:"nullable"`
// Whether cost-optimized parsing was used for the page
CostOptimized bool `json:"cost_optimized" api:"nullable"`
// Original orientation angle of the page in degrees
OriginalOrientationAngle int64 `json:"original_orientation_angle" api:"nullable"`
// Printed page number as it appears in the document
PrintedPageNumber string `json:"printed_page_number" api:"nullable"`
// Section name from presentation slides
SlideSectionName string `json:"slide_section_name" api:"nullable"`
// Speaker notes from presentation slides
SpeakerNotes string `json:"speaker_notes" api:"nullable"`
// Whether auto mode was triggered for the page
TriggeredAutoMode bool `json:"triggered_auto_mode" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PageNumber respjson.Field
Confidence respjson.Field
CostOptimized respjson.Field
OriginalOrientationAngle respjson.Field
PrintedPageNumber respjson.Field
SlideSectionName respjson.Field
SpeakerNotes respjson.Field
TriggeredAutoMode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Page-level metadata including confidence scores and presentation-specific data.
func (ParsingGetResponseMetadataPage) RawJSON ¶
func (r ParsingGetResponseMetadataPage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseMetadataPage) UnmarshalJSON ¶
func (r *ParsingGetResponseMetadataPage) UnmarshalJSON(data []byte) error
type ParsingGetResponseResultContentMetadata ¶
type ParsingGetResponseResultContentMetadata struct {
// Size of the result file in bytes
SizeBytes int64 `json:"size_bytes" api:"required"`
// Whether the result file exists in S3
Exists bool `json:"exists"`
// Presigned URL to download the result file
PresignedURL string `json:"presigned_url" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SizeBytes respjson.Field
Exists respjson.Field
PresignedURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Metadata about a specific result type stored in S3.
func (ParsingGetResponseResultContentMetadata) RawJSON ¶
func (r ParsingGetResponseResultContentMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseResultContentMetadata) UnmarshalJSON ¶
func (r *ParsingGetResponseResultContentMetadata) UnmarshalJSON(data []byte) error
type ParsingGetResponseText ¶
type ParsingGetResponseText struct {
// List of text pages
Pages []ParsingGetResponseTextPage `json:"pages" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Pages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Plain text result (if requested)
func (ParsingGetResponseText) RawJSON ¶
func (r ParsingGetResponseText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseText) UnmarshalJSON ¶
func (r *ParsingGetResponseText) UnmarshalJSON(data []byte) error
type ParsingGetResponseTextPage ¶
type ParsingGetResponseTextPage struct {
// Page number of the document
PageNumber int64 `json:"page_number" api:"required"`
// Plain text content of the page
Text string `json:"text" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PageNumber respjson.Field
Text respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ParsingGetResponseTextPage) RawJSON ¶
func (r ParsingGetResponseTextPage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingGetResponseTextPage) UnmarshalJSON ¶
func (r *ParsingGetResponseTextPage) UnmarshalJSON(data []byte) error
type ParsingLanguages ¶
type ParsingLanguages string
Enum for representing the languages supported by the parser.
const ( ParsingLanguagesAf ParsingLanguages = "af" ParsingLanguagesAz ParsingLanguages = "az" ParsingLanguagesBs ParsingLanguages = "bs" ParsingLanguagesCs ParsingLanguages = "cs" ParsingLanguagesCy ParsingLanguages = "cy" ParsingLanguagesDa ParsingLanguages = "da" ParsingLanguagesDe ParsingLanguages = "de" ParsingLanguagesEn ParsingLanguages = "en" ParsingLanguagesEs ParsingLanguages = "es" ParsingLanguagesEt ParsingLanguages = "et" ParsingLanguagesFr ParsingLanguages = "fr" ParsingLanguagesGa ParsingLanguages = "ga" ParsingLanguagesHr ParsingLanguages = "hr" ParsingLanguagesHu ParsingLanguages = "hu" ParsingLanguagesID ParsingLanguages = "id" ParsingLanguagesIs ParsingLanguages = "is" ParsingLanguagesIt ParsingLanguages = "it" ParsingLanguagesKu ParsingLanguages = "ku" ParsingLanguagesLa ParsingLanguages = "la" ParsingLanguagesLt ParsingLanguages = "lt" ParsingLanguagesLv ParsingLanguages = "lv" ParsingLanguagesMi ParsingLanguages = "mi" ParsingLanguagesMs ParsingLanguages = "ms" ParsingLanguagesMt ParsingLanguages = "mt" ParsingLanguagesNl ParsingLanguages = "nl" ParsingLanguagesNo ParsingLanguages = "no" ParsingLanguagesOc ParsingLanguages = "oc" ParsingLanguagesPi ParsingLanguages = "pi" ParsingLanguagesPl ParsingLanguages = "pl" ParsingLanguagesPt ParsingLanguages = "pt" ParsingLanguagesRo ParsingLanguages = "ro" ParsingLanguagesRsLatin ParsingLanguages = "rs_latin" ParsingLanguagesSk ParsingLanguages = "sk" ParsingLanguagesSl ParsingLanguages = "sl" ParsingLanguagesSq ParsingLanguages = "sq" ParsingLanguagesSv ParsingLanguages = "sv" ParsingLanguagesSw ParsingLanguages = "sw" ParsingLanguagesTl ParsingLanguages = "tl" ParsingLanguagesTr ParsingLanguages = "tr" ParsingLanguagesUz ParsingLanguages = "uz" ParsingLanguagesVi ParsingLanguages = "vi" ParsingLanguagesAr ParsingLanguages = "ar" ParsingLanguagesFa ParsingLanguages = "fa" ParsingLanguagesUg ParsingLanguages = "ug" ParsingLanguagesUr ParsingLanguages = "ur" ParsingLanguagesBn ParsingLanguages = "bn" ParsingLanguagesAs ParsingLanguages = "as" ParsingLanguagesMni ParsingLanguages = "mni" ParsingLanguagesRu ParsingLanguages = "ru" ParsingLanguagesRsCyrillic ParsingLanguages = "rs_cyrillic" ParsingLanguagesBe ParsingLanguages = "be" ParsingLanguagesBg ParsingLanguages = "bg" ParsingLanguagesUk ParsingLanguages = "uk" ParsingLanguagesMn ParsingLanguages = "mn" ParsingLanguagesAbq ParsingLanguages = "abq" ParsingLanguagesAdy ParsingLanguages = "ady" ParsingLanguagesKbd ParsingLanguages = "kbd" ParsingLanguagesAva ParsingLanguages = "ava" ParsingLanguagesDar ParsingLanguages = "dar" ParsingLanguagesInh ParsingLanguages = "inh" ParsingLanguagesChe ParsingLanguages = "che" ParsingLanguagesLbe ParsingLanguages = "lbe" ParsingLanguagesLez ParsingLanguages = "lez" ParsingLanguagesTab ParsingLanguages = "tab" ParsingLanguagesTjk ParsingLanguages = "tjk" ParsingLanguagesHi ParsingLanguages = "hi" ParsingLanguagesMr ParsingLanguages = "mr" ParsingLanguagesNe ParsingLanguages = "ne" ParsingLanguagesBh ParsingLanguages = "bh" ParsingLanguagesMai ParsingLanguages = "mai" ParsingLanguagesAng ParsingLanguages = "ang" ParsingLanguagesBho ParsingLanguages = "bho" ParsingLanguagesMah ParsingLanguages = "mah" ParsingLanguagesSck ParsingLanguages = "sck" ParsingLanguagesNew ParsingLanguages = "new" ParsingLanguagesGom ParsingLanguages = "gom" ParsingLanguagesSa ParsingLanguages = "sa" ParsingLanguagesBgc ParsingLanguages = "bgc" ParsingLanguagesTh ParsingLanguages = "th" ParsingLanguagesChSim ParsingLanguages = "ch_sim" ParsingLanguagesChTra ParsingLanguages = "ch_tra" ParsingLanguagesJa ParsingLanguages = "ja" ParsingLanguagesKo ParsingLanguages = "ko" ParsingLanguagesTa ParsingLanguages = "ta" ParsingLanguagesTe ParsingLanguages = "te" ParsingLanguagesKn ParsingLanguages = "kn" )
type ParsingListParams ¶
type ParsingListParams struct {
// Include items created at or after this timestamp (inclusive)
CreatedAtOnOrAfter param.Opt[time.Time] `query:"created_at_on_or_after,omitzero" format:"date-time" json:"-"`
// Include items created at or before this timestamp (inclusive)
CreatedAtOnOrBefore param.Opt[time.Time] `query:"created_at_on_or_before,omitzero" format:"date-time" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
// Number of items per page
PageSize param.Opt[int64] `query:"page_size,omitzero" json:"-"`
// Token for pagination
PageToken param.Opt[string] `query:"page_token,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Filter by specific job IDs
JobIDs []string `query:"job_ids,omitzero" json:"-"`
// Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)
//
// Any of "PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status ParsingListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ParsingListParams) URLQuery ¶
func (r ParsingListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ParsingListParams's query parameters as `url.Values`.
type ParsingListParamsStatus ¶
type ParsingListParamsStatus string
Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)
const ( ParsingListParamsStatusPending ParsingListParamsStatus = "PENDING" ParsingListParamsStatusRunning ParsingListParamsStatus = "RUNNING" ParsingListParamsStatusCompleted ParsingListParamsStatus = "COMPLETED" ParsingListParamsStatusFailed ParsingListParamsStatus = "FAILED" ParsingListParamsStatusCancelled ParsingListParamsStatus = "CANCELLED" )
type ParsingListResponse ¶
type ParsingListResponse struct {
// Unique parse job identifier
ID string `json:"id" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED
//
// Any of "PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status ParsingListResponseStatus `json:"status" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error details when status is FAILED
ErrorMessage string `json:"error_message" api:"nullable"`
// Optional display name for this parse job
Name string `json:"name" api:"nullable"`
// Parsing tier used for this job
Tier string `json:"tier" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ProjectID respjson.Field
Status respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
Name respjson.Field
Tier respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A parse job.
func (ParsingListResponse) RawJSON ¶
func (r ParsingListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingListResponse) UnmarshalJSON ¶
func (r *ParsingListResponse) UnmarshalJSON(data []byte) error
type ParsingListResponseStatus ¶
type ParsingListResponseStatus string
Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED
const ( ParsingListResponseStatusPending ParsingListResponseStatus = "PENDING" ParsingListResponseStatusRunning ParsingListResponseStatus = "RUNNING" ParsingListResponseStatusCompleted ParsingListResponseStatus = "COMPLETED" ParsingListResponseStatusFailed ParsingListResponseStatus = "FAILED" ParsingListResponseStatusCancelled ParsingListResponseStatus = "CANCELLED" )
type ParsingMode ¶
type ParsingMode string
Enum for representing the mode of parsing to be used.
const ( ParsingModeParsePageWithoutLlm ParsingMode = "parse_page_without_llm" ParsingModeParsePageWithLlm ParsingMode = "parse_page_with_llm" ParsingModeParsePageWithLvm ParsingMode = "parse_page_with_lvm" ParsingModeParsePageWithAgent ParsingMode = "parse_page_with_agent" ParsingModeParsePageWithLayoutAgent ParsingMode = "parse_page_with_layout_agent" ParsingModeParseDocumentWithLlm ParsingMode = "parse_document_with_llm" ParsingModeParseDocumentWithLvm ParsingMode = "parse_document_with_lvm" ParsingModeParseDocumentWithAgent ParsingMode = "parse_document_with_agent" )
type ParsingNewParams ¶
type ParsingNewParams struct {
// Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced),
// 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with
// highest accuracy)
//
// Any of "fast", "cost_effective", "agentic", "agentic_plus".
Tier ParsingNewParamsTier `json:"tier,omitzero" api:"required"`
// Version for the selected tier. Use `latest`, or pin one of that tier's dated
// versions.
//
// Current `latest` by tier:
//
// - `fast`: `2025-12-11`
// - `cost_effective`: `2026-06-05`
// - `agentic`: `2026-06-04`
// - `agentic_plus`: `2026-06-04`
//
// Full list: `GET /api/v2/parse/versions`.
Version ParsingNewParamsVersion `json:"version,omitzero" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Identifier for the client/application making the request. Used for analytics and
// debugging. Example: 'my-app-v2'
ClientName param.Opt[string] `json:"client_name,omitzero"`
// Bypass result caching and force re-parsing. Use when document content may have
// changed or you need fresh results
DisableCache param.Opt[bool] `json:"disable_cache,omitzero"`
// ID of an existing file in the project to parse. Mutually exclusive with
// source_url
FileID param.Opt[string] `json:"file_id,omitzero"`
// HTTP/HTTPS proxy for fetching source_url. Ignored if using file_id
HTTPProxy param.Opt[string] `json:"http_proxy,omitzero"`
// Public URL of the document to parse. Mutually exclusive with file_id
SourceURL param.Opt[string] `json:"source_url,omitzero"`
// Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
//
// These options customize how the AI processes and interprets document content.
// Only applicable when using non-fast tiers.
AgenticOptions ParsingNewParamsAgenticOptions `json:"agentic_options,omitzero"`
// Options for fast tier parsing (rule-based, no AI).
//
// Fast tier uses deterministic algorithms for text extraction without AI
// enhancement. It's the fastest and most cost-effective option, best suited for
// simple documents with standard layouts. Currently has no configurable options
// but reserved for future expansion.
FastOptions any `json:"fast_options,omitzero"`
// Crop boundaries to process only a portion of each page. Values are ratios 0-1
// from page edges
CropBox ParsingNewParamsCropBox `json:"crop_box,omitzero"`
// Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on
// detected input file type
InputOptions ParsingNewParamsInputOptions `json:"input_options,omitzero"`
// Output formatting options for markdown, text, and extracted images
OutputOptions ParsingNewParamsOutputOptions `json:"output_options,omitzero"`
// Page selection: limit total pages or specify exact pages to process
PageRanges ParsingNewParamsPageRanges `json:"page_ranges,omitzero"`
// Job execution controls including timeouts and failure thresholds
ProcessingControl ParsingNewParamsProcessingControl `json:"processing_control,omitzero"`
// Document processing options including OCR, table extraction, and chart parsing
ProcessingOptions ParsingNewParamsProcessingOptions `json:"processing_options,omitzero"`
// Webhook endpoints for job status notifications. Multiple webhooks can be
// configured for different events or services
WebhookConfigurations []ParsingNewParamsWebhookConfiguration `json:"webhook_configurations,omitzero"`
// contains filtered or unexported fields
}
func (ParsingNewParams) MarshalJSON ¶
func (r ParsingNewParams) MarshalJSON() (data []byte, err error)
func (ParsingNewParams) URLQuery ¶
func (r ParsingNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes ParsingNewParams's query parameters as `url.Values`.
func (*ParsingNewParams) UnmarshalJSON ¶
func (r *ParsingNewParams) UnmarshalJSON(data []byte) error
type ParsingNewParamsAgenticOptions ¶
type ParsingNewParamsAgenticOptions struct {
// Custom instructions for the AI parser. Use to guide extraction behavior, specify
// output formatting, or provide domain-specific context. Example: 'Extract
// financial tables with currency symbols. Format dates as YYYY-MM-DD.'
CustomPrompt param.Opt[string] `json:"custom_prompt,omitzero"`
// contains filtered or unexported fields
}
Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
These options customize how the AI processes and interprets document content. Only applicable when using non-fast tiers.
func (ParsingNewParamsAgenticOptions) MarshalJSON ¶
func (r ParsingNewParamsAgenticOptions) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsAgenticOptions) UnmarshalJSON ¶
func (r *ParsingNewParamsAgenticOptions) UnmarshalJSON(data []byte) error
type ParsingNewParamsCropBox ¶
type ParsingNewParamsCropBox struct {
// Bottom boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content below this
// line is excluded
Bottom param.Opt[float64] `json:"bottom,omitzero"`
// Left boundary as ratio (0-1). 0=left edge, 1=right edge. Content left of this
// line is excluded
Left param.Opt[float64] `json:"left,omitzero"`
// Right boundary as ratio (0-1). 0=left edge, 1=right edge. Content right of this
// line is excluded
Right param.Opt[float64] `json:"right,omitzero"`
// Top boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content above this line
// is excluded
Top param.Opt[float64] `json:"top,omitzero"`
// contains filtered or unexported fields
}
Crop boundaries to process only a portion of each page. Values are ratios 0-1 from page edges
func (ParsingNewParamsCropBox) MarshalJSON ¶
func (r ParsingNewParamsCropBox) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsCropBox) UnmarshalJSON ¶
func (r *ParsingNewParamsCropBox) UnmarshalJSON(data []byte) error
type ParsingNewParamsInputOptions ¶
type ParsingNewParamsInputOptions struct {
// HTML/web page parsing options (applies to .html, .htm files)
HTML ParsingNewParamsInputOptionsHTML `json:"html,omitzero"`
// PDF-specific parsing options (applies to .pdf files)
Pdf any `json:"pdf,omitzero"`
// Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
Presentation ParsingNewParamsInputOptionsPresentation `json:"presentation,omitzero"`
// Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
Spreadsheet ParsingNewParamsInputOptionsSpreadsheet `json:"spreadsheet,omitzero"`
// contains filtered or unexported fields
}
Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on detected input file type
func (ParsingNewParamsInputOptions) MarshalJSON ¶
func (r ParsingNewParamsInputOptions) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsInputOptions) UnmarshalJSON ¶
func (r *ParsingNewParamsInputOptions) UnmarshalJSON(data []byte) error
type ParsingNewParamsInputOptionsHTML ¶
type ParsingNewParamsInputOptionsHTML struct {
// Force all HTML elements to be visible by overriding CSS display/visibility
// properties. Useful for parsing pages with hidden content or collapsed sections
MakeAllElementsVisible param.Opt[bool] `json:"make_all_elements_visible,omitzero"`
// Remove fixed-position elements (headers, footers, floating buttons) that appear
// on every page render
RemoveFixedElements param.Opt[bool] `json:"remove_fixed_elements,omitzero"`
RemoveNavigationElements param.Opt[bool] `json:"remove_navigation_elements,omitzero"`
// contains filtered or unexported fields
}
HTML/web page parsing options (applies to .html, .htm files)
func (ParsingNewParamsInputOptionsHTML) MarshalJSON ¶
func (r ParsingNewParamsInputOptionsHTML) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsInputOptionsHTML) UnmarshalJSON ¶
func (r *ParsingNewParamsInputOptionsHTML) UnmarshalJSON(data []byte) error
type ParsingNewParamsInputOptionsPresentation ¶
type ParsingNewParamsInputOptionsPresentation struct {
// Extract content positioned outside the visible slide area. Some presentations
// have hidden notes or content that extends beyond slide boundaries
OutOfBoundsContent param.Opt[bool] `json:"out_of_bounds_content,omitzero"`
// Skip extraction of embedded chart data tables. When true, only the visual
// representation of charts is captured, not the underlying data
SkipEmbeddedData param.Opt[bool] `json:"skip_embedded_data,omitzero"`
// contains filtered or unexported fields
}
Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
func (ParsingNewParamsInputOptionsPresentation) MarshalJSON ¶
func (r ParsingNewParamsInputOptionsPresentation) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsInputOptionsPresentation) UnmarshalJSON ¶
func (r *ParsingNewParamsInputOptionsPresentation) UnmarshalJSON(data []byte) error
type ParsingNewParamsInputOptionsSpreadsheet ¶
type ParsingNewParamsInputOptionsSpreadsheet struct {
// Detect and extract multiple tables within a single sheet. Useful when
// spreadsheets contain several data regions separated by blank rows/columns
DetectSubTablesInSheets param.Opt[bool] `json:"detect_sub_tables_in_sheets,omitzero"`
// Compute formula results instead of extracting formula text. Use when you need
// calculated values rather than formula definitions
ForceFormulaComputationInSheets param.Opt[bool] `json:"force_formula_computation_in_sheets,omitzero"`
// Parse hidden sheets in addition to visible ones. By default, hidden sheets are
// skipped
IncludeHiddenSheets param.Opt[bool] `json:"include_hidden_sheets,omitzero"`
// contains filtered or unexported fields
}
Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
func (ParsingNewParamsInputOptionsSpreadsheet) MarshalJSON ¶
func (r ParsingNewParamsInputOptionsSpreadsheet) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsInputOptionsSpreadsheet) UnmarshalJSON ¶
func (r *ParsingNewParamsInputOptionsSpreadsheet) UnmarshalJSON(data []byte) error
type ParsingNewParamsOutputOptions ¶
type ParsingNewParamsOutputOptions struct {
// Extract the printed page number as it appears in the document (e.g., 'Page 5 of
// 10', 'v', 'A-3'). Useful for referencing original page numbers
ExtractPrintedPageNumber param.Opt[bool] `json:"extract_printed_page_number,omitzero"`
// Optional additional output artifacts to save alongside the primary parse output.
// Each value opts in to generating and persisting one extra file; the empty list
// (default) saves none. The three accepted values are: 'stripped_md' — per-page
// markdown stripped of formatting (links, bold/italic, images, HTML), saved as
// JSON for full-text-search indexing; fetch via
// `expand=stripped_markdown_content_metadata`. 'concatenated_stripped_txt' — all
// stripped pages concatenated into a single plain-text file with `\n\n---\n\n`
// between pages, useful for feeding the document into search or embedding
// pipelines as one blob; fetch via
// `expand=concatenated_stripped_markdown_content_metadata`. 'word_bbox' — raw
// word-level bounding boxes (one JSON object per word, with page number and
// x/y/w/h coordinates) saved as JSONL, useful for highlighting or grounding
// extracted answers back to the source document; fetch via
// `expand=raw_words_content_metadata`.
AdditionalOutputs []string `json:"additional_outputs,omitzero"`
// Bounding-box granularity levels to compute for the parse. 'word' computes one
// bounding box per detected word; 'line' computes one per text line; 'cell'
// computes one per table cell. Multiple levels can be requested. Empty list
// (default) disables granular bboxes — only item-level layout boxes are returned
// on the result. When set, the computed boxes are not inlined on the result items;
// they are written to a separate `grounded_items` sidecar (JSONL, one row per
// page) and exposed as `result_content_metadata.grounded_items` (a presigned
// download URL) on the parse result. Each row matches the `GroundedJsonItem`
// shape.
//
// Any of "cell", "line", "word".
GranularBboxes []string `json:"granular_bboxes,omitzero"`
// Image categories to extract and save. Options: 'screenshot' (full page renders
// useful for visual QA), 'embedded' (images found within the document), 'layout'
// (cropped regions from layout detection like figures and diagrams). Empty list
// saves no images
//
// Any of "screenshot", "embedded", "layout".
ImagesToSave []string `json:"images_to_save,omitzero"`
// Markdown formatting options including table styles and link annotations
Markdown ParsingNewParamsOutputOptionsMarkdown `json:"markdown,omitzero"`
// Spatial text output options for preserving document layout structure
SpatialText ParsingNewParamsOutputOptionsSpatialText `json:"spatial_text,omitzero"`
// Options for exporting tables as XLSX spreadsheets
TablesAsSpreadsheet ParsingNewParamsOutputOptionsTablesAsSpreadsheet `json:"tables_as_spreadsheet,omitzero"`
// contains filtered or unexported fields
}
Output formatting options for markdown, text, and extracted images
func (ParsingNewParamsOutputOptions) MarshalJSON ¶
func (r ParsingNewParamsOutputOptions) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsOutputOptions) UnmarshalJSON ¶
func (r *ParsingNewParamsOutputOptions) UnmarshalJSON(data []byte) error
type ParsingNewParamsOutputOptionsMarkdown ¶
type ParsingNewParamsOutputOptionsMarkdown struct {
// Add link annotations to markdown output in the format [text](url). When false,
// only the link text is included
AnnotateLinks param.Opt[bool] `json:"annotate_links,omitzero"`
// Embed images directly in markdown as base64 data URIs instead of extracting them
// as separate files. Useful for self-contained markdown output
InlineImages param.Opt[bool] `json:"inline_images,omitzero"`
// Table formatting options including markdown vs HTML format and merging behavior
Tables ParsingNewParamsOutputOptionsMarkdownTables `json:"tables,omitzero"`
// contains filtered or unexported fields
}
Markdown formatting options including table styles and link annotations
func (ParsingNewParamsOutputOptionsMarkdown) MarshalJSON ¶
func (r ParsingNewParamsOutputOptionsMarkdown) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsOutputOptionsMarkdown) UnmarshalJSON ¶
func (r *ParsingNewParamsOutputOptionsMarkdown) UnmarshalJSON(data []byte) error
type ParsingNewParamsOutputOptionsMarkdownTables ¶
type ParsingNewParamsOutputOptionsMarkdownTables struct {
// Remove extra whitespace padding in markdown table cells for more compact output
CompactMarkdownTables param.Opt[bool] `json:"compact_markdown_tables,omitzero"`
// Separator string for multiline cell content in markdown tables. Example:
// '<br>' to preserve line breaks, ' ' to join with spaces
MarkdownTableMultilineSeparator param.Opt[string] `json:"markdown_table_multiline_separator,omitzero"`
// Automatically merge tables that span multiple pages into a single table. The
// merged table appears on the first page with merged_from_pages metadata
MergeContinuedTables param.Opt[bool] `json:"merge_continued_tables,omitzero"`
// Output tables as markdown pipe tables instead of HTML <table> tags.
// Markdown tables are simpler but cannot represent complex structures like merged
// cells
OutputTablesAsMarkdown param.Opt[bool] `json:"output_tables_as_markdown,omitzero"`
// contains filtered or unexported fields
}
Table formatting options including markdown vs HTML format and merging behavior
func (ParsingNewParamsOutputOptionsMarkdownTables) MarshalJSON ¶
func (r ParsingNewParamsOutputOptionsMarkdownTables) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsOutputOptionsMarkdownTables) UnmarshalJSON ¶
func (r *ParsingNewParamsOutputOptionsMarkdownTables) UnmarshalJSON(data []byte) error
type ParsingNewParamsOutputOptionsSpatialText ¶
type ParsingNewParamsOutputOptionsSpatialText struct {
// Keep multi-column layouts intact instead of linearizing columns into sequential
// text. Automatically enabled for non-fast tiers
DoNotUnrollColumns param.Opt[bool] `json:"do_not_unroll_columns,omitzero"`
// Maintain consistent text column alignment across page boundaries. Automatically
// enabled for document-level parsing modes
PreserveLayoutAlignmentAcrossPages param.Opt[bool] `json:"preserve_layout_alignment_across_pages,omitzero"`
// Include text below the normal size threshold. Useful for footnotes, watermarks,
// or fine print that might otherwise be filtered out
PreserveVerySmallText param.Opt[bool] `json:"preserve_very_small_text,omitzero"`
// contains filtered or unexported fields
}
Spatial text output options for preserving document layout structure
func (ParsingNewParamsOutputOptionsSpatialText) MarshalJSON ¶
func (r ParsingNewParamsOutputOptionsSpatialText) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsOutputOptionsSpatialText) UnmarshalJSON ¶
func (r *ParsingNewParamsOutputOptionsSpatialText) UnmarshalJSON(data []byte) error
type ParsingNewParamsOutputOptionsTablesAsSpreadsheet ¶
type ParsingNewParamsOutputOptionsTablesAsSpreadsheet struct {
// Whether this option is enabled
Enable param.Opt[bool] `json:"enable,omitzero"`
// Automatically generate descriptive sheet names from table context (headers,
// surrounding text) instead of using generic names like 'Table_1'
GuessSheetName param.Opt[bool] `json:"guess_sheet_name,omitzero"`
// contains filtered or unexported fields
}
Options for exporting tables as XLSX spreadsheets
func (ParsingNewParamsOutputOptionsTablesAsSpreadsheet) MarshalJSON ¶
func (r ParsingNewParamsOutputOptionsTablesAsSpreadsheet) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsOutputOptionsTablesAsSpreadsheet) UnmarshalJSON ¶
func (r *ParsingNewParamsOutputOptionsTablesAsSpreadsheet) UnmarshalJSON(data []byte) error
type ParsingNewParamsPageRanges ¶
type ParsingNewParamsPageRanges struct {
// Maximum number of pages to process. Pages are processed in order starting from
// page 1. If both max_pages and target_pages are set, target_pages takes
// precedence
MaxPages param.Opt[int64] `json:"max_pages,omitzero"`
// Comma-separated list of specific pages to process using 1-based indexing.
// Supports individual pages and ranges. Examples: '1,3,5' (pages 1, 3, 5), '1-5'
// (pages 1 through 5 inclusive), '1,3,5-8,10' (pages 1, 3, 5-8, and 10). Pages are
// sorted and deduplicated automatically. Duplicate pages cause an error
TargetPages param.Opt[string] `json:"target_pages,omitzero"`
// contains filtered or unexported fields
}
Page selection: limit total pages or specify exact pages to process
func (ParsingNewParamsPageRanges) MarshalJSON ¶
func (r ParsingNewParamsPageRanges) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsPageRanges) UnmarshalJSON ¶
func (r *ParsingNewParamsPageRanges) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingControl ¶
type ParsingNewParamsProcessingControl struct {
// Quality thresholds that determine when a job should fail vs complete with
// partial results
JobFailureConditions ParsingNewParamsProcessingControlJobFailureConditions `json:"job_failure_conditions,omitzero"`
// Timeout settings for job execution. Increase for large or complex documents
Timeouts ParsingNewParamsProcessingControlTimeouts `json:"timeouts,omitzero"`
// contains filtered or unexported fields
}
Job execution controls including timeouts and failure thresholds
func (ParsingNewParamsProcessingControl) MarshalJSON ¶
func (r ParsingNewParamsProcessingControl) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingControl) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingControl) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingControlJobFailureConditions ¶
type ParsingNewParamsProcessingControlJobFailureConditions struct {
// Maximum ratio of pages allowed to fail before the job fails (0-1). Example: 0.1
// means job fails if more than 10% of pages fail. Default is 0.05 (5%)
AllowedPageFailureRatio param.Opt[float64] `json:"allowed_page_failure_ratio,omitzero"`
// Fail the job if a problematic font is detected that may cause incorrect text
// extraction. Buggy fonts can produce garbled or missing characters
FailOnBuggyFont param.Opt[bool] `json:"fail_on_buggy_font,omitzero"`
// Fail the entire job if any embedded image cannot be extracted. By default, image
// extraction errors are logged but don't fail the job
FailOnImageExtractionError param.Opt[bool] `json:"fail_on_image_extraction_error,omitzero"`
// Fail the entire job if OCR fails on any image. By default, OCR errors result in
// empty text for that image
FailOnImageOcrError param.Opt[bool] `json:"fail_on_image_ocr_error,omitzero"`
// Fail the entire job if markdown cannot be reconstructed for any page. By
// default, failed pages use fallback text extraction
FailOnMarkdownReconstructionError param.Opt[bool] `json:"fail_on_markdown_reconstruction_error,omitzero"`
// contains filtered or unexported fields
}
Quality thresholds that determine when a job should fail vs complete with partial results
func (ParsingNewParamsProcessingControlJobFailureConditions) MarshalJSON ¶
func (r ParsingNewParamsProcessingControlJobFailureConditions) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingControlJobFailureConditions) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingControlJobFailureConditions) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingControlTimeouts ¶
type ParsingNewParamsProcessingControlTimeouts struct {
// Base timeout for the job in seconds (max 7200 = 2 hours). This is the minimum
// time allowed regardless of document size
BaseInSeconds param.Opt[int64] `json:"base_in_seconds,omitzero"`
// Additional timeout per page in seconds (max 300 = 5 minutes). Total timeout =
// base + (this value × page count)
ExtraTimePerPageInSeconds param.Opt[int64] `json:"extra_time_per_page_in_seconds,omitzero"`
// contains filtered or unexported fields
}
Timeout settings for job execution. Increase for large or complex documents
func (ParsingNewParamsProcessingControlTimeouts) MarshalJSON ¶
func (r ParsingNewParamsProcessingControlTimeouts) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingControlTimeouts) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingControlTimeouts) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptions ¶
type ParsingNewParamsProcessingOptions struct {
// Use aggressive heuristics to detect table boundaries, even without visible
// borders. Useful for documents with borderless or complex tables
AggressiveTableExtraction param.Opt[bool] `json:"aggressive_table_extraction,omitzero"`
// Disable automatic heuristics including outlined table extraction and adaptive
// long table handling. Use when heuristics produce incorrect results
DisableHeuristics param.Opt[bool] `json:"disable_heuristics,omitzero"`
// Conditional processing rules that apply different parsing options based on page
// content, document structure, or filename patterns. Each entry defines trigger
// conditions and the parsing configuration to apply when triggered
AutoModeConfiguration []ParsingNewParamsProcessingOptionsAutoModeConfiguration `json:"auto_mode_configuration,omitzero"`
// Cost optimizer configuration for reducing parsing costs on simpler pages.
//
// When enabled, the parser analyzes each page and routes simpler pages to faster,
// cheaper processing while preserving quality for complex pages. Only works with
// 'agentic' or 'agentic_plus' tiers.
CostOptimizer ParsingNewParamsProcessingOptionsCostOptimizer `json:"cost_optimizer,omitzero"`
// Enable AI-powered chart analysis. Modes: 'efficient' (fast, lower cost),
// 'agentic' (balanced), 'agentic_plus' (highest accuracy). Automatically enables
// extract_layout and precise_bounding_box when set
//
// Any of "agentic_plus", "agentic", "efficient".
SpecializedChartParsing string `json:"specialized_chart_parsing,omitzero"`
// Options for ignoring specific text types (diagonal, hidden, text in images)
Ignore ParsingNewParamsProcessingOptionsIgnore `json:"ignore,omitzero"`
// OCR configuration including language detection settings
OcrParameters ParsingNewParamsProcessingOptionsOcrParameters `json:"ocr_parameters,omitzero"`
// contains filtered or unexported fields
}
Document processing options including OCR, table extraction, and chart parsing
func (ParsingNewParamsProcessingOptions) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptions) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptions) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptions) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfiguration ¶
type ParsingNewParamsProcessingOptionsAutoModeConfiguration struct {
// Parsing configuration to apply when trigger conditions are met
ParsingConf ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConf `json:"parsing_conf,omitzero" api:"required"`
// Single glob pattern to match against filename
FilenameMatchGlob param.Opt[string] `json:"filename_match_glob,omitzero"`
// Regex pattern to match against filename
FilenameRegexp param.Opt[string] `json:"filename_regexp,omitzero"`
// Regex mode flags (e.g., 'i' for case-insensitive)
FilenameRegexpMode param.Opt[string] `json:"filename_regexp_mode,omitzero"`
// Trigger if page contains a full-page image (scanned page detection)
FullPageImageInPage param.Opt[bool] `json:"full_page_image_in_page,omitzero"`
// Trigger if page contains non-screenshot images
ImageInPage param.Opt[bool] `json:"image_in_page,omitzero"`
// Trigger if page contains this layout element type
LayoutElementInPage param.Opt[string] `json:"layout_element_in_page,omitzero"`
// Trigger on pages with markdown extraction errors
PageMdError param.Opt[bool] `json:"page_md_error,omitzero"`
// Regex pattern to match in page content
RegexpInPage param.Opt[string] `json:"regexp_in_page,omitzero"`
// Regex mode flags for regexp_in_page
RegexpInPageMode param.Opt[string] `json:"regexp_in_page_mode,omitzero"`
// Trigger if page contains a table
TableInPage param.Opt[bool] `json:"table_in_page,omitzero"`
// Trigger if page text/markdown contains this string
TextInPage param.Opt[string] `json:"text_in_page,omitzero"`
// How to combine multiple trigger conditions: 'and' (all conditions must match,
// this is the default) or 'or' (any single condition can trigger)
TriggerMode param.Opt[string] `json:"trigger_mode,omitzero"`
// List of glob patterns to match against filename
FilenameMatchGlobList []string `json:"filename_match_glob_list,omitzero"`
// Threshold for full page image detection (0.0-1.0, default 0.8)
FullPageImageInPageThreshold ParsingNewParamsProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion `json:"full_page_image_in_page_threshold,omitzero"`
// Confidence threshold for layout element detection
LayoutElementInPageConfidenceThreshold ParsingNewParamsProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion `json:"layout_element_in_page_confidence_threshold,omitzero"`
// Trigger if page has more than N charts
PageContainsAtLeastNCharts ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion `json:"page_contains_at_least_n_charts,omitzero"`
// Trigger if page has more than N images
PageContainsAtLeastNImages ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion `json:"page_contains_at_least_n_images,omitzero"`
// Trigger if page has more than N layout elements
PageContainsAtLeastNLayoutElements ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion `json:"page_contains_at_least_n_layout_elements,omitzero"`
// Trigger if page has more than N lines
PageContainsAtLeastNLines ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion `json:"page_contains_at_least_n_lines,omitzero"`
// Trigger if page has more than N links
PageContainsAtLeastNLinks ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion `json:"page_contains_at_least_n_links,omitzero"`
// Trigger if page has more than N numeric words
PageContainsAtLeastNNumbers ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion `json:"page_contains_at_least_n_numbers,omitzero"`
// Trigger if page has more than N% numeric words
PageContainsAtLeastNPercentNumbers ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion `json:"page_contains_at_least_n_percent_numbers,omitzero"`
// Trigger if page has more than N tables
PageContainsAtLeastNTables ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion `json:"page_contains_at_least_n_tables,omitzero"`
// Trigger if page has more than N words
PageContainsAtLeastNWords ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion `json:"page_contains_at_least_n_words,omitzero"`
// Trigger if page has fewer than N charts
PageContainsAtMostNCharts ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion `json:"page_contains_at_most_n_charts,omitzero"`
// Trigger if page has fewer than N images
PageContainsAtMostNImages ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion `json:"page_contains_at_most_n_images,omitzero"`
// Trigger if page has fewer than N layout elements
PageContainsAtMostNLayoutElements ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion `json:"page_contains_at_most_n_layout_elements,omitzero"`
// Trigger if page has fewer than N lines
PageContainsAtMostNLines ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion `json:"page_contains_at_most_n_lines,omitzero"`
// Trigger if page has fewer than N links
PageContainsAtMostNLinks ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion `json:"page_contains_at_most_n_links,omitzero"`
// Trigger if page has fewer than N numeric words
PageContainsAtMostNNumbers ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion `json:"page_contains_at_most_n_numbers,omitzero"`
// Trigger if page has fewer than N% numeric words
PageContainsAtMostNPercentNumbers ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion `json:"page_contains_at_most_n_percent_numbers,omitzero"`
// Trigger if page has fewer than N tables
PageContainsAtMostNTables ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion `json:"page_contains_at_most_n_tables,omitzero"`
// Trigger if page has fewer than N words
PageContainsAtMostNWords ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion `json:"page_contains_at_most_n_words,omitzero"`
// Trigger if page has more than N characters
PageLongerThanNChars ParsingNewParamsProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion `json:"page_longer_than_n_chars,omitzero"`
// Trigger if page has fewer than N characters
PageShorterThanNChars ParsingNewParamsProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion `json:"page_shorter_than_n_chars,omitzero"`
// contains filtered or unexported fields
}
A single auto mode rule with trigger conditions and parsing configuration.
Auto mode allows conditional parsing where different configurations are applied based on page content, structure, or filename. When triggers match, the parsing_conf overrides default settings for that page.
The property ParsingConf is required.
func (ParsingNewParamsProcessingOptionsAutoModeConfiguration) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsAutoModeConfiguration) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfiguration) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsAutoModeConfiguration) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationFullPageImageInPageThresholdUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationLayoutElementInPageConfidenceThresholdUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNChartsUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNImagesUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLayoutElementsUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinesUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNLinksUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNNumbersUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNPercentNumbersUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNTablesUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtLeastNWordsUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNChartsUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNImagesUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLayoutElementsUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinesUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNLinksUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNNumbersUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNPercentNumbersUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNTablesUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageContainsAtMostNWordsUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageLongerThanNCharsUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion struct {
OfInt param.Opt[int64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion) MarshalJSON ¶
func (u ParsingNewParamsProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion) MarshalJSON() ([]byte, error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion) UnmarshalJSON ¶
func (u *ParsingNewParamsProcessingOptionsAutoModeConfigurationPageShorterThanNCharsUnion) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConf ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConf struct {
// Whether to use adaptive long table handling
AdaptiveLongTable param.Opt[bool] `json:"adaptive_long_table,omitzero"`
// Whether to use aggressive table extraction
AggressiveTableExtraction param.Opt[bool] `json:"aggressive_table_extraction,omitzero"`
// Custom AI instructions for matched pages. Overrides the base custom_prompt
CustomPrompt param.Opt[string] `json:"custom_prompt,omitzero"`
// Whether to extract layout information
ExtractLayout param.Opt[bool] `json:"extract_layout,omitzero"`
// Whether to use high resolution OCR
HighResOcr param.Opt[bool] `json:"high_res_ocr,omitzero"`
// Primary language of the document
Language param.Opt[string] `json:"language,omitzero"`
// Whether to use outlined table extraction
OutlinedTableExtraction param.Opt[bool] `json:"outlined_table_extraction,omitzero"`
// Crop box options for auto mode parsing configuration.
CropBox ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfCropBox `json:"crop_box,omitzero"`
// Ignore options for auto mode parsing configuration.
Ignore ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfIgnore `json:"ignore,omitzero"`
// Presentation-specific options for auto mode parsing configuration.
Presentation ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfPresentation `json:"presentation,omitzero"`
// Spatial text options for auto mode parsing configuration.
SpatialText ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfSpatialText `json:"spatial_text,omitzero"`
// Enable specialized chart parsing with the specified mode
//
// Any of "agentic_plus", "agentic", "efficient".
SpecializedChartParsing string `json:"specialized_chart_parsing,omitzero"`
// Override the parsing tier for matched pages. Must be paired with version
//
// Any of "fast", "cost_effective", "agentic", "agentic_plus".
Tier string `json:"tier,omitzero"`
// Version for the override tier. Required when `tier` is set. Use `latest`, or pin
// one of that tier's dated versions.
//
// Current `latest` by tier:
//
// - `fast`: `2025-12-11`
// - `cost_effective`: `2026-06-05`
// - `agentic`: `2026-06-04`
// - `agentic_plus`: `2026-06-04`
//
// Full list: `GET /api/v2/parse/versions`.
Version string `json:"version,omitzero"`
// contains filtered or unexported fields
}
Parsing configuration to apply when trigger conditions are met
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConf) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConf) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConf) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConf) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfCropBox ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfCropBox struct {
// Bottom boundary of crop box as ratio (0-1)
Bottom param.Opt[float64] `json:"bottom,omitzero"`
// Left boundary of crop box as ratio (0-1)
Left param.Opt[float64] `json:"left,omitzero"`
// Right boundary of crop box as ratio (0-1)
Right param.Opt[float64] `json:"right,omitzero"`
// Top boundary of crop box as ratio (0-1)
Top param.Opt[float64] `json:"top,omitzero"`
// contains filtered or unexported fields
}
Crop box options for auto mode parsing configuration.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfCropBox) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfCropBox) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfCropBox) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfCropBox) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfIgnore ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfIgnore struct {
// Whether to ignore diagonal text in the document
IgnoreDiagonalText param.Opt[bool] `json:"ignore_diagonal_text,omitzero"`
// Whether to ignore hidden text in the document
IgnoreHiddenText param.Opt[bool] `json:"ignore_hidden_text,omitzero"`
// contains filtered or unexported fields
}
Ignore options for auto mode parsing configuration.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfIgnore) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfIgnore) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfIgnore) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfIgnore) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfPresentation ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfPresentation struct {
// Extract out of bounds content in presentation slides
OutOfBoundsContent param.Opt[bool] `json:"out_of_bounds_content,omitzero"`
// Skip extraction of embedded data for charts in presentation slides
SkipEmbeddedData param.Opt[bool] `json:"skip_embedded_data,omitzero"`
// contains filtered or unexported fields
}
Presentation-specific options for auto mode parsing configuration.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfPresentation) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfPresentation) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfPresentation) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfPresentation) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfSpatialText ¶
type ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfSpatialText struct {
// Keep column structure intact without unrolling
DoNotUnrollColumns param.Opt[bool] `json:"do_not_unroll_columns,omitzero"`
// Preserve text alignment across page boundaries
PreserveLayoutAlignmentAcrossPages param.Opt[bool] `json:"preserve_layout_alignment_across_pages,omitzero"`
// Include very small text in spatial output
PreserveVerySmallText param.Opt[bool] `json:"preserve_very_small_text,omitzero"`
// contains filtered or unexported fields
}
Spatial text options for auto mode parsing configuration.
func (ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfSpatialText) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfSpatialText) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfSpatialText) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsAutoModeConfigurationParsingConfSpatialText) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsCostOptimizer ¶
type ParsingNewParamsProcessingOptionsCostOptimizer struct {
// Enable cost-optimized parsing. Routes simpler pages to faster processing while
// complex pages use full AI analysis. May reduce speed on some documents.
// IMPORTANT: Only available with 'agentic' or 'agentic_plus' tiers
Enable param.Opt[bool] `json:"enable,omitzero"`
// contains filtered or unexported fields
}
Cost optimizer configuration for reducing parsing costs on simpler pages.
When enabled, the parser analyzes each page and routes simpler pages to faster, cheaper processing while preserving quality for complex pages. Only works with 'agentic' or 'agentic_plus' tiers.
func (ParsingNewParamsProcessingOptionsCostOptimizer) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsCostOptimizer) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsCostOptimizer) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsCostOptimizer) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsIgnore ¶
type ParsingNewParamsProcessingOptionsIgnore struct {
// Skip text rotated at an angle (not horizontal/vertical). Useful for ignoring
// watermarks or decorative angled text
IgnoreDiagonalText param.Opt[bool] `json:"ignore_diagonal_text,omitzero"`
// Skip text marked as hidden in the document structure. Some PDFs contain
// invisible text layers used for accessibility or search indexing
IgnoreHiddenText param.Opt[bool] `json:"ignore_hidden_text,omitzero"`
// Skip OCR text extraction from embedded images. Use when images contain
// irrelevant text (watermarks, logos) that shouldn't be in the output
IgnoreTextInImage param.Opt[bool] `json:"ignore_text_in_image,omitzero"`
// contains filtered or unexported fields
}
Options for ignoring specific text types (diagonal, hidden, text in images)
func (ParsingNewParamsProcessingOptionsIgnore) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsIgnore) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsIgnore) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsIgnore) UnmarshalJSON(data []byte) error
type ParsingNewParamsProcessingOptionsOcrParameters ¶
type ParsingNewParamsProcessingOptionsOcrParameters struct {
// Languages to use for OCR text recognition. Specify multiple languages if
// document contains mixed-language content. Order matters - put primary language
// first. Example: ['en', 'es'] for English with Spanish
Languages []ParsingLanguages `json:"languages,omitzero"`
// contains filtered or unexported fields
}
OCR configuration including language detection settings
func (ParsingNewParamsProcessingOptionsOcrParameters) MarshalJSON ¶
func (r ParsingNewParamsProcessingOptionsOcrParameters) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsProcessingOptionsOcrParameters) UnmarshalJSON ¶
func (r *ParsingNewParamsProcessingOptionsOcrParameters) UnmarshalJSON(data []byte) error
type ParsingNewParamsTier ¶
type ParsingNewParamsTier string
Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced), 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with highest accuracy)
const ( ParsingNewParamsTierFast ParsingNewParamsTier = "fast" ParsingNewParamsTierCostEffective ParsingNewParamsTier = "cost_effective" ParsingNewParamsTierAgentic ParsingNewParamsTier = "agentic" ParsingNewParamsTierAgenticPlus ParsingNewParamsTier = "agentic_plus" )
type ParsingNewParamsVersion ¶
type ParsingNewParamsVersion string
Version for the selected tier. Use `latest`, or pin one of that tier's dated versions.
Current `latest` by tier:
- `fast`: `2025-12-11` - `cost_effective`: `2026-06-05` - `agentic`: `2026-06-04` - `agentic_plus`: `2026-06-04`
Full list: `GET /api/v2/parse/versions`.
const ( ParsingNewParamsVersionLatest ParsingNewParamsVersion = "latest" ParsingNewParamsVersion2026_06_05 ParsingNewParamsVersion = "2026-06-05" ParsingNewParamsVersion2026_06_04 ParsingNewParamsVersion = "2026-06-04" ParsingNewParamsVersion2025_12_11 ParsingNewParamsVersion = "2025-12-11" )
type ParsingNewParamsWebhookConfiguration ¶
type ParsingNewParamsWebhookConfiguration struct {
// HTTPS URL to receive webhook POST requests. Must be publicly accessible
WebhookURL param.Opt[string] `json:"webhook_url,omitzero"`
// Events that trigger this webhook. Options: 'parse.success' (job completed),
// 'parse.error' (job failed), 'parse.partial_success' (some pages failed),
// 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook
// fires for all events
WebhookEvents []string `json:"webhook_events,omitzero"`
// Custom HTTP headers to include in webhook requests. Use for authentication
// tokens or custom routing. Example: {'Authorization': 'Bearer xyz'}
WebhookHeaders map[string]any `json:"webhook_headers,omitzero"`
// Format of the webhook payload body. 'string' (default) sends the payload as a
// JSON-encoded string; 'json' sends it as a JSON object.
//
// Any of "string", "json".
WebhookOutputFormat string `json:"webhook_output_format,omitzero"`
// contains filtered or unexported fields
}
Webhook configuration for receiving parsing job notifications.
Webhooks are called when specified events occur during job processing. Configure multiple webhook configurations to send to different endpoints.
func (ParsingNewParamsWebhookConfiguration) MarshalJSON ¶
func (r ParsingNewParamsWebhookConfiguration) MarshalJSON() (data []byte, err error)
func (*ParsingNewParamsWebhookConfiguration) UnmarshalJSON ¶
func (r *ParsingNewParamsWebhookConfiguration) UnmarshalJSON(data []byte) error
type ParsingNewResponse ¶
type ParsingNewResponse struct {
// Unique parse job identifier
ID string `json:"id" api:"required"`
// Project this job belongs to
ProjectID string `json:"project_id" api:"required"`
// Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED
//
// Any of "PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED".
Status ParsingNewResponseStatus `json:"status" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Error details when status is FAILED
ErrorMessage string `json:"error_message" api:"nullable"`
// Optional display name for this parse job
Name string `json:"name" api:"nullable"`
// Parsing tier used for this job
Tier string `json:"tier" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ProjectID respjson.Field
Status respjson.Field
CreatedAt respjson.Field
ErrorMessage respjson.Field
Name respjson.Field
Tier respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A parse job.
func (ParsingNewResponse) RawJSON ¶
func (r ParsingNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ParsingNewResponse) UnmarshalJSON ¶
func (r *ParsingNewResponse) UnmarshalJSON(data []byte) error
type ParsingNewResponseStatus ¶
type ParsingNewResponseStatus string
Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED
const ( ParsingNewResponseStatusPending ParsingNewResponseStatus = "PENDING" ParsingNewResponseStatusRunning ParsingNewResponseStatus = "RUNNING" ParsingNewResponseStatusCompleted ParsingNewResponseStatus = "COMPLETED" ParsingNewResponseStatusFailed ParsingNewResponseStatus = "FAILED" ParsingNewResponseStatusCancelled ParsingNewResponseStatus = "CANCELLED" )
type ParsingService ¶
type ParsingService struct {
// contains filtered or unexported fields
}
ParsingService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewParsingService method instead.
func NewParsingService ¶
func NewParsingService(opts ...option.RequestOption) (r ParsingService)
NewParsingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ParsingService) Get ¶
func (r *ParsingService) Get(ctx context.Context, jobID string, query ParsingGetParams, opts ...option.RequestOption) (res *ParsingGetResponse, err error)
Retrieve a parse job with optional expanded content.
By default returns job metadata only. Use `expand` to include parsed content:
- `text` — plain text output - `markdown` — markdown output - `items` — structured page-by-page output - `job_metadata` — usage and processing details
Content metadata fields (e.g. `text_content_metadata`) return presigned URLs for downloading large results.
func (*ParsingService) List ¶
func (r *ParsingService) List(ctx context.Context, query ParsingListParams, opts ...option.RequestOption) (res *pagination.PaginatedCursor[ParsingListResponse], err error)
List parse jobs for the current project.
Filter by `status` or creation date range. Results are paginated — use `page_token` from the response to fetch subsequent pages.
func (*ParsingService) ListAutoPaging ¶
func (r *ParsingService) ListAutoPaging(ctx context.Context, query ParsingListParams, opts ...option.RequestOption) *pagination.PaginatedCursorAutoPager[ParsingListResponse]
List parse jobs for the current project.
Filter by `status` or creation date range. Results are paginated — use `page_token` from the response to fetch subsequent pages.
func (*ParsingService) New ¶
func (r *ParsingService) New(ctx context.Context, params ParsingNewParams, opts ...option.RequestOption) (res *ParsingNewResponse, err error)
Parse a file by file ID or URL.
Provide either `file_id` (a previously uploaded file) or `source_url` (a publicly accessible URL). Configure parsing with options like `tier`, `target_pages`, and `lang`.
## Tiers
- `fast` — rule-based, cheapest, no AI - `cost_effective` — balanced speed and quality - `agentic` — full AI-powered parsing - `agentic_plus` — premium AI with specialized features
The job runs asynchronously. Poll `GET /parse/{job_id}` with `expand=text` or `expand=markdown` to retrieve results.
type PgVectorHnswSettings ¶
type PgVectorHnswSettings = shared.PgVectorHnswSettings
HNSW settings for PGVector.
This is an alias to an internal type.
type PgVectorHnswSettingsDistanceMethod ¶
type PgVectorHnswSettingsDistanceMethod = shared.PgVectorHnswSettingsDistanceMethod
The distance method to use.
This is an alias to an internal type.
type PgVectorHnswSettingsParam ¶
type PgVectorHnswSettingsParam = shared.PgVectorHnswSettingsParam
HNSW settings for PGVector.
This is an alias to an internal type.
type PgVectorHnswSettingsVectorType ¶
type PgVectorHnswSettingsVectorType = shared.PgVectorHnswSettingsVectorType
The type of vector to use.
This is an alias to an internal type.
type Pipeline ¶
type Pipeline struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
EmbeddingConfig PipelineEmbeddingConfigUnion `json:"embedding_config" api:"required"`
Name string `json:"name" api:"required"`
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Hashes for the configuration of a pipeline.
ConfigHash PipelineConfigHash `json:"config_hash" api:"nullable"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Schema for a data sink.
DataSink DataSink `json:"data_sink" api:"nullable"`
// Schema for an embedding model config.
EmbeddingModelConfig PipelineEmbeddingModelConfig `json:"embedding_model_config" api:"nullable"`
// The ID of the EmbeddingModelConfig this pipeline is using.
EmbeddingModelConfigID string `json:"embedding_model_config_id" api:"nullable" format:"uuid"`
// Settings that can be configured for how to use LlamaParse to parse files within
// a LlamaCloud pipeline.
LlamaParseParameters LlamaParseParametersResp `json:"llama_parse_parameters" api:"nullable"`
// The ID of the ManagedPipeline this playground pipeline is linked to.
ManagedPipelineID string `json:"managed_pipeline_id" api:"nullable" format:"uuid"`
// Metadata configuration for the pipeline.
MetadataConfig PipelineMetadataConfig `json:"metadata_config" api:"nullable"`
// Type of pipeline. Either PLAYGROUND or MANAGED.
//
// Any of "PLAYGROUND", "MANAGED".
PipelineType PipelineType `json:"pipeline_type"`
// Preset retrieval parameters for the pipeline.
PresetRetrievalParameters PresetRetrievalParamsResp `json:"preset_retrieval_parameters"`
// Configuration for sparse embedding models used in hybrid search.
//
// This allows users to choose between Splade and BM25 models for sparse retrieval
// in managed data sinks.
SparseModelConfig SparseModelConfig `json:"sparse_model_config" api:"nullable"`
// Status of the pipeline.
//
// Any of "CREATED", "DELETING".
Status PipelineStatus `json:"status" api:"nullable"`
// Configuration for the transformation.
TransformConfig PipelineTransformConfigUnion `json:"transform_config"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
EmbeddingConfig respjson.Field
Name respjson.Field
ProjectID respjson.Field
ConfigHash respjson.Field
CreatedAt respjson.Field
DataSink respjson.Field
EmbeddingModelConfig respjson.Field
EmbeddingModelConfigID respjson.Field
LlamaParseParameters respjson.Field
ManagedPipelineID respjson.Field
MetadataConfig respjson.Field
PipelineType respjson.Field
PresetRetrievalParameters respjson.Field
SparseModelConfig respjson.Field
Status respjson.Field
TransformConfig respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for a pipeline.
func (*Pipeline) UnmarshalJSON ¶
type PipelineConfigHash ¶
type PipelineConfigHash struct {
// Hash of the embedding config.
EmbeddingConfigHash string `json:"embedding_config_hash" api:"nullable"`
// Hash of the llama parse parameters.
ParsingConfigHash string `json:"parsing_config_hash" api:"nullable"`
// Hash of the transform config.
TransformConfigHash string `json:"transform_config_hash" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EmbeddingConfigHash respjson.Field
ParsingConfigHash respjson.Field
TransformConfigHash respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Hashes for the configuration of a pipeline.
func (PipelineConfigHash) RawJSON ¶
func (r PipelineConfigHash) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineConfigHash) UnmarshalJSON ¶
func (r *PipelineConfigHash) UnmarshalJSON(data []byte) error
type PipelineCreateEmbeddingConfigUnionParam ¶
type PipelineCreateEmbeddingConfigUnionParam struct {
OfAzureEmbedding *AzureOpenAIEmbeddingConfigParam `json:",omitzero,inline"`
OfCohereEmbedding *CohereEmbeddingConfigParam `json:",omitzero,inline"`
OfGeminiEmbedding *GeminiEmbeddingConfigParam `json:",omitzero,inline"`
OfHuggingfaceAPIEmbedding *HuggingFaceInferenceAPIEmbeddingConfigParam `json:",omitzero,inline"`
OfOpenAIEmbedding *OpenAIEmbeddingConfigParam `json:",omitzero,inline"`
OfVertexaiEmbedding *VertexAIEmbeddingConfigParam `json:",omitzero,inline"`
OfBedrockEmbedding *BedrockEmbeddingConfigParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PipelineCreateEmbeddingConfigUnionParam) MarshalJSON ¶
func (u PipelineCreateEmbeddingConfigUnionParam) MarshalJSON() ([]byte, error)
func (*PipelineCreateEmbeddingConfigUnionParam) UnmarshalJSON ¶
func (u *PipelineCreateEmbeddingConfigUnionParam) UnmarshalJSON(data []byte) error
type PipelineCreateParam ¶
type PipelineCreateParam struct {
Name string `json:"name" api:"required"`
// Data sink ID. When provided instead of data_sink, the data sink will be looked
// up by ID.
DataSinkID param.Opt[string] `json:"data_sink_id,omitzero" format:"uuid"`
// Embedding model config ID. When provided instead of embedding_config, the
// embedding model config will be looked up by ID.
EmbeddingModelConfigID param.Opt[string] `json:"embedding_model_config_id,omitzero" format:"uuid"`
// The ID of the ManagedPipeline this playground pipeline is linked to.
ManagedPipelineID param.Opt[string] `json:"managed_pipeline_id,omitzero" format:"uuid"`
// Status of the pipeline deployment.
Status param.Opt[string] `json:"status,omitzero"`
EmbeddingConfig PipelineCreateEmbeddingConfigUnionParam `json:"embedding_config,omitzero"`
// Configuration for the transformation.
TransformConfig PipelineCreateTransformConfigUnionParam `json:"transform_config,omitzero"`
// Schema for creating a data sink.
DataSink DataSinkCreateParam `json:"data_sink,omitzero"`
// Settings that can be configured for how to use LlamaParse to parse files within
// a LlamaCloud pipeline.
LlamaParseParameters LlamaParseParameters `json:"llama_parse_parameters,omitzero"`
// Metadata configuration for the pipeline.
MetadataConfig PipelineMetadataConfigParam `json:"metadata_config,omitzero"`
// Type of pipeline. Either PLAYGROUND or MANAGED.
//
// Any of "PLAYGROUND", "MANAGED".
PipelineType PipelineType `json:"pipeline_type,omitzero"`
// Preset retrieval parameters for the pipeline.
PresetRetrievalParameters PresetRetrievalParams `json:"preset_retrieval_parameters,omitzero"`
// Configuration for sparse embedding models used in hybrid search.
//
// This allows users to choose between Splade and BM25 models for sparse retrieval
// in managed data sinks.
SparseModelConfig SparseModelConfigParam `json:"sparse_model_config,omitzero"`
// contains filtered or unexported fields
}
Schema for creating a pipeline.
The property Name is required.
func (PipelineCreateParam) MarshalJSON ¶
func (r PipelineCreateParam) MarshalJSON() (data []byte, err error)
func (*PipelineCreateParam) UnmarshalJSON ¶
func (r *PipelineCreateParam) UnmarshalJSON(data []byte) error
type PipelineCreateTransformConfigUnionParam ¶
type PipelineCreateTransformConfigUnionParam struct {
OfAutoTransformConfig *AutoTransformConfigParam `json:",omitzero,inline"`
OfAdvancedModeTransformConfig *AdvancedModeTransformConfigParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PipelineCreateTransformConfigUnionParam) MarshalJSON ¶
func (u PipelineCreateTransformConfigUnionParam) MarshalJSON() ([]byte, error)
func (*PipelineCreateTransformConfigUnionParam) UnmarshalJSON ¶
func (u *PipelineCreateTransformConfigUnionParam) UnmarshalJSON(data []byte) error
type PipelineDataSource ¶
type PipelineDataSource struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// Component that implements the data source
Component PipelineDataSourceComponentUnion `json:"component" api:"required"`
// The ID of the data source.
DataSourceID string `json:"data_source_id" api:"required" format:"uuid"`
// The last time the data source was automatically synced.
LastSyncedAt time.Time `json:"last_synced_at" api:"required" format:"date-time"`
// The name of the data source.
Name string `json:"name" api:"required"`
// The ID of the pipeline.
PipelineID string `json:"pipeline_id" api:"required" format:"uuid"`
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Any of "S3", "AZURE_STORAGE_BLOB", "GOOGLE_DRIVE", "MICROSOFT_ONEDRIVE",
// "MICROSOFT_SHAREPOINT", "SLACK", "NOTION_PAGE", "CONFLUENCE", "JIRA", "JIRA_V2",
// "BOX".
SourceType PipelineDataSourceSourceType `json:"source_type" api:"required"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Custom metadata that will be present on all data loaded from the data source
CustomMetadata map[string]*PipelineDataSourceCustomMetadataUnion `json:"custom_metadata" api:"nullable"`
// The status of the data source in the pipeline.
//
// Any of "NOT_STARTED", "IN_PROGRESS", "SUCCESS", "ERROR", "CANCELLED".
Status PipelineDataSourceStatus `json:"status" api:"nullable"`
// The last time the status was updated.
StatusUpdatedAt time.Time `json:"status_updated_at" api:"nullable" format:"date-time"`
// The interval at which the data source should be synced.
SyncInterval float64 `json:"sync_interval" api:"nullable"`
// The id of the user who set the sync schedule.
SyncScheduleSetBy string `json:"sync_schedule_set_by" api:"nullable"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// Version metadata for the data source
VersionMetadata DataSourceReaderVersionMetadata `json:"version_metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Component respjson.Field
DataSourceID respjson.Field
LastSyncedAt respjson.Field
Name respjson.Field
PipelineID respjson.Field
ProjectID respjson.Field
SourceType respjson.Field
CreatedAt respjson.Field
CustomMetadata respjson.Field
Status respjson.Field
StatusUpdatedAt respjson.Field
SyncInterval respjson.Field
SyncScheduleSetBy respjson.Field
UpdatedAt respjson.Field
VersionMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for a data source in a pipeline.
func (PipelineDataSource) RawJSON ¶
func (r PipelineDataSource) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineDataSource) UnmarshalJSON ¶
func (r *PipelineDataSource) UnmarshalJSON(data []byte) error
type PipelineDataSourceComponentUnion ¶
type PipelineDataSourceComponentUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfPipelineDataSourceComponentMapItem any `json:",inline"`
// This field is from variant [shared.CloudS3DataSource].
Bucket string `json:"bucket"`
// This field is from variant [shared.CloudS3DataSource].
AwsAccessID string `json:"aws_access_id"`
// This field is from variant [shared.CloudS3DataSource].
AwsAccessSecret string `json:"aws_access_secret"`
ClassName string `json:"class_name"`
Prefix string `json:"prefix"`
// This field is from variant [shared.CloudS3DataSource].
RegexPattern string `json:"regex_pattern"`
// This field is from variant [shared.CloudS3DataSource].
S3EndpointURL string `json:"s3_endpoint_url"`
SupportsAccessControl bool `json:"supports_access_control"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
AccountURL string `json:"account_url"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
ContainerName string `json:"container_name"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
AccountKey string `json:"account_key"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
AccountName string `json:"account_name"`
// This field is from variant [shared.CloudAzStorageBlobDataSource].
Blob string `json:"blob"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
TenantID string `json:"tenant_id"`
FolderID string `json:"folder_id"`
// This field is from variant [shared.CloudGoogleDriveDataSource].
ServiceAccountKey map[string]string `json:"service_account_key"`
// This field is from variant [shared.CloudOneDriveDataSource].
UserPrincipalName string `json:"user_principal_name"`
FolderPath string `json:"folder_path"`
RequiredExts []string `json:"required_exts"`
// This field is from variant [shared.CloudSharepointDataSource].
DriveName string `json:"drive_name"`
// This field is from variant [shared.CloudSharepointDataSource].
ExcludePathPatterns []string `json:"exclude_path_patterns"`
GetPermissions bool `json:"get_permissions"`
// This field is from variant [shared.CloudSharepointDataSource].
IncludePathPatterns []string `json:"include_path_patterns"`
// This field is from variant [shared.CloudSharepointDataSource].
SiteID string `json:"site_id"`
// This field is from variant [shared.CloudSharepointDataSource].
SiteName string `json:"site_name"`
// This field is from variant [shared.CloudSlackDataSource].
SlackToken string `json:"slack_token"`
// This field is from variant [shared.CloudSlackDataSource].
ChannelIDs string `json:"channel_ids"`
// This field is from variant [shared.CloudSlackDataSource].
ChannelPatterns string `json:"channel_patterns"`
// This field is from variant [shared.CloudSlackDataSource].
EarliestDate string `json:"earliest_date"`
// This field is from variant [shared.CloudSlackDataSource].
EarliestDateTimestamp float64 `json:"earliest_date_timestamp"`
// This field is from variant [shared.CloudSlackDataSource].
LatestDate string `json:"latest_date"`
// This field is from variant [shared.CloudSlackDataSource].
LatestDateTimestamp float64 `json:"latest_date_timestamp"`
// This field is from variant [shared.CloudNotionPageDataSource].
IntegrationToken string `json:"integration_token"`
// This field is from variant [shared.CloudNotionPageDataSource].
DatabaseIDs string `json:"database_ids"`
PageIDs string `json:"page_ids"`
AuthenticationMechanism string `json:"authentication_mechanism"`
ServerURL string `json:"server_url"`
APIToken string `json:"api_token"`
// This field is from variant [shared.CloudConfluenceDataSource].
Cql string `json:"cql"`
// This field is from variant [shared.CloudConfluenceDataSource].
FailureHandling shared.FailureHandlingConfig `json:"failure_handling"`
// This field is from variant [shared.CloudConfluenceDataSource].
IndexRestrictedPages bool `json:"index_restricted_pages"`
// This field is from variant [shared.CloudConfluenceDataSource].
KeepMarkdownFormat bool `json:"keep_markdown_format"`
// This field is from variant [shared.CloudConfluenceDataSource].
Label string `json:"label"`
// This field is from variant [shared.CloudConfluenceDataSource].
SpaceKey string `json:"space_key"`
// This field is from variant [shared.CloudConfluenceDataSource].
UserName string `json:"user_name"`
Query string `json:"query"`
CloudID string `json:"cloud_id"`
Email string `json:"email"`
// This field is from variant [shared.CloudJiraDataSourceV2].
APIVersion shared.CloudJiraDataSourceV2APIVersion `json:"api_version"`
// This field is from variant [shared.CloudJiraDataSourceV2].
Expand string `json:"expand"`
// This field is from variant [shared.CloudJiraDataSourceV2].
Fields []string `json:"fields"`
// This field is from variant [shared.CloudJiraDataSourceV2].
RequestsPerMinute int64 `json:"requests_per_minute"`
// This field is from variant [shared.CloudBoxDataSource].
DeveloperToken string `json:"developer_token"`
// This field is from variant [shared.CloudBoxDataSource].
EnterpriseID string `json:"enterprise_id"`
// This field is from variant [shared.CloudBoxDataSource].
UserID string `json:"user_id"`
JSON struct {
OfPipelineDataSourceComponentMapItem respjson.Field
Bucket respjson.Field
AwsAccessID respjson.Field
AwsAccessSecret respjson.Field
ClassName respjson.Field
Prefix respjson.Field
RegexPattern respjson.Field
S3EndpointURL respjson.Field
SupportsAccessControl respjson.Field
AccountURL respjson.Field
ContainerName respjson.Field
AccountKey respjson.Field
AccountName respjson.Field
Blob respjson.Field
ClientID respjson.Field
ClientSecret respjson.Field
TenantID respjson.Field
FolderID respjson.Field
ServiceAccountKey respjson.Field
UserPrincipalName respjson.Field
FolderPath respjson.Field
RequiredExts respjson.Field
DriveName respjson.Field
ExcludePathPatterns respjson.Field
GetPermissions respjson.Field
IncludePathPatterns respjson.Field
SiteID respjson.Field
SiteName respjson.Field
SlackToken respjson.Field
ChannelIDs respjson.Field
ChannelPatterns respjson.Field
EarliestDate respjson.Field
EarliestDateTimestamp respjson.Field
LatestDate respjson.Field
LatestDateTimestamp respjson.Field
IntegrationToken respjson.Field
DatabaseIDs respjson.Field
PageIDs respjson.Field
AuthenticationMechanism respjson.Field
ServerURL respjson.Field
APIToken respjson.Field
Cql respjson.Field
FailureHandling respjson.Field
IndexRestrictedPages respjson.Field
KeepMarkdownFormat respjson.Field
Label respjson.Field
SpaceKey respjson.Field
UserName respjson.Field
Query respjson.Field
CloudID respjson.Field
Email respjson.Field
APIVersion respjson.Field
Expand respjson.Field
Fields respjson.Field
RequestsPerMinute respjson.Field
DeveloperToken respjson.Field
EnterpriseID respjson.Field
UserID respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineDataSourceComponentUnion contains all possible properties and values from [map[string]any], shared.CloudS3DataSource, shared.CloudAzStorageBlobDataSource, shared.CloudGoogleDriveDataSource, shared.CloudOneDriveDataSource, shared.CloudSharepointDataSource, shared.CloudSlackDataSource, shared.CloudNotionPageDataSource, shared.CloudConfluenceDataSource, shared.CloudJiraDataSource, shared.CloudJiraDataSourceV2, shared.CloudBoxDataSource.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfPipelineDataSourceComponentMapItem]
func (PipelineDataSourceComponentUnion) AsAnyMap ¶
func (u PipelineDataSourceComponentUnion) AsAnyMap() (v map[string]any)
func (PipelineDataSourceComponentUnion) AsCloudAzStorageBlobDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudAzStorageBlobDataSource() (v shared.CloudAzStorageBlobDataSource)
func (PipelineDataSourceComponentUnion) AsCloudBoxDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudBoxDataSource() (v shared.CloudBoxDataSource)
func (PipelineDataSourceComponentUnion) AsCloudConfluenceDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudConfluenceDataSource() (v shared.CloudConfluenceDataSource)
func (PipelineDataSourceComponentUnion) AsCloudGoogleDriveDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudGoogleDriveDataSource() (v shared.CloudGoogleDriveDataSource)
func (PipelineDataSourceComponentUnion) AsCloudJiraDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudJiraDataSource() (v shared.CloudJiraDataSource)
func (PipelineDataSourceComponentUnion) AsCloudJiraDataSourceV2 ¶
func (u PipelineDataSourceComponentUnion) AsCloudJiraDataSourceV2() (v shared.CloudJiraDataSourceV2)
func (PipelineDataSourceComponentUnion) AsCloudNotionPageDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudNotionPageDataSource() (v shared.CloudNotionPageDataSource)
func (PipelineDataSourceComponentUnion) AsCloudOneDriveDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudOneDriveDataSource() (v shared.CloudOneDriveDataSource)
func (PipelineDataSourceComponentUnion) AsCloudS3DataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudS3DataSource() (v shared.CloudS3DataSource)
func (PipelineDataSourceComponentUnion) AsCloudSharepointDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudSharepointDataSource() (v shared.CloudSharepointDataSource)
func (PipelineDataSourceComponentUnion) AsCloudSlackDataSource ¶
func (u PipelineDataSourceComponentUnion) AsCloudSlackDataSource() (v shared.CloudSlackDataSource)
func (PipelineDataSourceComponentUnion) RawJSON ¶
func (u PipelineDataSourceComponentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineDataSourceComponentUnion) UnmarshalJSON ¶
func (r *PipelineDataSourceComponentUnion) UnmarshalJSON(data []byte) error
type PipelineDataSourceCustomMetadataUnion ¶
type PipelineDataSourceCustomMetadataUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfPipelineDataSourceCustomMetadataMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfPipelineDataSourceCustomMetadataMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineDataSourceCustomMetadataUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfPipelineDataSourceCustomMetadataMapItem OfAnyArray OfString OfFloat OfBool]
func (PipelineDataSourceCustomMetadataUnion) AsAnyArray ¶
func (u PipelineDataSourceCustomMetadataUnion) AsAnyArray() (v []any)
func (PipelineDataSourceCustomMetadataUnion) AsAnyMap ¶
func (u PipelineDataSourceCustomMetadataUnion) AsAnyMap() (v map[string]any)
func (PipelineDataSourceCustomMetadataUnion) AsBool ¶
func (u PipelineDataSourceCustomMetadataUnion) AsBool() (v bool)
func (PipelineDataSourceCustomMetadataUnion) AsFloat ¶
func (u PipelineDataSourceCustomMetadataUnion) AsFloat() (v float64)
func (PipelineDataSourceCustomMetadataUnion) AsString ¶
func (u PipelineDataSourceCustomMetadataUnion) AsString() (v string)
func (PipelineDataSourceCustomMetadataUnion) RawJSON ¶
func (u PipelineDataSourceCustomMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineDataSourceCustomMetadataUnion) UnmarshalJSON ¶
func (r *PipelineDataSourceCustomMetadataUnion) UnmarshalJSON(data []byte) error
type PipelineDataSourceGetStatusParams ¶
type PipelineDataSourceGetStatusParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
type PipelineDataSourceService ¶
type PipelineDataSourceService struct {
// contains filtered or unexported fields
}
PipelineDataSourceService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPipelineDataSourceService method instead.
func NewPipelineDataSourceService ¶
func NewPipelineDataSourceService(opts ...option.RequestOption) (r PipelineDataSourceService)
NewPipelineDataSourceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PipelineDataSourceService) GetDataSources ¶
func (r *PipelineDataSourceService) GetDataSources(ctx context.Context, pipelineID string, opts ...option.RequestOption) (res *[]PipelineDataSource, err error)
Get data sources for a pipeline.
func (*PipelineDataSourceService) GetStatus ¶
func (r *PipelineDataSourceService) GetStatus(ctx context.Context, dataSourceID string, query PipelineDataSourceGetStatusParams, opts ...option.RequestOption) (res *ManagedIngestionStatusResponse, err error)
Get the status of a data source for a pipeline.
func (*PipelineDataSourceService) Sync ¶
func (r *PipelineDataSourceService) Sync(ctx context.Context, dataSourceID string, params PipelineDataSourceSyncParams, opts ...option.RequestOption) (res *Pipeline, err error)
Run incremental ingestion: pull upstream changes from the data source into the data sink.
func (*PipelineDataSourceService) Update ¶
func (r *PipelineDataSourceService) Update(ctx context.Context, dataSourceID string, params PipelineDataSourceUpdateParams, opts ...option.RequestOption) (res *PipelineDataSource, err error)
Update the configuration of a data source in a pipeline.
func (*PipelineDataSourceService) UpdateDataSources ¶
func (r *PipelineDataSourceService) UpdateDataSources(ctx context.Context, pipelineID string, body PipelineDataSourceUpdateDataSourcesParams, opts ...option.RequestOption) (res *[]PipelineDataSource, err error)
Add data sources to a pipeline.
type PipelineDataSourceSourceType ¶
type PipelineDataSourceSourceType string
const ( PipelineDataSourceSourceTypeS3 PipelineDataSourceSourceType = "S3" PipelineDataSourceSourceTypeAzureStorageBlob PipelineDataSourceSourceType = "AZURE_STORAGE_BLOB" PipelineDataSourceSourceTypeGoogleDrive PipelineDataSourceSourceType = "GOOGLE_DRIVE" PipelineDataSourceSourceTypeMicrosoftOnedrive PipelineDataSourceSourceType = "MICROSOFT_ONEDRIVE" PipelineDataSourceSourceTypeSlack PipelineDataSourceSourceType = "SLACK" PipelineDataSourceSourceTypeNotionPage PipelineDataSourceSourceType = "NOTION_PAGE" PipelineDataSourceSourceTypeConfluence PipelineDataSourceSourceType = "CONFLUENCE" PipelineDataSourceSourceTypeJira PipelineDataSourceSourceType = "JIRA" PipelineDataSourceSourceTypeJiraV2 PipelineDataSourceSourceType = "JIRA_V2" PipelineDataSourceSourceTypeBox PipelineDataSourceSourceType = "BOX" )
type PipelineDataSourceStatus ¶
type PipelineDataSourceStatus string
The status of the data source in the pipeline.
const ( PipelineDataSourceStatusNotStarted PipelineDataSourceStatus = "NOT_STARTED" PipelineDataSourceStatusInProgress PipelineDataSourceStatus = "IN_PROGRESS" PipelineDataSourceStatusSuccess PipelineDataSourceStatus = "SUCCESS" PipelineDataSourceStatusError PipelineDataSourceStatus = "ERROR" PipelineDataSourceStatusCancelled PipelineDataSourceStatus = "CANCELLED" )
type PipelineDataSourceSyncParams ¶
type PipelineDataSourceSyncParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
PipelineFileIDs []string `json:"pipeline_file_ids,omitzero" format:"uuid"`
// contains filtered or unexported fields
}
func (PipelineDataSourceSyncParams) MarshalJSON ¶
func (r PipelineDataSourceSyncParams) MarshalJSON() (data []byte, err error)
func (*PipelineDataSourceSyncParams) UnmarshalJSON ¶
func (r *PipelineDataSourceSyncParams) UnmarshalJSON(data []byte) error
type PipelineDataSourceUpdateDataSourcesParams ¶
type PipelineDataSourceUpdateDataSourcesParams struct {
Body []PipelineDataSourceUpdateDataSourcesParamsBody
// contains filtered or unexported fields
}
func (PipelineDataSourceUpdateDataSourcesParams) MarshalJSON ¶
func (r PipelineDataSourceUpdateDataSourcesParams) MarshalJSON() (data []byte, err error)
func (*PipelineDataSourceUpdateDataSourcesParams) UnmarshalJSON ¶
func (r *PipelineDataSourceUpdateDataSourcesParams) UnmarshalJSON(data []byte) error
type PipelineDataSourceUpdateDataSourcesParamsBody ¶
type PipelineDataSourceUpdateDataSourcesParamsBody struct {
// The ID of the data source.
DataSourceID string `json:"data_source_id" api:"required" format:"uuid"`
// The interval at which the data source should be synced. Valid values are: 21600,
// 43200, 86400
SyncInterval param.Opt[float64] `json:"sync_interval,omitzero"`
// contains filtered or unexported fields
}
Schema for creating an association between a data source and a pipeline.
The property DataSourceID is required.
func (PipelineDataSourceUpdateDataSourcesParamsBody) MarshalJSON ¶
func (r PipelineDataSourceUpdateDataSourcesParamsBody) MarshalJSON() (data []byte, err error)
func (*PipelineDataSourceUpdateDataSourcesParamsBody) UnmarshalJSON ¶
func (r *PipelineDataSourceUpdateDataSourcesParamsBody) UnmarshalJSON(data []byte) error
type PipelineDataSourceUpdateParams ¶
type PipelineDataSourceUpdateParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// The interval at which the data source should be synced.
SyncInterval param.Opt[float64] `json:"sync_interval,omitzero"`
// contains filtered or unexported fields
}
func (PipelineDataSourceUpdateParams) MarshalJSON ¶
func (r PipelineDataSourceUpdateParams) MarshalJSON() (data []byte, err error)
func (*PipelineDataSourceUpdateParams) UnmarshalJSON ¶
func (r *PipelineDataSourceUpdateParams) UnmarshalJSON(data []byte) error
type PipelineDocumentDeleteParams ¶
type PipelineDocumentDeleteParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
type PipelineDocumentGetChunksParams ¶
type PipelineDocumentGetChunksParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
type PipelineDocumentGetParams ¶
type PipelineDocumentGetParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
type PipelineDocumentGetStatusParams ¶
type PipelineDocumentGetStatusParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
type PipelineDocumentListParams ¶
type PipelineDocumentListParams struct {
FileID param.Opt[string] `query:"file_id,omitzero" format:"uuid" json:"-"`
OnlyAPIDataSourceDocuments param.Opt[bool] `query:"only_api_data_source_documents,omitzero" json:"-"`
OnlyDirectUpload param.Opt[bool] `query:"only_direct_upload,omitzero" json:"-"`
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
Skip param.Opt[int64] `query:"skip,omitzero" json:"-"`
// Any of "cached", "ttl".
StatusRefreshPolicy PipelineDocumentListParamsStatusRefreshPolicy `query:"status_refresh_policy,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PipelineDocumentListParams) URLQuery ¶
func (r PipelineDocumentListParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineDocumentListParams's query parameters as `url.Values`.
type PipelineDocumentListParamsStatusRefreshPolicy ¶
type PipelineDocumentListParamsStatusRefreshPolicy string
const ( PipelineDocumentListParamsStatusRefreshPolicyCached PipelineDocumentListParamsStatusRefreshPolicy = "cached" PipelineDocumentListParamsStatusRefreshPolicyTtl PipelineDocumentListParamsStatusRefreshPolicy = "ttl" )
type PipelineDocumentNewParams ¶
type PipelineDocumentNewParams struct {
Body []CloudDocumentCreateParam
// contains filtered or unexported fields
}
func (PipelineDocumentNewParams) MarshalJSON ¶
func (r PipelineDocumentNewParams) MarshalJSON() (data []byte, err error)
func (*PipelineDocumentNewParams) UnmarshalJSON ¶
func (r *PipelineDocumentNewParams) UnmarshalJSON(data []byte) error
type PipelineDocumentService ¶
type PipelineDocumentService struct {
// contains filtered or unexported fields
}
PipelineDocumentService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPipelineDocumentService method instead.
func NewPipelineDocumentService ¶
func NewPipelineDocumentService(opts ...option.RequestOption) (r PipelineDocumentService)
NewPipelineDocumentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PipelineDocumentService) Delete ¶
func (r *PipelineDocumentService) Delete(ctx context.Context, documentID string, body PipelineDocumentDeleteParams, opts ...option.RequestOption) (err error)
Delete a document from a pipeline; runs async (vectors first, then MongoDB record).
func (*PipelineDocumentService) Get ¶
func (r *PipelineDocumentService) Get(ctx context.Context, documentID string, query PipelineDocumentGetParams, opts ...option.RequestOption) (res *CloudDocument, err error)
Return a single document for a pipeline.
func (*PipelineDocumentService) GetChunks ¶
func (r *PipelineDocumentService) GetChunks(ctx context.Context, documentID string, query PipelineDocumentGetChunksParams, opts ...option.RequestOption) (res *[]TextNode, err error)
Return a list of chunks for a pipeline document.
func (*PipelineDocumentService) GetStatus ¶
func (r *PipelineDocumentService) GetStatus(ctx context.Context, documentID string, query PipelineDocumentGetStatusParams, opts ...option.RequestOption) (res *ManagedIngestionStatusResponse, err error)
Return a single document for a pipeline.
func (*PipelineDocumentService) List ¶
func (r *PipelineDocumentService) List(ctx context.Context, pipelineID string, query PipelineDocumentListParams, opts ...option.RequestOption) (res *pagination.PaginatedCloudDocuments[CloudDocument], err error)
Return a list of documents for a pipeline.
func (*PipelineDocumentService) ListAutoPaging ¶
func (r *PipelineDocumentService) ListAutoPaging(ctx context.Context, pipelineID string, query PipelineDocumentListParams, opts ...option.RequestOption) *pagination.PaginatedCloudDocumentsAutoPager[CloudDocument]
Return a list of documents for a pipeline.
func (*PipelineDocumentService) New ¶
func (r *PipelineDocumentService) New(ctx context.Context, pipelineID string, body PipelineDocumentNewParams, opts ...option.RequestOption) (res *[]CloudDocument, err error)
Batch create documents for a pipeline.
func (*PipelineDocumentService) Sync ¶
func (r *PipelineDocumentService) Sync(ctx context.Context, documentID string, body PipelineDocumentSyncParams, opts ...option.RequestOption) (res *PipelineDocumentSyncResponse, err error)
Sync a specific document for a pipeline.
func (*PipelineDocumentService) Upsert ¶
func (r *PipelineDocumentService) Upsert(ctx context.Context, pipelineID string, body PipelineDocumentUpsertParams, opts ...option.RequestOption) (res *[]CloudDocument, err error)
Batch create or update a document for a pipeline.
type PipelineDocumentSyncParams ¶
type PipelineDocumentSyncParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
type PipelineDocumentSyncResponse ¶
type PipelineDocumentSyncResponse = any
type PipelineDocumentUpsertParams ¶
type PipelineDocumentUpsertParams struct {
Body []CloudDocumentCreateParam
// contains filtered or unexported fields
}
func (PipelineDocumentUpsertParams) MarshalJSON ¶
func (r PipelineDocumentUpsertParams) MarshalJSON() (data []byte, err error)
func (*PipelineDocumentUpsertParams) UnmarshalJSON ¶
func (r *PipelineDocumentUpsertParams) UnmarshalJSON(data []byte) error
type PipelineEmbeddingConfigManagedOpenAIEmbedding ¶
type PipelineEmbeddingConfigManagedOpenAIEmbedding struct {
// Configuration for the Managed OpenAI embedding model.
Component PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent `json:"component"`
// Type of the embedding model.
//
// Any of "MANAGED_OPENAI_EMBEDDING".
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Component respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PipelineEmbeddingConfigManagedOpenAIEmbedding) RawJSON ¶
func (r PipelineEmbeddingConfigManagedOpenAIEmbedding) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineEmbeddingConfigManagedOpenAIEmbedding) UnmarshalJSON ¶
func (r *PipelineEmbeddingConfigManagedOpenAIEmbedding) UnmarshalJSON(data []byte) error
type PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent ¶
type PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent struct {
ClassName string `json:"class_name"`
// The batch size for embedding calls.
EmbedBatchSize int64 `json:"embed_batch_size"`
// The name of the OpenAI embedding model.
//
// Any of "openai-text-embedding-3-small".
ModelName string `json:"model_name"`
// The number of workers to use for async embedding calls.
NumWorkers int64 `json:"num_workers" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ClassName respjson.Field
EmbedBatchSize respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for the Managed OpenAI embedding model.
func (PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent) RawJSON ¶
func (r PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent) UnmarshalJSON ¶
func (r *PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent) UnmarshalJSON(data []byte) error
type PipelineEmbeddingConfigUnion ¶
type PipelineEmbeddingConfigUnion struct {
// This field is a union of
// [PipelineEmbeddingConfigManagedOpenAIEmbeddingComponent],
// [AzureOpenAIEmbedding], [CohereEmbedding], [GeminiEmbedding],
// [HuggingFaceInferenceAPIEmbedding], [OpenAIEmbedding], [VertexTextEmbedding],
// [BedrockEmbedding]
Component PipelineEmbeddingConfigUnionComponent `json:"component"`
// Any of "MANAGED_OPENAI_EMBEDDING", "AZURE_EMBEDDING", "COHERE_EMBEDDING",
// "GEMINI_EMBEDDING", "HUGGINGFACE_API_EMBEDDING", "OPENAI_EMBEDDING",
// "VERTEXAI_EMBEDDING", "BEDROCK_EMBEDDING".
Type string `json:"type"`
JSON struct {
Component respjson.Field
Type respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineEmbeddingConfigUnion contains all possible properties and values from PipelineEmbeddingConfigManagedOpenAIEmbedding, AzureOpenAIEmbeddingConfig, CohereEmbeddingConfig, GeminiEmbeddingConfig, HuggingFaceInferenceAPIEmbeddingConfig, OpenAIEmbeddingConfig, VertexAIEmbeddingConfig, BedrockEmbeddingConfig.
Use the PipelineEmbeddingConfigUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (PipelineEmbeddingConfigUnion) AsAny ¶
func (u PipelineEmbeddingConfigUnion) AsAny() anyPipelineEmbeddingConfig
Use the following switch statement to find the correct variant
switch variant := PipelineEmbeddingConfigUnion.AsAny().(type) {
case llamacloudprod.PipelineEmbeddingConfigManagedOpenAIEmbedding:
case llamacloudprod.AzureOpenAIEmbeddingConfig:
case llamacloudprod.CohereEmbeddingConfig:
case llamacloudprod.GeminiEmbeddingConfig:
case llamacloudprod.HuggingFaceInferenceAPIEmbeddingConfig:
case llamacloudprod.OpenAIEmbeddingConfig:
case llamacloudprod.VertexAIEmbeddingConfig:
case llamacloudprod.BedrockEmbeddingConfig:
default:
fmt.Errorf("no variant present")
}
func (PipelineEmbeddingConfigUnion) AsAzureEmbedding ¶
func (u PipelineEmbeddingConfigUnion) AsAzureEmbedding() (v AzureOpenAIEmbeddingConfig)
func (PipelineEmbeddingConfigUnion) AsBedrockEmbedding ¶
func (u PipelineEmbeddingConfigUnion) AsBedrockEmbedding() (v BedrockEmbeddingConfig)
func (PipelineEmbeddingConfigUnion) AsCohereEmbedding ¶
func (u PipelineEmbeddingConfigUnion) AsCohereEmbedding() (v CohereEmbeddingConfig)
func (PipelineEmbeddingConfigUnion) AsGeminiEmbedding ¶
func (u PipelineEmbeddingConfigUnion) AsGeminiEmbedding() (v GeminiEmbeddingConfig)
func (PipelineEmbeddingConfigUnion) AsHuggingfaceAPIEmbedding ¶
func (u PipelineEmbeddingConfigUnion) AsHuggingfaceAPIEmbedding() (v HuggingFaceInferenceAPIEmbeddingConfig)
func (PipelineEmbeddingConfigUnion) AsManagedOpenAIEmbedding ¶
func (u PipelineEmbeddingConfigUnion) AsManagedOpenAIEmbedding() (v PipelineEmbeddingConfigManagedOpenAIEmbedding)
func (PipelineEmbeddingConfigUnion) AsOpenAIEmbedding ¶
func (u PipelineEmbeddingConfigUnion) AsOpenAIEmbedding() (v OpenAIEmbeddingConfig)
func (PipelineEmbeddingConfigUnion) AsVertexaiEmbedding ¶
func (u PipelineEmbeddingConfigUnion) AsVertexaiEmbedding() (v VertexAIEmbeddingConfig)
func (PipelineEmbeddingConfigUnion) RawJSON ¶
func (u PipelineEmbeddingConfigUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineEmbeddingConfigUnion) UnmarshalJSON ¶
func (r *PipelineEmbeddingConfigUnion) UnmarshalJSON(data []byte) error
type PipelineEmbeddingConfigUnionComponent ¶
type PipelineEmbeddingConfigUnionComponent struct {
ClassName string `json:"class_name"`
EmbedBatchSize int64 `json:"embed_batch_size"`
ModelName string `json:"model_name"`
NumWorkers int64 `json:"num_workers"`
AdditionalKwargs any `json:"additional_kwargs"`
APIBase string `json:"api_base"`
APIKey string `json:"api_key"`
APIVersion string `json:"api_version"`
// This field is from variant [AzureOpenAIEmbedding].
AzureDeployment string `json:"azure_deployment"`
// This field is from variant [AzureOpenAIEmbedding].
AzureEndpoint string `json:"azure_endpoint"`
DefaultHeaders string `json:"default_headers"`
Dimensions int64 `json:"dimensions"`
MaxRetries int64 `json:"max_retries"`
ReuseClient bool `json:"reuse_client"`
Timeout float64 `json:"timeout"`
// This field is from variant [CohereEmbedding].
EmbeddingType string `json:"embedding_type"`
// This field is from variant [CohereEmbedding].
InputType string `json:"input_type"`
// This field is from variant [CohereEmbedding].
Truncate string `json:"truncate"`
// This field is from variant [GeminiEmbedding].
OutputDimensionality int64 `json:"output_dimensionality"`
// This field is from variant [GeminiEmbedding].
TaskType string `json:"task_type"`
// This field is from variant [GeminiEmbedding].
Title string `json:"title"`
// This field is from variant [GeminiEmbedding].
Transport string `json:"transport"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Token HuggingFaceInferenceAPIEmbeddingTokenUnion `json:"token"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Cookies map[string]string `json:"cookies"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Headers map[string]string `json:"headers"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Pooling HuggingFaceInferenceAPIEmbeddingPooling `json:"pooling"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
QueryInstruction string `json:"query_instruction"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Task string `json:"task"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
TextInstruction string `json:"text_instruction"`
// This field is from variant [VertexTextEmbedding].
ClientEmail string `json:"client_email"`
// This field is from variant [VertexTextEmbedding].
Location string `json:"location"`
// This field is from variant [VertexTextEmbedding].
PrivateKey string `json:"private_key"`
// This field is from variant [VertexTextEmbedding].
PrivateKeyID string `json:"private_key_id"`
// This field is from variant [VertexTextEmbedding].
Project string `json:"project"`
// This field is from variant [VertexTextEmbedding].
TokenUri string `json:"token_uri"`
// This field is from variant [VertexTextEmbedding].
EmbedMode VertexTextEmbeddingEmbedMode `json:"embed_mode"`
// This field is from variant [BedrockEmbedding].
AwsAccessKeyID string `json:"aws_access_key_id"`
// This field is from variant [BedrockEmbedding].
AwsSecretAccessKey string `json:"aws_secret_access_key"`
// This field is from variant [BedrockEmbedding].
AwsSessionToken string `json:"aws_session_token"`
// This field is from variant [BedrockEmbedding].
ProfileName string `json:"profile_name"`
// This field is from variant [BedrockEmbedding].
RegionName string `json:"region_name"`
JSON struct {
ClassName respjson.Field
EmbedBatchSize respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
AdditionalKwargs respjson.Field
APIBase respjson.Field
APIKey respjson.Field
APIVersion respjson.Field
AzureDeployment respjson.Field
AzureEndpoint respjson.Field
DefaultHeaders respjson.Field
Dimensions respjson.Field
MaxRetries respjson.Field
ReuseClient respjson.Field
Timeout respjson.Field
EmbeddingType respjson.Field
InputType respjson.Field
Truncate respjson.Field
OutputDimensionality respjson.Field
TaskType respjson.Field
Title respjson.Field
Transport respjson.Field
Token respjson.Field
Cookies respjson.Field
Headers respjson.Field
Pooling respjson.Field
QueryInstruction respjson.Field
Task respjson.Field
TextInstruction respjson.Field
ClientEmail respjson.Field
Location respjson.Field
PrivateKey respjson.Field
PrivateKeyID respjson.Field
Project respjson.Field
TokenUri respjson.Field
EmbedMode respjson.Field
AwsAccessKeyID respjson.Field
AwsSecretAccessKey respjson.Field
AwsSessionToken respjson.Field
ProfileName respjson.Field
RegionName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineEmbeddingConfigUnionComponent is an implicit subunion of PipelineEmbeddingConfigUnion. PipelineEmbeddingConfigUnionComponent provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the PipelineEmbeddingConfigUnion.
func (*PipelineEmbeddingConfigUnionComponent) UnmarshalJSON ¶
func (r *PipelineEmbeddingConfigUnionComponent) UnmarshalJSON(data []byte) error
type PipelineEmbeddingModelConfig ¶
type PipelineEmbeddingModelConfig struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// The embedding configuration for the embedding model config.
EmbeddingConfig PipelineEmbeddingModelConfigEmbeddingConfigUnion `json:"embedding_config" api:"required"`
// The name of the embedding model config.
Name string `json:"name" api:"required"`
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
EmbeddingConfig respjson.Field
Name respjson.Field
ProjectID respjson.Field
CreatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for an embedding model config.
func (PipelineEmbeddingModelConfig) RawJSON ¶
func (r PipelineEmbeddingModelConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineEmbeddingModelConfig) UnmarshalJSON ¶
func (r *PipelineEmbeddingModelConfig) UnmarshalJSON(data []byte) error
type PipelineEmbeddingModelConfigEmbeddingConfigUnion ¶
type PipelineEmbeddingModelConfigEmbeddingConfigUnion struct {
// This field is a union of [AzureOpenAIEmbedding], [CohereEmbedding],
// [GeminiEmbedding], [HuggingFaceInferenceAPIEmbedding], [OpenAIEmbedding],
// [VertexTextEmbedding], [BedrockEmbedding]
Component PipelineEmbeddingModelConfigEmbeddingConfigUnionComponent `json:"component"`
// Any of "AZURE_EMBEDDING", "COHERE_EMBEDDING", "GEMINI_EMBEDDING",
// "HUGGINGFACE_API_EMBEDDING", "OPENAI_EMBEDDING", "VERTEXAI_EMBEDDING",
// "BEDROCK_EMBEDDING".
Type string `json:"type"`
JSON struct {
Component respjson.Field
Type respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineEmbeddingModelConfigEmbeddingConfigUnion contains all possible properties and values from AzureOpenAIEmbeddingConfig, CohereEmbeddingConfig, GeminiEmbeddingConfig, HuggingFaceInferenceAPIEmbeddingConfig, OpenAIEmbeddingConfig, VertexAIEmbeddingConfig, BedrockEmbeddingConfig.
Use the PipelineEmbeddingModelConfigEmbeddingConfigUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsAny ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsAny() anyPipelineEmbeddingModelConfigEmbeddingConfig
Use the following switch statement to find the correct variant
switch variant := PipelineEmbeddingModelConfigEmbeddingConfigUnion.AsAny().(type) {
case llamacloudprod.AzureOpenAIEmbeddingConfig:
case llamacloudprod.CohereEmbeddingConfig:
case llamacloudprod.GeminiEmbeddingConfig:
case llamacloudprod.HuggingFaceInferenceAPIEmbeddingConfig:
case llamacloudprod.OpenAIEmbeddingConfig:
case llamacloudprod.VertexAIEmbeddingConfig:
case llamacloudprod.BedrockEmbeddingConfig:
default:
fmt.Errorf("no variant present")
}
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsAzureEmbedding ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsAzureEmbedding() (v AzureOpenAIEmbeddingConfig)
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsBedrockEmbedding ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsBedrockEmbedding() (v BedrockEmbeddingConfig)
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsCohereEmbedding ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsCohereEmbedding() (v CohereEmbeddingConfig)
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsGeminiEmbedding ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsGeminiEmbedding() (v GeminiEmbeddingConfig)
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsHuggingfaceAPIEmbedding ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsHuggingfaceAPIEmbedding() (v HuggingFaceInferenceAPIEmbeddingConfig)
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsOpenAIEmbedding ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsOpenAIEmbedding() (v OpenAIEmbeddingConfig)
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsVertexaiEmbedding ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) AsVertexaiEmbedding() (v VertexAIEmbeddingConfig)
func (PipelineEmbeddingModelConfigEmbeddingConfigUnion) RawJSON ¶
func (u PipelineEmbeddingModelConfigEmbeddingConfigUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineEmbeddingModelConfigEmbeddingConfigUnion) UnmarshalJSON ¶
func (r *PipelineEmbeddingModelConfigEmbeddingConfigUnion) UnmarshalJSON(data []byte) error
type PipelineEmbeddingModelConfigEmbeddingConfigUnionComponent ¶
type PipelineEmbeddingModelConfigEmbeddingConfigUnionComponent struct {
AdditionalKwargs any `json:"additional_kwargs"`
APIBase string `json:"api_base"`
APIKey string `json:"api_key"`
APIVersion string `json:"api_version"`
// This field is from variant [AzureOpenAIEmbedding].
AzureDeployment string `json:"azure_deployment"`
// This field is from variant [AzureOpenAIEmbedding].
AzureEndpoint string `json:"azure_endpoint"`
ClassName string `json:"class_name"`
DefaultHeaders string `json:"default_headers"`
Dimensions int64 `json:"dimensions"`
EmbedBatchSize int64 `json:"embed_batch_size"`
MaxRetries int64 `json:"max_retries"`
ModelName string `json:"model_name"`
NumWorkers int64 `json:"num_workers"`
ReuseClient bool `json:"reuse_client"`
Timeout float64 `json:"timeout"`
// This field is from variant [CohereEmbedding].
EmbeddingType string `json:"embedding_type"`
// This field is from variant [CohereEmbedding].
InputType string `json:"input_type"`
// This field is from variant [CohereEmbedding].
Truncate string `json:"truncate"`
// This field is from variant [GeminiEmbedding].
OutputDimensionality int64 `json:"output_dimensionality"`
// This field is from variant [GeminiEmbedding].
TaskType string `json:"task_type"`
// This field is from variant [GeminiEmbedding].
Title string `json:"title"`
// This field is from variant [GeminiEmbedding].
Transport string `json:"transport"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Token HuggingFaceInferenceAPIEmbeddingTokenUnion `json:"token"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Cookies map[string]string `json:"cookies"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Headers map[string]string `json:"headers"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Pooling HuggingFaceInferenceAPIEmbeddingPooling `json:"pooling"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
QueryInstruction string `json:"query_instruction"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
Task string `json:"task"`
// This field is from variant [HuggingFaceInferenceAPIEmbedding].
TextInstruction string `json:"text_instruction"`
// This field is from variant [VertexTextEmbedding].
ClientEmail string `json:"client_email"`
// This field is from variant [VertexTextEmbedding].
Location string `json:"location"`
// This field is from variant [VertexTextEmbedding].
PrivateKey string `json:"private_key"`
// This field is from variant [VertexTextEmbedding].
PrivateKeyID string `json:"private_key_id"`
// This field is from variant [VertexTextEmbedding].
Project string `json:"project"`
// This field is from variant [VertexTextEmbedding].
TokenUri string `json:"token_uri"`
// This field is from variant [VertexTextEmbedding].
EmbedMode VertexTextEmbeddingEmbedMode `json:"embed_mode"`
// This field is from variant [BedrockEmbedding].
AwsAccessKeyID string `json:"aws_access_key_id"`
// This field is from variant [BedrockEmbedding].
AwsSecretAccessKey string `json:"aws_secret_access_key"`
// This field is from variant [BedrockEmbedding].
AwsSessionToken string `json:"aws_session_token"`
// This field is from variant [BedrockEmbedding].
ProfileName string `json:"profile_name"`
// This field is from variant [BedrockEmbedding].
RegionName string `json:"region_name"`
JSON struct {
AdditionalKwargs respjson.Field
APIBase respjson.Field
APIKey respjson.Field
APIVersion respjson.Field
AzureDeployment respjson.Field
AzureEndpoint respjson.Field
ClassName respjson.Field
DefaultHeaders respjson.Field
Dimensions respjson.Field
EmbedBatchSize respjson.Field
MaxRetries respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
ReuseClient respjson.Field
Timeout respjson.Field
EmbeddingType respjson.Field
InputType respjson.Field
Truncate respjson.Field
OutputDimensionality respjson.Field
TaskType respjson.Field
Title respjson.Field
Transport respjson.Field
Token respjson.Field
Cookies respjson.Field
Headers respjson.Field
Pooling respjson.Field
QueryInstruction respjson.Field
Task respjson.Field
TextInstruction respjson.Field
ClientEmail respjson.Field
Location respjson.Field
PrivateKey respjson.Field
PrivateKeyID respjson.Field
Project respjson.Field
TokenUri respjson.Field
EmbedMode respjson.Field
AwsAccessKeyID respjson.Field
AwsSecretAccessKey respjson.Field
AwsSessionToken respjson.Field
ProfileName respjson.Field
RegionName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineEmbeddingModelConfigEmbeddingConfigUnionComponent is an implicit subunion of PipelineEmbeddingModelConfigEmbeddingConfigUnion. PipelineEmbeddingModelConfigEmbeddingConfigUnionComponent provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the PipelineEmbeddingModelConfigEmbeddingConfigUnion.
func (*PipelineEmbeddingModelConfigEmbeddingConfigUnionComponent) UnmarshalJSON ¶
func (r *PipelineEmbeddingModelConfigEmbeddingConfigUnionComponent) UnmarshalJSON(data []byte) error
type PipelineFile ¶
type PipelineFile struct {
// Unique identifier for the pipeline file.
ID string `json:"id" api:"required" format:"uuid"`
// The ID of the pipeline that the file is associated with.
PipelineID string `json:"pipeline_id" api:"required" format:"uuid"`
// Hashes for the configuration of the pipeline.
ConfigHash map[string]*PipelineFileConfigHashUnion `json:"config_hash" api:"nullable"`
// When the pipeline file was created.
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Custom metadata for the file.
CustomMetadata map[string]*PipelineFileCustomMetadataUnion `json:"custom_metadata" api:"nullable"`
// The ID of the data source that the file belongs to.
DataSourceID string `json:"data_source_id" api:"nullable" format:"uuid"`
// The ID of the file in the external system.
ExternalFileID string `json:"external_file_id" api:"nullable"`
// The ID of the file.
FileID string `json:"file_id" api:"nullable" format:"uuid"`
// Size of the file in bytes.
FileSize int64 `json:"file_size" api:"nullable"`
// File type (e.g. pdf, docx, etc.).
FileType string `json:"file_type" api:"nullable"`
// The number of pages that have been indexed for this file.
IndexedPageCount int64 `json:"indexed_page_count" api:"nullable"`
// The last modified time of the file.
LastModifiedAt time.Time `json:"last_modified_at" api:"nullable" format:"date-time"`
// Name of the file.
Name string `json:"name" api:"nullable"`
// Permission information for the file.
PermissionInfo map[string]*PipelineFilePermissionInfoUnion `json:"permission_info" api:"nullable"`
// The ID of the project that the file belongs to.
ProjectID string `json:"project_id" api:"nullable" format:"uuid"`
// Resource information for the file.
ResourceInfo map[string]*PipelineFileResourceInfoUnion `json:"resource_info" api:"nullable"`
// Status of the pipeline file.
//
// Any of "NOT_STARTED", "IN_PROGRESS", "SUCCESS", "ERROR", "CANCELLED".
Status PipelineFileStatus `json:"status" api:"nullable"`
// The last time the status was updated.
StatusUpdatedAt time.Time `json:"status_updated_at" api:"nullable" format:"date-time"`
// When the pipeline file was last updated.
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
PipelineID respjson.Field
ConfigHash respjson.Field
CreatedAt respjson.Field
CustomMetadata respjson.Field
DataSourceID respjson.Field
ExternalFileID respjson.Field
FileID respjson.Field
FileSize respjson.Field
FileType respjson.Field
IndexedPageCount respjson.Field
LastModifiedAt respjson.Field
Name respjson.Field
PermissionInfo respjson.Field
ProjectID respjson.Field
ResourceInfo respjson.Field
Status respjson.Field
StatusUpdatedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A file associated with a pipeline.
func (PipelineFile) RawJSON ¶
func (r PipelineFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineFile) UnmarshalJSON ¶
func (r *PipelineFile) UnmarshalJSON(data []byte) error
type PipelineFileConfigHashUnion ¶
type PipelineFileConfigHashUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfPipelineFileConfigHashMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfPipelineFileConfigHashMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineFileConfigHashUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfPipelineFileConfigHashMapItem OfAnyArray OfString OfFloat OfBool]
func (PipelineFileConfigHashUnion) AsAnyArray ¶
func (u PipelineFileConfigHashUnion) AsAnyArray() (v []any)
func (PipelineFileConfigHashUnion) AsAnyMap ¶
func (u PipelineFileConfigHashUnion) AsAnyMap() (v map[string]any)
func (PipelineFileConfigHashUnion) AsBool ¶
func (u PipelineFileConfigHashUnion) AsBool() (v bool)
func (PipelineFileConfigHashUnion) AsFloat ¶
func (u PipelineFileConfigHashUnion) AsFloat() (v float64)
func (PipelineFileConfigHashUnion) AsString ¶
func (u PipelineFileConfigHashUnion) AsString() (v string)
func (PipelineFileConfigHashUnion) RawJSON ¶
func (u PipelineFileConfigHashUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineFileConfigHashUnion) UnmarshalJSON ¶
func (r *PipelineFileConfigHashUnion) UnmarshalJSON(data []byte) error
type PipelineFileCustomMetadataUnion ¶
type PipelineFileCustomMetadataUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfPipelineFileCustomMetadataMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfPipelineFileCustomMetadataMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineFileCustomMetadataUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfPipelineFileCustomMetadataMapItem OfAnyArray OfString OfFloat OfBool]
func (PipelineFileCustomMetadataUnion) AsAnyArray ¶
func (u PipelineFileCustomMetadataUnion) AsAnyArray() (v []any)
func (PipelineFileCustomMetadataUnion) AsAnyMap ¶
func (u PipelineFileCustomMetadataUnion) AsAnyMap() (v map[string]any)
func (PipelineFileCustomMetadataUnion) AsBool ¶
func (u PipelineFileCustomMetadataUnion) AsBool() (v bool)
func (PipelineFileCustomMetadataUnion) AsFloat ¶
func (u PipelineFileCustomMetadataUnion) AsFloat() (v float64)
func (PipelineFileCustomMetadataUnion) AsString ¶
func (u PipelineFileCustomMetadataUnion) AsString() (v string)
func (PipelineFileCustomMetadataUnion) RawJSON ¶
func (u PipelineFileCustomMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineFileCustomMetadataUnion) UnmarshalJSON ¶
func (r *PipelineFileCustomMetadataUnion) UnmarshalJSON(data []byte) error
type PipelineFileDeleteParams ¶
type PipelineFileDeleteParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
type PipelineFileGetStatusCountsParams ¶
type PipelineFileGetStatusCountsParams struct {
DataSourceID param.Opt[string] `query:"data_source_id,omitzero" format:"uuid" json:"-"`
OnlyManuallyUploaded param.Opt[bool] `query:"only_manually_uploaded,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PipelineFileGetStatusCountsParams) URLQuery ¶
func (r PipelineFileGetStatusCountsParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineFileGetStatusCountsParams's query parameters as `url.Values`.
type PipelineFileGetStatusCountsResponse ¶
type PipelineFileGetStatusCountsResponse struct {
// The counts of files by status
Counts map[string]int64 `json:"counts" api:"required"`
// The total number of files
TotalCount int64 `json:"total_count" api:"required"`
// The ID of the data source that the files belong to
DataSourceID string `json:"data_source_id" api:"nullable" format:"uuid"`
// Whether to only count manually uploaded files
OnlyManuallyUploaded bool `json:"only_manually_uploaded"`
// The ID of the pipeline that the files belong to
PipelineID string `json:"pipeline_id" api:"nullable" format:"uuid"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Counts respjson.Field
TotalCount respjson.Field
DataSourceID respjson.Field
OnlyManuallyUploaded respjson.Field
PipelineID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PipelineFileGetStatusCountsResponse) RawJSON ¶
func (r PipelineFileGetStatusCountsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineFileGetStatusCountsResponse) UnmarshalJSON ¶
func (r *PipelineFileGetStatusCountsResponse) UnmarshalJSON(data []byte) error
type PipelineFileGetStatusParams ¶
type PipelineFileGetStatusParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
type PipelineFileListParams ¶
type PipelineFileListParams struct {
DataSourceID param.Opt[string] `query:"data_source_id,omitzero" format:"uuid" json:"-"`
FileNameContains param.Opt[string] `query:"file_name_contains,omitzero" json:"-"`
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
OnlyManuallyUploaded param.Opt[bool] `query:"only_manually_uploaded,omitzero" json:"-"`
// Filter by file statuses
//
// Any of "NOT_STARTED", "IN_PROGRESS", "SUCCESS", "ERROR", "CANCELLED".
Statuses []string `query:"statuses,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PipelineFileListParams) URLQuery ¶
func (r PipelineFileListParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineFileListParams's query parameters as `url.Values`.
type PipelineFileNewParams ¶
type PipelineFileNewParams struct {
Body []PipelineFileNewParamsBody
// contains filtered or unexported fields
}
func (PipelineFileNewParams) MarshalJSON ¶
func (r PipelineFileNewParams) MarshalJSON() (data []byte, err error)
func (*PipelineFileNewParams) UnmarshalJSON ¶
func (r *PipelineFileNewParams) UnmarshalJSON(data []byte) error
type PipelineFileNewParamsBody ¶
type PipelineFileNewParamsBody struct {
// The ID of the file
FileID string `json:"file_id" api:"required" format:"uuid"`
// Custom metadata for the file
CustomMetadata map[string]*PipelineFileNewParamsBodyCustomMetadataUnion `json:"custom_metadata,omitzero"`
// contains filtered or unexported fields
}
Schema for creating a file that is associated with a pipeline.
The property FileID is required.
func (PipelineFileNewParamsBody) MarshalJSON ¶
func (r PipelineFileNewParamsBody) MarshalJSON() (data []byte, err error)
func (*PipelineFileNewParamsBody) UnmarshalJSON ¶
func (r *PipelineFileNewParamsBody) UnmarshalJSON(data []byte) error
type PipelineFileNewParamsBodyCustomMetadataUnion ¶
type PipelineFileNewParamsBodyCustomMetadataUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PipelineFileNewParamsBodyCustomMetadataUnion) MarshalJSON ¶
func (u PipelineFileNewParamsBodyCustomMetadataUnion) MarshalJSON() ([]byte, error)
func (*PipelineFileNewParamsBodyCustomMetadataUnion) UnmarshalJSON ¶
func (u *PipelineFileNewParamsBodyCustomMetadataUnion) UnmarshalJSON(data []byte) error
type PipelineFilePermissionInfoUnion ¶
type PipelineFilePermissionInfoUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfPipelineFilePermissionInfoMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfPipelineFilePermissionInfoMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineFilePermissionInfoUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfPipelineFilePermissionInfoMapItem OfAnyArray OfString OfFloat OfBool]
func (PipelineFilePermissionInfoUnion) AsAnyArray ¶
func (u PipelineFilePermissionInfoUnion) AsAnyArray() (v []any)
func (PipelineFilePermissionInfoUnion) AsAnyMap ¶
func (u PipelineFilePermissionInfoUnion) AsAnyMap() (v map[string]any)
func (PipelineFilePermissionInfoUnion) AsBool ¶
func (u PipelineFilePermissionInfoUnion) AsBool() (v bool)
func (PipelineFilePermissionInfoUnion) AsFloat ¶
func (u PipelineFilePermissionInfoUnion) AsFloat() (v float64)
func (PipelineFilePermissionInfoUnion) AsString ¶
func (u PipelineFilePermissionInfoUnion) AsString() (v string)
func (PipelineFilePermissionInfoUnion) RawJSON ¶
func (u PipelineFilePermissionInfoUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineFilePermissionInfoUnion) UnmarshalJSON ¶
func (r *PipelineFilePermissionInfoUnion) UnmarshalJSON(data []byte) error
type PipelineFileResourceInfoUnion ¶
type PipelineFileResourceInfoUnion struct {
// This field will be present if the value is a [any] instead of an object.
OfPipelineFileResourceInfoMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfPipelineFileResourceInfoMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineFileResourceInfoUnion contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfPipelineFileResourceInfoMapItem OfAnyArray OfString OfFloat OfBool]
func (PipelineFileResourceInfoUnion) AsAnyArray ¶
func (u PipelineFileResourceInfoUnion) AsAnyArray() (v []any)
func (PipelineFileResourceInfoUnion) AsAnyMap ¶
func (u PipelineFileResourceInfoUnion) AsAnyMap() (v map[string]any)
func (PipelineFileResourceInfoUnion) AsBool ¶
func (u PipelineFileResourceInfoUnion) AsBool() (v bool)
func (PipelineFileResourceInfoUnion) AsFloat ¶
func (u PipelineFileResourceInfoUnion) AsFloat() (v float64)
func (PipelineFileResourceInfoUnion) AsString ¶
func (u PipelineFileResourceInfoUnion) AsString() (v string)
func (PipelineFileResourceInfoUnion) RawJSON ¶
func (u PipelineFileResourceInfoUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineFileResourceInfoUnion) UnmarshalJSON ¶
func (r *PipelineFileResourceInfoUnion) UnmarshalJSON(data []byte) error
type PipelineFileService ¶
type PipelineFileService struct {
// contains filtered or unexported fields
}
PipelineFileService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPipelineFileService method instead.
func NewPipelineFileService ¶
func NewPipelineFileService(opts ...option.RequestOption) (r PipelineFileService)
NewPipelineFileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PipelineFileService) Delete ¶
func (r *PipelineFileService) Delete(ctx context.Context, fileID string, body PipelineFileDeleteParams, opts ...option.RequestOption) (err error)
Delete a file from a pipeline.
func (*PipelineFileService) GetStatus ¶
func (r *PipelineFileService) GetStatus(ctx context.Context, fileID string, query PipelineFileGetStatusParams, opts ...option.RequestOption) (res *ManagedIngestionStatusResponse, err error)
Get status of a file for a pipeline.
func (*PipelineFileService) GetStatusCounts ¶
func (r *PipelineFileService) GetStatusCounts(ctx context.Context, pipelineID string, query PipelineFileGetStatusCountsParams, opts ...option.RequestOption) (res *PipelineFileGetStatusCountsResponse, err error)
Get files for a pipeline.
func (*PipelineFileService) List
deprecated
func (r *PipelineFileService) List(ctx context.Context, pipelineID string, query PipelineFileListParams, opts ...option.RequestOption) (res *pagination.PaginatedPipelineFiles[PipelineFile], err error)
List files for a pipeline with optional filtering, sorting, and pagination.
Deprecated: deprecated
func (*PipelineFileService) ListAutoPaging
deprecated
func (r *PipelineFileService) ListAutoPaging(ctx context.Context, pipelineID string, query PipelineFileListParams, opts ...option.RequestOption) *pagination.PaginatedPipelineFilesAutoPager[PipelineFile]
List files for a pipeline with optional filtering, sorting, and pagination.
Deprecated: deprecated
func (*PipelineFileService) New ¶
func (r *PipelineFileService) New(ctx context.Context, pipelineID string, body PipelineFileNewParams, opts ...option.RequestOption) (res *[]PipelineFile, err error)
Add files to a pipeline.
func (*PipelineFileService) Update ¶
func (r *PipelineFileService) Update(ctx context.Context, fileID string, params PipelineFileUpdateParams, opts ...option.RequestOption) (res *PipelineFile, err error)
Update a file for a pipeline.
type PipelineFileStatus ¶
type PipelineFileStatus string
Status of the pipeline file.
const ( PipelineFileStatusNotStarted PipelineFileStatus = "NOT_STARTED" PipelineFileStatusInProgress PipelineFileStatus = "IN_PROGRESS" PipelineFileStatusSuccess PipelineFileStatus = "SUCCESS" PipelineFileStatusError PipelineFileStatus = "ERROR" PipelineFileStatusCancelled PipelineFileStatus = "CANCELLED" )
type PipelineFileUpdateParams ¶
type PipelineFileUpdateParams struct {
PipelineID string `path:"pipeline_id" api:"required" format:"uuid" json:"-"`
// Custom metadata for the file
CustomMetadata map[string]*PipelineFileUpdateParamsCustomMetadataUnion `json:"custom_metadata,omitzero"`
// contains filtered or unexported fields
}
func (PipelineFileUpdateParams) MarshalJSON ¶
func (r PipelineFileUpdateParams) MarshalJSON() (data []byte, err error)
func (*PipelineFileUpdateParams) UnmarshalJSON ¶
func (r *PipelineFileUpdateParams) UnmarshalJSON(data []byte) error
type PipelineFileUpdateParamsCustomMetadataUnion ¶
type PipelineFileUpdateParamsCustomMetadataUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PipelineFileUpdateParamsCustomMetadataUnion) MarshalJSON ¶
func (u PipelineFileUpdateParamsCustomMetadataUnion) MarshalJSON() ([]byte, error)
func (*PipelineFileUpdateParamsCustomMetadataUnion) UnmarshalJSON ¶
func (u *PipelineFileUpdateParamsCustomMetadataUnion) UnmarshalJSON(data []byte) error
type PipelineGetStatusParams ¶
type PipelineGetStatusParams struct {
FullDetails param.Opt[bool] `query:"full_details,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PipelineGetStatusParams) URLQuery ¶
func (r PipelineGetStatusParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineGetStatusParams's query parameters as `url.Values`.
type PipelineImageGetPageFigureParams ¶
type PipelineImageGetPageFigureParams struct {
ID string `path:"id" api:"required" format:"uuid" json:"-"`
PageIndex int64 `path:"page_index" api:"required" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (PipelineImageGetPageFigureParams) URLQuery ¶
func (r PipelineImageGetPageFigureParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineImageGetPageFigureParams's query parameters as `url.Values`.
type PipelineImageGetPageFigureResponse ¶
type PipelineImageGetPageFigureResponse = any
type PipelineImageGetPageScreenshotParams ¶
type PipelineImageGetPageScreenshotParams struct {
ID string `path:"id" api:"required" format:"uuid" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (PipelineImageGetPageScreenshotParams) URLQuery ¶
func (r PipelineImageGetPageScreenshotParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineImageGetPageScreenshotParams's query parameters as `url.Values`.
type PipelineImageGetPageScreenshotResponse ¶
type PipelineImageGetPageScreenshotResponse = any
type PipelineImageListPageFiguresParams ¶
type PipelineImageListPageFiguresParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (PipelineImageListPageFiguresParams) URLQuery ¶
func (r PipelineImageListPageFiguresParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineImageListPageFiguresParams's query parameters as `url.Values`.
type PipelineImageListPageFiguresResponse ¶
type PipelineImageListPageFiguresResponse struct {
// The confidence of the figure
Confidence float64 `json:"confidence" api:"required"`
// The name of the figure
FigureName string `json:"figure_name" api:"required"`
// The size of the figure in bytes
FigureSize int64 `json:"figure_size" api:"required"`
// The ID of the file that the figure was taken from
FileID string `json:"file_id" api:"required" format:"uuid"`
// The index of the page for which the figure is taken (0-indexed)
PageIndex int64 `json:"page_index" api:"required"`
// Whether the figure is likely to be noise
IsLikelyNoise bool `json:"is_likely_noise"`
// Metadata for the figure
Metadata map[string]any `json:"metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Confidence respjson.Field
FigureName respjson.Field
FigureSize respjson.Field
FileID respjson.Field
PageIndex respjson.Field
IsLikelyNoise respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PipelineImageListPageFiguresResponse) RawJSON ¶
func (r PipelineImageListPageFiguresResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineImageListPageFiguresResponse) UnmarshalJSON ¶
func (r *PipelineImageListPageFiguresResponse) UnmarshalJSON(data []byte) error
type PipelineImageListPageScreenshotsParams ¶
type PipelineImageListPageScreenshotsParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (PipelineImageListPageScreenshotsParams) URLQuery ¶
func (r PipelineImageListPageScreenshotsParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineImageListPageScreenshotsParams's query parameters as `url.Values`.
type PipelineImageListPageScreenshotsResponse ¶
type PipelineImageListPageScreenshotsResponse struct {
// The ID of the file that the page screenshot was taken from
FileID string `json:"file_id" api:"required" format:"uuid"`
// The size of the image in bytes
ImageSize int64 `json:"image_size" api:"required"`
// The index of the page for which the screenshot is taken (0-indexed)
PageIndex int64 `json:"page_index" api:"required"`
// Metadata for the screenshot
Metadata map[string]any `json:"metadata" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FileID respjson.Field
ImageSize respjson.Field
PageIndex respjson.Field
Metadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PipelineImageListPageScreenshotsResponse) RawJSON ¶
func (r PipelineImageListPageScreenshotsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineImageListPageScreenshotsResponse) UnmarshalJSON ¶
func (r *PipelineImageListPageScreenshotsResponse) UnmarshalJSON(data []byte) error
type PipelineImageService ¶
type PipelineImageService struct {
// contains filtered or unexported fields
}
PipelineImageService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPipelineImageService method instead.
func NewPipelineImageService ¶
func NewPipelineImageService(opts ...option.RequestOption) (r PipelineImageService)
NewPipelineImageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PipelineImageService) GetPageFigure ¶
func (r *PipelineImageService) GetPageFigure(ctx context.Context, figureName string, params PipelineImageGetPageFigureParams, opts ...option.RequestOption) (res *PipelineImageGetPageFigureResponse, err error)
Get a specific figure from a page of a file.
func (*PipelineImageService) GetPageScreenshot ¶
func (r *PipelineImageService) GetPageScreenshot(ctx context.Context, pageIndex int64, params PipelineImageGetPageScreenshotParams, opts ...option.RequestOption) (res *PipelineImageGetPageScreenshotResponse, err error)
Get screenshot of a page from a file.
func (*PipelineImageService) ListPageFigures ¶
func (r *PipelineImageService) ListPageFigures(ctx context.Context, id string, query PipelineImageListPageFiguresParams, opts ...option.RequestOption) (res *[]PipelineImageListPageFiguresResponse, err error)
List metadata for all figures from all pages of a file.
func (*PipelineImageService) ListPageScreenshots ¶
func (r *PipelineImageService) ListPageScreenshots(ctx context.Context, id string, query PipelineImageListPageScreenshotsParams, opts ...option.RequestOption) (res *[]PipelineImageListPageScreenshotsResponse, err error)
List metadata for all screenshots of pages from a file.
type PipelineListParams ¶
type PipelineListParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
PipelineName param.Opt[string] `query:"pipeline_name,omitzero" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
ProjectName param.Opt[string] `query:"project_name,omitzero" json:"-"`
// Enum for representing the type of a pipeline
//
// Any of "PLAYGROUND", "MANAGED".
PipelineType PipelineType `query:"pipeline_type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PipelineListParams) URLQuery ¶
func (r PipelineListParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineListParams's query parameters as `url.Values`.
type PipelineMetadataConfig ¶
type PipelineMetadataConfig struct {
// List of metadata keys to exclude from embeddings
ExcludedEmbedMetadataKeys []string `json:"excluded_embed_metadata_keys"`
// List of metadata keys to exclude from LLM during retrieval
ExcludedLlmMetadataKeys []string `json:"excluded_llm_metadata_keys"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExcludedEmbedMetadataKeys respjson.Field
ExcludedLlmMetadataKeys respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PipelineMetadataConfig) RawJSON ¶
func (r PipelineMetadataConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (PipelineMetadataConfig) ToParam ¶
func (r PipelineMetadataConfig) ToParam() PipelineMetadataConfigParam
ToParam converts this PipelineMetadataConfig to a PipelineMetadataConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PipelineMetadataConfigParam.Overrides()
func (*PipelineMetadataConfig) UnmarshalJSON ¶
func (r *PipelineMetadataConfig) UnmarshalJSON(data []byte) error
type PipelineMetadataConfigParam ¶
type PipelineMetadataConfigParam struct {
// List of metadata keys to exclude from embeddings
ExcludedEmbedMetadataKeys []string `json:"excluded_embed_metadata_keys,omitzero"`
// List of metadata keys to exclude from LLM during retrieval
ExcludedLlmMetadataKeys []string `json:"excluded_llm_metadata_keys,omitzero"`
// contains filtered or unexported fields
}
func (PipelineMetadataConfigParam) MarshalJSON ¶
func (r PipelineMetadataConfigParam) MarshalJSON() (data []byte, err error)
func (*PipelineMetadataConfigParam) UnmarshalJSON ¶
func (r *PipelineMetadataConfigParam) UnmarshalJSON(data []byte) error
type PipelineMetadataNewParams ¶
type PipelineMetadataNewParams struct {
UploadFile io.Reader `json:"upload_file,omitzero" api:"required" format:"binary"`
// contains filtered or unexported fields
}
func (PipelineMetadataNewParams) MarshalMultipart ¶
func (r PipelineMetadataNewParams) MarshalMultipart() (data []byte, contentType string, err error)
type PipelineMetadataService ¶
type PipelineMetadataService struct {
// contains filtered or unexported fields
}
PipelineMetadataService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPipelineMetadataService method instead.
func NewPipelineMetadataService ¶
func NewPipelineMetadataService(opts ...option.RequestOption) (r PipelineMetadataService)
NewPipelineMetadataService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PipelineMetadataService) DeleteAll ¶
func (r *PipelineMetadataService) DeleteAll(ctx context.Context, pipelineID string, opts ...option.RequestOption) (err error)
Delete metadata for all files in a pipeline.
func (*PipelineMetadataService) New ¶
func (r *PipelineMetadataService) New(ctx context.Context, pipelineID string, body PipelineMetadataNewParams, opts ...option.RequestOption) (res *PipelineMetadataNewResponse, err error)
Import metadata for a pipeline.
type PipelineNewParams ¶
type PipelineNewParams struct {
// Schema for creating a pipeline.
PipelineCreate PipelineCreateParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (PipelineNewParams) MarshalJSON ¶
func (r PipelineNewParams) MarshalJSON() (data []byte, err error)
func (PipelineNewParams) URLQuery ¶
func (r PipelineNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineNewParams's query parameters as `url.Values`.
func (*PipelineNewParams) UnmarshalJSON ¶
func (r *PipelineNewParams) UnmarshalJSON(data []byte) error
type PipelineRunSearchParams ¶
type PipelineRunSearchParams struct {
// The query to retrieve against.
Query string `json:"query" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// Alpha value for hybrid retrieval to determine the weights between dense and
// sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.
Alpha param.Opt[float64] `json:"alpha,omitzero"`
// Minimum similarity score wrt query for retrieval
DenseSimilarityCutoff param.Opt[float64] `json:"dense_similarity_cutoff,omitzero"`
// Number of nodes for dense retrieval.
DenseSimilarityTopK param.Opt[int64] `json:"dense_similarity_top_k,omitzero"`
// Enable reranking for retrieval
EnableReranking param.Opt[bool] `json:"enable_reranking,omitzero"`
// Number of files to retrieve (only for retrieval mode files_via_metadata and
// files_via_content).
FilesTopK param.Opt[int64] `json:"files_top_k,omitzero"`
// Number of reranked nodes for returning.
RerankTopN param.Opt[int64] `json:"rerank_top_n,omitzero"`
// Number of nodes for sparse retrieval.
SparseSimilarityTopK param.Opt[int64] `json:"sparse_similarity_top_k,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// Whether to retrieve image nodes.
RetrieveImageNodes param.Opt[bool] `json:"retrieve_image_nodes,omitzero"`
// Whether to retrieve page figure nodes.
RetrievePageFigureNodes param.Opt[bool] `json:"retrieve_page_figure_nodes,omitzero"`
// Whether to retrieve page screenshot nodes.
RetrievePageScreenshotNodes param.Opt[bool] `json:"retrieve_page_screenshot_nodes,omitzero"`
// JSON Schema that will be used to infer search_filters. Omit or leave as null to
// skip inference.
SearchFiltersInferenceSchema map[string]*PipelineRunSearchParamsSearchFiltersInferenceSchemaUnion `json:"search_filters_inference_schema,omitzero"`
// The retrieval mode for the query.
//
// Any of "chunks", "files_via_metadata", "files_via_content", "auto_routed".
RetrievalMode RetrievalMode `json:"retrieval_mode,omitzero"`
// Metadata filters for vector stores.
SearchFilters MetadataFiltersParam `json:"search_filters,omitzero"`
// contains filtered or unexported fields
}
func (PipelineRunSearchParams) MarshalJSON ¶
func (r PipelineRunSearchParams) MarshalJSON() (data []byte, err error)
func (PipelineRunSearchParams) URLQuery ¶
func (r PipelineRunSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineRunSearchParams's query parameters as `url.Values`.
func (*PipelineRunSearchParams) UnmarshalJSON ¶
func (r *PipelineRunSearchParams) UnmarshalJSON(data []byte) error
type PipelineRunSearchParamsSearchFiltersInferenceSchemaUnion ¶
type PipelineRunSearchParamsSearchFiltersInferenceSchemaUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PipelineRunSearchParamsSearchFiltersInferenceSchemaUnion) MarshalJSON ¶
func (u PipelineRunSearchParamsSearchFiltersInferenceSchemaUnion) MarshalJSON() ([]byte, error)
func (*PipelineRunSearchParamsSearchFiltersInferenceSchemaUnion) UnmarshalJSON ¶
func (u *PipelineRunSearchParamsSearchFiltersInferenceSchemaUnion) UnmarshalJSON(data []byte) error
type PipelineRunSearchResponse ¶
type PipelineRunSearchResponse struct {
// The ID of the pipeline that the query was retrieved against.
PipelineID string `json:"pipeline_id" api:"required" format:"uuid"`
// The nodes retrieved by the pipeline for the given query.
RetrievalNodes []PipelineRunSearchResponseRetrievalNode `json:"retrieval_nodes" api:"required"`
ClassName string `json:"class_name"`
// The image nodes retrieved by the pipeline for the given query. Deprecated - will
// soon be replaced with 'page_screenshot_nodes'.
//
// Deprecated: deprecated
ImageNodes []PageScreenshotNodeWithScore `json:"image_nodes"`
// Metadata filters for vector stores.
InferredSearchFilters MetadataFilters `json:"inferred_search_filters" api:"nullable"`
// Metadata associated with the retrieval execution
Metadata map[string]string `json:"metadata"`
// The page figure nodes retrieved by the pipeline for the given query.
PageFigureNodes []PageFigureNodeWithScore `json:"page_figure_nodes"`
// The end-to-end latency for retrieval and reranking.
RetrievalLatency map[string]float64 `json:"retrieval_latency"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PipelineID respjson.Field
RetrievalNodes respjson.Field
ClassName respjson.Field
ImageNodes respjson.Field
InferredSearchFilters respjson.Field
Metadata respjson.Field
PageFigureNodes respjson.Field
RetrievalLatency respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for the result of an retrieval execution.
func (PipelineRunSearchResponse) RawJSON ¶
func (r PipelineRunSearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineRunSearchResponse) UnmarshalJSON ¶
func (r *PipelineRunSearchResponse) UnmarshalJSON(data []byte) error
type PipelineRunSearchResponseRetrievalNode ¶
type PipelineRunSearchResponseRetrievalNode struct {
// Provided for backward compatibility.
Node TextNode `json:"node" api:"required"`
ClassName string `json:"class_name"`
Score float64 `json:"score" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Node respjson.Field
ClassName respjson.Field
Score respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Same as NodeWithScore but type for node is a TextNode instead of BaseNode. FastAPI doesn't accept abstract classes like BaseNode.
func (PipelineRunSearchResponseRetrievalNode) RawJSON ¶
func (r PipelineRunSearchResponseRetrievalNode) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineRunSearchResponseRetrievalNode) UnmarshalJSON ¶
func (r *PipelineRunSearchResponseRetrievalNode) UnmarshalJSON(data []byte) error
type PipelineService ¶
type PipelineService struct {
Sync PipelineSyncService
DataSources PipelineDataSourceService
Images PipelineImageService
Files PipelineFileService
Metadata PipelineMetadataService
Documents PipelineDocumentService
// contains filtered or unexported fields
}
PipelineService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPipelineService method instead.
func NewPipelineService ¶
func NewPipelineService(opts ...option.RequestOption) (r PipelineService)
NewPipelineService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PipelineService) Delete ¶
func (r *PipelineService) Delete(ctx context.Context, pipelineID string, opts ...option.RequestOption) (err error)
Delete a pipeline and all associated resources.
Removes pipeline files, data sources, and vector store data. This operation is irreversible.
func (*PipelineService) Get ¶
func (r *PipelineService) Get(ctx context.Context, pipelineID string, opts ...option.RequestOption) (res *Pipeline, err error)
Get a pipeline by ID.
func (*PipelineService) GetStatus ¶
func (r *PipelineService) GetStatus(ctx context.Context, pipelineID string, query PipelineGetStatusParams, opts ...option.RequestOption) (res *ManagedIngestionStatusResponse, err error)
Get the ingestion status of a managed pipeline.
Returns document counts, sync progress, and the last effective timestamp. Only available for managed pipelines.
func (*PipelineService) List ¶
func (r *PipelineService) List(ctx context.Context, query PipelineListParams, opts ...option.RequestOption) (res *[]Pipeline, err error)
Search for pipelines by name, type, or project.
func (*PipelineService) New ¶
func (r *PipelineService) New(ctx context.Context, params PipelineNewParams, opts ...option.RequestOption) (res *Pipeline, err error)
Create a new managed ingestion pipeline.
A pipeline connects data sources to a vector store for RAG. After creation, call `POST /pipelines/{id}/sync` to start ingesting documents.
func (*PipelineService) RunSearch ¶
func (r *PipelineService) RunSearch(ctx context.Context, pipelineID string, params PipelineRunSearchParams, opts ...option.RequestOption) (res *PipelineRunSearchResponse, err error)
Run a retrieval query against a managed pipeline.
Searches the pipeline's vector store using the provided query and retrieval parameters. Supports dense, sparse, and hybrid search modes with configurable top-k and reranking.
func (*PipelineService) Update ¶
func (r *PipelineService) Update(ctx context.Context, pipelineID string, body PipelineUpdateParams, opts ...option.RequestOption) (res *Pipeline, err error)
Update an existing pipeline's configuration.
func (*PipelineService) Upsert ¶
func (r *PipelineService) Upsert(ctx context.Context, params PipelineUpsertParams, opts ...option.RequestOption) (res *Pipeline, err error)
Upsert a pipeline.
Updates the pipeline if one with the same name and project already exists, otherwise creates a new one.
type PipelineStatus ¶
type PipelineStatus string
Status of the pipeline.
const ( PipelineStatusCreated PipelineStatus = "CREATED" PipelineStatusDeleting PipelineStatus = "DELETING" )
type PipelineSyncService ¶
type PipelineSyncService struct {
// contains filtered or unexported fields
}
PipelineSyncService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPipelineSyncService method instead.
func NewPipelineSyncService ¶
func NewPipelineSyncService(opts ...option.RequestOption) (r PipelineSyncService)
NewPipelineSyncService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PipelineSyncService) Cancel ¶
func (r *PipelineSyncService) Cancel(ctx context.Context, pipelineID string, opts ...option.RequestOption) (res *Pipeline, err error)
Cancel all running sync jobs for a pipeline.
func (*PipelineSyncService) New ¶
func (r *PipelineSyncService) New(ctx context.Context, pipelineID string, opts ...option.RequestOption) (res *Pipeline, err error)
Trigger an incremental sync for a managed pipeline.
Processes new and updated documents from data sources and files, then updates the index for retrieval.
type PipelineTransformConfigUnion ¶
type PipelineTransformConfigUnion struct {
// This field is from variant [AutoTransformConfig].
ChunkOverlap int64 `json:"chunk_overlap"`
// This field is from variant [AutoTransformConfig].
ChunkSize int64 `json:"chunk_size"`
Mode string `json:"mode"`
// This field is from variant [AdvancedModeTransformConfig].
ChunkingConfig AdvancedModeTransformConfigChunkingConfigUnion `json:"chunking_config"`
// This field is from variant [AdvancedModeTransformConfig].
SegmentationConfig AdvancedModeTransformConfigSegmentationConfigUnion `json:"segmentation_config"`
JSON struct {
ChunkOverlap respjson.Field
ChunkSize respjson.Field
Mode respjson.Field
ChunkingConfig respjson.Field
SegmentationConfig respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PipelineTransformConfigUnion contains all possible properties and values from AutoTransformConfig, AdvancedModeTransformConfig.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (PipelineTransformConfigUnion) AsAdvancedModeTransformConfig ¶
func (u PipelineTransformConfigUnion) AsAdvancedModeTransformConfig() (v AdvancedModeTransformConfig)
func (PipelineTransformConfigUnion) AsAutoTransformConfig ¶
func (u PipelineTransformConfigUnion) AsAutoTransformConfig() (v AutoTransformConfig)
func (PipelineTransformConfigUnion) RawJSON ¶
func (u PipelineTransformConfigUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PipelineTransformConfigUnion) UnmarshalJSON ¶
func (r *PipelineTransformConfigUnion) UnmarshalJSON(data []byte) error
type PipelineType ¶
type PipelineType string
Enum for representing the type of a pipeline
const ( PipelineTypePlayground PipelineType = "PLAYGROUND" PipelineTypeManaged PipelineType = "MANAGED" )
type PipelineUpdateParams ¶
type PipelineUpdateParams struct {
// Data sink ID. When provided instead of data_sink, the data sink will be looked
// up by ID.
DataSinkID param.Opt[string] `json:"data_sink_id,omitzero" format:"uuid"`
// Embedding model config ID. When provided instead of embedding_config, the
// embedding model config will be looked up by ID.
EmbeddingModelConfigID param.Opt[string] `json:"embedding_model_config_id,omitzero" format:"uuid"`
// The ID of the ManagedPipeline this playground pipeline is linked to.
ManagedPipelineID param.Opt[string] `json:"managed_pipeline_id,omitzero" format:"uuid"`
Name param.Opt[string] `json:"name,omitzero"`
// Status of the pipeline deployment.
Status param.Opt[string] `json:"status,omitzero"`
EmbeddingConfig PipelineUpdateParamsEmbeddingConfigUnion `json:"embedding_config,omitzero"`
// Configuration for the transformation.
TransformConfig PipelineUpdateParamsTransformConfigUnion `json:"transform_config,omitzero"`
// Schema for creating a data sink.
DataSink DataSinkCreateParam `json:"data_sink,omitzero"`
// Settings that can be configured for how to use LlamaParse to parse files within
// a LlamaCloud pipeline.
LlamaParseParameters LlamaParseParameters `json:"llama_parse_parameters,omitzero"`
// Metadata configuration for the pipeline.
MetadataConfig PipelineMetadataConfigParam `json:"metadata_config,omitzero"`
// Schema for the search params for an retrieval execution that can be preset for a
// pipeline.
PresetRetrievalParameters PresetRetrievalParams `json:"preset_retrieval_parameters,omitzero"`
// Configuration for sparse embedding models used in hybrid search.
//
// This allows users to choose between Splade and BM25 models for sparse retrieval
// in managed data sinks.
SparseModelConfig SparseModelConfigParam `json:"sparse_model_config,omitzero"`
// contains filtered or unexported fields
}
func (PipelineUpdateParams) MarshalJSON ¶
func (r PipelineUpdateParams) MarshalJSON() (data []byte, err error)
func (*PipelineUpdateParams) UnmarshalJSON ¶
func (r *PipelineUpdateParams) UnmarshalJSON(data []byte) error
type PipelineUpdateParamsEmbeddingConfigUnion ¶
type PipelineUpdateParamsEmbeddingConfigUnion struct {
OfAzureEmbedding *AzureOpenAIEmbeddingConfigParam `json:",omitzero,inline"`
OfCohereEmbedding *CohereEmbeddingConfigParam `json:",omitzero,inline"`
OfGeminiEmbedding *GeminiEmbeddingConfigParam `json:",omitzero,inline"`
OfHuggingfaceAPIEmbedding *HuggingFaceInferenceAPIEmbeddingConfigParam `json:",omitzero,inline"`
OfOpenAIEmbedding *OpenAIEmbeddingConfigParam `json:",omitzero,inline"`
OfVertexaiEmbedding *VertexAIEmbeddingConfigParam `json:",omitzero,inline"`
OfBedrockEmbedding *BedrockEmbeddingConfigParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PipelineUpdateParamsEmbeddingConfigUnion) MarshalJSON ¶
func (u PipelineUpdateParamsEmbeddingConfigUnion) MarshalJSON() ([]byte, error)
func (*PipelineUpdateParamsEmbeddingConfigUnion) UnmarshalJSON ¶
func (u *PipelineUpdateParamsEmbeddingConfigUnion) UnmarshalJSON(data []byte) error
type PipelineUpdateParamsTransformConfigUnion ¶
type PipelineUpdateParamsTransformConfigUnion struct {
OfAutoTransformConfig *AutoTransformConfigParam `json:",omitzero,inline"`
OfAdvancedModeTransformConfig *AdvancedModeTransformConfigParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PipelineUpdateParamsTransformConfigUnion) MarshalJSON ¶
func (u PipelineUpdateParamsTransformConfigUnion) MarshalJSON() ([]byte, error)
func (*PipelineUpdateParamsTransformConfigUnion) UnmarshalJSON ¶
func (u *PipelineUpdateParamsTransformConfigUnion) UnmarshalJSON(data []byte) error
type PipelineUpsertParams ¶
type PipelineUpsertParams struct {
// Schema for creating a pipeline.
PipelineCreate PipelineCreateParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (PipelineUpsertParams) MarshalJSON ¶
func (r PipelineUpsertParams) MarshalJSON() (data []byte, err error)
func (PipelineUpsertParams) URLQuery ¶
func (r PipelineUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes PipelineUpsertParams's query parameters as `url.Values`.
func (*PipelineUpsertParams) UnmarshalJSON ¶
func (r *PipelineUpsertParams) UnmarshalJSON(data []byte) error
type PresetRetrievalParams ¶
type PresetRetrievalParams struct {
// Alpha value for hybrid retrieval to determine the weights between dense and
// sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.
Alpha param.Opt[float64] `json:"alpha,omitzero"`
// Minimum similarity score wrt query for retrieval
DenseSimilarityCutoff param.Opt[float64] `json:"dense_similarity_cutoff,omitzero"`
// Number of nodes for dense retrieval.
DenseSimilarityTopK param.Opt[int64] `json:"dense_similarity_top_k,omitzero"`
// Enable reranking for retrieval
EnableReranking param.Opt[bool] `json:"enable_reranking,omitzero"`
// Number of files to retrieve (only for retrieval mode files_via_metadata and
// files_via_content).
FilesTopK param.Opt[int64] `json:"files_top_k,omitzero"`
// Number of reranked nodes for returning.
RerankTopN param.Opt[int64] `json:"rerank_top_n,omitzero"`
// Number of nodes for sparse retrieval.
SparseSimilarityTopK param.Opt[int64] `json:"sparse_similarity_top_k,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// Whether to retrieve image nodes.
//
// Deprecated: deprecated
RetrieveImageNodes param.Opt[bool] `json:"retrieve_image_nodes,omitzero"`
// Whether to retrieve page figure nodes.
RetrievePageFigureNodes param.Opt[bool] `json:"retrieve_page_figure_nodes,omitzero"`
// Whether to retrieve page screenshot nodes.
RetrievePageScreenshotNodes param.Opt[bool] `json:"retrieve_page_screenshot_nodes,omitzero"`
// JSON Schema that will be used to infer search_filters. Omit or leave as null to
// skip inference.
SearchFiltersInferenceSchema map[string]*PresetRetrievalParamsSearchFiltersInferenceSchemaUnion `json:"search_filters_inference_schema,omitzero"`
// The retrieval mode for the query.
//
// Any of "chunks", "files_via_metadata", "files_via_content", "auto_routed".
RetrievalMode RetrievalMode `json:"retrieval_mode,omitzero"`
// Metadata filters for vector stores.
SearchFilters MetadataFiltersParam `json:"search_filters,omitzero"`
// contains filtered or unexported fields
}
Schema for the search params for an retrieval execution that can be preset for a pipeline.
func (PresetRetrievalParams) MarshalJSON ¶
func (r PresetRetrievalParams) MarshalJSON() (data []byte, err error)
func (*PresetRetrievalParams) UnmarshalJSON ¶
func (r *PresetRetrievalParams) UnmarshalJSON(data []byte) error
type PresetRetrievalParamsResp ¶
type PresetRetrievalParamsResp struct {
// Alpha value for hybrid retrieval to determine the weights between dense and
// sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.
Alpha float64 `json:"alpha" api:"nullable"`
ClassName string `json:"class_name"`
// Minimum similarity score wrt query for retrieval
DenseSimilarityCutoff float64 `json:"dense_similarity_cutoff" api:"nullable"`
// Number of nodes for dense retrieval.
DenseSimilarityTopK int64 `json:"dense_similarity_top_k" api:"nullable"`
// Enable reranking for retrieval
EnableReranking bool `json:"enable_reranking" api:"nullable"`
// Number of files to retrieve (only for retrieval mode files_via_metadata and
// files_via_content).
FilesTopK int64 `json:"files_top_k" api:"nullable"`
// Number of reranked nodes for returning.
RerankTopN int64 `json:"rerank_top_n" api:"nullable"`
// The retrieval mode for the query.
//
// Any of "chunks", "files_via_metadata", "files_via_content", "auto_routed".
RetrievalMode RetrievalMode `json:"retrieval_mode"`
// Whether to retrieve image nodes.
//
// Deprecated: deprecated
RetrieveImageNodes bool `json:"retrieve_image_nodes"`
// Whether to retrieve page figure nodes.
RetrievePageFigureNodes bool `json:"retrieve_page_figure_nodes"`
// Whether to retrieve page screenshot nodes.
RetrievePageScreenshotNodes bool `json:"retrieve_page_screenshot_nodes"`
// Metadata filters for vector stores.
SearchFilters MetadataFilters `json:"search_filters" api:"nullable"`
// JSON Schema that will be used to infer search_filters. Omit or leave as null to
// skip inference.
SearchFiltersInferenceSchema map[string]*PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp `json:"search_filters_inference_schema" api:"nullable"`
// Number of nodes for sparse retrieval.
SparseSimilarityTopK int64 `json:"sparse_similarity_top_k" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Alpha respjson.Field
ClassName respjson.Field
DenseSimilarityCutoff respjson.Field
DenseSimilarityTopK respjson.Field
EnableReranking respjson.Field
FilesTopK respjson.Field
RerankTopN respjson.Field
RetrievalMode respjson.Field
RetrieveImageNodes respjson.Field
RetrievePageFigureNodes respjson.Field
RetrievePageScreenshotNodes respjson.Field
SearchFilters respjson.Field
SearchFiltersInferenceSchema respjson.Field
SparseSimilarityTopK respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for the search params for an retrieval execution that can be preset for a pipeline.
func (PresetRetrievalParamsResp) RawJSON ¶
func (r PresetRetrievalParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (PresetRetrievalParamsResp) ToParam ¶
func (r PresetRetrievalParamsResp) ToParam() PresetRetrievalParams
ToParam converts this PresetRetrievalParamsResp to a PresetRetrievalParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PresetRetrievalParams.Overrides()
func (*PresetRetrievalParamsResp) UnmarshalJSON ¶
func (r *PresetRetrievalParamsResp) UnmarshalJSON(data []byte) error
type PresetRetrievalParamsSearchFiltersInferenceSchemaUnion ¶
type PresetRetrievalParamsSearchFiltersInferenceSchemaUnion struct {
OfAnyMap map[string]any `json:",omitzero,inline"`
OfAnyArray []any `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PresetRetrievalParamsSearchFiltersInferenceSchemaUnion) MarshalJSON ¶
func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnion) MarshalJSON() ([]byte, error)
func (*PresetRetrievalParamsSearchFiltersInferenceSchemaUnion) UnmarshalJSON ¶
func (u *PresetRetrievalParamsSearchFiltersInferenceSchemaUnion) UnmarshalJSON(data []byte) error
type PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp ¶
type PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp struct {
// This field will be present if the value is a [any] instead of an object.
OfPresetRetrievalsSearchFiltersInferenceSchemaMapItem any `json:",inline"`
// This field will be present if the value is a [[]any] instead of an object.
OfAnyArray []any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfPresetRetrievalsSearchFiltersInferenceSchemaMapItem respjson.Field
OfAnyArray respjson.Field
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp contains all possible properties and values from [map[string]any], [[]any], [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfPresetRetrievalsSearchFiltersInferenceSchemaMapItem OfAnyArray OfString OfFloat OfBool]
func (PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsAnyArray ¶
func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsAnyArray() (v []any)
func (PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsAnyMap ¶
func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsAnyMap() (v map[string]any)
func (PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsBool ¶
func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsBool() (v bool)
func (PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsFloat ¶
func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsFloat() (v float64)
func (PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsString ¶
func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) AsString() (v string)
func (PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) RawJSON ¶
func (u PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) UnmarshalJSON ¶
func (r *PresetRetrievalParamsSearchFiltersInferenceSchemaUnionResp) UnmarshalJSON(data []byte) error
type PresignedURL ¶
type PresignedURL struct {
// The time at which the presigned URL expires
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
// A presigned URL for IO operations against a private file
URL string `json:"url" api:"required" format:"uri"`
// Form fields for a presigned POST request
FormFields map[string]string `json:"form_fields" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExpiresAt respjson.Field
URL respjson.Field
FormFields respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for a presigned URL.
func (PresignedURL) RawJSON ¶
func (r PresignedURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*PresignedURL) UnmarshalJSON ¶
func (r *PresignedURL) UnmarshalJSON(data []byte) error
type Project ¶
type Project struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
// The Organization ID the project is under.
OrganizationID string `json:"organization_id" api:"required" format:"uuid"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// Whether this project is the default project for the user.
IsDefault bool `json:"is_default"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
OrganizationID respjson.Field
CreatedAt respjson.Field
IsDefault respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Schema for a project.
func (*Project) UnmarshalJSON ¶
type ProjectGetParams ¶
type ProjectGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (ProjectGetParams) URLQuery ¶
func (r ProjectGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes ProjectGetParams's query parameters as `url.Values`.
type ProjectListParams ¶
type ProjectListParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectName param.Opt[string] `query:"project_name,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ProjectListParams) URLQuery ¶
func (r ProjectListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ProjectListParams's query parameters as `url.Values`.
type ProjectService ¶
type ProjectService struct {
// contains filtered or unexported fields
}
ProjectService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProjectService method instead.
func NewProjectService ¶
func NewProjectService(opts ...option.RequestOption) (r ProjectService)
NewProjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProjectService) Get ¶
func (r *ProjectService) Get(ctx context.Context, projectID string, query ProjectGetParams, opts ...option.RequestOption) (res *Project, err error)
Get a project by ID.
func (*ProjectService) List ¶
func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) (res *[]Project, err error)
List projects or get one by name
type ReRankConfigParam ¶
type ReRankConfigParam struct {
// The number of nodes to retrieve after reranking over retrieved nodes from all
// retrieval tools.
TopN param.Opt[int64] `json:"top_n,omitzero"`
// The type of reranker to use.
//
// Any of "system_default", "llm", "cohere", "bedrock", "score", "disabled".
Type ReRankConfigType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (ReRankConfigParam) MarshalJSON ¶
func (r ReRankConfigParam) MarshalJSON() (data []byte, err error)
func (*ReRankConfigParam) UnmarshalJSON ¶
func (r *ReRankConfigParam) UnmarshalJSON(data []byte) error
type ReRankConfigType ¶
type ReRankConfigType string
The type of reranker to use.
const ( ReRankConfigTypeSystemDefault ReRankConfigType = "system_default" ReRankConfigTypeLlm ReRankConfigType = "llm" ReRankConfigTypeCohere ReRankConfigType = "cohere" ReRankConfigTypeBedrock ReRankConfigType = "bedrock" ReRankConfigTypeScore ReRankConfigType = "score" ReRankConfigTypeDisabled ReRankConfigType = "disabled" )
type RetrievalMode ¶
type RetrievalMode string
const ( RetrievalModeChunks RetrievalMode = "chunks" RetrievalModeFilesViaMetadata RetrievalMode = "files_via_metadata" RetrievalModeFilesViaContent RetrievalMode = "files_via_content" RetrievalModeAutoRouted RetrievalMode = "auto_routed" )
type Retriever ¶
type Retriever struct {
// Unique identifier
ID string `json:"id" api:"required" format:"uuid"`
// A name for the retriever tool. Will default to the pipeline name if not
// provided.
Name string `json:"name" api:"required"`
// The ID of the project this retriever resides in.
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// Creation datetime
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
// The pipelines this retriever uses.
Pipelines []RetrieverPipeline `json:"pipelines"`
// Update datetime
UpdatedAt time.Time `json:"updated_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ProjectID respjson.Field
CreatedAt respjson.Field
Pipelines respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An entity that retrieves context nodes from several sub RetrieverTools.
func (*Retriever) UnmarshalJSON ¶
type RetrieverCreateParam ¶
type RetrieverCreateParam struct {
// A name for the retriever tool. Will default to the pipeline name if not
// provided.
Name string `json:"name" api:"required"`
// The pipelines this retriever uses.
Pipelines []RetrieverPipelineParam `json:"pipelines,omitzero"`
// contains filtered or unexported fields
}
The property Name is required.
func (RetrieverCreateParam) MarshalJSON ¶
func (r RetrieverCreateParam) MarshalJSON() (data []byte, err error)
func (*RetrieverCreateParam) UnmarshalJSON ¶
func (r *RetrieverCreateParam) UnmarshalJSON(data []byte) error
type RetrieverDeleteParams ¶
type RetrieverDeleteParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (RetrieverDeleteParams) URLQuery ¶
func (r RetrieverDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes RetrieverDeleteParams's query parameters as `url.Values`.
type RetrieverGetParams ¶
type RetrieverGetParams struct {
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (RetrieverGetParams) URLQuery ¶
func (r RetrieverGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes RetrieverGetParams's query parameters as `url.Values`.
type RetrieverListParams ¶
type RetrieverListParams struct {
Name param.Opt[string] `query:"name,omitzero" json:"-"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (RetrieverListParams) URLQuery ¶
func (r RetrieverListParams) URLQuery() (v url.Values, err error)
URLQuery serializes RetrieverListParams's query parameters as `url.Values`.
type RetrieverNewParams ¶
type RetrieverNewParams struct {
RetrieverCreate RetrieverCreateParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (RetrieverNewParams) MarshalJSON ¶
func (r RetrieverNewParams) MarshalJSON() (data []byte, err error)
func (RetrieverNewParams) URLQuery ¶
func (r RetrieverNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes RetrieverNewParams's query parameters as `url.Values`.
func (*RetrieverNewParams) UnmarshalJSON ¶
func (r *RetrieverNewParams) UnmarshalJSON(data []byte) error
type RetrieverPipeline ¶
type RetrieverPipeline struct {
// A description of the retriever tool.
Description string `json:"description" api:"required"`
// A name for the retriever tool. Will default to the pipeline name if not
// provided.
Name string `json:"name" api:"required"`
// The ID of the pipeline this tool uses.
PipelineID string `json:"pipeline_id" api:"required" format:"uuid"`
// Parameters for retrieval configuration.
PresetRetrievalParameters PresetRetrievalParamsResp `json:"preset_retrieval_parameters"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Name respjson.Field
PipelineID respjson.Field
PresetRetrievalParameters respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (RetrieverPipeline) RawJSON ¶
func (r RetrieverPipeline) RawJSON() string
Returns the unmodified JSON received from the API
func (RetrieverPipeline) ToParam ¶
func (r RetrieverPipeline) ToParam() RetrieverPipelineParam
ToParam converts this RetrieverPipeline to a RetrieverPipelineParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with RetrieverPipelineParam.Overrides()
func (*RetrieverPipeline) UnmarshalJSON ¶
func (r *RetrieverPipeline) UnmarshalJSON(data []byte) error
type RetrieverPipelineParam ¶
type RetrieverPipelineParam struct {
// A description of the retriever tool.
Description param.Opt[string] `json:"description,omitzero" api:"required"`
// A name for the retriever tool. Will default to the pipeline name if not
// provided.
Name param.Opt[string] `json:"name,omitzero" api:"required"`
// The ID of the pipeline this tool uses.
PipelineID string `json:"pipeline_id" api:"required" format:"uuid"`
// Parameters for retrieval configuration.
PresetRetrievalParameters PresetRetrievalParams `json:"preset_retrieval_parameters,omitzero"`
// contains filtered or unexported fields
}
The properties Description, Name, PipelineID are required.
func (RetrieverPipelineParam) MarshalJSON ¶
func (r RetrieverPipelineParam) MarshalJSON() (data []byte, err error)
func (*RetrieverPipelineParam) UnmarshalJSON ¶
func (r *RetrieverPipelineParam) UnmarshalJSON(data []byte) error
type RetrieverRetrieverSearchParams ¶
type RetrieverRetrieverSearchParams struct {
// The query to retrieve against.
Query string `json:"query" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// (use rerank_config.top_n instead) The number of nodes to retrieve after
// reranking over retrieved nodes from all retrieval tools.
RerankTopN param.Opt[int64] `json:"rerank_top_n,omitzero"`
// The mode of composite retrieval.
//
// Any of "routing", "full".
Mode CompositeRetrievalMode `json:"mode,omitzero"`
// The rerank configuration for composite retrieval.
RerankConfig ReRankConfigParam `json:"rerank_config,omitzero"`
// contains filtered or unexported fields
}
func (RetrieverRetrieverSearchParams) MarshalJSON ¶
func (r RetrieverRetrieverSearchParams) MarshalJSON() (data []byte, err error)
func (RetrieverRetrieverSearchParams) URLQuery ¶
func (r RetrieverRetrieverSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes RetrieverRetrieverSearchParams's query parameters as `url.Values`.
func (*RetrieverRetrieverSearchParams) UnmarshalJSON ¶
func (r *RetrieverRetrieverSearchParams) UnmarshalJSON(data []byte) error
type RetrieverRetrieverService ¶
type RetrieverRetrieverService struct {
// contains filtered or unexported fields
}
RetrieverRetrieverService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRetrieverRetrieverService method instead.
func NewRetrieverRetrieverService ¶
func NewRetrieverRetrieverService(opts ...option.RequestOption) (r RetrieverRetrieverService)
NewRetrieverRetrieverService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RetrieverRetrieverService) Search ¶
func (r *RetrieverRetrieverService) Search(ctx context.Context, retrieverID string, params RetrieverRetrieverSearchParams, opts ...option.RequestOption) (res *CompositeRetrievalResult, err error)
Retrieve data using a Retriever.
type RetrieverSearchParams ¶
type RetrieverSearchParams struct {
// The query to retrieve against.
Query string `json:"query" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// (use rerank_config.top_n instead) The number of nodes to retrieve after
// reranking over retrieved nodes from all retrieval tools.
RerankTopN param.Opt[int64] `json:"rerank_top_n,omitzero"`
// The mode of composite retrieval.
//
// Any of "routing", "full".
Mode CompositeRetrievalMode `json:"mode,omitzero"`
// The pipelines to use for retrieval.
Pipelines []RetrieverPipelineParam `json:"pipelines,omitzero"`
// The rerank configuration for composite retrieval.
RerankConfig ReRankConfigParam `json:"rerank_config,omitzero"`
// contains filtered or unexported fields
}
func (RetrieverSearchParams) MarshalJSON ¶
func (r RetrieverSearchParams) MarshalJSON() (data []byte, err error)
func (RetrieverSearchParams) URLQuery ¶
func (r RetrieverSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes RetrieverSearchParams's query parameters as `url.Values`.
func (*RetrieverSearchParams) UnmarshalJSON ¶
func (r *RetrieverSearchParams) UnmarshalJSON(data []byte) error
type RetrieverService ¶
type RetrieverService struct {
Retriever RetrieverRetrieverService
// contains filtered or unexported fields
}
RetrieverService contains methods and other services that help with interacting with the llama-cloud API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRetrieverService method instead.
func NewRetrieverService ¶
func NewRetrieverService(opts ...option.RequestOption) (r RetrieverService)
NewRetrieverService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RetrieverService) Delete ¶
func (r *RetrieverService) Delete(ctx context.Context, retrieverID string, body RetrieverDeleteParams, opts ...option.RequestOption) (err error)
Delete a Retriever by ID.
func (*RetrieverService) Get ¶
func (r *RetrieverService) Get(ctx context.Context, retrieverID string, query RetrieverGetParams, opts ...option.RequestOption) (res *Retriever, err error)
Get a Retriever by ID.
func (*RetrieverService) List ¶
func (r *RetrieverService) List(ctx context.Context, query RetrieverListParams, opts ...option.RequestOption) (res *[]Retriever, err error)
List Retrievers for a project.
func (*RetrieverService) New ¶
func (r *RetrieverService) New(ctx context.Context, params RetrieverNewParams, opts ...option.RequestOption) (res *Retriever, err error)
Create a new Retriever.
func (*RetrieverService) Search ¶
func (r *RetrieverService) Search(ctx context.Context, params RetrieverSearchParams, opts ...option.RequestOption) (res *CompositeRetrievalResult, err error)
Retrieve data using specified pipelines without creating a persistent retriever.
func (*RetrieverService) Update ¶
func (r *RetrieverService) Update(ctx context.Context, retrieverID string, params RetrieverUpdateParams, opts ...option.RequestOption) (res *Retriever, err error)
Update an existing Retriever.
func (*RetrieverService) Upsert ¶
func (r *RetrieverService) Upsert(ctx context.Context, params RetrieverUpsertParams, opts ...option.RequestOption) (res *Retriever, err error)
Upsert a new Retriever.
type RetrieverUpdateParams ¶
type RetrieverUpdateParams struct {
// The pipelines this retriever uses.
Pipelines []RetrieverPipelineParam `json:"pipelines,omitzero" api:"required"`
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// A name for the retriever.
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
func (RetrieverUpdateParams) MarshalJSON ¶
func (r RetrieverUpdateParams) MarshalJSON() (data []byte, err error)
func (RetrieverUpdateParams) URLQuery ¶
func (r RetrieverUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes RetrieverUpdateParams's query parameters as `url.Values`.
func (*RetrieverUpdateParams) UnmarshalJSON ¶
func (r *RetrieverUpdateParams) UnmarshalJSON(data []byte) error
type RetrieverUpsertParams ¶
type RetrieverUpsertParams struct {
RetrieverCreate RetrieverCreateParam
OrganizationID param.Opt[string] `query:"organization_id,omitzero" format:"uuid" json:"-"`
ProjectID param.Opt[string] `query:"project_id,omitzero" format:"uuid" json:"-"`
// contains filtered or unexported fields
}
func (RetrieverUpsertParams) MarshalJSON ¶
func (r RetrieverUpsertParams) MarshalJSON() (data []byte, err error)
func (RetrieverUpsertParams) URLQuery ¶
func (r RetrieverUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes RetrieverUpsertParams's query parameters as `url.Values`.
func (*RetrieverUpsertParams) UnmarshalJSON ¶
func (r *RetrieverUpsertParams) UnmarshalJSON(data []byte) error
type SheetsJob ¶
type SheetsJob struct {
// The ID of the job
ID string `json:"id" api:"required"`
// Configuration applied to the parsing job (inline or resolved from a saved
// preset).
Configuration SheetsParsingConfig `json:"configuration" api:"required"`
// When the job was created
CreatedAt string `json:"created_at" api:"required"`
// The ID of the input file
FileID string `json:"file_id" api:"required" format:"uuid"`
// The ID of the project
ProjectID string `json:"project_id" api:"required" format:"uuid"`
// The status of the parsing job
//
// Any of "PENDING", "SUCCESS", "ERROR", "PARTIAL_SUCCESS", "CANCELLED".
Status SheetsJobStatus `json:"status" api:"required"`
// When the job was last updated
UpdatedAt string `json:"updated_at" api:"required"`
// The ID of the user
UserID string `json:"user_id" api:"required"`
// Configuration for spreadsheet parsing and region extraction
//
// Deprecated: deprecated
Config SheetsParsingConfig `json:"config" api:"nullable"`
// The saved product configuration ID used at create time, if any.
ConfigurationID string `json:"configuration_id" api:"nullable"`
// Any errors encountered
Errors []string `json:"errors"`
// Schema for a file.
//
// Deprecated: deprecated
File File `json:"file" api:"nullable"`
// Per-status entry timestamps. Returned only when requested via
// `?expand=metadata_state_transitions`.
MetadataStateTransitions map[string]any `json:"metadata_state_transitions" api:"nullable"`
// Job-time parameters such as webhook configurations.
Parameters SheetsJobParameters `json:"parameters"`
// All extracted regions (populated when job is complete)
Regions []SheetsJobRegion `json:"regions"`
// Whether the job completed successfully
Success bool `json:"success" api:"nullable"`
// Metadata for each processed worksheet (populated when job is complete)
WorksheetMetadata []SheetsJobWorksheetMetadata `json:"worksheet_metadata"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Configuration respjson.Field
CreatedAt respjson.Field
FileID respjson.Field
ProjectID respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
UserID respjson.Field
Config respjson.Field
ConfigurationID respjson.Field
Errors respjson.Field
File respjson.Field
MetadataStateTransitions respjson.Field
Parameters respjson.Field
Regions respjson.Field
Success respjson.Field
WorksheetMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A spreadsheet parsing job.
func (*SheetsJob) UnmarshalJSON ¶
type SheetsJobParameters ¶
type SheetsJobParameters struct {
// Webhook configurations for job status notifications.
WebhookConfigurations []SheetsJobParametersWebhookConfiguration `json:"webhook_configurations" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
WebhookConfigurations respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Job-time parameters such as webhook configurations.
func (SheetsJobParameters) RawJSON ¶
func (r SheetsJobParameters) RawJSON() string
Returns the unmodified JSON received from the API
func (*SheetsJobParameters) UnmarshalJSON ¶
func (r *SheetsJobParameters) UnmarshalJSON(data []byte) error
type SheetsJobParametersWebhookConfiguration ¶
type SheetsJobParametersWebhookConfiguration struct {
// Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
// events are delivered.
//
// Any of "extract.pending", "extract.success", "extract.error",
// "extract.partial_success", "extract.cancelled", "parse.pending",
// "parse.running", "parse.success", "parse.error", "parse.partial_success",
// "parse.cancelled", "classify.pending", "classify.running", "classify.success",
// "classify.error", "classify.partial_success", "classify.cancelled",
// "sheets.pending", "sheets.success", "sheets.error", "sheets.partial_success",
// "sheets.cancelled", "unmapped_event".
WebhookEvents []string `json:"webhook_events" api:"nullable"`
// Custom HTTP headers sent with each webhook request (e.g. auth tokens)
WebhookHeaders map[string]string `json:"webhook_headers" api:"nullable"`
// Response format sent to the webhook: 'string' (default) or 'json'
WebhookOutputFormat string `json:"webhook_output_format" api:"nullable"`
// URL to receive webhook POST notifications
WebhookURL string `json:"webhook_url" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
WebhookEvents respjson.Field
WebhookHeaders respjson.Field
WebhookOutputFormat respjson.Field
WebhookURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for a single outbound webhook endpoint.
func (SheetsJobParametersWebhookConfiguration) RawJSON ¶
func (r SheetsJobParametersWebhookConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (*SheetsJobParametersWebhookConfiguration) UnmarshalJSON ¶
func (r *SheetsJobParametersWebhookConfiguration) UnmarshalJSON(data []byte) error
type SheetsJobRegion ¶
type SheetsJobRegion struct {
// Location of the region in the spreadsheet
Location string `json:"location" api:"required"`
// Type of the extracted region
RegionType string `json:"region_type" api:"required"`
// Worksheet name where region was found
SheetName string `json:"sheet_name" api:"required"`
// Generated description for the region
Description string `json:"description" api:"nullable"`
// Unique identifier for this region within the file
RegionID string `json:"region_id"`
// Generated title for the region
Title string `json:"title" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Location respjson.Field
RegionType respjson.Field
SheetName respjson.Field
Description respjson.Field
RegionID respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A summary of a single extracted region from a spreadsheet
func (SheetsJobRegion) RawJSON ¶
func (r SheetsJobRegion) RawJSON() string
Returns the unmodified JSON received from the API
func (*SheetsJobRegion) UnmarshalJSON ¶
func (r *SheetsJobRegion) UnmarshalJSON(data []byte) error
type SheetsJobStatus ¶
type SheetsJobStatus string
The status of the parsing job
const ( SheetsJobStatusPending SheetsJobStatus = "PENDING" SheetsJobStatusSuccess SheetsJobStatus = "SUCCESS" SheetsJobStatusError SheetsJobStatus = "ERROR" SheetsJobStatusPartialSuccess SheetsJobStatus = "PARTIAL_SUCCESS" SheetsJobStatusCancelled SheetsJobStatus = "CANCELLED" )
type SheetsJobWorksheetMetadata ¶
type SheetsJobWorksheetMetadata struct {
// Name of the worksheet
SheetName string `json:"sheet_name" api:"required"`
// Generated description of the worksheet
Description string `json:"description" api:"nullable"`
// Generated title for the worksheet
Title string `json:"title" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SheetName respjson.Field
Description respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Metadata about a worksheet in a spreadsheet
func (SheetsJobWorksheetMetadata) RawJSON ¶
func (r SheetsJobWorksheetMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*SheetsJobWorksheetMetadata) UnmarshalJSON ¶
func (r *SheetsJobWorksheetMetadata) UnmarshalJSON(data []byte) error
type SheetsParsingConfig ¶
type SheetsParsingConfig struct {
// A1 notation of the range to extract a single region from. If None, the entire
// sheet is used.
ExtractionRange string `json:"extraction_range" api:"nullable"`
// Return a flattened dataframe when a detected table is recognized as
// hierarchical.
FlattenHierarchicalTables bool `json:"flatten_hierarchical_tables"`
// Whether to generate additional metadata (title, description) for each extracted
// region.
GenerateAdditionalMetadata bool `json:"generate_additional_metadata"`
// Whether to include hidden cells when extracting regions from the spreadsheet.
IncludeHiddenCells bool `json:"include_hidden_cells"`
// The names of the sheets to extract regions from. If empty, all sheets will be
// processed.
SheetNames []string `json:"sheet_names" api:"nullable"`
// Optional specialization mode for domain-specific extraction. Supported values:
// 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None
// uses the general-purpose pipeline.
Specialization string `json:"specialization" api:"nullable"`
// Influences how likely similar-looking regions are merged into a single table.
// Useful for spreadsheets that either have sparse tables (strong merging) or many
// distinct tables close together (weak merging).
//
// Any of "strong", "weak".
TableMergeSensitivity SheetsParsingConfigTableMergeSensitivity `json:"table_merge_sensitivity"`
// Enables experimental processing. Accuracy may be impacted.
UseExperimentalProcessing bool `json:"use_experimental_processing"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtractionRange respjson.Field
FlattenHierarchicalTables respjson.Field
GenerateAdditionalMetadata respjson.Field
IncludeHiddenCells respjson.Field
SheetNames respjson.Field
Specialization respjson.Field
TableMergeSensitivity respjson.Field
UseExperimentalProcessing respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for spreadsheet parsing and region extraction
func (SheetsParsingConfig) RawJSON ¶
func (r SheetsParsingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (SheetsParsingConfig) ToParam ¶
func (r SheetsParsingConfig) ToParam() SheetsParsingConfigParam
ToParam converts this SheetsParsingConfig to a SheetsParsingConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SheetsParsingConfigParam.Overrides()
func (*SheetsParsingConfig) UnmarshalJSON ¶
func (r *SheetsParsingConfig) UnmarshalJSON(data []byte) error
type SheetsParsingConfigParam ¶
type SheetsParsingConfigParam struct {
// A1 notation of the range to extract a single region from. If None, the entire
// sheet is used.
ExtractionRange param.Opt[string] `json:"extraction_range,omitzero"`
// Optional specialization mode for domain-specific extraction. Supported values:
// 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None
// uses the general-purpose pipeline.
Specialization param.Opt[string] `json:"specialization,omitzero"`
// Return a flattened dataframe when a detected table is recognized as
// hierarchical.
FlattenHierarchicalTables param.Opt[bool] `json:"flatten_hierarchical_tables,omitzero"`
// Whether to generate additional metadata (title, description) for each extracted
// region.
GenerateAdditionalMetadata param.Opt[bool] `json:"generate_additional_metadata,omitzero"`
// Whether to include hidden cells when extracting regions from the spreadsheet.
IncludeHiddenCells param.Opt[bool] `json:"include_hidden_cells,omitzero"`
// Enables experimental processing. Accuracy may be impacted.
UseExperimentalProcessing param.Opt[bool] `json:"use_experimental_processing,omitzero"`
// The names of the sheets to extract regions from. If empty, all sheets will be
// processed.
SheetNames []string `json:"sheet_names,omitzero"`
// Influences how likely similar-looking regions are merged into a single table.
// Useful for spreadsheets that either have sparse tables (strong merging) or many
// distinct tables close together (weak merging).
//
// Any of "strong", "weak".
TableMergeSensitivity SheetsParsingConfigTableMergeSensitivity `json:"table_merge_sensitivity,omitzero"`
// contains filtered or unexported fields
}
Configuration for spreadsheet parsing and region extraction
func (SheetsParsingConfigParam) MarshalJSON ¶
func (r SheetsParsingConfigParam) MarshalJSON() (data []byte, err error)
func (*SheetsParsingConfigParam) UnmarshalJSON ¶
func (r *SheetsParsingConfigParam) UnmarshalJSON(data []byte) error
type SheetsParsingConfigTableMergeSensitivity ¶
type SheetsParsingConfigTableMergeSensitivity string
Influences how likely similar-looking regions are merged into a single table. Useful for spreadsheets that either have sparse tables (strong merging) or many distinct tables close together (weak merging).
const ( SheetsParsingConfigTableMergeSensitivityStrong SheetsParsingConfigTableMergeSensitivity = "strong" SheetsParsingConfigTableMergeSensitivityWeak SheetsParsingConfigTableMergeSensitivity = "weak" )
type SparseModelConfig ¶
type SparseModelConfig struct {
ClassName string `json:"class_name"`
// The sparse model type to use. 'bm25' uses Qdrant's FastEmbed BM25 model (default
// for new pipelines), 'splade' uses HuggingFace Splade model, 'auto' selects based
// on deployment mode (BYOC uses term frequency, Cloud uses Splade).
//
// Any of "splade", "bm25", "auto".
ModelType SparseModelConfigModelType `json:"model_type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ClassName respjson.Field
ModelType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for sparse embedding models used in hybrid search.
This allows users to choose between Splade and BM25 models for sparse retrieval in managed data sinks.
func (SparseModelConfig) RawJSON ¶
func (r SparseModelConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (SparseModelConfig) ToParam ¶
func (r SparseModelConfig) ToParam() SparseModelConfigParam
ToParam converts this SparseModelConfig to a SparseModelConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparseModelConfigParam.Overrides()
func (*SparseModelConfig) UnmarshalJSON ¶
func (r *SparseModelConfig) UnmarshalJSON(data []byte) error
type SparseModelConfigModelType ¶
type SparseModelConfigModelType string
The sparse model type to use. 'bm25' uses Qdrant's FastEmbed BM25 model (default for new pipelines), 'splade' uses HuggingFace Splade model, 'auto' selects based on deployment mode (BYOC uses term frequency, Cloud uses Splade).
const ( SparseModelConfigModelTypeSplade SparseModelConfigModelType = "splade" SparseModelConfigModelTypeBm25 SparseModelConfigModelType = "bm25" SparseModelConfigModelTypeAuto SparseModelConfigModelType = "auto" )
type SparseModelConfigParam ¶
type SparseModelConfigParam struct {
ClassName param.Opt[string] `json:"class_name,omitzero"`
// The sparse model type to use. 'bm25' uses Qdrant's FastEmbed BM25 model (default
// for new pipelines), 'splade' uses HuggingFace Splade model, 'auto' selects based
// on deployment mode (BYOC uses term frequency, Cloud uses Splade).
//
// Any of "splade", "bm25", "auto".
ModelType SparseModelConfigModelType `json:"model_type,omitzero"`
// contains filtered or unexported fields
}
Configuration for sparse embedding models used in hybrid search.
This allows users to choose between Splade and BM25 models for sparse retrieval in managed data sinks.
func (SparseModelConfigParam) MarshalJSON ¶
func (r SparseModelConfigParam) MarshalJSON() (data []byte, err error)
func (*SparseModelConfigParam) UnmarshalJSON ¶
func (r *SparseModelConfigParam) UnmarshalJSON(data []byte) error
type SplitCategory ¶
type SplitCategory struct {
// Name of the category.
Name string `json:"name" api:"required"`
// Optional description of what content belongs in this category.
Description string `json:"description" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Category definition for document splitting.
func (SplitCategory) RawJSON ¶
func (r SplitCategory) RawJSON() string
Returns the unmodified JSON received from the API
func (SplitCategory) ToParam ¶
func (r SplitCategory) ToParam() SplitCategoryParam
ToParam converts this SplitCategory to a SplitCategoryParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SplitCategoryParam.Overrides()
func (*SplitCategory) UnmarshalJSON ¶
func (r *SplitCategory) UnmarshalJSON(data []byte) error
type SplitCategoryParam ¶
type SplitCategoryParam struct {
// Name of the category.
Name string `json:"name" api:"required"`
// Optional description of what content belongs in this category.
Description param.Opt[string] `json:"description,omitzero"`
// contains filtered or unexported fields
}
Category definition for document splitting.
The property Name is required.
func (SplitCategoryParam) MarshalJSON ¶
func (r SplitCategoryParam) MarshalJSON() (data []byte, err error)
func (*SplitCategoryParam) UnmarshalJSON ¶
func (r *SplitCategoryParam) UnmarshalJSON(data []byte) error
type SplitDocumentInput ¶
type SplitDocumentInput struct {
// Type of document input. Valid values are: file_id
Type string `json:"type" api:"required"`
// Document identifier.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Document input specification for beta API.
func (SplitDocumentInput) RawJSON ¶
func (r SplitDocumentInput) RawJSON() string
Returns the unmodified JSON received from the API
func (SplitDocumentInput) ToParam ¶
func (r SplitDocumentInput) ToParam() SplitDocumentInputParam
ToParam converts this SplitDocumentInput to a SplitDocumentInputParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SplitDocumentInputParam.Overrides()
func (*SplitDocumentInput) UnmarshalJSON ¶
func (r *SplitDocumentInput) UnmarshalJSON(data []byte) error
type SplitDocumentInputParam ¶
type SplitDocumentInputParam struct {
// Type of document input. Valid values are: file_id
Type string `json:"type" api:"required"`
// Document identifier.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
Document input specification for beta API.
The properties Type, Value are required.
func (SplitDocumentInputParam) MarshalJSON ¶
func (r SplitDocumentInputParam) MarshalJSON() (data []byte, err error)
func (*SplitDocumentInputParam) UnmarshalJSON ¶
func (r *SplitDocumentInputParam) UnmarshalJSON(data []byte) error
type SplitResultResponse ¶
type SplitResultResponse struct {
// List of document segments.
Segments []SplitSegmentResponse `json:"segments" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Segments respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Result of a completed split job.
func (SplitResultResponse) RawJSON ¶
func (r SplitResultResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SplitResultResponse) UnmarshalJSON ¶
func (r *SplitResultResponse) UnmarshalJSON(data []byte) error
type SplitSegmentResponse ¶
type SplitSegmentResponse struct {
// Category name this split belongs to.
Category string `json:"category" api:"required"`
// Categorical confidence level. Valid values are: high, medium, low.
ConfidenceCategory string `json:"confidence_category" api:"required"`
// 1-indexed page numbers in this split.
Pages []int64 `json:"pages" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Category respjson.Field
ConfidenceCategory respjson.Field
Pages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A segment of the split document.
func (SplitSegmentResponse) RawJSON ¶
func (r SplitSegmentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SplitSegmentResponse) UnmarshalJSON ¶
func (r *SplitSegmentResponse) UnmarshalJSON(data []byte) error
type SplitV1Parameters ¶
type SplitV1Parameters struct {
// Categories to split documents into.
Categories []SplitCategoryParam `json:"categories,omitzero" api:"required"`
// Strategy for splitting documents.
SplittingStrategy SplitV1ParametersSplittingStrategy `json:"splitting_strategy,omitzero"`
// Product type.
//
// This field can be elided, and will marshal its zero value as "split_v1".
ProductType constant.SplitV1 `json:"product_type" default:"split_v1"`
// contains filtered or unexported fields
}
Typed parameters for a _split v1_ product configuration.
The properties Categories, ProductType are required.
func (SplitV1Parameters) MarshalJSON ¶
func (r SplitV1Parameters) MarshalJSON() (data []byte, err error)
func (*SplitV1Parameters) UnmarshalJSON ¶
func (r *SplitV1Parameters) UnmarshalJSON(data []byte) error
type SplitV1ParametersResp ¶
type SplitV1ParametersResp struct {
// Categories to split documents into.
Categories []SplitCategory `json:"categories" api:"required"`
// Product type.
ProductType constant.SplitV1 `json:"product_type" default:"split_v1"`
// Strategy for splitting documents.
SplittingStrategy SplitV1ParametersSplittingStrategyResp `json:"splitting_strategy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Categories respjson.Field
ProductType respjson.Field
SplittingStrategy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Typed parameters for a _split v1_ product configuration.
func (SplitV1ParametersResp) RawJSON ¶
func (r SplitV1ParametersResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SplitV1ParametersResp) ToParam ¶
func (r SplitV1ParametersResp) ToParam() SplitV1Parameters
ToParam converts this SplitV1ParametersResp to a SplitV1Parameters.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SplitV1Parameters.Overrides()
func (*SplitV1ParametersResp) UnmarshalJSON ¶
func (r *SplitV1ParametersResp) UnmarshalJSON(data []byte) error
type SplitV1ParametersSplittingStrategy ¶
type SplitV1ParametersSplittingStrategy struct {
// Controls handling of pages that don't match any category. 'include': pages can
// be grouped as 'uncategorized' and included in results. 'forbid': all pages must
// be assigned to a defined category. 'omit': pages can be classified as
// 'uncategorized' but are excluded from results.
//
// Any of "include", "forbid", "omit".
AllowUncategorized string `json:"allow_uncategorized,omitzero"`
// contains filtered or unexported fields
}
Strategy for splitting documents.
func (SplitV1ParametersSplittingStrategy) MarshalJSON ¶
func (r SplitV1ParametersSplittingStrategy) MarshalJSON() (data []byte, err error)
func (*SplitV1ParametersSplittingStrategy) UnmarshalJSON ¶
func (r *SplitV1ParametersSplittingStrategy) UnmarshalJSON(data []byte) error
type SplitV1ParametersSplittingStrategyResp ¶
type SplitV1ParametersSplittingStrategyResp struct {
// Controls handling of pages that don't match any category. 'include': pages can
// be grouped as 'uncategorized' and included in results. 'forbid': all pages must
// be assigned to a defined category. 'omit': pages can be classified as
// 'uncategorized' but are excluded from results.
//
// Any of "include", "forbid", "omit".
AllowUncategorized string `json:"allow_uncategorized"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AllowUncategorized respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Strategy for splitting documents.
func (SplitV1ParametersSplittingStrategyResp) RawJSON ¶
func (r SplitV1ParametersSplittingStrategyResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*SplitV1ParametersSplittingStrategyResp) UnmarshalJSON ¶
func (r *SplitV1ParametersSplittingStrategyResp) UnmarshalJSON(data []byte) error
type StatusEnum ¶
type StatusEnum string
Enum for representing the status of a job
const ( StatusEnumPending StatusEnum = "PENDING" StatusEnumSuccess StatusEnum = "SUCCESS" StatusEnumError StatusEnum = "ERROR" StatusEnumPartialSuccess StatusEnum = "PARTIAL_SUCCESS" StatusEnumCancelled StatusEnum = "CANCELLED" )
type TableItem ¶
type TableItem struct {
// CSV representation of the table
Csv string `json:"csv" api:"required"`
// HTML representation of the table
HTML string `json:"html" api:"required"`
// Markdown representation preserving formatting
Md string `json:"md" api:"required"`
// Table data as array of arrays (string, number, or null)
Rows [][]*TableItemRowUnion `json:"rows" api:"required"`
// List of bounding boxes
Bbox []BBox `json:"bbox" api:"nullable"`
// List of page numbers with tables that were merged into this table (e.g., [1, 2,
// 3, 4])
MergedFromPages []int64 `json:"merged_from_pages" api:"nullable"`
// Populated when merged into another table. Page number where the full merged
// table begins (used on empty tables).
MergedIntoPage int64 `json:"merged_into_page" api:"nullable"`
// Quality concerns detected during table extraction, indicating the table may have
// issues
ParseConcerns []TableItemParseConcern `json:"parse_concerns" api:"nullable"`
// Table item type
//
// Any of "table".
Type TableItemType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Csv respjson.Field
HTML respjson.Field
Md respjson.Field
Rows respjson.Field
Bbox respjson.Field
MergedFromPages respjson.Field
MergedIntoPage respjson.Field
ParseConcerns respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*TableItem) UnmarshalJSON ¶
type TableItemParseConcern ¶
type TableItemParseConcern struct {
// Human-readable details about the concern
Details string `json:"details" api:"required"`
// Type of parse concern (e.g. header_value_type_mismatch,
// inconsistent_row_cell_count)
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Details respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TableItemParseConcern) RawJSON ¶
func (r TableItemParseConcern) RawJSON() string
Returns the unmodified JSON received from the API
func (*TableItemParseConcern) UnmarshalJSON ¶
func (r *TableItemParseConcern) UnmarshalJSON(data []byte) error
type TableItemRowUnion ¶
type TableItemRowUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TableItemRowUnion contains all possible properties and values from [string], [float64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat]
func (TableItemRowUnion) AsFloat ¶
func (u TableItemRowUnion) AsFloat() (v float64)
func (TableItemRowUnion) AsString ¶
func (u TableItemRowUnion) AsString() (v string)
func (TableItemRowUnion) RawJSON ¶
func (u TableItemRowUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TableItemRowUnion) UnmarshalJSON ¶
func (r *TableItemRowUnion) UnmarshalJSON(data []byte) error
type TableItemType ¶
type TableItemType string
Table item type
const (
TableItemTypeTable TableItemType = "table"
)
type TextItem ¶
type TextItem struct {
// Markdown representation preserving formatting
Md string `json:"md" api:"required"`
// Text content
Value string `json:"value" api:"required"`
// List of bounding boxes
Bbox []BBox `json:"bbox" api:"nullable"`
// Text item type
//
// Any of "text".
Type TextItemType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Md respjson.Field
Value respjson.Field
Bbox respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*TextItem) UnmarshalJSON ¶
type TextItemType ¶
type TextItemType string
Text item type
const (
TextItemTypeText TextItemType = "text"
)
type TextNode ¶
type TextNode struct {
ClassName string `json:"class_name"`
// Embedding of the node.
Embedding []float64 `json:"embedding" api:"nullable"`
// End char index of the node.
EndCharIdx int64 `json:"end_char_idx" api:"nullable"`
// Metadata keys that are excluded from text for the embed model.
ExcludedEmbedMetadataKeys []string `json:"excluded_embed_metadata_keys"`
// Metadata keys that are excluded from text for the LLM.
ExcludedLlmMetadataKeys []string `json:"excluded_llm_metadata_keys"`
// A flat dictionary of metadata fields
ExtraInfo map[string]any `json:"extra_info"`
// Unique ID of the node.
ID string `json:"id_"`
// Separator between metadata fields when converting to string.
MetadataSeperator string `json:"metadata_seperator"`
// Template for how metadata is formatted, with {key} and {value} placeholders.
MetadataTemplate string `json:"metadata_template"`
// MIME type of the node content.
Mimetype string `json:"mimetype"`
// A mapping of relationships to other node information.
Relationships map[string]TextNodeRelationshipUnion `json:"relationships"`
// Start char index of the node.
StartCharIdx int64 `json:"start_char_idx" api:"nullable"`
// Text content of the node.
Text string `json:"text"`
// Template for how text is formatted, with {content} and {metadata_str}
// placeholders.
TextTemplate string `json:"text_template"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ClassName respjson.Field
Embedding respjson.Field
EndCharIdx respjson.Field
ExcludedEmbedMetadataKeys respjson.Field
ExcludedLlmMetadataKeys respjson.Field
ExtraInfo respjson.Field
ID respjson.Field
MetadataSeperator respjson.Field
MetadataTemplate respjson.Field
Mimetype respjson.Field
Relationships respjson.Field
StartCharIdx respjson.Field
Text respjson.Field
TextTemplate respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Provided for backward compatibility.
func (*TextNode) UnmarshalJSON ¶
type TextNodeRelationshipArrayItem ¶
type TextNodeRelationshipArrayItem struct {
NodeID string `json:"node_id" api:"required"`
ClassName string `json:"class_name"`
Hash string `json:"hash" api:"nullable"`
Metadata map[string]any `json:"metadata"`
NodeType string `json:"node_type" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
NodeID respjson.Field
ClassName respjson.Field
Hash respjson.Field
Metadata respjson.Field
NodeType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TextNodeRelationshipArrayItem) RawJSON ¶
func (r TextNodeRelationshipArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*TextNodeRelationshipArrayItem) UnmarshalJSON ¶
func (r *TextNodeRelationshipArrayItem) UnmarshalJSON(data []byte) error
type TextNodeRelationshipRelatedNodeInfo ¶
type TextNodeRelationshipRelatedNodeInfo struct {
NodeID string `json:"node_id" api:"required"`
ClassName string `json:"class_name"`
Hash string `json:"hash" api:"nullable"`
Metadata map[string]any `json:"metadata"`
NodeType string `json:"node_type" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
NodeID respjson.Field
ClassName respjson.Field
Hash respjson.Field
Metadata respjson.Field
NodeType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TextNodeRelationshipRelatedNodeInfo) RawJSON ¶
func (r TextNodeRelationshipRelatedNodeInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*TextNodeRelationshipRelatedNodeInfo) UnmarshalJSON ¶
func (r *TextNodeRelationshipRelatedNodeInfo) UnmarshalJSON(data []byte) error
type TextNodeRelationshipUnion ¶
type TextNodeRelationshipUnion struct {
// This field will be present if the value is a [[]TextNodeRelationshipArrayItem]
// instead of an object.
OfTextNodeRelationshipArray []TextNodeRelationshipArrayItem `json:",inline"`
// This field is from variant [TextNodeRelationshipRelatedNodeInfo].
NodeID string `json:"node_id"`
// This field is from variant [TextNodeRelationshipRelatedNodeInfo].
ClassName string `json:"class_name"`
// This field is from variant [TextNodeRelationshipRelatedNodeInfo].
Hash string `json:"hash"`
// This field is from variant [TextNodeRelationshipRelatedNodeInfo].
Metadata map[string]any `json:"metadata"`
// This field is from variant [TextNodeRelationshipRelatedNodeInfo].
NodeType string `json:"node_type"`
JSON struct {
OfTextNodeRelationshipArray respjson.Field
NodeID respjson.Field
ClassName respjson.Field
Hash respjson.Field
Metadata respjson.Field
NodeType respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TextNodeRelationshipUnion contains all possible properties and values from TextNodeRelationshipRelatedNodeInfo, [[]TextNodeRelationshipArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfTextNodeRelationshipArray]
func (TextNodeRelationshipUnion) AsRelatedNodeInfo ¶
func (u TextNodeRelationshipUnion) AsRelatedNodeInfo() (v TextNodeRelationshipRelatedNodeInfo)
func (TextNodeRelationshipUnion) AsTextNodeRelationshipArray ¶
func (u TextNodeRelationshipUnion) AsTextNodeRelationshipArray() (v []TextNodeRelationshipArrayItem)
func (TextNodeRelationshipUnion) RawJSON ¶
func (u TextNodeRelationshipUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TextNodeRelationshipUnion) UnmarshalJSON ¶
func (r *TextNodeRelationshipUnion) UnmarshalJSON(data []byte) error
type UntypedParameters ¶
type UntypedParameters struct {
// Product type.
ProductType constant.Unknown `json:"product_type" default:"unknown"`
ExtraFields map[string]any `json:"-"`
// contains filtered or unexported fields
}
Catch-all for configurations without a dedicated typed schema.
Accepts arbitrary JSON fields alongside `product_type`.
This struct has a constant value, construct it with NewUntypedParameters.
func NewUntypedParameters ¶
func NewUntypedParameters() UntypedParameters
func (UntypedParameters) MarshalJSON ¶
func (r UntypedParameters) MarshalJSON() (data []byte, err error)
func (*UntypedParameters) UnmarshalJSON ¶
func (r *UntypedParameters) UnmarshalJSON(data []byte) error
type UntypedParametersResp ¶
type UntypedParametersResp struct {
// Product type.
ProductType constant.Unknown `json:"product_type" default:"unknown"`
ExtraFields map[string]any `json:"" api:"extrafields"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ProductType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Catch-all for configurations without a dedicated typed schema.
Accepts arbitrary JSON fields alongside `product_type`.
func (UntypedParametersResp) RawJSON ¶
func (r UntypedParametersResp) RawJSON() string
Returns the unmodified JSON received from the API
func (UntypedParametersResp) ToParam ¶
func (r UntypedParametersResp) ToParam() UntypedParameters
ToParam converts this UntypedParametersResp to a UntypedParameters.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with UntypedParameters.Overrides()
func (*UntypedParametersResp) UnmarshalJSON ¶
func (r *UntypedParametersResp) UnmarshalJSON(data []byte) error
type VertexAIEmbeddingConfig ¶
type VertexAIEmbeddingConfig struct {
// Configuration for the VertexAI embedding model.
Component VertexTextEmbedding `json:"component"`
// Type of the embedding model.
//
// Any of "VERTEXAI_EMBEDDING".
Type VertexAIEmbeddingConfigType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Component respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VertexAIEmbeddingConfig) RawJSON ¶
func (r VertexAIEmbeddingConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (VertexAIEmbeddingConfig) ToParam ¶
func (r VertexAIEmbeddingConfig) ToParam() VertexAIEmbeddingConfigParam
ToParam converts this VertexAIEmbeddingConfig to a VertexAIEmbeddingConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with VertexAIEmbeddingConfigParam.Overrides()
func (*VertexAIEmbeddingConfig) UnmarshalJSON ¶
func (r *VertexAIEmbeddingConfig) UnmarshalJSON(data []byte) error
type VertexAIEmbeddingConfigParam ¶
type VertexAIEmbeddingConfigParam struct {
// Configuration for the VertexAI embedding model.
Component VertexTextEmbeddingParam `json:"component,omitzero"`
// Type of the embedding model.
//
// Any of "VERTEXAI_EMBEDDING".
Type VertexAIEmbeddingConfigType `json:"type,omitzero"`
// contains filtered or unexported fields
}
func (VertexAIEmbeddingConfigParam) MarshalJSON ¶
func (r VertexAIEmbeddingConfigParam) MarshalJSON() (data []byte, err error)
func (*VertexAIEmbeddingConfigParam) UnmarshalJSON ¶
func (r *VertexAIEmbeddingConfigParam) UnmarshalJSON(data []byte) error
type VertexAIEmbeddingConfigType ¶
type VertexAIEmbeddingConfigType string
Type of the embedding model.
const (
VertexAIEmbeddingConfigTypeVertexaiEmbedding VertexAIEmbeddingConfigType = "VERTEXAI_EMBEDDING"
)
type VertexTextEmbedding ¶
type VertexTextEmbedding struct {
// The client email for the VertexAI credentials.
ClientEmail string `json:"client_email" api:"required"`
// The default location to use when making API calls.
Location string `json:"location" api:"required"`
// The private key for the VertexAI credentials.
PrivateKey string `json:"private_key" api:"required"`
// The private key ID for the VertexAI credentials.
PrivateKeyID string `json:"private_key_id" api:"required"`
// The default GCP project to use when making Vertex API calls.
Project string `json:"project" api:"required"`
// The token URI for the VertexAI credentials.
TokenUri string `json:"token_uri" api:"required"`
// Additional kwargs for the Vertex.
AdditionalKwargs map[string]any `json:"additional_kwargs"`
ClassName string `json:"class_name"`
// The batch size for embedding calls.
EmbedBatchSize int64 `json:"embed_batch_size"`
// The embedding mode to use.
//
// Any of "default", "classification", "clustering", "similarity", "retrieval".
EmbedMode VertexTextEmbeddingEmbedMode `json:"embed_mode"`
// The modelId of the VertexAI model to use.
ModelName string `json:"model_name"`
// The number of workers to use for async embedding calls.
NumWorkers int64 `json:"num_workers" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ClientEmail respjson.Field
Location respjson.Field
PrivateKey respjson.Field
PrivateKeyID respjson.Field
Project respjson.Field
TokenUri respjson.Field
AdditionalKwargs respjson.Field
ClassName respjson.Field
EmbedBatchSize respjson.Field
EmbedMode respjson.Field
ModelName respjson.Field
NumWorkers respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VertexTextEmbedding) RawJSON ¶
func (r VertexTextEmbedding) RawJSON() string
Returns the unmodified JSON received from the API
func (VertexTextEmbedding) ToParam ¶
func (r VertexTextEmbedding) ToParam() VertexTextEmbeddingParam
ToParam converts this VertexTextEmbedding to a VertexTextEmbeddingParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with VertexTextEmbeddingParam.Overrides()
func (*VertexTextEmbedding) UnmarshalJSON ¶
func (r *VertexTextEmbedding) UnmarshalJSON(data []byte) error
type VertexTextEmbeddingEmbedMode ¶
type VertexTextEmbeddingEmbedMode string
The embedding mode to use.
const ( VertexTextEmbeddingEmbedModeDefault VertexTextEmbeddingEmbedMode = "default" VertexTextEmbeddingEmbedModeClassification VertexTextEmbeddingEmbedMode = "classification" VertexTextEmbeddingEmbedModeClustering VertexTextEmbeddingEmbedMode = "clustering" VertexTextEmbeddingEmbedModeSimilarity VertexTextEmbeddingEmbedMode = "similarity" VertexTextEmbeddingEmbedModeRetrieval VertexTextEmbeddingEmbedMode = "retrieval" )
type VertexTextEmbeddingParam ¶
type VertexTextEmbeddingParam struct {
// The client email for the VertexAI credentials.
ClientEmail param.Opt[string] `json:"client_email,omitzero" api:"required"`
// The private key for the VertexAI credentials.
PrivateKey param.Opt[string] `json:"private_key,omitzero" api:"required"`
// The private key ID for the VertexAI credentials.
PrivateKeyID param.Opt[string] `json:"private_key_id,omitzero" api:"required"`
// The token URI for the VertexAI credentials.
TokenUri param.Opt[string] `json:"token_uri,omitzero" api:"required"`
// The default location to use when making API calls.
Location string `json:"location" api:"required"`
// The default GCP project to use when making Vertex API calls.
Project string `json:"project" api:"required"`
// The number of workers to use for async embedding calls.
NumWorkers param.Opt[int64] `json:"num_workers,omitzero"`
ClassName param.Opt[string] `json:"class_name,omitzero"`
// The batch size for embedding calls.
EmbedBatchSize param.Opt[int64] `json:"embed_batch_size,omitzero"`
// The modelId of the VertexAI model to use.
ModelName param.Opt[string] `json:"model_name,omitzero"`
// Additional kwargs for the Vertex.
AdditionalKwargs map[string]any `json:"additional_kwargs,omitzero"`
// The embedding mode to use.
//
// Any of "default", "classification", "clustering", "similarity", "retrieval".
EmbedMode VertexTextEmbeddingEmbedMode `json:"embed_mode,omitzero"`
// contains filtered or unexported fields
}
The properties ClientEmail, Location, PrivateKey, PrivateKeyID, Project, TokenUri are required.
func (VertexTextEmbeddingParam) MarshalJSON ¶
func (r VertexTextEmbeddingParam) MarshalJSON() (data []byte, err error)
func (*VertexTextEmbeddingParam) UnmarshalJSON ¶
func (r *VertexTextEmbeddingParam) UnmarshalJSON(data []byte) error
Source Files
¶
- aliases.go
- batch.go
- beta.go
- betaagentdata.go
- betabatch.go
- betabatchjobitem.go
- betachat.go
- betadirectory.go
- betadirectoryfile.go
- betaindex.go
- betaretrieval.go
- betasheet.go
- betasplit.go
- classifier.go
- classifierjob.go
- classify.go
- client.go
- configuration.go
- datasink.go
- datasource.go
- default_http_client.go
- extract.go
- field.go
- file.go
- parsing.go
- pipeline.go
- pipelinedatasource.go
- pipelinedocument.go
- pipelinefile.go
- pipelineimage.go
- pipelinemetadata.go
- pipelinesync.go
- project.go
- retriever.go
- retrieverretriever.go
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|