Documentation
¶
Index ¶
- Variables
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type APIFeedbackSourceParam
- type APIFeedbackSourceType
- type AnnotationQueueAnnotationQueuesParams
- type AnnotationQueueDeleteResponse
- type AnnotationQueueExportParams
- type AnnotationQueueExportResponse
- type AnnotationQueueGetAnnotationQueuesParams
- type AnnotationQueueGetAnnotationQueuesParamsQueueType
- type AnnotationQueueGetAnnotationQueuesResponse
- type AnnotationQueueGetAnnotationQueuesResponseQueueType
- type AnnotationQueueGetResponse
- type AnnotationQueueGetResponseQueueType
- type AnnotationQueueGetRunParams
- type AnnotationQueueGetSizeParams
- type AnnotationQueueGetSizeParamsStatus
- type AnnotationQueueGetTotalArchivedParams
- type AnnotationQueueInfoListResponse
- type AnnotationQueueInfoListResponseBatchIngestConfig
- type AnnotationQueueInfoListResponseCustomerInfo
- type AnnotationQueueInfoService
- type AnnotationQueueNewRunStatusParams
- type AnnotationQueueNewRunStatusResponse
- type AnnotationQueuePopulateParams
- type AnnotationQueuePopulateResponse
- type AnnotationQueueRubricItemSchema
- type AnnotationQueueRubricItemSchemaParam
- type AnnotationQueueRunDeleteAllParams
- type AnnotationQueueRunDeleteAllResponse
- type AnnotationQueueRunDeleteQueueResponse
- type AnnotationQueueRunListParams
- type AnnotationQueueRunListParamsStatus
- type AnnotationQueueRunNewParams
- type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArray
- type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayItemdeprecated
- type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTier
- type AnnotationQueueRunNewParamsBodyRunsUuidArray
- type AnnotationQueueRunNewParamsBodyUnion
- type AnnotationQueueRunNewResponse
- type AnnotationQueueRunService
- func (r *AnnotationQueueRunService) DeleteAll(ctx context.Context, queueID string, body AnnotationQueueRunDeleteAllParams, ...) (res *AnnotationQueueRunDeleteAllResponse, err error)
- func (r *AnnotationQueueRunService) DeleteQueue(ctx context.Context, queueID string, queueRunID string, ...) (res *AnnotationQueueRunDeleteQueueResponse, err error)
- func (r *AnnotationQueueRunService) List(ctx context.Context, queueID string, query AnnotationQueueRunListParams, ...) (res *[]RunSchemaWithAnnotationQueueInfo, err error)
- func (r *AnnotationQueueRunService) New(ctx context.Context, queueID string, body AnnotationQueueRunNewParams, ...) (res *[]AnnotationQueueRunNewResponse, err error)
- func (r *AnnotationQueueRunService) Update(ctx context.Context, queueID string, queueRunID string, ...) (res *AnnotationQueueRunUpdateResponse, err error)
- type AnnotationQueueRunUpdateParams
- type AnnotationQueueRunUpdateResponse
- type AnnotationQueueSchema
- type AnnotationQueueSchemaQueueType
- type AnnotationQueueService
- func (r *AnnotationQueueService) AnnotationQueues(ctx context.Context, body AnnotationQueueAnnotationQueuesParams, ...) (res *AnnotationQueueSchema, err error)
- func (r *AnnotationQueueService) Delete(ctx context.Context, queueID string, opts ...option.RequestOption) (res *AnnotationQueueDeleteResponse, err error)
- func (r *AnnotationQueueService) Export(ctx context.Context, queueID string, body AnnotationQueueExportParams, ...) (res *AnnotationQueueExportResponse, err error)
- func (r *AnnotationQueueService) Get(ctx context.Context, queueID string, opts ...option.RequestOption) (res *AnnotationQueueGetResponse, err error)
- func (r *AnnotationQueueService) GetAnnotationQueues(ctx context.Context, query AnnotationQueueGetAnnotationQueuesParams, ...) (...)
- func (r *AnnotationQueueService) GetAnnotationQueuesAutoPaging(ctx context.Context, query AnnotationQueueGetAnnotationQueuesParams, ...) ...
- func (r *AnnotationQueueService) GetQueues(ctx context.Context, runID string, opts ...option.RequestOption) (res *[]AnnotationQueueSchema, err error)
- func (r *AnnotationQueueService) GetRun(ctx context.Context, queueID string, index int64, ...) (res *RunSchemaWithAnnotationQueueInfo, err error)
- func (r *AnnotationQueueService) GetSize(ctx context.Context, queueID string, query AnnotationQueueGetSizeParams, ...) (res *AnnotationQueueSizeSchema, err error)
- func (r *AnnotationQueueService) GetTotalArchived(ctx context.Context, queueID string, ...) (res *AnnotationQueueSizeSchema, err error)
- func (r *AnnotationQueueService) GetTotalSize(ctx context.Context, queueID string, opts ...option.RequestOption) (res *AnnotationQueueSizeSchema, err error)
- func (r *AnnotationQueueService) NewRunStatus(ctx context.Context, annotationQueueRunID string, ...) (res *AnnotationQueueNewRunStatusResponse, err error)
- func (r *AnnotationQueueService) Populate(ctx context.Context, body AnnotationQueuePopulateParams, ...) (res *AnnotationQueuePopulateResponse, err error)
- func (r *AnnotationQueueService) Update(ctx context.Context, queueID string, body AnnotationQueueUpdateParams, ...) (res *AnnotationQueueUpdateResponse, err error)
- type AnnotationQueueSizeSchema
- type AnnotationQueueUpdateParams
- type AnnotationQueueUpdateParamsMetadataMap
- type AnnotationQueueUpdateParamsMetadataUnion
- type AnnotationQueueUpdateParamsNumReviewersPerItemUnion
- type AnnotationQueueUpdateResponse
- type AppFeedbackSourceParam
- type AppFeedbackSourceType
- type AppHubCrudTenantsTenant
- type AttachmentsOperationsParam
- type AutoEvalFeedbackSourceParam
- type AutoEvalFeedbackSourceType
- type Client
- func (r *Client) Close()
- func (r *Client) CreateRun(run *RunCreate) error
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) GenerateInsights(ctx context.Context, params GenerateInsightsParams, ...) (*InsightsReport, error)
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) GetInsightsReport(ctx context.Context, params GetInsightsReportParams, ...) (*InsightsReportResult, error)
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) PollInsights(ctx context.Context, params PollInsightsParams, opts ...option.RequestOption) (*InsightsReport, error)
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) UpdateRun(run *RunUpdate) error
- type CommitGetParams
- type CommitGetResponse
- type CommitGetResponseExample
- type CommitListParams
- type CommitManifestResponse
- type CommitManifestResponseExample
- type CommitNewParams
- type CommitNewResponse
- type CommitService
- func (r *CommitService) Get(ctx context.Context, owner string, repo string, commit string, ...) (res *CommitGetResponse, err error)
- func (r *CommitService) List(ctx context.Context, owner string, repo string, query CommitListParams, ...) (res *pagination.OffsetPaginationCommits[CommitWithLookups], err error)
- func (r *CommitService) ListAutoPaging(ctx context.Context, owner string, repo string, query CommitListParams, ...) *pagination.OffsetPaginationCommitsAutoPager[CommitWithLookups]
- func (r *CommitService) New(ctx context.Context, owner string, repo string, body CommitNewParams, ...) (res *CommitNewResponse, err error)
- type CommitWithLookups
- type CreateRepoResponse
- type CreateRunClusteringJobRequestModel
- type CreateRunClusteringJobRequestParam
- type CustomChartsSection
- type CustomChartsSectionChart
- type CustomChartsSectionChartsChartType
- type CustomChartsSectionChartsCommonFilters
- type CustomChartsSectionChartsData
- type CustomChartsSectionChartsDataValueMap
- type CustomChartsSectionChartsDataValueUnion
- type CustomChartsSectionChartsSeries
- type CustomChartsSectionChartsSeriesFilters
- type CustomChartsSectionChartsSeriesGroupBy
- type CustomChartsSectionChartsSeriesGroupByAttribute
- type CustomChartsSectionChartsSeriesGroupBySetBy
- type CustomChartsSectionChartsSeriesMetric
- type CustomChartsSectionChartsSeriesProjectMetric
- type CustomChartsSectionRequestParam
- type CustomChartsSectionSubSection
- type CustomChartsSectionSubSectionsChart
- type CustomChartsSectionSubSectionsChartsChartType
- type CustomChartsSectionSubSectionsChartsCommonFilters
- type CustomChartsSectionSubSectionsChartsData
- type CustomChartsSectionSubSectionsChartsDataValueMap
- type CustomChartsSectionSubSectionsChartsDataValueUnion
- type CustomChartsSectionSubSectionsChartsSeries
- type CustomChartsSectionSubSectionsChartsSeriesFilters
- type CustomChartsSectionSubSectionsChartsSeriesGroupBy
- type CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute
- type CustomChartsSectionSubSectionsChartsSeriesGroupBySetBy
- type CustomChartsSectionSubSectionsChartsSeriesMetric
- type CustomChartsSectionSubSectionsChartsSeriesProjectMetric
- type DataType
- type Dataset
- type DatasetCloneParams
- type DatasetCloneParamsAsOfUnion
- type DatasetCloneParamsSplitArray
- type DatasetCloneParamsSplitUnion
- type DatasetCloneResponse
- type DatasetComparativeDeleteResponse
- type DatasetComparativeNewParams
- type DatasetComparativeNewResponse
- type DatasetComparativeService
- type DatasetDeleteResponse
- type DatasetExperimentGroupedParams
- type DatasetExperimentGroupedResponse
- type DatasetExperimentService
- type DatasetGetCsvParams
- type DatasetGetCsvResponse
- type DatasetGetJSONLParams
- type DatasetGetJSONLResponse
- type DatasetGetOpenAIFtParams
- type DatasetGetOpenAIFtResponse
- type DatasetGetOpenAIParams
- type DatasetGetOpenAIResponse
- type DatasetGetVersionParams
- type DatasetGroupRunsParams
- type DatasetGroupRunsParamsGroupBy
- type DatasetGroupRunsResponse
- type DatasetGroupRunsResponseGroup
- type DatasetGroupRunsResponseGroupsGroupKeyUnion
- type DatasetGroupRunsResponseGroupsSession
- type DatasetGroupRunsResponseGroupsSessionsTraceTier
- type DatasetGroupService
- type DatasetListParams
- type DatasetListParamsDataTypeArray
- type DatasetListParamsDataTypeUnion
- type DatasetListParamsExclude
- type DatasetNewParams
- type DatasetPlaygroundExperimentBatchParams
- type DatasetPlaygroundExperimentBatchResponse
- type DatasetPlaygroundExperimentService
- func (r *DatasetPlaygroundExperimentService) Batch(ctx context.Context, body DatasetPlaygroundExperimentBatchParams, ...) (res *DatasetPlaygroundExperimentBatchResponse, err error)
- func (r *DatasetPlaygroundExperimentService) Stream(ctx context.Context, body DatasetPlaygroundExperimentStreamParams, ...) (res *DatasetPlaygroundExperimentStreamResponse, err error)
- type DatasetPlaygroundExperimentStreamParams
- type DatasetPlaygroundExperimentStreamResponse
- type DatasetRunDeltaParams
- type DatasetRunNewParams
- type DatasetRunNewParamsFormat
- type DatasetRunService
- type DatasetService
- func (r *DatasetService) Clone(ctx context.Context, body DatasetCloneParams, opts ...option.RequestOption) (res *[]DatasetCloneResponse, err error)
- func (r *DatasetService) Delete(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *DatasetDeleteResponse, err error)
- func (r *DatasetService) Get(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *Dataset, err error)
- func (r *DatasetService) GetCsv(ctx context.Context, datasetID string, query DatasetGetCsvParams, ...) (res *DatasetGetCsvResponse, err error)
- func (r *DatasetService) GetJSONL(ctx context.Context, datasetID string, query DatasetGetJSONLParams, ...) (res *DatasetGetJSONLResponse, err error)
- func (r *DatasetService) GetOpenAI(ctx context.Context, datasetID string, query DatasetGetOpenAIParams, ...) (res *DatasetGetOpenAIResponse, err error)
- func (r *DatasetService) GetOpenAIFt(ctx context.Context, datasetID string, query DatasetGetOpenAIFtParams, ...) (res *DatasetGetOpenAIFtResponse, err error)
- func (r *DatasetService) GetVersion(ctx context.Context, datasetID string, query DatasetGetVersionParams, ...) (res *DatasetVersion, err error)
- func (r *DatasetService) List(ctx context.Context, query DatasetListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[Dataset], err error)
- func (r *DatasetService) ListAutoPaging(ctx context.Context, query DatasetListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[Dataset]
- func (r *DatasetService) New(ctx context.Context, body DatasetNewParams, opts ...option.RequestOption) (res *Dataset, err error)
- func (r *DatasetService) Update(ctx context.Context, datasetID string, body DatasetUpdateParams, ...) (res *DatasetUpdateResponse, err error)
- func (r *DatasetService) UpdateTags(ctx context.Context, datasetID string, body DatasetUpdateTagsParams, ...) (res *DatasetVersion, err error)
- func (r *DatasetService) Upload(ctx context.Context, body DatasetUploadParams, opts ...option.RequestOption) (res *Dataset, err error)
- type DatasetShareDeleteAllResponse
- type DatasetShareNewParams
- type DatasetShareSchema
- type DatasetShareService
- func (r *DatasetShareService) DeleteAll(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *DatasetShareDeleteAllResponse, err error)
- func (r *DatasetShareService) Get(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *DatasetShareSchema, err error)
- func (r *DatasetShareService) New(ctx context.Context, datasetID string, body DatasetShareNewParams, ...) (res *DatasetShareSchema, err error)
- type DatasetSplitGetParams
- type DatasetSplitGetParamsAsOfUnion
- type DatasetSplitNewParams
- type DatasetSplitService
- type DatasetTransformation
- type DatasetTransformationParam
- type DatasetTransformationTransformationType
- type DatasetUpdateParams
- type DatasetUpdateParamsBaselineExperimentIDUnion
- type DatasetUpdateParamsDescriptionUnion
- type DatasetUpdateParamsInputsSchemaDefinitionMap
- type DatasetUpdateParamsInputsSchemaDefinitionUnion
- type DatasetUpdateParamsMetadataMap
- type DatasetUpdateParamsMetadataUnion
- type DatasetUpdateParamsNameUnion
- type DatasetUpdateParamsOutputsSchemaDefinitionMap
- type DatasetUpdateParamsOutputsSchemaDefinitionUnion
- type DatasetUpdateParamsPatchExamples
- type DatasetUpdateParamsPatchExamplesSplitArray
- type DatasetUpdateParamsPatchExamplesSplitUnion
- type DatasetUpdateParamsTransformationsArray
- type DatasetUpdateParamsTransformationsUnion
- type DatasetUpdateResponse
- type DatasetUpdateTagsParams
- type DatasetUpdateTagsParamsAsOfUnion
- type DatasetUploadParams
- type DatasetVersion
- type DatasetVersionGetDiffParams
- type DatasetVersionGetDiffParamsFromVersionUnion
- type DatasetVersionGetDiffParamsToVersionUnion
- type DatasetVersionGetDiffResponse
- type DatasetVersionListParams
- type DatasetVersionService
- func (r *DatasetVersionService) GetDiff(ctx context.Context, datasetID string, query DatasetVersionGetDiffParams, ...) (res *DatasetVersionGetDiffResponse, err error)
- func (r *DatasetVersionService) List(ctx context.Context, datasetID string, query DatasetVersionListParams, ...) (res *pagination.OffsetPaginationTopLevelArray[DatasetVersion], err error)
- func (r *DatasetVersionService) ListAutoPaging(ctx context.Context, datasetID string, query DatasetVersionListParams, ...) *pagination.OffsetPaginationTopLevelArrayAutoPager[DatasetVersion]
- type DrainConfig
- type Error
- type Example
- type ExampleBulkNewParams
- type ExampleBulkNewParamsBody
- type ExampleBulkNewParamsBodySplitArray
- type ExampleBulkNewParamsBodySplitUnion
- type ExampleBulkPatchAllParams
- type ExampleBulkPatchAllParamsBody
- type ExampleBulkPatchAllParamsBodySplitArray
- type ExampleBulkPatchAllParamsBodySplitUnion
- type ExampleBulkPatchAllResponse
- type ExampleBulkService
- type ExampleDeleteAllParams
- type ExampleDeleteAllResponse
- type ExampleDeleteResponse
- type ExampleGetCountParams
- type ExampleGetCountParamsAsOfUnion
- type ExampleGetParams
- type ExampleGetParamsAsOfUnion
- type ExampleListParams
- type ExampleListParamsAsOfUnion
- type ExampleListParamsOrder
- type ExampleNewParams
- type ExampleNewParamsSplitArray
- type ExampleNewParamsSplitUnion
- type ExampleSelect
- type ExampleService
- func (r *ExampleService) Delete(ctx context.Context, exampleID string, opts ...option.RequestOption) (res *ExampleDeleteResponse, err error)
- func (r *ExampleService) DeleteAll(ctx context.Context, body ExampleDeleteAllParams, opts ...option.RequestOption) (res *ExampleDeleteAllResponse, err error)
- func (r *ExampleService) Get(ctx context.Context, exampleID string, query ExampleGetParams, ...) (res *Example, err error)
- func (r *ExampleService) GetCount(ctx context.Context, query ExampleGetCountParams, opts ...option.RequestOption) (res *int64, err error)
- func (r *ExampleService) List(ctx context.Context, query ExampleListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[Example], err error)
- func (r *ExampleService) ListAutoPaging(ctx context.Context, query ExampleListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[Example]
- func (r *ExampleService) New(ctx context.Context, body ExampleNewParams, opts ...option.RequestOption) (res *Example, err error)
- func (r *ExampleService) Update(ctx context.Context, exampleID string, body ExampleUpdateParams, ...) (res *ExampleUpdateResponse, err error)
- func (r *ExampleService) UploadFromCsv(ctx context.Context, datasetID string, body ExampleUploadFromCsvParams, ...) (res *[]Example, err error)
- type ExampleUpdateParams
- type ExampleUpdateParamsSplitArray
- type ExampleUpdateParamsSplitUnion
- type ExampleUpdateResponse
- type ExampleUploadFromCsvParams
- type ExampleValidateService
- type ExampleValidationResult
- type ExampleValidationResultSplitArray
- type ExampleValidationResultSplitUnion
- type ExampleWithRunsCh
- type ExampleWithRunsChRun
- type FeedbackConfigDeleteParams
- type FeedbackConfigService
- type FeedbackCreateSchemaCorrectionMapParam
- type FeedbackCreateSchemaCorrectionUnionParam
- type FeedbackCreateSchemaFeedbackConfigCategoryParam
- type FeedbackCreateSchemaFeedbackConfigParam
- type FeedbackCreateSchemaFeedbackConfigType
- type FeedbackCreateSchemaFeedbackSourceParam
- type FeedbackCreateSchemaFeedbackSourceType
- type FeedbackCreateSchemaFeedbackSourceUnionParam
- type FeedbackCreateSchemaParam
- type FeedbackCreateSchemaScoreUnionParam
- type FeedbackCreateSchemaValueMapParam
- type FeedbackCreateSchemaValueUnionParam
- type FeedbackDeleteResponse
- type FeedbackGetParams
- type FeedbackIngestTokenCreateSchemaFeedbackConfigCategoryParam
- type FeedbackIngestTokenCreateSchemaFeedbackConfigParam
- type FeedbackIngestTokenCreateSchemaFeedbackConfigType
- type FeedbackIngestTokenCreateSchemaParam
- type FeedbackIngestTokenSchema
- type FeedbackLevel
- type FeedbackListParams
- type FeedbackListParamsRunArray
- type FeedbackListParamsRunUnion
- type FeedbackListParamsSessionArray
- type FeedbackListParamsSessionUnion
- type FeedbackNewParams
- type FeedbackSchema
- type FeedbackSchemaCorrectionMap
- type FeedbackSchemaCorrectionUnion
- type FeedbackSchemaFeedbackSource
- type FeedbackSchemaScoreUnion
- type FeedbackSchemaValueMap
- type FeedbackSchemaValueUnion
- type FeedbackService
- func (r *FeedbackService) Delete(ctx context.Context, feedbackID string, opts ...option.RequestOption) (res *FeedbackDeleteResponse, err error)
- func (r *FeedbackService) Get(ctx context.Context, feedbackID string, query FeedbackGetParams, ...) (res *FeedbackSchema, err error)
- func (r *FeedbackService) List(ctx context.Context, query FeedbackListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[FeedbackSchema], err error)
- func (r *FeedbackService) ListAutoPaging(ctx context.Context, query FeedbackListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[FeedbackSchema]
- func (r *FeedbackService) New(ctx context.Context, body FeedbackNewParams, opts ...option.RequestOption) (res *FeedbackSchema, err error)
- func (r *FeedbackService) Update(ctx context.Context, feedbackID string, body FeedbackUpdateParams, ...) (res *FeedbackSchema, err error)
- type FeedbackTokenGetParams
- type FeedbackTokenGetParamsScoreUnion
- type FeedbackTokenGetParamsValueUnion
- type FeedbackTokenGetResponse
- type FeedbackTokenListParams
- type FeedbackTokenNewParams
- type FeedbackTokenNewParamsBodyArray
- type FeedbackTokenNewParamsBodyUnion
- type FeedbackTokenNewResponseArray
- type FeedbackTokenNewResponseUnion
- type FeedbackTokenService
- func (r *FeedbackTokenService) Get(ctx context.Context, token string, query FeedbackTokenGetParams, ...) (res *FeedbackTokenGetResponse, err error)
- func (r *FeedbackTokenService) List(ctx context.Context, query FeedbackTokenListParams, ...) (res *[]FeedbackIngestTokenSchema, err error)
- func (r *FeedbackTokenService) New(ctx context.Context, body FeedbackTokenNewParams, opts ...option.RequestOption) (res *FeedbackTokenNewResponseUnion, err error)
- func (r *FeedbackTokenService) Update(ctx context.Context, token string, body FeedbackTokenUpdateParams, ...) (res *FeedbackTokenUpdateResponse, err error)
- type FeedbackTokenUpdateParams
- type FeedbackTokenUpdateParamsCorrectionMap
- type FeedbackTokenUpdateParamsCorrectionUnion
- type FeedbackTokenUpdateParamsScoreUnion
- type FeedbackTokenUpdateParamsValueUnion
- type FeedbackTokenUpdateResponse
- type FeedbackUpdateParams
- type FeedbackUpdateParamsCorrectionMap
- type FeedbackUpdateParamsCorrectionUnion
- type FeedbackUpdateParamsFeedbackConfig
- type FeedbackUpdateParamsFeedbackConfigCategory
- type FeedbackUpdateParamsFeedbackConfigType
- type FeedbackUpdateParamsScoreUnion
- type FeedbackUpdateParamsValueMap
- type FeedbackUpdateParamsValueUnion
- type GenerateInsightsParams
- type GetInsightsReportParams
- type GetRepoResponse
- type InsightsReport
- type InsightsReportResult
- type MissingParam
- func (r MissingParam) ImplementsAnnotationQueueUpdateParamsNumReviewersPerItemUnion()
- func (r MissingParam) ImplementsDatasetUpdateParamsBaselineExperimentIDUnion()
- func (r MissingParam) ImplementsDatasetUpdateParamsDescriptionUnion()
- func (r MissingParam) ImplementsDatasetUpdateParamsNameUnion()
- func (r MissingParam) MarshalJSON() (data []byte, err error)
- type Missing_Missing
- type ModelFeedbackSourceParam
- type ModelFeedbackSourceType
- type OTelTracer
- type OTelTracerOption
- type PollInsightsParams
- type PublicDatasetGetSessionsBulkParams
- type PublicDatasetListComparativeParams
- type PublicDatasetListComparativeResponse
- type PublicDatasetListFeedbackParams
- type PublicDatasetListParams
- type PublicDatasetListResponse
- type PublicDatasetListSessionsParams
- type PublicDatasetService
- func (r *PublicDatasetService) GetSessionsBulk(ctx context.Context, query PublicDatasetGetSessionsBulkParams, ...) (res *[]TracerSession, err error)
- func (r *PublicDatasetService) List(ctx context.Context, shareToken string, query PublicDatasetListParams, ...) (res *PublicDatasetListResponse, err error)
- func (r *PublicDatasetService) ListComparative(ctx context.Context, shareToken string, ...) (...)
- func (r *PublicDatasetService) ListComparativeAutoPaging(ctx context.Context, shareToken string, ...) ...
- func (r *PublicDatasetService) ListFeedback(ctx context.Context, shareToken string, query PublicDatasetListFeedbackParams, ...) (res *pagination.OffsetPaginationTopLevelArray[FeedbackSchema], err error)
- func (r *PublicDatasetService) ListFeedbackAutoPaging(ctx context.Context, shareToken string, query PublicDatasetListFeedbackParams, ...) *pagination.OffsetPaginationTopLevelArrayAutoPager[FeedbackSchema]
- func (r *PublicDatasetService) ListSessions(ctx context.Context, shareToken string, params PublicDatasetListSessionsParams, ...) (res *pagination.OffsetPaginationTopLevelArray[TracerSession], err error)
- func (r *PublicDatasetService) ListSessionsAutoPaging(ctx context.Context, shareToken string, params PublicDatasetListSessionsParams, ...) *pagination.OffsetPaginationTopLevelArrayAutoPager[TracerSession]
- type PublicGetFeedbacksParams
- type PublicService
- func (r *PublicService) GetFeedbacks(ctx context.Context, shareToken string, query PublicGetFeedbacksParams, ...) (res *pagination.OffsetPaginationTopLevelArray[FeedbackSchema], err error)
- func (r *PublicService) GetFeedbacksAutoPaging(ctx context.Context, shareToken string, query PublicGetFeedbacksParams, ...) *pagination.OffsetPaginationTopLevelArrayAutoPager[FeedbackSchema]
- type QueryFeedbackDeltaParam
- type RepoDeleteResponse
- type RepoListParams
- type RepoListParamsIsArchived
- type RepoListParamsIsPublic
- type RepoListParamsRepoType
- type RepoListParamsSortDirection
- type RepoListParamsSortField
- type RepoNewParams
- type RepoNewParamsRepoType
- type RepoService
- func (r *RepoService) Delete(ctx context.Context, owner string, repo string, opts ...option.RequestOption) (res *RepoDeleteResponse, err error)
- func (r *RepoService) Get(ctx context.Context, owner string, repo string, opts ...option.RequestOption) (res *GetRepoResponse, err error)
- func (r *RepoService) List(ctx context.Context, query RepoListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationRepos[RepoWithLookups], err error)
- func (r *RepoService) ListAutoPaging(ctx context.Context, query RepoListParams, opts ...option.RequestOption) *pagination.OffsetPaginationReposAutoPager[RepoWithLookups]
- func (r *RepoService) New(ctx context.Context, body RepoNewParams, opts ...option.RequestOption) (res *CreateRepoResponse, err error)
- func (r *RepoService) Update(ctx context.Context, owner string, repo string, body RepoUpdateParams, ...) (res *CreateRepoResponse, err error)
- type RepoUpdateParams
- type RepoWithLookups
- type RepoWithLookupsRepoType
- type RunCreate
- type RunGetParams
- type RunIngestBatchParams
- type RunIngestBatchResponse
- type RunIngestBatchResponseItem
- type RunNewParams
- type RunNewResponse
- type RunNewResponseItem
- type RunOp
- type RunParam
- type RunQueryParams
- type RunQueryParamsOrder
- type RunQueryParamsSelect
- type RunQueryResponse
- type RunRuleService
- type RunRunType
- type RunSchema
- type RunSchemaTraceTier
- type RunSchemaWithAnnotationQueueInfo
- type RunSchemaWithAnnotationQueueInfoTraceTier
- type RunService
- func (r *RunService) Get(ctx context.Context, runID string, query RunGetParams, ...) (res *RunSchema, err error)
- func (r *RunService) IngestBatch(ctx context.Context, body RunIngestBatchParams, opts ...option.RequestOption) (res *RunIngestBatchResponse, err error)
- func (r *RunService) New(ctx context.Context, body RunNewParams, opts ...option.RequestOption) (res *RunNewResponse, err error)
- func (r *RunService) Query(ctx context.Context, body RunQueryParams, opts ...option.RequestOption) (res *RunQueryResponse, err error)
- func (r *RunService) Stats(ctx context.Context, body RunStatsParams, opts ...option.RequestOption) (res *RunStatsResponseUnion, err error)
- func (r *RunService) Update(ctx context.Context, runID string, body RunUpdateParams, ...) (res *RunUpdateResponse, err error)
- func (r *RunService) Update2(ctx context.Context, runID string, opts ...option.RequestOption) (res *RunUpdate2Response, err error)
- type RunStatsGroupByAttribute
- type RunStatsGroupByParam
- type RunStatsParams
- type RunStatsQueryParams
- type RunStatsQueryParamsSelect
- type RunStatsResponseMap
- type RunStatsResponseMapItem
- type RunStatsResponseRunStats
- type RunStatsResponseUnion
- type RunTransformFunc
- type RunTypeEnum
- type RunUpdate
- type RunUpdate2Response
- type RunUpdateParams
- type RunUpdateResponse
- type RunUpdateResponseItem
- type RunnableConfigParam
- type RunnerContextEnum
- type RunsFilterDataSourceTypeEnum
- type SessionDashboardParams
- type SessionDeleteResponse
- type SessionFeedbackDelta
- type SessionFeedbackDeltaFeedbackDelta
- type SessionGetParams
- type SessionInsightDeleteResponse
- type SessionInsightGetJobResponse
- type SessionInsightGetJobResponseCluster
- type SessionInsightGetJobResponseReport
- type SessionInsightGetJobResponseReportHighlightedTrace
- type SessionInsightGetRunsParams
- type SessionInsightGetRunsParamsAttributeSortOrder
- type SessionInsightGetRunsResponse
- type SessionInsightListParams
- type SessionInsightListResponse
- type SessionInsightNewParams
- type SessionInsightNewResponse
- type SessionInsightService
- func (r *SessionInsightService) Delete(ctx context.Context, sessionID string, jobID string, ...) (res *SessionInsightDeleteResponse, err error)
- func (r *SessionInsightService) GetJob(ctx context.Context, sessionID string, jobID string, ...) (res *SessionInsightGetJobResponse, err error)
- func (r *SessionInsightService) GetRuns(ctx context.Context, sessionID string, jobID string, ...) (res *SessionInsightGetRunsResponse, err error)
- func (r *SessionInsightService) List(ctx context.Context, sessionID string, query SessionInsightListParams, ...) (...)
- func (r *SessionInsightService) ListAutoPaging(ctx context.Context, sessionID string, query SessionInsightListParams, ...) ...
- func (r *SessionInsightService) New(ctx context.Context, sessionID string, body SessionInsightNewParams, ...) (res *SessionInsightNewResponse, err error)
- func (r *SessionInsightService) Update(ctx context.Context, sessionID string, jobID string, ...) (res *SessionInsightUpdateResponse, err error)
- type SessionInsightUpdateParams
- type SessionInsightUpdateResponse
- type SessionListParams
- type SessionNewParams
- type SessionNewParamsTraceTier
- type SessionService
- func (r *SessionService) Dashboard(ctx context.Context, sessionID string, params SessionDashboardParams, ...) (res *CustomChartsSection, err error)
- func (r *SessionService) Delete(ctx context.Context, sessionID string, opts ...option.RequestOption) (res *SessionDeleteResponse, err error)
- func (r *SessionService) Get(ctx context.Context, sessionID string, params SessionGetParams, ...) (res *TracerSession, err error)
- func (r *SessionService) List(ctx context.Context, params SessionListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[TracerSession], err error)
- func (r *SessionService) ListAutoPaging(ctx context.Context, params SessionListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[TracerSession]
- func (r *SessionService) New(ctx context.Context, params SessionNewParams, opts ...option.RequestOption) (res *TracerSessionWithoutVirtualFields, err error)
- func (r *SessionService) Update(ctx context.Context, sessionID string, body SessionUpdateParams, ...) (res *TracerSessionWithoutVirtualFields, err error)
- type SessionSortableColumns
- type SessionUpdateParams
- type SessionUpdateParamsTraceTier
- type SettingService
- type SimpleExperimentInfo
- type SortByComparativeExperimentColumn
- type SortByDatasetColumn
- type SortParamsForRunsComparisonView
- type SortParamsForRunsComparisonViewSortOrder
- type SourceType
- type TimedeltaInputParam
- type Tracerdeprecated
- type TracerOptiondeprecated
- type TracerSession
- type TracerSessionTraceTier
- type TracerSessionWithoutVirtualFields
- type TracerSessionWithoutVirtualFieldsTraceTier
- type TracingAttachment
- type TracingClient
- type TracingLogger
- type TracingOption
Constants ¶
This section is empty.
Variables ¶
var ( WithTracingAPIURL = langsmithtracing.WithAPIURL WithTracingAPIKey = langsmithtracing.WithAPIKey WithTracingBearerToken = langsmithtracing.WithBearerToken WithTracingProject = langsmithtracing.WithProject WithTracingDrain = langsmithtracing.WithDrainConfig WithSampleRate = langsmithtracing.WithSampleRate WithRunTransform = langsmithtracing.WithRunTransform WithMergeFilteredEnvIntoExtraMetadata = langsmithtracing.WithMergeFilteredEnvIntoExtraMetadata WithCompressionDisabled = langsmithtracing.WithCompressionDisabled WithTracingLogger = langsmithtracing.WithLogger )
Tracing option constructors.
var New = NewOTel
Deprecated: Use NewOTel instead.
var NewTracer = NewOTelTracer
Deprecated: Use NewOTelTracer instead.
var NewTracingClient = langsmithtracing.NewTracingClient
NewTracingClient creates a standalone TracingClient. Most users should use Client.CreateRun / Client.UpdateRun instead, which lazily initialize the underlying TracingClient on first use so REST-only clients pay no cost. It returns an error if tracing sampling env vars are set but invalid.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (LANGSMITH_API_KEY, LANGSMITH_TENANT_ID, LANGSMITH_BEARER_TOKEN, LANGSMITH_ORGANIZATION_ID, LANGSMITH_ENDPOINT). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type APIFeedbackSourceParam ¶
type APIFeedbackSourceParam struct {
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Type param.Field[APIFeedbackSourceType] `json:"type"`
}
API feedback source.
func (APIFeedbackSourceParam) MarshalJSON ¶
func (r APIFeedbackSourceParam) MarshalJSON() (data []byte, err error)
type APIFeedbackSourceType ¶
type APIFeedbackSourceType string
const (
APIFeedbackSourceTypeAPI APIFeedbackSourceType = "api"
)
func (APIFeedbackSourceType) IsKnown ¶
func (r APIFeedbackSourceType) IsKnown() bool
type AnnotationQueueAnnotationQueuesParams ¶
type AnnotationQueueAnnotationQueuesParams struct {
Name param.Field[string] `json:"name" api:"required"`
ID param.Field[string] `json:"id" format:"uuid"`
CreatedAt param.Field[time.Time] `json:"created_at" format:"date-time"`
DefaultDataset param.Field[string] `json:"default_dataset" format:"uuid"`
Description param.Field[string] `json:"description"`
EnableReservations param.Field[bool] `json:"enable_reservations"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
NumReviewersPerItem param.Field[int64] `json:"num_reviewers_per_item"`
ReservationMinutes param.Field[int64] `json:"reservation_minutes"`
RubricInstructions param.Field[string] `json:"rubric_instructions"`
RubricItems param.Field[[]AnnotationQueueRubricItemSchemaParam] `json:"rubric_items"`
SessionIDs param.Field[[]string] `json:"session_ids" format:"uuid"`
UpdatedAt param.Field[time.Time] `json:"updated_at" format:"date-time"`
}
func (AnnotationQueueAnnotationQueuesParams) MarshalJSON ¶
func (r AnnotationQueueAnnotationQueuesParams) MarshalJSON() (data []byte, err error)
type AnnotationQueueDeleteResponse ¶
type AnnotationQueueDeleteResponse = interface{}
type AnnotationQueueExportParams ¶
type AnnotationQueueExportParams struct {
EndTime param.Field[time.Time] `json:"end_time" format:"date-time"`
IncludeAnnotatorDetail param.Field[bool] `json:"include_annotator_detail"`
StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
}
func (AnnotationQueueExportParams) MarshalJSON ¶
func (r AnnotationQueueExportParams) MarshalJSON() (data []byte, err error)
type AnnotationQueueExportResponse ¶
type AnnotationQueueExportResponse = interface{}
type AnnotationQueueGetAnnotationQueuesParams ¶
type AnnotationQueueGetAnnotationQueuesParams struct {
DatasetID param.Field[string] `query:"dataset_id" format:"uuid"`
IDs param.Field[[]string] `query:"ids" format:"uuid"`
Limit param.Field[int64] `query:"limit"`
Name param.Field[string] `query:"name"`
NameContains param.Field[string] `query:"name_contains"`
Offset param.Field[int64] `query:"offset"`
QueueType param.Field[AnnotationQueueGetAnnotationQueuesParamsQueueType] `query:"queue_type"`
TagValueID param.Field[[]string] `query:"tag_value_id" format:"uuid"`
}
func (AnnotationQueueGetAnnotationQueuesParams) URLQuery ¶
func (r AnnotationQueueGetAnnotationQueuesParams) URLQuery() (v url.Values)
URLQuery serializes AnnotationQueueGetAnnotationQueuesParams's query parameters as `url.Values`.
type AnnotationQueueGetAnnotationQueuesParamsQueueType ¶
type AnnotationQueueGetAnnotationQueuesParamsQueueType string
const ( AnnotationQueueGetAnnotationQueuesParamsQueueTypeSingle AnnotationQueueGetAnnotationQueuesParamsQueueType = "single" AnnotationQueueGetAnnotationQueuesParamsQueueTypePairwise AnnotationQueueGetAnnotationQueuesParamsQueueType = "pairwise" )
func (AnnotationQueueGetAnnotationQueuesParamsQueueType) IsKnown ¶
func (r AnnotationQueueGetAnnotationQueuesParamsQueueType) IsKnown() bool
type AnnotationQueueGetAnnotationQueuesResponse ¶
type AnnotationQueueGetAnnotationQueuesResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
QueueType AnnotationQueueGetAnnotationQueuesResponseQueueType `json:"queue_type" api:"required"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
TotalRuns int64 `json:"total_runs" api:"required"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
DefaultDataset string `json:"default_dataset" api:"nullable" format:"uuid"`
Description string `json:"description" api:"nullable"`
EnableReservations bool `json:"enable_reservations" api:"nullable"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
NumReviewersPerItem int64 `json:"num_reviewers_per_item" api:"nullable"`
ReservationMinutes int64 `json:"reservation_minutes" api:"nullable"`
RunRuleID string `json:"run_rule_id" api:"nullable" format:"uuid"`
SourceRuleID string `json:"source_rule_id" api:"nullable" format:"uuid"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON annotationQueueGetAnnotationQueuesResponseJSON `json:"-"`
}
AnnotationQueue schema with size.
func (*AnnotationQueueGetAnnotationQueuesResponse) UnmarshalJSON ¶
func (r *AnnotationQueueGetAnnotationQueuesResponse) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueGetAnnotationQueuesResponseQueueType ¶
type AnnotationQueueGetAnnotationQueuesResponseQueueType string
const ( AnnotationQueueGetAnnotationQueuesResponseQueueTypeSingle AnnotationQueueGetAnnotationQueuesResponseQueueType = "single" AnnotationQueueGetAnnotationQueuesResponseQueueTypePairwise AnnotationQueueGetAnnotationQueuesResponseQueueType = "pairwise" )
func (AnnotationQueueGetAnnotationQueuesResponseQueueType) IsKnown ¶
func (r AnnotationQueueGetAnnotationQueuesResponseQueueType) IsKnown() bool
type AnnotationQueueGetResponse ¶
type AnnotationQueueGetResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
QueueType AnnotationQueueGetResponseQueueType `json:"queue_type" api:"required"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
DefaultDataset string `json:"default_dataset" api:"nullable" format:"uuid"`
Description string `json:"description" api:"nullable"`
EnableReservations bool `json:"enable_reservations" api:"nullable"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
NumReviewersPerItem int64 `json:"num_reviewers_per_item" api:"nullable"`
ReservationMinutes int64 `json:"reservation_minutes" api:"nullable"`
RubricInstructions string `json:"rubric_instructions" api:"nullable"`
RubricItems []AnnotationQueueRubricItemSchema `json:"rubric_items" api:"nullable"`
RunRuleID string `json:"run_rule_id" api:"nullable" format:"uuid"`
SourceRuleID string `json:"source_rule_id" api:"nullable" format:"uuid"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON annotationQueueGetResponseJSON `json:"-"`
}
AnnotationQueue schema with rubric.
func (*AnnotationQueueGetResponse) UnmarshalJSON ¶
func (r *AnnotationQueueGetResponse) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueGetResponseQueueType ¶
type AnnotationQueueGetResponseQueueType string
const ( AnnotationQueueGetResponseQueueTypeSingle AnnotationQueueGetResponseQueueType = "single" AnnotationQueueGetResponseQueueTypePairwise AnnotationQueueGetResponseQueueType = "pairwise" )
func (AnnotationQueueGetResponseQueueType) IsKnown ¶
func (r AnnotationQueueGetResponseQueueType) IsKnown() bool
type AnnotationQueueGetRunParams ¶
func (AnnotationQueueGetRunParams) URLQuery ¶
func (r AnnotationQueueGetRunParams) URLQuery() (v url.Values)
URLQuery serializes AnnotationQueueGetRunParams's query parameters as `url.Values`.
type AnnotationQueueGetSizeParams ¶ added in v0.2.0
type AnnotationQueueGetSizeParams struct {
Status param.Field[AnnotationQueueGetSizeParamsStatus] `query:"status"`
}
func (AnnotationQueueGetSizeParams) URLQuery ¶ added in v0.2.0
func (r AnnotationQueueGetSizeParams) URLQuery() (v url.Values)
URLQuery serializes AnnotationQueueGetSizeParams's query parameters as `url.Values`.
type AnnotationQueueGetSizeParamsStatus ¶ added in v0.2.0
type AnnotationQueueGetSizeParamsStatus string
const ( AnnotationQueueGetSizeParamsStatusNeedsMyReview AnnotationQueueGetSizeParamsStatus = "needs_my_review" AnnotationQueueGetSizeParamsStatusNeedsOthersReview AnnotationQueueGetSizeParamsStatus = "needs_others_review" AnnotationQueueGetSizeParamsStatusCompleted AnnotationQueueGetSizeParamsStatus = "completed" )
func (AnnotationQueueGetSizeParamsStatus) IsKnown ¶ added in v0.2.0
func (r AnnotationQueueGetSizeParamsStatus) IsKnown() bool
type AnnotationQueueGetTotalArchivedParams ¶
type AnnotationQueueGetTotalArchivedParams struct {
EndTime param.Field[time.Time] `query:"end_time" format:"date-time"`
StartTime param.Field[time.Time] `query:"start_time" format:"date-time"`
}
func (AnnotationQueueGetTotalArchivedParams) URLQuery ¶
func (r AnnotationQueueGetTotalArchivedParams) URLQuery() (v url.Values)
URLQuery serializes AnnotationQueueGetTotalArchivedParams's query parameters as `url.Values`.
type AnnotationQueueInfoListResponse ¶
type AnnotationQueueInfoListResponse struct {
Version string `json:"version" api:"required"`
// Batch ingest config.
BatchIngestConfig AnnotationQueueInfoListResponseBatchIngestConfig `json:"batch_ingest_config"`
// Customer info.
CustomerInfo AnnotationQueueInfoListResponseCustomerInfo `json:"customer_info" api:"nullable"`
GitSha string `json:"git_sha" api:"nullable"`
InstanceFlags map[string]interface{} `json:"instance_flags"`
LicenseExpirationTime time.Time `json:"license_expiration_time" api:"nullable" format:"date-time"`
JSON annotationQueueInfoListResponseJSON `json:"-"`
}
The LangSmith server info.
func (*AnnotationQueueInfoListResponse) UnmarshalJSON ¶
func (r *AnnotationQueueInfoListResponse) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueInfoListResponseBatchIngestConfig ¶
type AnnotationQueueInfoListResponseBatchIngestConfig struct {
ScaleDownNemptyTrigger int64 `json:"scale_down_nempty_trigger"`
ScaleUpNthreadsLimit int64 `json:"scale_up_nthreads_limit"`
ScaleUpQsizeTrigger int64 `json:"scale_up_qsize_trigger"`
SizeLimit int64 `json:"size_limit"`
SizeLimitBytes int64 `json:"size_limit_bytes"`
UseMultipartEndpoint bool `json:"use_multipart_endpoint"`
JSON annotationQueueInfoListResponseBatchIngestConfigJSON `json:"-"`
}
Batch ingest config.
func (*AnnotationQueueInfoListResponseBatchIngestConfig) UnmarshalJSON ¶
func (r *AnnotationQueueInfoListResponseBatchIngestConfig) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueInfoListResponseCustomerInfo ¶
type AnnotationQueueInfoListResponseCustomerInfo struct {
CustomerID string `json:"customer_id" api:"required"`
CustomerName string `json:"customer_name" api:"required"`
JSON annotationQueueInfoListResponseCustomerInfoJSON `json:"-"`
}
Customer info.
func (*AnnotationQueueInfoListResponseCustomerInfo) UnmarshalJSON ¶
func (r *AnnotationQueueInfoListResponseCustomerInfo) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueInfoService ¶
type AnnotationQueueInfoService struct {
Options []option.RequestOption
}
AnnotationQueueInfoService contains methods and other services that help with interacting with the langChain 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 NewAnnotationQueueInfoService method instead.
func NewAnnotationQueueInfoService ¶
func NewAnnotationQueueInfoService(opts ...option.RequestOption) (r *AnnotationQueueInfoService)
NewAnnotationQueueInfoService 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 (*AnnotationQueueInfoService) List ¶
func (r *AnnotationQueueInfoService) List(ctx context.Context, opts ...option.RequestOption) (res *AnnotationQueueInfoListResponse, err error)
Get information about the current deployment of LangSmith.
type AnnotationQueueNewRunStatusParams ¶
type AnnotationQueueNewRunStatusParams struct {
OverrideAddedAt param.Field[time.Time] `json:"override_added_at" format:"date-time"`
Status param.Field[string] `json:"status"`
}
func (AnnotationQueueNewRunStatusParams) MarshalJSON ¶
func (r AnnotationQueueNewRunStatusParams) MarshalJSON() (data []byte, err error)
type AnnotationQueueNewRunStatusResponse ¶
type AnnotationQueueNewRunStatusResponse = interface{}
type AnnotationQueuePopulateParams ¶
type AnnotationQueuePopulateParams struct {
QueueID param.Field[string] `json:"queue_id" api:"required" format:"uuid"`
SessionIDs param.Field[[]string] `json:"session_ids" api:"required" format:"uuid"`
}
func (AnnotationQueuePopulateParams) MarshalJSON ¶
func (r AnnotationQueuePopulateParams) MarshalJSON() (data []byte, err error)
type AnnotationQueuePopulateResponse ¶
type AnnotationQueuePopulateResponse = interface{}
type AnnotationQueueRubricItemSchema ¶
type AnnotationQueueRubricItemSchema struct {
FeedbackKey string `json:"feedback_key" api:"required"`
Description string `json:"description" api:"nullable"`
IsRequired bool `json:"is_required" api:"nullable"`
ScoreDescriptions map[string]string `json:"score_descriptions" api:"nullable"`
ValueDescriptions map[string]string `json:"value_descriptions" api:"nullable"`
JSON annotationQueueRubricItemSchemaJSON `json:"-"`
}
func (*AnnotationQueueRubricItemSchema) UnmarshalJSON ¶
func (r *AnnotationQueueRubricItemSchema) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueRubricItemSchemaParam ¶
type AnnotationQueueRubricItemSchemaParam struct {
FeedbackKey param.Field[string] `json:"feedback_key" api:"required"`
Description param.Field[string] `json:"description"`
IsRequired param.Field[bool] `json:"is_required"`
ScoreDescriptions param.Field[map[string]string] `json:"score_descriptions"`
ValueDescriptions param.Field[map[string]string] `json:"value_descriptions"`
}
func (AnnotationQueueRubricItemSchemaParam) MarshalJSON ¶
func (r AnnotationQueueRubricItemSchemaParam) MarshalJSON() (data []byte, err error)
type AnnotationQueueRunDeleteAllParams ¶
type AnnotationQueueRunDeleteAllParams struct {
DeleteAll param.Field[bool] `json:"delete_all"`
ExcludeRunIDs param.Field[[]string] `json:"exclude_run_ids" format:"uuid"`
RunIDs param.Field[[]string] `json:"run_ids" format:"uuid"`
}
func (AnnotationQueueRunDeleteAllParams) MarshalJSON ¶
func (r AnnotationQueueRunDeleteAllParams) MarshalJSON() (data []byte, err error)
type AnnotationQueueRunDeleteAllResponse ¶
type AnnotationQueueRunDeleteAllResponse = interface{}
type AnnotationQueueRunDeleteQueueResponse ¶
type AnnotationQueueRunDeleteQueueResponse = interface{}
type AnnotationQueueRunListParams ¶
type AnnotationQueueRunListParams struct {
Archived param.Field[bool] `query:"archived"`
IncludeStats param.Field[bool] `query:"include_stats"`
Limit param.Field[int64] `query:"limit"`
Offset param.Field[int64] `query:"offset"`
Status param.Field[AnnotationQueueRunListParamsStatus] `query:"status"`
}
func (AnnotationQueueRunListParams) URLQuery ¶
func (r AnnotationQueueRunListParams) URLQuery() (v url.Values)
URLQuery serializes AnnotationQueueRunListParams's query parameters as `url.Values`.
type AnnotationQueueRunListParamsStatus ¶ added in v0.2.0
type AnnotationQueueRunListParamsStatus string
const ( AnnotationQueueRunListParamsStatusNeedsMyReview AnnotationQueueRunListParamsStatus = "needs_my_review" AnnotationQueueRunListParamsStatusNeedsOthersReview AnnotationQueueRunListParamsStatus = "needs_others_review" AnnotationQueueRunListParamsStatusCompleted AnnotationQueueRunListParamsStatus = "completed" )
func (AnnotationQueueRunListParamsStatus) IsKnown ¶ added in v0.2.0
func (r AnnotationQueueRunListParamsStatus) IsKnown() bool
type AnnotationQueueRunNewParams ¶
type AnnotationQueueRunNewParams struct {
Body AnnotationQueueRunNewParamsBodyUnion `json:"body" api:"required" format:"uuid"`
}
func (AnnotationQueueRunNewParams) MarshalJSON ¶
func (r AnnotationQueueRunNewParams) MarshalJSON() (data []byte, err error)
type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArray ¶
type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArray []AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayItem
type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayItem
deprecated
type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayItem struct {
// Deprecated: deprecated
RunID param.Field[string] `json:"run_id" api:"required" format:"uuid"`
// Deprecated: deprecated
ParentRunID param.Field[string] `json:"parent_run_id" format:"uuid"`
// Deprecated: deprecated
SessionID param.Field[string] `json:"session_id" format:"uuid"`
// Deprecated: deprecated
StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
// Deprecated: deprecated
TraceID param.Field[string] `json:"trace_id" format:"uuid"`
// Deprecated: deprecated
TraceTier param.Field[AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTier] `json:"trace_tier"`
}
Deprecated: use plain UUID list or AddRunToQueueByKeyRequest instead.
func (AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayItem) MarshalJSON ¶
func (r AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayItem) MarshalJSON() (data []byte, err error)
type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTier ¶
type AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTier string
const ( AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTierLonglived AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTier = "longlived" AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTierShortlived AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTier = "shortlived" )
func (AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTier) IsKnown ¶
func (r AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArrayTraceTier) IsKnown() bool
type AnnotationQueueRunNewParamsBodyRunsUuidArray ¶
type AnnotationQueueRunNewParamsBodyRunsUuidArray []string
type AnnotationQueueRunNewParamsBodyUnion ¶
type AnnotationQueueRunNewParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by AnnotationQueueRunNewParamsBodyRunsUuidArray, AnnotationQueueRunNewParamsBodyRunsAnnotationQueueRunAddSchemaArray.
type AnnotationQueueRunNewResponse ¶
type AnnotationQueueRunNewResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
QueueID string `json:"queue_id" api:"required" format:"uuid"`
RunID string `json:"run_id" api:"required" format:"uuid"`
AddedAt time.Time `json:"added_at" format:"date-time"`
LastReviewedTime time.Time `json:"last_reviewed_time" api:"nullable" format:"date-time"`
JSON annotationQueueRunNewResponseJSON `json:"-"`
}
func (*AnnotationQueueRunNewResponse) UnmarshalJSON ¶
func (r *AnnotationQueueRunNewResponse) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueRunService ¶
type AnnotationQueueRunService struct {
Options []option.RequestOption
}
AnnotationQueueRunService contains methods and other services that help with interacting with the langChain 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 NewAnnotationQueueRunService method instead.
func NewAnnotationQueueRunService ¶
func NewAnnotationQueueRunService(opts ...option.RequestOption) (r *AnnotationQueueRunService)
NewAnnotationQueueRunService 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 (*AnnotationQueueRunService) DeleteAll ¶
func (r *AnnotationQueueRunService) DeleteAll(ctx context.Context, queueID string, body AnnotationQueueRunDeleteAllParams, opts ...option.RequestOption) (res *AnnotationQueueRunDeleteAllResponse, err error)
Delete Runs From Annotation Queue
func (*AnnotationQueueRunService) DeleteQueue ¶
func (r *AnnotationQueueRunService) DeleteQueue(ctx context.Context, queueID string, queueRunID string, opts ...option.RequestOption) (res *AnnotationQueueRunDeleteQueueResponse, err error)
Delete Run From Annotation Queue
func (*AnnotationQueueRunService) List ¶
func (r *AnnotationQueueRunService) List(ctx context.Context, queueID string, query AnnotationQueueRunListParams, opts ...option.RequestOption) (res *[]RunSchemaWithAnnotationQueueInfo, err error)
Get Runs From Annotation Queue
func (*AnnotationQueueRunService) New ¶
func (r *AnnotationQueueRunService) New(ctx context.Context, queueID string, body AnnotationQueueRunNewParams, opts ...option.RequestOption) (res *[]AnnotationQueueRunNewResponse, err error)
Add Runs To Annotation Queue
func (*AnnotationQueueRunService) Update ¶
func (r *AnnotationQueueRunService) Update(ctx context.Context, queueID string, queueRunID string, body AnnotationQueueRunUpdateParams, opts ...option.RequestOption) (res *AnnotationQueueRunUpdateResponse, err error)
Update Run In Annotation Queue
type AnnotationQueueRunUpdateParams ¶
type AnnotationQueueRunUpdateParams struct {
AddedAt param.Field[time.Time] `json:"added_at" format:"date-time"`
LastReviewedTime param.Field[time.Time] `json:"last_reviewed_time" format:"date-time"`
}
func (AnnotationQueueRunUpdateParams) MarshalJSON ¶
func (r AnnotationQueueRunUpdateParams) MarshalJSON() (data []byte, err error)
type AnnotationQueueRunUpdateResponse ¶
type AnnotationQueueRunUpdateResponse = interface{}
type AnnotationQueueSchema ¶
type AnnotationQueueSchema struct {
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
QueueType AnnotationQueueSchemaQueueType `json:"queue_type" api:"required"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
DefaultDataset string `json:"default_dataset" api:"nullable" format:"uuid"`
Description string `json:"description" api:"nullable"`
EnableReservations bool `json:"enable_reservations" api:"nullable"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
NumReviewersPerItem int64 `json:"num_reviewers_per_item" api:"nullable"`
ReservationMinutes int64 `json:"reservation_minutes" api:"nullable"`
RunRuleID string `json:"run_rule_id" api:"nullable" format:"uuid"`
SourceRuleID string `json:"source_rule_id" api:"nullable" format:"uuid"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON annotationQueueSchemaJSON `json:"-"`
}
AnnotationQueue schema.
func (*AnnotationQueueSchema) UnmarshalJSON ¶
func (r *AnnotationQueueSchema) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueSchemaQueueType ¶
type AnnotationQueueSchemaQueueType string
const ( AnnotationQueueSchemaQueueTypeSingle AnnotationQueueSchemaQueueType = "single" AnnotationQueueSchemaQueueTypePairwise AnnotationQueueSchemaQueueType = "pairwise" )
func (AnnotationQueueSchemaQueueType) IsKnown ¶
func (r AnnotationQueueSchemaQueueType) IsKnown() bool
type AnnotationQueueService ¶
type AnnotationQueueService struct {
Options []option.RequestOption
Runs *AnnotationQueueRunService
Info *AnnotationQueueInfoService
}
AnnotationQueueService contains methods and other services that help with interacting with the langChain 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 NewAnnotationQueueService method instead.
func NewAnnotationQueueService ¶
func NewAnnotationQueueService(opts ...option.RequestOption) (r *AnnotationQueueService)
NewAnnotationQueueService 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 (*AnnotationQueueService) AnnotationQueues ¶
func (r *AnnotationQueueService) AnnotationQueues(ctx context.Context, body AnnotationQueueAnnotationQueuesParams, opts ...option.RequestOption) (res *AnnotationQueueSchema, err error)
Create Annotation Queue
func (*AnnotationQueueService) Delete ¶
func (r *AnnotationQueueService) Delete(ctx context.Context, queueID string, opts ...option.RequestOption) (res *AnnotationQueueDeleteResponse, err error)
Delete Annotation Queue
func (*AnnotationQueueService) Export ¶
func (r *AnnotationQueueService) Export(ctx context.Context, queueID string, body AnnotationQueueExportParams, opts ...option.RequestOption) (res *AnnotationQueueExportResponse, err error)
Export Annotation Queue Archived Runs
func (*AnnotationQueueService) Get ¶
func (r *AnnotationQueueService) Get(ctx context.Context, queueID string, opts ...option.RequestOption) (res *AnnotationQueueGetResponse, err error)
Get Annotation Queue
func (*AnnotationQueueService) GetAnnotationQueues ¶
func (r *AnnotationQueueService) GetAnnotationQueues(ctx context.Context, query AnnotationQueueGetAnnotationQueuesParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[AnnotationQueueGetAnnotationQueuesResponse], err error)
Get Annotation Queues
func (*AnnotationQueueService) GetAnnotationQueuesAutoPaging ¶
func (r *AnnotationQueueService) GetAnnotationQueuesAutoPaging(ctx context.Context, query AnnotationQueueGetAnnotationQueuesParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[AnnotationQueueGetAnnotationQueuesResponse]
Get Annotation Queues
func (*AnnotationQueueService) GetQueues ¶
func (r *AnnotationQueueService) GetQueues(ctx context.Context, runID string, opts ...option.RequestOption) (res *[]AnnotationQueueSchema, err error)
Get Annotation Queues For Run
func (*AnnotationQueueService) GetRun ¶
func (r *AnnotationQueueService) GetRun(ctx context.Context, queueID string, index int64, query AnnotationQueueGetRunParams, opts ...option.RequestOption) (res *RunSchemaWithAnnotationQueueInfo, err error)
Get a run from an annotation queue
func (*AnnotationQueueService) GetSize ¶
func (r *AnnotationQueueService) GetSize(ctx context.Context, queueID string, query AnnotationQueueGetSizeParams, opts ...option.RequestOption) (res *AnnotationQueueSizeSchema, err error)
Get Size From Annotation Queue
func (*AnnotationQueueService) GetTotalArchived ¶
func (r *AnnotationQueueService) GetTotalArchived(ctx context.Context, queueID string, query AnnotationQueueGetTotalArchivedParams, opts ...option.RequestOption) (res *AnnotationQueueSizeSchema, err error)
Get Total Archived From Annotation Queue
func (*AnnotationQueueService) GetTotalSize ¶
func (r *AnnotationQueueService) GetTotalSize(ctx context.Context, queueID string, opts ...option.RequestOption) (res *AnnotationQueueSizeSchema, err error)
Get Total Size From Annotation Queue
func (*AnnotationQueueService) NewRunStatus ¶
func (r *AnnotationQueueService) NewRunStatus(ctx context.Context, annotationQueueRunID string, body AnnotationQueueNewRunStatusParams, opts ...option.RequestOption) (res *AnnotationQueueNewRunStatusResponse, err error)
Create Identity Annotation Queue Run Status
func (*AnnotationQueueService) Populate ¶
func (r *AnnotationQueueService) Populate(ctx context.Context, body AnnotationQueuePopulateParams, opts ...option.RequestOption) (res *AnnotationQueuePopulateResponse, err error)
Populate annotation queue with runs from an experiment.
func (*AnnotationQueueService) Update ¶
func (r *AnnotationQueueService) Update(ctx context.Context, queueID string, body AnnotationQueueUpdateParams, opts ...option.RequestOption) (res *AnnotationQueueUpdateResponse, err error)
Update Annotation Queue
type AnnotationQueueSizeSchema ¶
type AnnotationQueueSizeSchema struct {
Size int64 `json:"size" api:"required"`
JSON annotationQueueSizeSchemaJSON `json:"-"`
}
Size of an Annotation Queue
func (*AnnotationQueueSizeSchema) UnmarshalJSON ¶
func (r *AnnotationQueueSizeSchema) UnmarshalJSON(data []byte) (err error)
type AnnotationQueueUpdateParams ¶
type AnnotationQueueUpdateParams struct {
DefaultDataset param.Field[string] `json:"default_dataset" format:"uuid"`
Description param.Field[string] `json:"description"`
EnableReservations param.Field[bool] `json:"enable_reservations"`
Metadata param.Field[AnnotationQueueUpdateParamsMetadataUnion] `json:"metadata"`
Name param.Field[string] `json:"name"`
NumReviewersPerItem param.Field[AnnotationQueueUpdateParamsNumReviewersPerItemUnion] `json:"num_reviewers_per_item"`
ReservationMinutes param.Field[int64] `json:"reservation_minutes"`
RubricInstructions param.Field[string] `json:"rubric_instructions"`
RubricItems param.Field[[]AnnotationQueueRubricItemSchemaParam] `json:"rubric_items"`
}
func (AnnotationQueueUpdateParams) MarshalJSON ¶
func (r AnnotationQueueUpdateParams) MarshalJSON() (data []byte, err error)
type AnnotationQueueUpdateParamsMetadataMap ¶
type AnnotationQueueUpdateParamsMetadataMap map[string]interface{}
type AnnotationQueueUpdateParamsMetadataUnion ¶
type AnnotationQueueUpdateParamsMetadataUnion interface {
// contains filtered or unexported methods
}
Satisfied by AnnotationQueueUpdateParamsMetadataMap, MissingParam.
type AnnotationQueueUpdateParamsNumReviewersPerItemUnion ¶
type AnnotationQueueUpdateParamsNumReviewersPerItemUnion interface {
ImplementsAnnotationQueueUpdateParamsNumReviewersPerItemUnion()
}
Satisfied by shared.UnionInt, MissingParam.
type AnnotationQueueUpdateResponse ¶
type AnnotationQueueUpdateResponse = interface{}
type AppFeedbackSourceParam ¶
type AppFeedbackSourceParam struct {
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Type param.Field[AppFeedbackSourceType] `json:"type"`
}
Feedback from the LangChainPlus App.
func (AppFeedbackSourceParam) MarshalJSON ¶
func (r AppFeedbackSourceParam) MarshalJSON() (data []byte, err error)
type AppFeedbackSourceType ¶
type AppFeedbackSourceType string
const (
AppFeedbackSourceTypeApp AppFeedbackSourceType = "app"
)
func (AppFeedbackSourceType) IsKnown ¶
func (r AppFeedbackSourceType) IsKnown() bool
type AppHubCrudTenantsTenant ¶
type AppHubCrudTenantsTenant struct {
ID string `json:"id" api:"required" format:"uuid"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required"`
TenantHandle string `json:"tenant_handle" api:"nullable"`
JSON appHubCrudTenantsTenantJSON `json:"-"`
}
func (*AppHubCrudTenantsTenant) UnmarshalJSON ¶
func (r *AppHubCrudTenantsTenant) UnmarshalJSON(data []byte) (err error)
type AttachmentsOperationsParam ¶
type AttachmentsOperationsParam struct {
// Mapping of old attachment names to new names
Rename param.Field[map[string]string] `json:"rename"`
// List of attachment names to keep
Retain param.Field[[]string] `json:"retain"`
}
func (AttachmentsOperationsParam) MarshalJSON ¶
func (r AttachmentsOperationsParam) MarshalJSON() (data []byte, err error)
type AutoEvalFeedbackSourceParam ¶
type AutoEvalFeedbackSourceParam struct {
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Type param.Field[AutoEvalFeedbackSourceType] `json:"type"`
}
Auto eval feedback source.
func (AutoEvalFeedbackSourceParam) MarshalJSON ¶
func (r AutoEvalFeedbackSourceParam) MarshalJSON() (data []byte, err error)
type AutoEvalFeedbackSourceType ¶
type AutoEvalFeedbackSourceType string
const (
AutoEvalFeedbackSourceTypeAutoEval AutoEvalFeedbackSourceType = "auto_eval"
)
func (AutoEvalFeedbackSourceType) IsKnown ¶
func (r AutoEvalFeedbackSourceType) IsKnown() bool
type Client ¶
type Client struct {
Options []option.RequestOption
Sessions *SessionService
Examples *ExampleService
Datasets *DatasetService
Runs *RunService
Feedback *FeedbackService
Public *PublicService
AnnotationQueues *AnnotationQueueService
Repos *RepoService
Commits *CommitService
Settings *SettingService
// contains filtered or unexported fields
}
Client creates a struct with services and top level methods that help with interacting with the langChain 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 (LANGSMITH_API_KEY, LANGSMITH_TENANT_ID, LANGSMITH_BEARER_TOKEN, LANGSMITH_ORGANIZATION_ID, LANGSMITH_ENDPOINT). 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) Close ¶ added in v0.2.2
func (r *Client) Close()
Close flushes pending tracing operations and shuts down background goroutines. Always call Close before the client goes out of scope to ensure all traces are delivered. It is safe to call Close multiple times; it is also safe to call Close on a client that never used tracing (no-op in that case).
func (*Client) CreateRun ¶ added in v0.2.2
CreateRun enqueues a run create (post) for multipart ingestion.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, 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 interface{}, res interface{}, 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) GenerateInsights ¶ added in v0.2.1
func (r *Client) GenerateInsights(ctx context.Context, params GenerateInsightsParams, opts ...option.RequestOption) (*InsightsReport, error)
GenerateInsights generates an insights report from a list of chat histories.
The method:
- Ensures an OpenAI or Anthropic API key is available as a workspace secret.
- Creates a tracing project and ingests the chat histories as runs.
- Submits an insights clustering job against that project.
NOTE: Requires a Plus or higher tier LangSmith account. Report generation can take up to 30 minutes; use Client.PollInsights to wait for completion and Client.GetInsightsReport to retrieve full results.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, 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) GetInsightsReport ¶ added in v0.2.1
func (r *Client) GetInsightsReport(ctx context.Context, params GetInsightsReportParams, opts ...option.RequestOption) (*InsightsReportResult, error)
GetInsightsReport fetches the full results of a completed insights job. Provide either Report or both ID and ProjectID, but not both.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, 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.
func (*Client) PollInsights ¶ added in v0.2.1
func (r *Client) PollInsights(ctx context.Context, params PollInsightsParams, opts ...option.RequestOption) (*InsightsReport, error)
PollInsights polls an insights job until it reaches a terminal state or the timeout is exceeded. Provide either Report or both ID and ProjectID, but not both.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type CommitGetParams ¶
type CommitGetParams struct {
GetExamples param.Field[bool] `query:"get_examples"`
// Comma-separated list of optional fields: "model", "is_draft"
Include param.Field[string] `query:"include"`
// Deprecated: use Include instead
IncludeModel param.Field[bool] `query:"include_model"`
IsView param.Field[bool] `query:"is_view"`
}
func (CommitGetParams) URLQuery ¶
func (r CommitGetParams) URLQuery() (v url.Values)
URLQuery serializes CommitGetParams's query parameters as `url.Values`.
type CommitGetResponse ¶
type CommitGetResponse struct {
CommitHash string `json:"commit_hash"`
Examples []CommitGetResponseExample `json:"examples"`
IsDraft bool `json:"is_draft"`
Manifest interface{} `json:"manifest"`
ModelConfig interface{} `json:"model_config"`
ModelProvider string `json:"model_provider"`
JSON commitGetResponseJSON `json:"-"`
}
func (*CommitGetResponse) UnmarshalJSON ¶
func (r *CommitGetResponse) UnmarshalJSON(data []byte) (err error)
type CommitGetResponseExample ¶
type CommitGetResponseExample struct {
ID string `json:"id" format:"uuid"`
Inputs interface{} `json:"inputs"`
Outputs interface{} `json:"outputs"`
SessionID string `json:"session_id" format:"uuid"`
StartTime string `json:"start_time"`
JSON commitGetResponseExampleJSON `json:"-"`
}
func (*CommitGetResponseExample) UnmarshalJSON ¶
func (r *CommitGetResponseExample) UnmarshalJSON(data []byte) (err error)
type CommitListParams ¶
type CommitListParams struct {
// IncludeStats determines whether to compute num_downloads and num_views
IncludeStats param.Field[bool] `query:"include_stats"`
// Limit is the pagination limit
Limit param.Field[int64] `query:"limit"`
// Offset is the pagination offset
Offset param.Field[int64] `query:"offset"`
// Tag filters commits to only those with a specific tag (e.g. "production",
// "staging")
Tag param.Field[string] `query:"tag"`
}
func (CommitListParams) URLQuery ¶
func (r CommitListParams) URLQuery() (v url.Values)
URLQuery serializes CommitListParams's query parameters as `url.Values`.
type CommitManifestResponse ¶
type CommitManifestResponse struct {
CommitHash string `json:"commit_hash" api:"required"`
Manifest map[string]interface{} `json:"manifest" api:"required"`
Examples []CommitManifestResponseExample `json:"examples" api:"nullable"`
JSON commitManifestResponseJSON `json:"-"`
}
Response model for get_commit_manifest.
func (*CommitManifestResponse) UnmarshalJSON ¶
func (r *CommitManifestResponse) UnmarshalJSON(data []byte) (err error)
type CommitManifestResponseExample ¶
type CommitManifestResponseExample struct {
ID string `json:"id" api:"required" format:"uuid"`
SessionID string `json:"session_id" api:"required" format:"uuid"`
Inputs map[string]interface{} `json:"inputs" api:"nullable"`
Outputs map[string]interface{} `json:"outputs" api:"nullable"`
StartTime time.Time `json:"start_time" api:"nullable" format:"date-time"`
JSON commitManifestResponseExampleJSON `json:"-"`
}
Response model for example runs
func (*CommitManifestResponseExample) UnmarshalJSON ¶
func (r *CommitManifestResponseExample) UnmarshalJSON(data []byte) (err error)
type CommitNewParams ¶
type CommitNewParams struct {
Manifest param.Field[interface{}] `json:"manifest"`
ParentCommit param.Field[string] `json:"parent_commit"`
// SkipWebhooks allows skipping webhook notifications. Can be true (boolean) to
// skip all, or an array of webhook UUIDs to skip specific ones.
SkipWebhooks param.Field[interface{}] `json:"skip_webhooks"`
}
func (CommitNewParams) MarshalJSON ¶
func (r CommitNewParams) MarshalJSON() (data []byte, err error)
type CommitNewResponse ¶
type CommitNewResponse struct {
Commit CommitWithLookups `json:"commit"`
JSON commitNewResponseJSON `json:"-"`
}
func (*CommitNewResponse) UnmarshalJSON ¶
func (r *CommitNewResponse) UnmarshalJSON(data []byte) (err error)
type CommitService ¶
type CommitService struct {
Options []option.RequestOption
}
CommitService contains methods and other services that help with interacting with the langChain 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 NewCommitService method instead.
func NewCommitService ¶
func NewCommitService(opts ...option.RequestOption) (r *CommitService)
NewCommitService 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 (*CommitService) Get ¶
func (r *CommitService) Get(ctx context.Context, owner string, repo string, commit string, query CommitGetParams, opts ...option.RequestOption) (res *CommitGetResponse, err error)
Retrieves a specific commit by hash, tag, or "latest" for a repository. This endpoint supports both authenticated and unauthenticated access. Authenticated users can access private repos, while unauthenticated users can only access public repos. Commit resolution logic:
- "latest" or empty: Get the most recent commit - Less than 8 characters: Only check for tags - 8 or more characters: Prioritize commit hash over tag, check both
func (*CommitService) List ¶
func (r *CommitService) List(ctx context.Context, owner string, repo string, query CommitListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationCommits[CommitWithLookups], err error)
Lists all commits for a repository with pagination support. This endpoint supports both authenticated and unauthenticated access. Authenticated users can access private repos, while unauthenticated users can only access public repos. The include_stats parameter controls whether download and view statistics are computed (defaults to true).
func (*CommitService) ListAutoPaging ¶
func (r *CommitService) ListAutoPaging(ctx context.Context, owner string, repo string, query CommitListParams, opts ...option.RequestOption) *pagination.OffsetPaginationCommitsAutoPager[CommitWithLookups]
Lists all commits for a repository with pagination support. This endpoint supports both authenticated and unauthenticated access. Authenticated users can access private repos, while unauthenticated users can only access public repos. The include_stats parameter controls whether download and view statistics are computed (defaults to true).
func (*CommitService) New ¶
func (r *CommitService) New(ctx context.Context, owner string, repo string, body CommitNewParams, opts ...option.RequestOption) (res *CommitNewResponse, err error)
Creates a new commit in a repository. Requires authentication and write access to the repository.
type CommitWithLookups ¶
type CommitWithLookups struct {
// The commit ID
ID string `json:"id" format:"uuid"`
// The hash of the commit
CommitHash string `json:"commit_hash"`
// When the commit was created
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Example run IDs associated with the commit
ExampleRunIDs []string `json:"example_run_ids" format:"uuid"`
// Author's full name
FullName string `json:"full_name"`
// The manifest of the commit
Manifest interface{} `json:"manifest"`
// The SHA of the manifest
ManifestSha []int64 `json:"manifest_sha"`
// Number of API downloads
NumDownloads int64 `json:"num_downloads"`
// Number of web views
NumViews int64 `json:"num_views"`
// The hash of the parent commit
ParentCommitHash string `json:"parent_commit_hash"`
// The ID of the parent commit
ParentID string `json:"parent_id" format:"uuid"`
// Repository ID
RepoID string `json:"repo_id" format:"uuid"`
// When the commit was last updated
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON commitWithLookupsJSON `json:"-"`
}
func (*CommitWithLookups) UnmarshalJSON ¶
func (r *CommitWithLookups) UnmarshalJSON(data []byte) (err error)
type CreateRepoResponse ¶
type CreateRepoResponse struct {
// All database fields for repos, plus helpful computed fields.
Repo RepoWithLookups `json:"repo" api:"required"`
JSON createRepoResponseJSON `json:"-"`
}
func (*CreateRepoResponse) UnmarshalJSON ¶
func (r *CreateRepoResponse) UnmarshalJSON(data []byte) (err error)
type CreateRunClusteringJobRequestModel ¶
type CreateRunClusteringJobRequestModel string
const ( CreateRunClusteringJobRequestModelOpenAI CreateRunClusteringJobRequestModel = "openai" CreateRunClusteringJobRequestModelAnthropic CreateRunClusteringJobRequestModel = "anthropic" )
func (CreateRunClusteringJobRequestModel) IsKnown ¶
func (r CreateRunClusteringJobRequestModel) IsKnown() bool
type CreateRunClusteringJobRequestParam ¶
type CreateRunClusteringJobRequestParam struct {
AttributeSchemas param.Field[map[string]interface{}] `json:"attribute_schemas"`
ClusterModel param.Field[string] `json:"cluster_model"`
ConfigID param.Field[string] `json:"config_id" format:"uuid"`
EndTime param.Field[time.Time] `json:"end_time" format:"date-time"`
Filter param.Field[string] `json:"filter"`
Hierarchy param.Field[[]int64] `json:"hierarchy"`
IsScheduled param.Field[bool] `json:"is_scheduled"`
LastNHours param.Field[int64] `json:"last_n_hours"`
Model param.Field[CreateRunClusteringJobRequestModel] `json:"model"`
Name param.Field[string] `json:"name"`
Partitions param.Field[map[string]string] `json:"partitions"`
Sample param.Field[float64] `json:"sample"`
StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
SummaryModel param.Field[string] `json:"summary_model"`
SummaryPrompt param.Field[string] `json:"summary_prompt"`
UserContext param.Field[map[string]string] `json:"user_context"`
ValidateModelSecrets param.Field[bool] `json:"validate_model_secrets"`
}
Request to create a run clustering job.
func (CreateRunClusteringJobRequestParam) MarshalJSON ¶
func (r CreateRunClusteringJobRequestParam) MarshalJSON() (data []byte, err error)
type CustomChartsSection ¶
type CustomChartsSection struct {
ID string `json:"id" api:"required" format:"uuid"`
Charts []CustomChartsSectionChart `json:"charts" api:"required"`
Title string `json:"title" api:"required"`
Description string `json:"description" api:"nullable"`
Index int64 `json:"index" api:"nullable"`
SessionID string `json:"session_id" api:"nullable" format:"uuid"`
SubSections []CustomChartsSectionSubSection `json:"sub_sections" api:"nullable"`
JSON customChartsSectionJSON `json:"-"`
}
func (*CustomChartsSection) UnmarshalJSON ¶
func (r *CustomChartsSection) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionChart ¶
type CustomChartsSectionChart struct {
ID string `json:"id" api:"required" format:"uuid"`
// Enum for custom chart types.
ChartType CustomChartsSectionChartsChartType `json:"chart_type" api:"required"`
Data []CustomChartsSectionChartsData `json:"data" api:"required"`
Index int64 `json:"index" api:"required"`
Series []CustomChartsSectionChartsSeries `json:"series" api:"required"`
Title string `json:"title" api:"required"`
CommonFilters CustomChartsSectionChartsCommonFilters `json:"common_filters" api:"nullable"`
Description string `json:"description" api:"nullable"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
JSON customChartsSectionChartJSON `json:"-"`
}
func (*CustomChartsSectionChart) UnmarshalJSON ¶
func (r *CustomChartsSectionChart) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionChartsChartType ¶
type CustomChartsSectionChartsChartType string
Enum for custom chart types.
const ( CustomChartsSectionChartsChartTypeLine CustomChartsSectionChartsChartType = "line" CustomChartsSectionChartsChartTypeBar CustomChartsSectionChartsChartType = "bar" )
func (CustomChartsSectionChartsChartType) IsKnown ¶
func (r CustomChartsSectionChartsChartType) IsKnown() bool
type CustomChartsSectionChartsCommonFilters ¶
type CustomChartsSectionChartsCommonFilters struct {
Filter string `json:"filter" api:"nullable"`
Session []string `json:"session" api:"nullable" format:"uuid"`
TraceFilter string `json:"trace_filter" api:"nullable"`
TreeFilter string `json:"tree_filter" api:"nullable"`
JSON customChartsSectionChartsCommonFiltersJSON `json:"-"`
}
func (*CustomChartsSectionChartsCommonFilters) UnmarshalJSON ¶
func (r *CustomChartsSectionChartsCommonFilters) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionChartsData ¶
type CustomChartsSectionChartsData struct {
SeriesID string `json:"series_id" api:"required"`
Timestamp time.Time `json:"timestamp" api:"required" format:"date-time"`
Value CustomChartsSectionChartsDataValueUnion `json:"value" api:"required,nullable"`
Group string `json:"group" api:"nullable"`
JSON customChartsSectionChartsDataJSON `json:"-"`
}
func (*CustomChartsSectionChartsData) UnmarshalJSON ¶
func (r *CustomChartsSectionChartsData) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionChartsDataValueMap ¶
type CustomChartsSectionChartsDataValueMap map[string]interface{}
func (CustomChartsSectionChartsDataValueMap) ImplementsCustomChartsSectionChartsDataValueUnion ¶
func (r CustomChartsSectionChartsDataValueMap) ImplementsCustomChartsSectionChartsDataValueUnion()
type CustomChartsSectionChartsDataValueUnion ¶
type CustomChartsSectionChartsDataValueUnion interface {
ImplementsCustomChartsSectionChartsDataValueUnion()
}
Union satisfied by shared.UnionFloat or CustomChartsSectionChartsDataValueMap.
type CustomChartsSectionChartsSeries ¶
type CustomChartsSectionChartsSeries struct {
ID string `json:"id" api:"required" format:"uuid"`
// Metrics you can chart. Feedback metrics are not available for
// organization-scoped charts.
Metric CustomChartsSectionChartsSeriesMetric `json:"metric" api:"required"`
Name string `json:"name" api:"required"`
FeedbackKey string `json:"feedback_key" api:"nullable"`
Filters CustomChartsSectionChartsSeriesFilters `json:"filters" api:"nullable"`
// Include additional information about where the group_by param was set.
GroupBy CustomChartsSectionChartsSeriesGroupBy `json:"group_by" api:"nullable"`
// LGP Metrics you can chart.
ProjectMetric CustomChartsSectionChartsSeriesProjectMetric `json:"project_metric" api:"nullable"`
WorkspaceID string `json:"workspace_id" api:"nullable" format:"uuid"`
JSON customChartsSectionChartsSeriesJSON `json:"-"`
}
func (*CustomChartsSectionChartsSeries) UnmarshalJSON ¶
func (r *CustomChartsSectionChartsSeries) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionChartsSeriesFilters ¶
type CustomChartsSectionChartsSeriesFilters struct {
Filter string `json:"filter" api:"nullable"`
Session []string `json:"session" api:"nullable" format:"uuid"`
TraceFilter string `json:"trace_filter" api:"nullable"`
TreeFilter string `json:"tree_filter" api:"nullable"`
JSON customChartsSectionChartsSeriesFiltersJSON `json:"-"`
}
func (*CustomChartsSectionChartsSeriesFilters) UnmarshalJSON ¶
func (r *CustomChartsSectionChartsSeriesFilters) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionChartsSeriesGroupBy ¶
type CustomChartsSectionChartsSeriesGroupBy struct {
Attribute CustomChartsSectionChartsSeriesGroupByAttribute `json:"attribute" api:"required"`
MaxGroups int64 `json:"max_groups"`
Path string `json:"path" api:"nullable"`
SetBy CustomChartsSectionChartsSeriesGroupBySetBy `json:"set_by" api:"nullable"`
JSON customChartsSectionChartsSeriesGroupByJSON `json:"-"`
}
Include additional information about where the group_by param was set.
func (*CustomChartsSectionChartsSeriesGroupBy) UnmarshalJSON ¶
func (r *CustomChartsSectionChartsSeriesGroupBy) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionChartsSeriesGroupByAttribute ¶
type CustomChartsSectionChartsSeriesGroupByAttribute string
const ( CustomChartsSectionChartsSeriesGroupByAttributeName CustomChartsSectionChartsSeriesGroupByAttribute = "name" CustomChartsSectionChartsSeriesGroupByAttributeRunType CustomChartsSectionChartsSeriesGroupByAttribute = "run_type" CustomChartsSectionChartsSeriesGroupByAttributeTag CustomChartsSectionChartsSeriesGroupByAttribute = "tag" CustomChartsSectionChartsSeriesGroupByAttributeMetadata CustomChartsSectionChartsSeriesGroupByAttribute = "metadata" )
func (CustomChartsSectionChartsSeriesGroupByAttribute) IsKnown ¶
func (r CustomChartsSectionChartsSeriesGroupByAttribute) IsKnown() bool
type CustomChartsSectionChartsSeriesGroupBySetBy ¶
type CustomChartsSectionChartsSeriesGroupBySetBy string
const ( CustomChartsSectionChartsSeriesGroupBySetBySection CustomChartsSectionChartsSeriesGroupBySetBy = "section" CustomChartsSectionChartsSeriesGroupBySetBySeries CustomChartsSectionChartsSeriesGroupBySetBy = "series" )
func (CustomChartsSectionChartsSeriesGroupBySetBy) IsKnown ¶
func (r CustomChartsSectionChartsSeriesGroupBySetBy) IsKnown() bool
type CustomChartsSectionChartsSeriesMetric ¶
type CustomChartsSectionChartsSeriesMetric string
Metrics you can chart. Feedback metrics are not available for organization-scoped charts.
const ( CustomChartsSectionChartsSeriesMetricRunCount CustomChartsSectionChartsSeriesMetric = "run_count" CustomChartsSectionChartsSeriesMetricLatencyP50 CustomChartsSectionChartsSeriesMetric = "latency_p50" CustomChartsSectionChartsSeriesMetricLatencyP99 CustomChartsSectionChartsSeriesMetric = "latency_p99" CustomChartsSectionChartsSeriesMetricLatencyAvg CustomChartsSectionChartsSeriesMetric = "latency_avg" CustomChartsSectionChartsSeriesMetricFirstTokenP50 CustomChartsSectionChartsSeriesMetric = "first_token_p50" CustomChartsSectionChartsSeriesMetricFirstTokenP99 CustomChartsSectionChartsSeriesMetric = "first_token_p99" CustomChartsSectionChartsSeriesMetricTotalTokens CustomChartsSectionChartsSeriesMetric = "total_tokens" CustomChartsSectionChartsSeriesMetricPromptTokens CustomChartsSectionChartsSeriesMetric = "prompt_tokens" CustomChartsSectionChartsSeriesMetricCompletionTokens CustomChartsSectionChartsSeriesMetric = "completion_tokens" CustomChartsSectionChartsSeriesMetricMedianTokens CustomChartsSectionChartsSeriesMetric = "median_tokens" CustomChartsSectionChartsSeriesMetricCompletionTokensP50 CustomChartsSectionChartsSeriesMetric = "completion_tokens_p50" CustomChartsSectionChartsSeriesMetricPromptTokensP50 CustomChartsSectionChartsSeriesMetric = "prompt_tokens_p50" CustomChartsSectionChartsSeriesMetricTokensP99 CustomChartsSectionChartsSeriesMetric = "tokens_p99" CustomChartsSectionChartsSeriesMetricCompletionTokensP99 CustomChartsSectionChartsSeriesMetric = "completion_tokens_p99" CustomChartsSectionChartsSeriesMetricPromptTokensP99 CustomChartsSectionChartsSeriesMetric = "prompt_tokens_p99" CustomChartsSectionChartsSeriesMetricFeedback CustomChartsSectionChartsSeriesMetric = "feedback" CustomChartsSectionChartsSeriesMetricFeedbackScoreAvg CustomChartsSectionChartsSeriesMetric = "feedback_score_avg" CustomChartsSectionChartsSeriesMetricFeedbackValues CustomChartsSectionChartsSeriesMetric = "feedback_values" CustomChartsSectionChartsSeriesMetricTotalCost CustomChartsSectionChartsSeriesMetric = "total_cost" CustomChartsSectionChartsSeriesMetricPromptCost CustomChartsSectionChartsSeriesMetric = "prompt_cost" CustomChartsSectionChartsSeriesMetricCompletionCost CustomChartsSectionChartsSeriesMetric = "completion_cost" CustomChartsSectionChartsSeriesMetricErrorRate CustomChartsSectionChartsSeriesMetric = "error_rate" CustomChartsSectionChartsSeriesMetricStreamingRate CustomChartsSectionChartsSeriesMetric = "streaming_rate" CustomChartsSectionChartsSeriesMetricCostP50 CustomChartsSectionChartsSeriesMetric = "cost_p50" CustomChartsSectionChartsSeriesMetricCostP99 CustomChartsSectionChartsSeriesMetric = "cost_p99" )
func (CustomChartsSectionChartsSeriesMetric) IsKnown ¶
func (r CustomChartsSectionChartsSeriesMetric) IsKnown() bool
type CustomChartsSectionChartsSeriesProjectMetric ¶
type CustomChartsSectionChartsSeriesProjectMetric string
LGP Metrics you can chart.
const ( CustomChartsSectionChartsSeriesProjectMetricMemoryUsage CustomChartsSectionChartsSeriesProjectMetric = "memory_usage" CustomChartsSectionChartsSeriesProjectMetricCPUUsage CustomChartsSectionChartsSeriesProjectMetric = "cpu_usage" CustomChartsSectionChartsSeriesProjectMetricDiskUsage CustomChartsSectionChartsSeriesProjectMetric = "disk_usage" CustomChartsSectionChartsSeriesProjectMetricRestartCount CustomChartsSectionChartsSeriesProjectMetric = "restart_count" CustomChartsSectionChartsSeriesProjectMetricReplicaCount CustomChartsSectionChartsSeriesProjectMetric = "replica_count" CustomChartsSectionChartsSeriesProjectMetricWorkerCount CustomChartsSectionChartsSeriesProjectMetric = "worker_count" CustomChartsSectionChartsSeriesProjectMetricLgRunCount CustomChartsSectionChartsSeriesProjectMetric = "lg_run_count" CustomChartsSectionChartsSeriesProjectMetricResponsesPerSecond CustomChartsSectionChartsSeriesProjectMetric = "responses_per_second" CustomChartsSectionChartsSeriesProjectMetricErrorResponsesPerSecond CustomChartsSectionChartsSeriesProjectMetric = "error_responses_per_second" CustomChartsSectionChartsSeriesProjectMetricP95Latency CustomChartsSectionChartsSeriesProjectMetric = "p95_latency" )
func (CustomChartsSectionChartsSeriesProjectMetric) IsKnown ¶
func (r CustomChartsSectionChartsSeriesProjectMetric) IsKnown() bool
type CustomChartsSectionRequestParam ¶
type CustomChartsSectionRequestParam struct {
EndTime param.Field[time.Time] `json:"end_time" format:"date-time"`
// Group by param for run stats.
GroupBy param.Field[RunStatsGroupByParam] `json:"group_by"`
OmitData param.Field[bool] `json:"omit_data"`
StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
// Timedelta input.
Stride param.Field[TimedeltaInputParam] `json:"stride"`
Timezone param.Field[string] `json:"timezone"`
}
func (CustomChartsSectionRequestParam) MarshalJSON ¶
func (r CustomChartsSectionRequestParam) MarshalJSON() (data []byte, err error)
type CustomChartsSectionSubSection ¶
type CustomChartsSectionSubSection struct {
ID string `json:"id" api:"required" format:"uuid"`
Charts []CustomChartsSectionSubSectionsChart `json:"charts" api:"required"`
Index int64 `json:"index" api:"required"`
Title string `json:"title" api:"required"`
Description string `json:"description" api:"nullable"`
JSON customChartsSectionSubSectionJSON `json:"-"`
}
func (*CustomChartsSectionSubSection) UnmarshalJSON ¶
func (r *CustomChartsSectionSubSection) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionSubSectionsChart ¶
type CustomChartsSectionSubSectionsChart struct {
ID string `json:"id" api:"required" format:"uuid"`
// Enum for custom chart types.
ChartType CustomChartsSectionSubSectionsChartsChartType `json:"chart_type" api:"required"`
Data []CustomChartsSectionSubSectionsChartsData `json:"data" api:"required"`
Index int64 `json:"index" api:"required"`
Series []CustomChartsSectionSubSectionsChartsSeries `json:"series" api:"required"`
Title string `json:"title" api:"required"`
CommonFilters CustomChartsSectionSubSectionsChartsCommonFilters `json:"common_filters" api:"nullable"`
Description string `json:"description" api:"nullable"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
JSON customChartsSectionSubSectionsChartJSON `json:"-"`
}
func (*CustomChartsSectionSubSectionsChart) UnmarshalJSON ¶
func (r *CustomChartsSectionSubSectionsChart) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionSubSectionsChartsChartType ¶
type CustomChartsSectionSubSectionsChartsChartType string
Enum for custom chart types.
const ( CustomChartsSectionSubSectionsChartsChartTypeLine CustomChartsSectionSubSectionsChartsChartType = "line" CustomChartsSectionSubSectionsChartsChartTypeBar CustomChartsSectionSubSectionsChartsChartType = "bar" )
func (CustomChartsSectionSubSectionsChartsChartType) IsKnown ¶
func (r CustomChartsSectionSubSectionsChartsChartType) IsKnown() bool
type CustomChartsSectionSubSectionsChartsCommonFilters ¶
type CustomChartsSectionSubSectionsChartsCommonFilters struct {
Filter string `json:"filter" api:"nullable"`
Session []string `json:"session" api:"nullable" format:"uuid"`
TraceFilter string `json:"trace_filter" api:"nullable"`
TreeFilter string `json:"tree_filter" api:"nullable"`
JSON customChartsSectionSubSectionsChartsCommonFiltersJSON `json:"-"`
}
func (*CustomChartsSectionSubSectionsChartsCommonFilters) UnmarshalJSON ¶
func (r *CustomChartsSectionSubSectionsChartsCommonFilters) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionSubSectionsChartsData ¶
type CustomChartsSectionSubSectionsChartsData struct {
SeriesID string `json:"series_id" api:"required"`
Timestamp time.Time `json:"timestamp" api:"required" format:"date-time"`
Value CustomChartsSectionSubSectionsChartsDataValueUnion `json:"value" api:"required,nullable"`
Group string `json:"group" api:"nullable"`
JSON customChartsSectionSubSectionsChartsDataJSON `json:"-"`
}
func (*CustomChartsSectionSubSectionsChartsData) UnmarshalJSON ¶
func (r *CustomChartsSectionSubSectionsChartsData) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionSubSectionsChartsDataValueMap ¶
type CustomChartsSectionSubSectionsChartsDataValueMap map[string]interface{}
func (CustomChartsSectionSubSectionsChartsDataValueMap) ImplementsCustomChartsSectionSubSectionsChartsDataValueUnion ¶
func (r CustomChartsSectionSubSectionsChartsDataValueMap) ImplementsCustomChartsSectionSubSectionsChartsDataValueUnion()
type CustomChartsSectionSubSectionsChartsDataValueUnion ¶
type CustomChartsSectionSubSectionsChartsDataValueUnion interface {
ImplementsCustomChartsSectionSubSectionsChartsDataValueUnion()
}
Union satisfied by shared.UnionFloat or CustomChartsSectionSubSectionsChartsDataValueMap.
type CustomChartsSectionSubSectionsChartsSeries ¶
type CustomChartsSectionSubSectionsChartsSeries struct {
ID string `json:"id" api:"required" format:"uuid"`
// Metrics you can chart. Feedback metrics are not available for
// organization-scoped charts.
Metric CustomChartsSectionSubSectionsChartsSeriesMetric `json:"metric" api:"required"`
Name string `json:"name" api:"required"`
FeedbackKey string `json:"feedback_key" api:"nullable"`
Filters CustomChartsSectionSubSectionsChartsSeriesFilters `json:"filters" api:"nullable"`
// Include additional information about where the group_by param was set.
GroupBy CustomChartsSectionSubSectionsChartsSeriesGroupBy `json:"group_by" api:"nullable"`
// LGP Metrics you can chart.
ProjectMetric CustomChartsSectionSubSectionsChartsSeriesProjectMetric `json:"project_metric" api:"nullable"`
WorkspaceID string `json:"workspace_id" api:"nullable" format:"uuid"`
JSON customChartsSectionSubSectionsChartsSeriesJSON `json:"-"`
}
func (*CustomChartsSectionSubSectionsChartsSeries) UnmarshalJSON ¶
func (r *CustomChartsSectionSubSectionsChartsSeries) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionSubSectionsChartsSeriesFilters ¶
type CustomChartsSectionSubSectionsChartsSeriesFilters struct {
Filter string `json:"filter" api:"nullable"`
Session []string `json:"session" api:"nullable" format:"uuid"`
TraceFilter string `json:"trace_filter" api:"nullable"`
TreeFilter string `json:"tree_filter" api:"nullable"`
JSON customChartsSectionSubSectionsChartsSeriesFiltersJSON `json:"-"`
}
func (*CustomChartsSectionSubSectionsChartsSeriesFilters) UnmarshalJSON ¶
func (r *CustomChartsSectionSubSectionsChartsSeriesFilters) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionSubSectionsChartsSeriesGroupBy ¶
type CustomChartsSectionSubSectionsChartsSeriesGroupBy struct {
Attribute CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute `json:"attribute" api:"required"`
MaxGroups int64 `json:"max_groups"`
Path string `json:"path" api:"nullable"`
SetBy CustomChartsSectionSubSectionsChartsSeriesGroupBySetBy `json:"set_by" api:"nullable"`
JSON customChartsSectionSubSectionsChartsSeriesGroupByJSON `json:"-"`
}
Include additional information about where the group_by param was set.
func (*CustomChartsSectionSubSectionsChartsSeriesGroupBy) UnmarshalJSON ¶
func (r *CustomChartsSectionSubSectionsChartsSeriesGroupBy) UnmarshalJSON(data []byte) (err error)
type CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute ¶
type CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute string
const ( CustomChartsSectionSubSectionsChartsSeriesGroupByAttributeName CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute = "name" CustomChartsSectionSubSectionsChartsSeriesGroupByAttributeRunType CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute = "run_type" CustomChartsSectionSubSectionsChartsSeriesGroupByAttributeTag CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute = "tag" CustomChartsSectionSubSectionsChartsSeriesGroupByAttributeMetadata CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute = "metadata" )
func (CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute) IsKnown ¶
func (r CustomChartsSectionSubSectionsChartsSeriesGroupByAttribute) IsKnown() bool
type CustomChartsSectionSubSectionsChartsSeriesGroupBySetBy ¶
type CustomChartsSectionSubSectionsChartsSeriesGroupBySetBy string
const ( CustomChartsSectionSubSectionsChartsSeriesGroupBySetBySection CustomChartsSectionSubSectionsChartsSeriesGroupBySetBy = "section" CustomChartsSectionSubSectionsChartsSeriesGroupBySetBySeries CustomChartsSectionSubSectionsChartsSeriesGroupBySetBy = "series" )
func (CustomChartsSectionSubSectionsChartsSeriesGroupBySetBy) IsKnown ¶
func (r CustomChartsSectionSubSectionsChartsSeriesGroupBySetBy) IsKnown() bool
type CustomChartsSectionSubSectionsChartsSeriesMetric ¶
type CustomChartsSectionSubSectionsChartsSeriesMetric string
Metrics you can chart. Feedback metrics are not available for organization-scoped charts.
const ( CustomChartsSectionSubSectionsChartsSeriesMetricRunCount CustomChartsSectionSubSectionsChartsSeriesMetric = "run_count" CustomChartsSectionSubSectionsChartsSeriesMetricLatencyP50 CustomChartsSectionSubSectionsChartsSeriesMetric = "latency_p50" CustomChartsSectionSubSectionsChartsSeriesMetricLatencyP99 CustomChartsSectionSubSectionsChartsSeriesMetric = "latency_p99" CustomChartsSectionSubSectionsChartsSeriesMetricLatencyAvg CustomChartsSectionSubSectionsChartsSeriesMetric = "latency_avg" CustomChartsSectionSubSectionsChartsSeriesMetricFirstTokenP50 CustomChartsSectionSubSectionsChartsSeriesMetric = "first_token_p50" CustomChartsSectionSubSectionsChartsSeriesMetricFirstTokenP99 CustomChartsSectionSubSectionsChartsSeriesMetric = "first_token_p99" CustomChartsSectionSubSectionsChartsSeriesMetricTotalTokens CustomChartsSectionSubSectionsChartsSeriesMetric = "total_tokens" CustomChartsSectionSubSectionsChartsSeriesMetricPromptTokens CustomChartsSectionSubSectionsChartsSeriesMetric = "prompt_tokens" CustomChartsSectionSubSectionsChartsSeriesMetricCompletionTokens CustomChartsSectionSubSectionsChartsSeriesMetric = "completion_tokens" CustomChartsSectionSubSectionsChartsSeriesMetricMedianTokens CustomChartsSectionSubSectionsChartsSeriesMetric = "median_tokens" CustomChartsSectionSubSectionsChartsSeriesMetricCompletionTokensP50 CustomChartsSectionSubSectionsChartsSeriesMetric = "completion_tokens_p50" CustomChartsSectionSubSectionsChartsSeriesMetricPromptTokensP50 CustomChartsSectionSubSectionsChartsSeriesMetric = "prompt_tokens_p50" CustomChartsSectionSubSectionsChartsSeriesMetricTokensP99 CustomChartsSectionSubSectionsChartsSeriesMetric = "tokens_p99" CustomChartsSectionSubSectionsChartsSeriesMetricCompletionTokensP99 CustomChartsSectionSubSectionsChartsSeriesMetric = "completion_tokens_p99" CustomChartsSectionSubSectionsChartsSeriesMetricPromptTokensP99 CustomChartsSectionSubSectionsChartsSeriesMetric = "prompt_tokens_p99" CustomChartsSectionSubSectionsChartsSeriesMetricFeedback CustomChartsSectionSubSectionsChartsSeriesMetric = "feedback" CustomChartsSectionSubSectionsChartsSeriesMetricFeedbackScoreAvg CustomChartsSectionSubSectionsChartsSeriesMetric = "feedback_score_avg" CustomChartsSectionSubSectionsChartsSeriesMetricFeedbackValues CustomChartsSectionSubSectionsChartsSeriesMetric = "feedback_values" CustomChartsSectionSubSectionsChartsSeriesMetricTotalCost CustomChartsSectionSubSectionsChartsSeriesMetric = "total_cost" CustomChartsSectionSubSectionsChartsSeriesMetricPromptCost CustomChartsSectionSubSectionsChartsSeriesMetric = "prompt_cost" CustomChartsSectionSubSectionsChartsSeriesMetricCompletionCost CustomChartsSectionSubSectionsChartsSeriesMetric = "completion_cost" CustomChartsSectionSubSectionsChartsSeriesMetricErrorRate CustomChartsSectionSubSectionsChartsSeriesMetric = "error_rate" CustomChartsSectionSubSectionsChartsSeriesMetricStreamingRate CustomChartsSectionSubSectionsChartsSeriesMetric = "streaming_rate" CustomChartsSectionSubSectionsChartsSeriesMetricCostP50 CustomChartsSectionSubSectionsChartsSeriesMetric = "cost_p50" CustomChartsSectionSubSectionsChartsSeriesMetricCostP99 CustomChartsSectionSubSectionsChartsSeriesMetric = "cost_p99" )
func (CustomChartsSectionSubSectionsChartsSeriesMetric) IsKnown ¶
func (r CustomChartsSectionSubSectionsChartsSeriesMetric) IsKnown() bool
type CustomChartsSectionSubSectionsChartsSeriesProjectMetric ¶
type CustomChartsSectionSubSectionsChartsSeriesProjectMetric string
LGP Metrics you can chart.
const ( CustomChartsSectionSubSectionsChartsSeriesProjectMetricMemoryUsage CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "memory_usage" CustomChartsSectionSubSectionsChartsSeriesProjectMetricCPUUsage CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "cpu_usage" CustomChartsSectionSubSectionsChartsSeriesProjectMetricDiskUsage CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "disk_usage" CustomChartsSectionSubSectionsChartsSeriesProjectMetricRestartCount CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "restart_count" CustomChartsSectionSubSectionsChartsSeriesProjectMetricReplicaCount CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "replica_count" CustomChartsSectionSubSectionsChartsSeriesProjectMetricWorkerCount CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "worker_count" CustomChartsSectionSubSectionsChartsSeriesProjectMetricLgRunCount CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "lg_run_count" CustomChartsSectionSubSectionsChartsSeriesProjectMetricResponsesPerSecond CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "responses_per_second" CustomChartsSectionSubSectionsChartsSeriesProjectMetricErrorResponsesPerSecond CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "error_responses_per_second" CustomChartsSectionSubSectionsChartsSeriesProjectMetricP95Latency CustomChartsSectionSubSectionsChartsSeriesProjectMetric = "p95_latency" )
func (CustomChartsSectionSubSectionsChartsSeriesProjectMetric) IsKnown ¶
func (r CustomChartsSectionSubSectionsChartsSeriesProjectMetric) IsKnown() bool
type Dataset ¶
type Dataset struct {
ID string `json:"id" api:"required" format:"uuid"`
ModifiedAt time.Time `json:"modified_at" api:"required" format:"date-time"`
Name string `json:"name" api:"required"`
SessionCount int64 `json:"session_count" api:"required"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
BaselineExperimentID string `json:"baseline_experiment_id" api:"nullable" format:"uuid"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Enum for dataset data types.
DataType DataType `json:"data_type" api:"nullable"`
Description string `json:"description" api:"nullable"`
ExampleCount int64 `json:"example_count" api:"nullable"`
ExternallyManaged bool `json:"externally_managed" api:"nullable"`
InputsSchemaDefinition map[string]interface{} `json:"inputs_schema_definition" api:"nullable"`
LastSessionStartTime time.Time `json:"last_session_start_time" api:"nullable" format:"date-time"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
OutputsSchemaDefinition map[string]interface{} `json:"outputs_schema_definition" api:"nullable"`
Transformations []DatasetTransformation `json:"transformations" api:"nullable"`
JSON datasetJSON `json:"-"`
}
Dataset schema.
func (*Dataset) UnmarshalJSON ¶
type DatasetCloneParams ¶
type DatasetCloneParams struct {
SourceDatasetID param.Field[string] `json:"source_dataset_id" api:"required" format:"uuid"`
TargetDatasetID param.Field[string] `json:"target_dataset_id" api:"required" format:"uuid"`
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[DatasetCloneParamsAsOfUnion] `json:"as_of" format:"date-time"`
Examples param.Field[[]string] `json:"examples" format:"uuid"`
Split param.Field[DatasetCloneParamsSplitUnion] `json:"split"`
}
func (DatasetCloneParams) MarshalJSON ¶
func (r DatasetCloneParams) MarshalJSON() (data []byte, err error)
type DatasetCloneParamsAsOfUnion ¶
type DatasetCloneParamsAsOfUnion interface {
ImplementsDatasetCloneParamsAsOfUnion()
}
Only modifications made on or before this time are included. If None, the latest version of the dataset is used.
Satisfied by shared.UnionTime, shared.UnionString.
type DatasetCloneParamsSplitArray ¶
type DatasetCloneParamsSplitArray []string
func (DatasetCloneParamsSplitArray) ImplementsDatasetCloneParamsSplitUnion ¶
func (r DatasetCloneParamsSplitArray) ImplementsDatasetCloneParamsSplitUnion()
type DatasetCloneParamsSplitUnion ¶
type DatasetCloneParamsSplitUnion interface {
ImplementsDatasetCloneParamsSplitUnion()
}
Satisfied by shared.UnionString, DatasetCloneParamsSplitArray.
type DatasetCloneResponse ¶
type DatasetCloneResponse map[string]interface{}
type DatasetComparativeDeleteResponse ¶
type DatasetComparativeDeleteResponse = interface{}
type DatasetComparativeNewParams ¶
type DatasetComparativeNewParams struct {
ExperimentIDs param.Field[[]string] `json:"experiment_ids" api:"required" format:"uuid"`
ID param.Field[string] `json:"id" format:"uuid"`
CreatedAt param.Field[time.Time] `json:"created_at" format:"date-time"`
Description param.Field[string] `json:"description"`
Extra param.Field[map[string]interface{}] `json:"extra"`
ModifiedAt param.Field[time.Time] `json:"modified_at" format:"date-time"`
Name param.Field[string] `json:"name"`
ReferenceDatasetID param.Field[string] `json:"reference_dataset_id" format:"uuid"`
}
func (DatasetComparativeNewParams) MarshalJSON ¶
func (r DatasetComparativeNewParams) MarshalJSON() (data []byte, err error)
type DatasetComparativeNewResponse ¶
type DatasetComparativeNewResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
ModifiedAt time.Time `json:"modified_at" api:"required" format:"date-time"`
ReferenceDatasetID string `json:"reference_dataset_id" api:"required" format:"uuid"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
Description string `json:"description" api:"nullable"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
Name string `json:"name" api:"nullable"`
JSON datasetComparativeNewResponseJSON `json:"-"`
}
ComparativeExperiment schema.
func (*DatasetComparativeNewResponse) UnmarshalJSON ¶
func (r *DatasetComparativeNewResponse) UnmarshalJSON(data []byte) (err error)
type DatasetComparativeService ¶
type DatasetComparativeService struct {
Options []option.RequestOption
}
DatasetComparativeService contains methods and other services that help with interacting with the langChain 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 NewDatasetComparativeService method instead.
func NewDatasetComparativeService ¶
func NewDatasetComparativeService(opts ...option.RequestOption) (r *DatasetComparativeService)
NewDatasetComparativeService 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 (*DatasetComparativeService) Delete ¶
func (r *DatasetComparativeService) Delete(ctx context.Context, comparativeExperimentID string, opts ...option.RequestOption) (res *DatasetComparativeDeleteResponse, err error)
Delete a specific comparative experiment.
func (*DatasetComparativeService) New ¶
func (r *DatasetComparativeService) New(ctx context.Context, body DatasetComparativeNewParams, opts ...option.RequestOption) (res *DatasetComparativeNewResponse, err error)
Create a comparative experiment.
type DatasetDeleteResponse ¶
type DatasetDeleteResponse = interface{}
type DatasetExperimentGroupedParams ¶
type DatasetExperimentGroupedParams struct {
MetadataKeys param.Field[[]string] `json:"metadata_keys" api:"required"`
DatasetVersion param.Field[string] `json:"dataset_version"`
ExperimentLimit param.Field[int64] `json:"experiment_limit"`
Filter param.Field[string] `json:"filter"`
NameContains param.Field[string] `json:"name_contains"`
StatsStartTime param.Field[time.Time] `json:"stats_start_time" format:"date-time"`
TagValueID param.Field[[]string] `json:"tag_value_id" format:"uuid"`
UseApproxStats param.Field[bool] `json:"use_approx_stats"`
}
func (DatasetExperimentGroupedParams) MarshalJSON ¶
func (r DatasetExperimentGroupedParams) MarshalJSON() (data []byte, err error)
type DatasetExperimentGroupedResponse ¶
type DatasetExperimentGroupedResponse = interface{}
type DatasetExperimentService ¶
type DatasetExperimentService struct {
Options []option.RequestOption
}
DatasetExperimentService contains methods and other services that help with interacting with the langChain 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 NewDatasetExperimentService method instead.
func NewDatasetExperimentService ¶
func NewDatasetExperimentService(opts ...option.RequestOption) (r *DatasetExperimentService)
NewDatasetExperimentService 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 (*DatasetExperimentService) Grouped ¶
func (r *DatasetExperimentService) Grouped(ctx context.Context, datasetID string, body DatasetExperimentGroupedParams, opts ...option.RequestOption) (res *DatasetExperimentGroupedResponse, err error)
Stream grouped and aggregated experiments.
type DatasetGetCsvParams ¶
type DatasetGetCsvParams struct {
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[time.Time] `query:"as_of" format:"date-time"`
}
func (DatasetGetCsvParams) URLQuery ¶
func (r DatasetGetCsvParams) URLQuery() (v url.Values)
URLQuery serializes DatasetGetCsvParams's query parameters as `url.Values`.
type DatasetGetCsvResponse ¶
type DatasetGetCsvResponse = interface{}
type DatasetGetJSONLParams ¶
type DatasetGetJSONLParams struct {
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[time.Time] `query:"as_of" format:"date-time"`
}
func (DatasetGetJSONLParams) URLQuery ¶
func (r DatasetGetJSONLParams) URLQuery() (v url.Values)
URLQuery serializes DatasetGetJSONLParams's query parameters as `url.Values`.
type DatasetGetJSONLResponse ¶
type DatasetGetJSONLResponse = interface{}
type DatasetGetOpenAIFtParams ¶
type DatasetGetOpenAIFtParams struct {
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[time.Time] `query:"as_of" format:"date-time"`
}
func (DatasetGetOpenAIFtParams) URLQuery ¶
func (r DatasetGetOpenAIFtParams) URLQuery() (v url.Values)
URLQuery serializes DatasetGetOpenAIFtParams's query parameters as `url.Values`.
type DatasetGetOpenAIFtResponse ¶
type DatasetGetOpenAIFtResponse = interface{}
type DatasetGetOpenAIParams ¶
type DatasetGetOpenAIParams struct {
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[time.Time] `query:"as_of" format:"date-time"`
}
func (DatasetGetOpenAIParams) URLQuery ¶
func (r DatasetGetOpenAIParams) URLQuery() (v url.Values)
URLQuery serializes DatasetGetOpenAIParams's query parameters as `url.Values`.
type DatasetGetOpenAIResponse ¶
type DatasetGetOpenAIResponse = interface{}
type DatasetGetVersionParams ¶
type DatasetGetVersionParams struct {
AsOf param.Field[time.Time] `query:"as_of" format:"date-time"`
Tag param.Field[string] `query:"tag"`
}
func (DatasetGetVersionParams) URLQuery ¶
func (r DatasetGetVersionParams) URLQuery() (v url.Values)
URLQuery serializes DatasetGetVersionParams's query parameters as `url.Values`.
type DatasetGroupRunsParams ¶
type DatasetGroupRunsParams struct {
GroupBy param.Field[DatasetGroupRunsParamsGroupBy] `json:"group_by" api:"required"`
MetadataKey param.Field[string] `json:"metadata_key" api:"required"`
SessionIDs param.Field[[]string] `json:"session_ids" api:"required" format:"uuid"`
Filters param.Field[map[string][]string] `json:"filters"`
Limit param.Field[int64] `json:"limit"`
Offset param.Field[int64] `json:"offset"`
PerGroupLimit param.Field[int64] `json:"per_group_limit"`
Preview param.Field[bool] `json:"preview"`
}
func (DatasetGroupRunsParams) MarshalJSON ¶
func (r DatasetGroupRunsParams) MarshalJSON() (data []byte, err error)
type DatasetGroupRunsParamsGroupBy ¶
type DatasetGroupRunsParamsGroupBy string
const ( DatasetGroupRunsParamsGroupByRunMetadata DatasetGroupRunsParamsGroupBy = "run_metadata" DatasetGroupRunsParamsGroupByExampleMetadata DatasetGroupRunsParamsGroupBy = "example_metadata" )
func (DatasetGroupRunsParamsGroupBy) IsKnown ¶
func (r DatasetGroupRunsParamsGroupBy) IsKnown() bool
type DatasetGroupRunsResponse ¶
type DatasetGroupRunsResponse struct {
Groups []DatasetGroupRunsResponseGroup `json:"groups" api:"required"`
JSON datasetGroupRunsResponseJSON `json:"-"`
}
Response for grouped comparison view of dataset examples.
Returns dataset examples grouped by a run metadata value (e.g., model='gpt-4'). Optional filters are applied to all runs before grouping.
Shows:
- Which examples were executed with each metadata value - Per-session aggregate statistics for runs on those examples - The actual example data with their associated runs
Used for comparing how different sessions performed on the same set of examples.
func (*DatasetGroupRunsResponse) UnmarshalJSON ¶
func (r *DatasetGroupRunsResponse) UnmarshalJSON(data []byte) (err error)
type DatasetGroupRunsResponseGroup ¶
type DatasetGroupRunsResponseGroup struct {
ExampleCount int64 `json:"example_count" api:"required"`
Examples []ExampleWithRunsCh `json:"examples" api:"required"`
Filter string `json:"filter" api:"required"`
GroupKey DatasetGroupRunsResponseGroupsGroupKeyUnion `json:"group_key" api:"required"`
Sessions []DatasetGroupRunsResponseGroupsSession `json:"sessions" api:"required"`
CompletionCost string `json:"completion_cost" api:"nullable"`
CompletionTokens int64 `json:"completion_tokens" api:"nullable"`
Count int64 `json:"count" api:"nullable"`
ErrorRate float64 `json:"error_rate" api:"nullable"`
FeedbackStats map[string]interface{} `json:"feedback_stats" api:"nullable"`
LatencyP50 float64 `json:"latency_p50" api:"nullable"`
LatencyP99 float64 `json:"latency_p99" api:"nullable"`
MaxStartTime time.Time `json:"max_start_time" api:"nullable" format:"date-time"`
MinStartTime time.Time `json:"min_start_time" api:"nullable" format:"date-time"`
PromptCost string `json:"prompt_cost" api:"nullable"`
PromptTokens int64 `json:"prompt_tokens" api:"nullable"`
TotalCost string `json:"total_cost" api:"nullable"`
TotalTokens int64 `json:"total_tokens" api:"nullable"`
JSON datasetGroupRunsResponseGroupJSON `json:"-"`
}
Group of examples with a specific metadata value across multiple sessions.
Extends RunGroupBase with:
- group_key: metadata value that defines this group
- sessions: per-session stats for runs matching this metadata value
- examples: shared examples across all sessions (intersection logic) with flat array of runs (each run has session_id field for frontend to determine column)
- example_count: unique example count (pagination-aware, same across all sessions due to intersection)
Inherited from RunGroupBase:
- filter: metadata filter for this group (e.g., "and(eq(is_root, true), and(eq(metadata_key, 'model'), eq(metadata_value, 'gpt-4')))")
- count: total run count across all sessions (includes duplicate runs)
- total_tokens, total_cost: aggregate across sessions
- min_start_time, max_start_time: time range across sessions
- latency_p50, latency_p99: aggregate latency stats across sessions
- feedback_stats: weighted average feedback across sessions
Additional aggregate stats:
- prompt_tokens, completion_tokens: separate token counts - prompt_cost, completion_cost: separate costs - error_rate: average error rate
func (*DatasetGroupRunsResponseGroup) UnmarshalJSON ¶
func (r *DatasetGroupRunsResponseGroup) UnmarshalJSON(data []byte) (err error)
type DatasetGroupRunsResponseGroupsGroupKeyUnion ¶
type DatasetGroupRunsResponseGroupsGroupKeyUnion interface {
ImplementsDatasetGroupRunsResponseGroupsGroupKeyUnion()
}
Union satisfied by shared.UnionString or shared.UnionFloat.
type DatasetGroupRunsResponseGroupsSession ¶
type DatasetGroupRunsResponseGroupsSession struct {
ID string `json:"id" api:"required" format:"uuid"`
Filter string `json:"filter" api:"required"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
CompletionCost string `json:"completion_cost" api:"nullable"`
CompletionTokens int64 `json:"completion_tokens" api:"nullable"`
DefaultDatasetID string `json:"default_dataset_id" api:"nullable" format:"uuid"`
Description string `json:"description" api:"nullable"`
EndTime time.Time `json:"end_time" api:"nullable" format:"date-time"`
ErrorRate float64 `json:"error_rate" api:"nullable"`
ExampleCount int64 `json:"example_count" api:"nullable"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
FeedbackStats map[string]interface{} `json:"feedback_stats" api:"nullable"`
FirstTokenP50 float64 `json:"first_token_p50" api:"nullable"`
FirstTokenP99 float64 `json:"first_token_p99" api:"nullable"`
LastRunStartTime time.Time `json:"last_run_start_time" api:"nullable" format:"date-time"`
LastRunStartTimeLive time.Time `json:"last_run_start_time_live" api:"nullable" format:"date-time"`
LatencyP50 float64 `json:"latency_p50" api:"nullable"`
LatencyP99 float64 `json:"latency_p99" api:"nullable"`
MaxStartTime time.Time `json:"max_start_time" api:"nullable" format:"date-time"`
MinStartTime time.Time `json:"min_start_time" api:"nullable" format:"date-time"`
Name string `json:"name"`
PromptCost string `json:"prompt_cost" api:"nullable"`
PromptTokens int64 `json:"prompt_tokens" api:"nullable"`
ReferenceDatasetID string `json:"reference_dataset_id" api:"nullable" format:"uuid"`
RunCount int64 `json:"run_count" api:"nullable"`
RunFacets []map[string]interface{} `json:"run_facets" api:"nullable"`
SessionFeedbackStats map[string]interface{} `json:"session_feedback_stats" api:"nullable"`
StartTime time.Time `json:"start_time" format:"date-time"`
StreamingRate float64 `json:"streaming_rate" api:"nullable"`
TestRunNumber int64 `json:"test_run_number" api:"nullable"`
TotalCost string `json:"total_cost" api:"nullable"`
TotalTokens int64 `json:"total_tokens" api:"nullable"`
TraceTier DatasetGroupRunsResponseGroupsSessionsTraceTier `json:"trace_tier" api:"nullable"`
JSON datasetGroupRunsResponseGroupsSessionJSON `json:"-"`
}
TracerSession stats filtered to runs matching a specific metadata value.
Extends TracerSession with:
- example_count: unique examples (vs run_count = total runs including duplicates)
- filter: ClickHouse filter for fetching runs in this session/group
- min/max_start_time: time range for runs in this session/group
func (*DatasetGroupRunsResponseGroupsSession) UnmarshalJSON ¶
func (r *DatasetGroupRunsResponseGroupsSession) UnmarshalJSON(data []byte) (err error)
type DatasetGroupRunsResponseGroupsSessionsTraceTier ¶
type DatasetGroupRunsResponseGroupsSessionsTraceTier string
const ( DatasetGroupRunsResponseGroupsSessionsTraceTierLonglived DatasetGroupRunsResponseGroupsSessionsTraceTier = "longlived" DatasetGroupRunsResponseGroupsSessionsTraceTierShortlived DatasetGroupRunsResponseGroupsSessionsTraceTier = "shortlived" )
func (DatasetGroupRunsResponseGroupsSessionsTraceTier) IsKnown ¶
func (r DatasetGroupRunsResponseGroupsSessionsTraceTier) IsKnown() bool
type DatasetGroupService ¶
type DatasetGroupService struct {
Options []option.RequestOption
}
DatasetGroupService contains methods and other services that help with interacting with the langChain 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 NewDatasetGroupService method instead.
func NewDatasetGroupService ¶
func NewDatasetGroupService(opts ...option.RequestOption) (r *DatasetGroupService)
NewDatasetGroupService 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 (*DatasetGroupService) Runs ¶
func (r *DatasetGroupService) Runs(ctx context.Context, datasetID string, body DatasetGroupRunsParams, opts ...option.RequestOption) (res *DatasetGroupRunsResponse, err error)
Fetch examples for a dataset, and fetch the runs for each example if they are associated with the given session_ids.
type DatasetListParams ¶
type DatasetListParams struct {
ID param.Field[[]string] `query:"id" format:"uuid"`
// Enum for dataset data types.
Datatype param.Field[DatasetListParamsDataTypeUnion] `query:"data_type"`
Exclude param.Field[[]DatasetListParamsExclude] `query:"exclude"`
ExcludeCorrectionsDatasets param.Field[bool] `query:"exclude_corrections_datasets"`
Limit param.Field[int64] `query:"limit"`
Metadata param.Field[string] `query:"metadata"`
Name param.Field[string] `query:"name"`
NameContains param.Field[string] `query:"name_contains"`
Offset param.Field[int64] `query:"offset"`
// Enum for available dataset columns to sort by.
SortBy param.Field[SortByDatasetColumn] `query:"sort_by"`
SortByDesc param.Field[bool] `query:"sort_by_desc"`
TagValueID param.Field[[]string] `query:"tag_value_id" format:"uuid"`
}
func (DatasetListParams) URLQuery ¶
func (r DatasetListParams) URLQuery() (v url.Values)
URLQuery serializes DatasetListParams's query parameters as `url.Values`.
type DatasetListParamsDataTypeArray ¶
type DatasetListParamsDataTypeArray []DataType
type DatasetListParamsDataTypeUnion ¶
type DatasetListParamsDataTypeUnion interface {
// contains filtered or unexported methods
}
Enum for dataset data types.
Satisfied by DatasetListParamsDataTypeArray, DataType.
type DatasetListParamsExclude ¶
type DatasetListParamsExclude string
const (
DatasetListParamsExcludeExampleCount DatasetListParamsExclude = "example_count"
)
func (DatasetListParamsExclude) IsKnown ¶
func (r DatasetListParamsExclude) IsKnown() bool
type DatasetNewParams ¶
type DatasetNewParams struct {
Name param.Field[string] `json:"name" api:"required"`
ID param.Field[string] `json:"id" format:"uuid"`
CreatedAt param.Field[time.Time] `json:"created_at" format:"date-time"`
// Enum for dataset data types.
DataType param.Field[DataType] `json:"data_type"`
Description param.Field[string] `json:"description"`
ExternallyManaged param.Field[bool] `json:"externally_managed"`
Extra param.Field[map[string]interface{}] `json:"extra"`
InputsSchemaDefinition param.Field[map[string]interface{}] `json:"inputs_schema_definition"`
OutputsSchemaDefinition param.Field[map[string]interface{}] `json:"outputs_schema_definition"`
Transformations param.Field[[]DatasetTransformationParam] `json:"transformations"`
}
func (DatasetNewParams) MarshalJSON ¶
func (r DatasetNewParams) MarshalJSON() (data []byte, err error)
type DatasetPlaygroundExperimentBatchParams ¶
type DatasetPlaygroundExperimentBatchParams struct {
DatasetID param.Field[string] `json:"dataset_id" api:"required" format:"uuid"`
Manifest param.Field[interface{}] `json:"manifest" api:"required"`
// Configuration for a `Runnable`.
//
// !!! note Custom values
//
// The `TypedDict` has `total=False` set intentionally to:
//
// - Allow partial configs to be created and merged together via `merge_configs`
// - Support config propagation from parent to child runnables via
// `var_child_runnable_config` (a `ContextVar` that automatically passes
// config down the call stack without explicit parameter passing), where
// configs are merged rather than replaced
//
// !!! example
//
// “`python
// # Parent sets tags
// chain.invoke(input, config={"tags": ["parent"]})
// # Child automatically inherits and can add:
// # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
// “`
Options param.Field[RunnableConfigParam] `json:"options" api:"required"`
ProjectName param.Field[string] `json:"project_name" api:"required"`
Secrets param.Field[map[string]string] `json:"secrets" api:"required"`
BatchSize param.Field[int64] `json:"batch_size"`
Commit param.Field[string] `json:"commit"`
DatasetSplits param.Field[[]string] `json:"dataset_splits"`
EvaluatorRules param.Field[[]string] `json:"evaluator_rules" format:"uuid"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Owner param.Field[string] `json:"owner"`
ParallelToolCalls param.Field[bool] `json:"parallel_tool_calls"`
Repetitions param.Field[int64] `json:"repetitions"`
RepoHandle param.Field[string] `json:"repo_handle"`
RepoID param.Field[string] `json:"repo_id"`
RequestsPerSecond param.Field[int64] `json:"requests_per_second"`
RunID param.Field[string] `json:"run_id"`
RunnerContext param.Field[RunnerContextEnum] `json:"runner_context"`
ToolChoice param.Field[string] `json:"tool_choice"`
Tools param.Field[[]interface{}] `json:"tools"`
UseOrFallbackToWorkspaceSecrets param.Field[bool] `json:"use_or_fallback_to_workspace_secrets"`
}
func (DatasetPlaygroundExperimentBatchParams) MarshalJSON ¶
func (r DatasetPlaygroundExperimentBatchParams) MarshalJSON() (data []byte, err error)
type DatasetPlaygroundExperimentBatchResponse ¶
type DatasetPlaygroundExperimentBatchResponse = interface{}
type DatasetPlaygroundExperimentService ¶
type DatasetPlaygroundExperimentService struct {
Options []option.RequestOption
}
DatasetPlaygroundExperimentService contains methods and other services that help with interacting with the langChain 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 NewDatasetPlaygroundExperimentService method instead.
func NewDatasetPlaygroundExperimentService ¶
func NewDatasetPlaygroundExperimentService(opts ...option.RequestOption) (r *DatasetPlaygroundExperimentService)
NewDatasetPlaygroundExperimentService 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 (*DatasetPlaygroundExperimentService) Batch ¶
func (r *DatasetPlaygroundExperimentService) Batch(ctx context.Context, body DatasetPlaygroundExperimentBatchParams, opts ...option.RequestOption) (res *DatasetPlaygroundExperimentBatchResponse, err error)
Dataset Handler
func (*DatasetPlaygroundExperimentService) Stream ¶
func (r *DatasetPlaygroundExperimentService) Stream(ctx context.Context, body DatasetPlaygroundExperimentStreamParams, opts ...option.RequestOption) (res *DatasetPlaygroundExperimentStreamResponse, err error)
Stream Dataset Handler
type DatasetPlaygroundExperimentStreamParams ¶
type DatasetPlaygroundExperimentStreamParams struct {
DatasetID param.Field[string] `json:"dataset_id" api:"required" format:"uuid"`
Manifest param.Field[interface{}] `json:"manifest" api:"required"`
// Configuration for a `Runnable`.
//
// !!! note Custom values
//
// The `TypedDict` has `total=False` set intentionally to:
//
// - Allow partial configs to be created and merged together via `merge_configs`
// - Support config propagation from parent to child runnables via
// `var_child_runnable_config` (a `ContextVar` that automatically passes
// config down the call stack without explicit parameter passing), where
// configs are merged rather than replaced
//
// !!! example
//
// “`python
// # Parent sets tags
// chain.invoke(input, config={"tags": ["parent"]})
// # Child automatically inherits and can add:
// # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
// “`
Options param.Field[RunnableConfigParam] `json:"options" api:"required"`
ProjectName param.Field[string] `json:"project_name" api:"required"`
Secrets param.Field[map[string]string] `json:"secrets" api:"required"`
Commit param.Field[string] `json:"commit"`
DatasetSplits param.Field[[]string] `json:"dataset_splits"`
EvaluatorRules param.Field[[]string] `json:"evaluator_rules" format:"uuid"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Owner param.Field[string] `json:"owner"`
ParallelToolCalls param.Field[bool] `json:"parallel_tool_calls"`
Repetitions param.Field[int64] `json:"repetitions"`
RepoHandle param.Field[string] `json:"repo_handle"`
RepoID param.Field[string] `json:"repo_id"`
RequestsPerSecond param.Field[int64] `json:"requests_per_second"`
RunID param.Field[string] `json:"run_id"`
RunnerContext param.Field[RunnerContextEnum] `json:"runner_context"`
ToolChoice param.Field[string] `json:"tool_choice"`
Tools param.Field[[]interface{}] `json:"tools"`
UseOrFallbackToWorkspaceSecrets param.Field[bool] `json:"use_or_fallback_to_workspace_secrets"`
}
func (DatasetPlaygroundExperimentStreamParams) MarshalJSON ¶
func (r DatasetPlaygroundExperimentStreamParams) MarshalJSON() (data []byte, err error)
type DatasetPlaygroundExperimentStreamResponse ¶
type DatasetPlaygroundExperimentStreamResponse = interface{}
type DatasetRunDeltaParams ¶
type DatasetRunDeltaParams struct {
QueryFeedbackDelta QueryFeedbackDeltaParam `json:"query_feedback_delta" api:"required"`
}
func (DatasetRunDeltaParams) MarshalJSON ¶
func (r DatasetRunDeltaParams) MarshalJSON() (data []byte, err error)
type DatasetRunNewParams ¶
type DatasetRunNewParams struct {
SessionIDs param.Field[[]string] `json:"session_ids" api:"required" format:"uuid"`
// Response format, e.g., 'csv'
Format param.Field[DatasetRunNewParamsFormat] `query:"format"`
ComparativeExperimentID param.Field[string] `json:"comparative_experiment_id" format:"uuid"`
ExampleIDs param.Field[[]string] `json:"example_ids" format:"uuid"`
Filters param.Field[map[string][]string] `json:"filters"`
IncludeAnnotatorDetail param.Field[bool] `json:"include_annotator_detail"`
Limit param.Field[int64] `json:"limit"`
Offset param.Field[int64] `json:"offset"`
Preview param.Field[bool] `json:"preview"`
SortParams param.Field[SortParamsForRunsComparisonView] `json:"sort_params"`
Stream param.Field[bool] `json:"stream"`
}
func (DatasetRunNewParams) MarshalJSON ¶
func (r DatasetRunNewParams) MarshalJSON() (data []byte, err error)
func (DatasetRunNewParams) URLQuery ¶
func (r DatasetRunNewParams) URLQuery() (v url.Values)
URLQuery serializes DatasetRunNewParams's query parameters as `url.Values`.
type DatasetRunNewParamsFormat ¶
type DatasetRunNewParamsFormat string
Response format, e.g., 'csv'
const (
DatasetRunNewParamsFormatCsv DatasetRunNewParamsFormat = "csv"
)
func (DatasetRunNewParamsFormat) IsKnown ¶
func (r DatasetRunNewParamsFormat) IsKnown() bool
type DatasetRunService ¶
type DatasetRunService struct {
Options []option.RequestOption
}
DatasetRunService contains methods and other services that help with interacting with the langChain 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 NewDatasetRunService method instead.
func NewDatasetRunService ¶
func NewDatasetRunService(opts ...option.RequestOption) (r *DatasetRunService)
NewDatasetRunService 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 (*DatasetRunService) Delta ¶
func (r *DatasetRunService) Delta(ctx context.Context, datasetID string, body DatasetRunDeltaParams, opts ...option.RequestOption) (res *SessionFeedbackDelta, err error)
Fetch the number of regressions/improvements for each example in a dataset, between sessions[0] and sessions[1].
func (*DatasetRunService) New ¶
func (r *DatasetRunService) New(ctx context.Context, datasetID string, params DatasetRunNewParams, opts ...option.RequestOption) (res *[]ExampleWithRunsCh, err error)
Fetch examples for a dataset, and fetch the runs for each example if they are associated with the given session_ids.
type DatasetService ¶
type DatasetService struct {
Options []option.RequestOption
Versions *DatasetVersionService
Runs *DatasetRunService
Group *DatasetGroupService
Experiments *DatasetExperimentService
Comparative *DatasetComparativeService
Splits *DatasetSplitService
PlaygroundExperiment *DatasetPlaygroundExperimentService
}
DatasetService contains methods and other services that help with interacting with the langChain 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 NewDatasetService method instead.
func NewDatasetService ¶
func NewDatasetService(opts ...option.RequestOption) (r *DatasetService)
NewDatasetService 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 (*DatasetService) Clone ¶
func (r *DatasetService) Clone(ctx context.Context, body DatasetCloneParams, opts ...option.RequestOption) (res *[]DatasetCloneResponse, err error)
Clone a dataset.
func (*DatasetService) Delete ¶
func (r *DatasetService) Delete(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *DatasetDeleteResponse, err error)
Delete a specific dataset.
func (*DatasetService) Get ¶
func (r *DatasetService) Get(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *Dataset, err error)
Get a specific dataset.
func (*DatasetService) GetCsv ¶
func (r *DatasetService) GetCsv(ctx context.Context, datasetID string, query DatasetGetCsvParams, opts ...option.RequestOption) (res *DatasetGetCsvResponse, err error)
Download a dataset as CSV format.
func (*DatasetService) GetJSONL ¶
func (r *DatasetService) GetJSONL(ctx context.Context, datasetID string, query DatasetGetJSONLParams, opts ...option.RequestOption) (res *DatasetGetJSONLResponse, err error)
Download a dataset as CSV format.
func (*DatasetService) GetOpenAI ¶
func (r *DatasetService) GetOpenAI(ctx context.Context, datasetID string, query DatasetGetOpenAIParams, opts ...option.RequestOption) (res *DatasetGetOpenAIResponse, err error)
Download a dataset as OpenAI Evals Jsonl format.
func (*DatasetService) GetOpenAIFt ¶
func (r *DatasetService) GetOpenAIFt(ctx context.Context, datasetID string, query DatasetGetOpenAIFtParams, opts ...option.RequestOption) (res *DatasetGetOpenAIFtResponse, err error)
Download a dataset as OpenAI Jsonl format.
func (*DatasetService) GetVersion ¶
func (r *DatasetService) GetVersion(ctx context.Context, datasetID string, query DatasetGetVersionParams, opts ...option.RequestOption) (res *DatasetVersion, err error)
Get dataset version by as_of or exact tag.
func (*DatasetService) List ¶
func (r *DatasetService) List(ctx context.Context, query DatasetListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[Dataset], err error)
Get all datasets by query params and owner.
func (*DatasetService) ListAutoPaging ¶
func (r *DatasetService) ListAutoPaging(ctx context.Context, query DatasetListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[Dataset]
Get all datasets by query params and owner.
func (*DatasetService) New ¶
func (r *DatasetService) New(ctx context.Context, body DatasetNewParams, opts ...option.RequestOption) (res *Dataset, err error)
Create a new dataset.
func (*DatasetService) Update ¶
func (r *DatasetService) Update(ctx context.Context, datasetID string, body DatasetUpdateParams, opts ...option.RequestOption) (res *DatasetUpdateResponse, err error)
Update a specific dataset.
func (*DatasetService) UpdateTags ¶
func (r *DatasetService) UpdateTags(ctx context.Context, datasetID string, body DatasetUpdateTagsParams, opts ...option.RequestOption) (res *DatasetVersion, err error)
Set a tag on a dataset version.
func (*DatasetService) Upload ¶
func (r *DatasetService) Upload(ctx context.Context, body DatasetUploadParams, opts ...option.RequestOption) (res *Dataset, err error)
Create a new dataset from a CSV or JSONL file.
type DatasetShareDeleteAllResponse ¶
type DatasetShareDeleteAllResponse = interface{}
type DatasetShareNewParams ¶
type DatasetShareNewParams struct {
}
func (DatasetShareNewParams) URLQuery ¶
func (r DatasetShareNewParams) URLQuery() (v url.Values)
URLQuery serializes DatasetShareNewParams's query parameters as `url.Values`.
type DatasetShareSchema ¶
type DatasetShareSchema struct {
}
func (*DatasetShareSchema) UnmarshalJSON ¶
func (r *DatasetShareSchema) UnmarshalJSON(data []byte) (err error)
type DatasetShareService ¶
type DatasetShareService struct {
}
DatasetShareService contains methods and other services that help with interacting with the langChain 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 NewDatasetShareService method instead.
func NewDatasetShareService ¶
func NewDatasetShareService(opts ...option.RequestOption) (r *DatasetShareService)
NewDatasetShareService 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 (*DatasetShareService) DeleteAll ¶
func (r *DatasetShareService) DeleteAll(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *DatasetShareDeleteAllResponse, err error)
Unshare a dataset.
func (*DatasetShareService) Get ¶
func (r *DatasetShareService) Get(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *DatasetShareSchema, err error)
Get the state of sharing a dataset
func (*DatasetShareService) New ¶
func (r *DatasetShareService) New(ctx context.Context, datasetID string, body DatasetShareNewParams, opts ...option.RequestOption) (res *DatasetShareSchema, err error)
Share a dataset.
type DatasetSplitGetParams ¶
type DatasetSplitGetParams struct {
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[DatasetSplitGetParamsAsOfUnion] `query:"as_of" format:"date-time"`
}
func (DatasetSplitGetParams) URLQuery ¶
func (r DatasetSplitGetParams) URLQuery() (v url.Values)
URLQuery serializes DatasetSplitGetParams's query parameters as `url.Values`.
type DatasetSplitGetParamsAsOfUnion ¶
type DatasetSplitGetParamsAsOfUnion interface {
ImplementsDatasetSplitGetParamsAsOfUnion()
}
Only modifications made on or before this time are included. If None, the latest version of the dataset is used.
Satisfied by shared.UnionTime, shared.UnionString.
type DatasetSplitNewParams ¶
type DatasetSplitNewParams struct {
Examples param.Field[[]string] `json:"examples" api:"required" format:"uuid"`
SplitName param.Field[string] `json:"split_name" api:"required"`
Remove param.Field[bool] `json:"remove"`
}
func (DatasetSplitNewParams) MarshalJSON ¶
func (r DatasetSplitNewParams) MarshalJSON() (data []byte, err error)
type DatasetSplitService ¶
type DatasetSplitService struct {
Options []option.RequestOption
}
DatasetSplitService contains methods and other services that help with interacting with the langChain 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 NewDatasetSplitService method instead.
func NewDatasetSplitService ¶
func NewDatasetSplitService(opts ...option.RequestOption) (r *DatasetSplitService)
NewDatasetSplitService 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 (*DatasetSplitService) Get ¶
func (r *DatasetSplitService) Get(ctx context.Context, datasetID string, query DatasetSplitGetParams, opts ...option.RequestOption) (res *[]string, err error)
Get Dataset Splits
func (*DatasetSplitService) New ¶
func (r *DatasetSplitService) New(ctx context.Context, datasetID string, body DatasetSplitNewParams, opts ...option.RequestOption) (res *[]string, err error)
Update Dataset Splits
type DatasetTransformation ¶
type DatasetTransformation struct {
Path []string `json:"path" api:"required"`
// Enum for dataset transformation types. Ordering determines the order in which
// transformations are applied if there are multiple transformations on the same
// path.
TransformationType DatasetTransformationTransformationType `json:"transformation_type" api:"required"`
JSON datasetTransformationJSON `json:"-"`
}
func (*DatasetTransformation) UnmarshalJSON ¶
func (r *DatasetTransformation) UnmarshalJSON(data []byte) (err error)
type DatasetTransformationParam ¶
type DatasetTransformationParam struct {
Path param.Field[[]string] `json:"path" api:"required"`
// Enum for dataset transformation types. Ordering determines the order in which
// transformations are applied if there are multiple transformations on the same
// path.
TransformationType param.Field[DatasetTransformationTransformationType] `json:"transformation_type" api:"required"`
}
func (DatasetTransformationParam) MarshalJSON ¶
func (r DatasetTransformationParam) MarshalJSON() (data []byte, err error)
type DatasetTransformationTransformationType ¶
type DatasetTransformationTransformationType string
Enum for dataset transformation types. Ordering determines the order in which transformations are applied if there are multiple transformations on the same path.
const ( DatasetTransformationTransformationTypeConvertToOpenAIMessage DatasetTransformationTransformationType = "convert_to_openai_message" DatasetTransformationTransformationTypeConvertToOpenAITool DatasetTransformationTransformationType = "convert_to_openai_tool" DatasetTransformationTransformationTypeRemoveSystemMessages DatasetTransformationTransformationType = "remove_system_messages" DatasetTransformationTransformationTypeRemoveExtraFields DatasetTransformationTransformationType = "remove_extra_fields" DatasetTransformationTransformationTypeExtractToolsFromRun DatasetTransformationTransformationType = "extract_tools_from_run" )
func (DatasetTransformationTransformationType) IsKnown ¶
func (r DatasetTransformationTransformationType) IsKnown() bool
type DatasetUpdateParams ¶
type DatasetUpdateParams struct {
BaselineExperimentID param.Field[DatasetUpdateParamsBaselineExperimentIDUnion] `json:"baseline_experiment_id" format:"uuid"`
Description param.Field[DatasetUpdateParamsDescriptionUnion] `json:"description"`
InputsSchemaDefinition param.Field[DatasetUpdateParamsInputsSchemaDefinitionUnion] `json:"inputs_schema_definition"`
Metadata param.Field[DatasetUpdateParamsMetadataUnion] `json:"metadata"`
Name param.Field[DatasetUpdateParamsNameUnion] `json:"name"`
OutputsSchemaDefinition param.Field[DatasetUpdateParamsOutputsSchemaDefinitionUnion] `json:"outputs_schema_definition"`
PatchExamples param.Field[map[string]DatasetUpdateParamsPatchExamples] `json:"patch_examples"`
Transformations param.Field[DatasetUpdateParamsTransformationsUnion] `json:"transformations"`
}
func (DatasetUpdateParams) MarshalJSON ¶
func (r DatasetUpdateParams) MarshalJSON() (data []byte, err error)
type DatasetUpdateParamsBaselineExperimentIDUnion ¶
type DatasetUpdateParamsBaselineExperimentIDUnion interface {
ImplementsDatasetUpdateParamsBaselineExperimentIDUnion()
}
Satisfied by shared.UnionString, MissingParam.
type DatasetUpdateParamsDescriptionUnion ¶
type DatasetUpdateParamsDescriptionUnion interface {
ImplementsDatasetUpdateParamsDescriptionUnion()
}
Satisfied by shared.UnionString, MissingParam.
type DatasetUpdateParamsInputsSchemaDefinitionMap ¶
type DatasetUpdateParamsInputsSchemaDefinitionMap map[string]interface{}
type DatasetUpdateParamsInputsSchemaDefinitionUnion ¶
type DatasetUpdateParamsInputsSchemaDefinitionUnion interface {
// contains filtered or unexported methods
}
Satisfied by DatasetUpdateParamsInputsSchemaDefinitionMap, MissingParam.
type DatasetUpdateParamsMetadataMap ¶
type DatasetUpdateParamsMetadataMap map[string]interface{}
type DatasetUpdateParamsMetadataUnion ¶
type DatasetUpdateParamsMetadataUnion interface {
// contains filtered or unexported methods
}
Satisfied by DatasetUpdateParamsMetadataMap, MissingParam.
type DatasetUpdateParamsNameUnion ¶
type DatasetUpdateParamsNameUnion interface {
ImplementsDatasetUpdateParamsNameUnion()
}
Satisfied by shared.UnionString, MissingParam.
type DatasetUpdateParamsOutputsSchemaDefinitionMap ¶
type DatasetUpdateParamsOutputsSchemaDefinitionMap map[string]interface{}
type DatasetUpdateParamsOutputsSchemaDefinitionUnion ¶
type DatasetUpdateParamsOutputsSchemaDefinitionUnion interface {
// contains filtered or unexported methods
}
Satisfied by DatasetUpdateParamsOutputsSchemaDefinitionMap, MissingParam.
type DatasetUpdateParamsPatchExamples ¶
type DatasetUpdateParamsPatchExamples struct {
AttachmentsOperations param.Field[AttachmentsOperationsParam] `json:"attachments_operations"`
DatasetID param.Field[string] `json:"dataset_id" format:"uuid"`
Inputs param.Field[map[string]interface{}] `json:"inputs"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Outputs param.Field[map[string]interface{}] `json:"outputs"`
Overwrite param.Field[bool] `json:"overwrite"`
Split param.Field[DatasetUpdateParamsPatchExamplesSplitUnion] `json:"split"`
}
Update class for Example.
func (DatasetUpdateParamsPatchExamples) MarshalJSON ¶
func (r DatasetUpdateParamsPatchExamples) MarshalJSON() (data []byte, err error)
type DatasetUpdateParamsPatchExamplesSplitArray ¶
type DatasetUpdateParamsPatchExamplesSplitArray []string
func (DatasetUpdateParamsPatchExamplesSplitArray) ImplementsDatasetUpdateParamsPatchExamplesSplitUnion ¶
func (r DatasetUpdateParamsPatchExamplesSplitArray) ImplementsDatasetUpdateParamsPatchExamplesSplitUnion()
type DatasetUpdateParamsPatchExamplesSplitUnion ¶
type DatasetUpdateParamsPatchExamplesSplitUnion interface {
ImplementsDatasetUpdateParamsPatchExamplesSplitUnion()
}
Satisfied by DatasetUpdateParamsPatchExamplesSplitArray, shared.UnionString.
type DatasetUpdateParamsTransformationsArray ¶
type DatasetUpdateParamsTransformationsArray []DatasetTransformationParam
type DatasetUpdateParamsTransformationsUnion ¶
type DatasetUpdateParamsTransformationsUnion interface {
// contains filtered or unexported methods
}
Satisfied by DatasetUpdateParamsTransformationsArray, MissingParam.
type DatasetUpdateResponse ¶
type DatasetUpdateResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Enum for dataset data types.
DataType DataType `json:"data_type" api:"nullable"`
Description string `json:"description" api:"nullable"`
ExternallyManaged bool `json:"externally_managed" api:"nullable"`
InputsSchemaDefinition map[string]interface{} `json:"inputs_schema_definition" api:"nullable"`
OutputsSchemaDefinition map[string]interface{} `json:"outputs_schema_definition" api:"nullable"`
Transformations []DatasetTransformation `json:"transformations" api:"nullable"`
JSON datasetUpdateResponseJSON `json:"-"`
}
func (*DatasetUpdateResponse) UnmarshalJSON ¶
func (r *DatasetUpdateResponse) UnmarshalJSON(data []byte) (err error)
type DatasetUpdateTagsParams ¶
type DatasetUpdateTagsParams struct {
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[DatasetUpdateTagsParamsAsOfUnion] `json:"as_of" api:"required" format:"date-time"`
Tag param.Field[string] `json:"tag" api:"required"`
}
func (DatasetUpdateTagsParams) MarshalJSON ¶
func (r DatasetUpdateTagsParams) MarshalJSON() (data []byte, err error)
type DatasetUpdateTagsParamsAsOfUnion ¶
type DatasetUpdateTagsParamsAsOfUnion interface {
ImplementsDatasetUpdateTagsParamsAsOfUnion()
}
Only modifications made on or before this time are included. If None, the latest version of the dataset is used.
Satisfied by shared.UnionTime, shared.UnionString.
type DatasetUploadParams ¶
type DatasetUploadParams struct {
File param.Field[io.Reader] `json:"file" api:"required" format:"binary"`
InputKeys param.Field[[]string] `json:"input_keys" api:"required"`
// Enum for dataset data types.
DataType param.Field[DataType] `json:"data_type"`
Description param.Field[string] `json:"description"`
InputKeyMappings param.Field[string] `json:"input_key_mappings"`
InputsSchemaDefinition param.Field[string] `json:"inputs_schema_definition"`
MetadataKeyMappings param.Field[string] `json:"metadata_key_mappings"`
MetadataKeys param.Field[[]string] `json:"metadata_keys"`
Name param.Field[string] `json:"name"`
OutputKeyMappings param.Field[string] `json:"output_key_mappings"`
OutputKeys param.Field[[]string] `json:"output_keys"`
OutputsSchemaDefinition param.Field[string] `json:"outputs_schema_definition"`
Transformations param.Field[string] `json:"transformations"`
}
func (DatasetUploadParams) MarshalMultipart ¶
func (r DatasetUploadParams) MarshalMultipart() (data []byte, contentType string, err error)
type DatasetVersion ¶
type DatasetVersion struct {
AsOf time.Time `json:"as_of" api:"required" format:"date-time"`
Tags []string `json:"tags" api:"nullable"`
JSON datasetVersionJSON `json:"-"`
}
Dataset version schema.
func (*DatasetVersion) UnmarshalJSON ¶
func (r *DatasetVersion) UnmarshalJSON(data []byte) (err error)
type DatasetVersionGetDiffParams ¶
type DatasetVersionGetDiffParams struct {
FromVersion param.Field[DatasetVersionGetDiffParamsFromVersionUnion] `query:"from_version" api:"required" format:"date-time"`
ToVersion param.Field[DatasetVersionGetDiffParamsToVersionUnion] `query:"to_version" api:"required" format:"date-time"`
}
func (DatasetVersionGetDiffParams) URLQuery ¶
func (r DatasetVersionGetDiffParams) URLQuery() (v url.Values)
URLQuery serializes DatasetVersionGetDiffParams's query parameters as `url.Values`.
type DatasetVersionGetDiffParamsFromVersionUnion ¶
type DatasetVersionGetDiffParamsFromVersionUnion interface {
ImplementsDatasetVersionGetDiffParamsFromVersionUnion()
}
Satisfied by shared.UnionTime, shared.UnionString.
type DatasetVersionGetDiffParamsToVersionUnion ¶
type DatasetVersionGetDiffParamsToVersionUnion interface {
ImplementsDatasetVersionGetDiffParamsToVersionUnion()
}
Satisfied by shared.UnionTime, shared.UnionString.
type DatasetVersionGetDiffResponse ¶
type DatasetVersionGetDiffResponse struct {
ExamplesAdded []string `json:"examples_added" api:"required" format:"uuid"`
ExamplesModified []string `json:"examples_modified" api:"required" format:"uuid"`
ExamplesRemoved []string `json:"examples_removed" api:"required" format:"uuid"`
JSON datasetVersionGetDiffResponseJSON `json:"-"`
}
Dataset diff schema.
func (*DatasetVersionGetDiffResponse) UnmarshalJSON ¶
func (r *DatasetVersionGetDiffResponse) UnmarshalJSON(data []byte) (err error)
type DatasetVersionListParams ¶
type DatasetVersionListParams struct {
Example param.Field[string] `query:"example" format:"uuid"`
Limit param.Field[int64] `query:"limit"`
Offset param.Field[int64] `query:"offset"`
Search param.Field[string] `query:"search"`
}
func (DatasetVersionListParams) URLQuery ¶
func (r DatasetVersionListParams) URLQuery() (v url.Values)
URLQuery serializes DatasetVersionListParams's query parameters as `url.Values`.
type DatasetVersionService ¶
type DatasetVersionService struct {
Options []option.RequestOption
}
DatasetVersionService contains methods and other services that help with interacting with the langChain 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 NewDatasetVersionService method instead.
func NewDatasetVersionService ¶
func NewDatasetVersionService(opts ...option.RequestOption) (r *DatasetVersionService)
NewDatasetVersionService 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 (*DatasetVersionService) GetDiff ¶
func (r *DatasetVersionService) GetDiff(ctx context.Context, datasetID string, query DatasetVersionGetDiffParams, opts ...option.RequestOption) (res *DatasetVersionGetDiffResponse, err error)
Get diff between two dataset versions.
func (*DatasetVersionService) List ¶
func (r *DatasetVersionService) List(ctx context.Context, datasetID string, query DatasetVersionListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[DatasetVersion], err error)
Get dataset versions.
func (*DatasetVersionService) ListAutoPaging ¶
func (r *DatasetVersionService) ListAutoPaging(ctx context.Context, datasetID string, query DatasetVersionListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[DatasetVersion]
Get dataset versions.
type DrainConfig ¶ added in v0.2.2
type DrainConfig = langsmithtracing.DrainConfig
DrainConfig controls batching and auto-scaling behavior for the trace sink.
func DefaultDrainConfig ¶ added in v0.2.2
func DefaultDrainConfig() DrainConfig
DefaultDrainConfig returns production-grade defaults for the trace sink.
type Example ¶
type Example struct {
ID string `json:"id" api:"required" format:"uuid"`
DatasetID string `json:"dataset_id" api:"required" format:"uuid"`
Inputs map[string]interface{} `json:"inputs" api:"required"`
Name string `json:"name" api:"required"`
AttachmentURLs map[string]interface{} `json:"attachment_urls" api:"nullable"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
ModifiedAt time.Time `json:"modified_at" api:"nullable" format:"date-time"`
Outputs map[string]interface{} `json:"outputs" api:"nullable"`
SourceRunID string `json:"source_run_id" api:"nullable" format:"uuid"`
JSON exampleJSON `json:"-"`
}
Example schema.
func (*Example) UnmarshalJSON ¶
type ExampleBulkNewParams ¶
type ExampleBulkNewParams struct {
// Schema for a batch of examples to be created.
Body []ExampleBulkNewParamsBody `json:"body" api:"required"`
}
func (ExampleBulkNewParams) MarshalJSON ¶
func (r ExampleBulkNewParams) MarshalJSON() (data []byte, err error)
type ExampleBulkNewParamsBody ¶
type ExampleBulkNewParamsBody struct {
DatasetID param.Field[string] `json:"dataset_id" api:"required" format:"uuid"`
ID param.Field[string] `json:"id" format:"uuid"`
CreatedAt param.Field[string] `json:"created_at"`
Inputs param.Field[map[string]interface{}] `json:"inputs"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Outputs param.Field[map[string]interface{}] `json:"outputs"`
SourceRunID param.Field[string] `json:"source_run_id" format:"uuid"`
Split param.Field[ExampleBulkNewParamsBodySplitUnion] `json:"split"`
// Use Legacy Message Format for LLM runs
UseLegacyMessageFormat param.Field[bool] `json:"use_legacy_message_format"`
UseSourceRunAttachments param.Field[[]string] `json:"use_source_run_attachments"`
UseSourceRunIo param.Field[bool] `json:"use_source_run_io"`
}
Example with optional created_at to prevent duplicate versions in bulk operations.
func (ExampleBulkNewParamsBody) MarshalJSON ¶
func (r ExampleBulkNewParamsBody) MarshalJSON() (data []byte, err error)
type ExampleBulkNewParamsBodySplitArray ¶
type ExampleBulkNewParamsBodySplitArray []string
func (ExampleBulkNewParamsBodySplitArray) ImplementsExampleBulkNewParamsBodySplitUnion ¶
func (r ExampleBulkNewParamsBodySplitArray) ImplementsExampleBulkNewParamsBodySplitUnion()
type ExampleBulkNewParamsBodySplitUnion ¶
type ExampleBulkNewParamsBodySplitUnion interface {
ImplementsExampleBulkNewParamsBodySplitUnion()
}
Satisfied by ExampleBulkNewParamsBodySplitArray, shared.UnionString.
type ExampleBulkPatchAllParams ¶
type ExampleBulkPatchAllParams struct {
Body []ExampleBulkPatchAllParamsBody `json:"body" api:"required"`
}
func (ExampleBulkPatchAllParams) MarshalJSON ¶
func (r ExampleBulkPatchAllParams) MarshalJSON() (data []byte, err error)
type ExampleBulkPatchAllParamsBody ¶
type ExampleBulkPatchAllParamsBody struct {
ID param.Field[string] `json:"id" api:"required" format:"uuid"`
AttachmentsOperations param.Field[AttachmentsOperationsParam] `json:"attachments_operations"`
DatasetID param.Field[string] `json:"dataset_id" format:"uuid"`
Inputs param.Field[map[string]interface{}] `json:"inputs"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Outputs param.Field[map[string]interface{}] `json:"outputs"`
Overwrite param.Field[bool] `json:"overwrite"`
Split param.Field[ExampleBulkPatchAllParamsBodySplitUnion] `json:"split"`
}
Bulk update class for Example (includes example id).
func (ExampleBulkPatchAllParamsBody) MarshalJSON ¶
func (r ExampleBulkPatchAllParamsBody) MarshalJSON() (data []byte, err error)
type ExampleBulkPatchAllParamsBodySplitArray ¶
type ExampleBulkPatchAllParamsBodySplitArray []string
func (ExampleBulkPatchAllParamsBodySplitArray) ImplementsExampleBulkPatchAllParamsBodySplitUnion ¶
func (r ExampleBulkPatchAllParamsBodySplitArray) ImplementsExampleBulkPatchAllParamsBodySplitUnion()
type ExampleBulkPatchAllParamsBodySplitUnion ¶
type ExampleBulkPatchAllParamsBodySplitUnion interface {
ImplementsExampleBulkPatchAllParamsBodySplitUnion()
}
Satisfied by ExampleBulkPatchAllParamsBodySplitArray, shared.UnionString.
type ExampleBulkPatchAllResponse ¶
type ExampleBulkPatchAllResponse = interface{}
type ExampleBulkService ¶
type ExampleBulkService struct {
Options []option.RequestOption
}
ExampleBulkService contains methods and other services that help with interacting with the langChain 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 NewExampleBulkService method instead.
func NewExampleBulkService ¶
func NewExampleBulkService(opts ...option.RequestOption) (r *ExampleBulkService)
NewExampleBulkService 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 (*ExampleBulkService) New ¶
func (r *ExampleBulkService) New(ctx context.Context, body ExampleBulkNewParams, opts ...option.RequestOption) (res *[]Example, err error)
Create bulk examples.
func (*ExampleBulkService) PatchAll ¶
func (r *ExampleBulkService) PatchAll(ctx context.Context, body ExampleBulkPatchAllParams, opts ...option.RequestOption) (res *ExampleBulkPatchAllResponse, err error)
Legacy update examples in bulk. For update involving attachments, use PATCH /v1/platform/datasets/{dataset_id}/examples instead.
type ExampleDeleteAllParams ¶
type ExampleDeleteAllParams struct {
ExampleIDs param.Field[[]string] `query:"example_ids" api:"required" format:"uuid"`
}
func (ExampleDeleteAllParams) URLQuery ¶
func (r ExampleDeleteAllParams) URLQuery() (v url.Values)
URLQuery serializes ExampleDeleteAllParams's query parameters as `url.Values`.
type ExampleDeleteAllResponse ¶
type ExampleDeleteAllResponse = interface{}
type ExampleDeleteResponse ¶
type ExampleDeleteResponse = interface{}
type ExampleGetCountParams ¶
type ExampleGetCountParams struct {
ID param.Field[[]string] `query:"id" format:"uuid"`
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[ExampleGetCountParamsAsOfUnion] `query:"as_of" format:"date-time"`
Dataset param.Field[string] `query:"dataset" format:"uuid"`
Filter param.Field[string] `query:"filter"`
FullTextContains param.Field[[]string] `query:"full_text_contains"`
Metadata param.Field[string] `query:"metadata"`
Splits param.Field[[]string] `query:"splits"`
}
func (ExampleGetCountParams) URLQuery ¶
func (r ExampleGetCountParams) URLQuery() (v url.Values)
URLQuery serializes ExampleGetCountParams's query parameters as `url.Values`.
type ExampleGetCountParamsAsOfUnion ¶
type ExampleGetCountParamsAsOfUnion interface {
ImplementsExampleGetCountParamsAsOfUnion()
}
Only modifications made on or before this time are included. If None, the latest version of the dataset is used.
Satisfied by shared.UnionTime, shared.UnionString.
type ExampleGetParams ¶
type ExampleGetParams struct {
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[ExampleGetParamsAsOfUnion] `query:"as_of" format:"date-time"`
Dataset param.Field[string] `query:"dataset" format:"uuid"`
}
func (ExampleGetParams) URLQuery ¶
func (r ExampleGetParams) URLQuery() (v url.Values)
URLQuery serializes ExampleGetParams's query parameters as `url.Values`.
type ExampleGetParamsAsOfUnion ¶
type ExampleGetParamsAsOfUnion interface {
ImplementsExampleGetParamsAsOfUnion()
}
Only modifications made on or before this time are included. If None, the latest version of the dataset is used.
Satisfied by shared.UnionTime, shared.UnionString.
type ExampleListParams ¶
type ExampleListParams struct {
ID param.Field[[]string] `query:"id" format:"uuid"`
// Only modifications made on or before this time are included. If None, the latest
// version of the dataset is used.
AsOf param.Field[ExampleListParamsAsOfUnion] `query:"as_of" format:"date-time"`
Dataset param.Field[string] `query:"dataset" format:"uuid"`
Descending param.Field[bool] `query:"descending"`
Filter param.Field[string] `query:"filter"`
FullTextContains param.Field[[]string] `query:"full_text_contains"`
Limit param.Field[int64] `query:"limit"`
Metadata param.Field[string] `query:"metadata"`
Offset param.Field[int64] `query:"offset"`
Order param.Field[ExampleListParamsOrder] `query:"order"`
RandomSeed param.Field[float64] `query:"random_seed"`
Select param.Field[[]ExampleSelect] `query:"select"`
Splits param.Field[[]string] `query:"splits"`
}
func (ExampleListParams) URLQuery ¶
func (r ExampleListParams) URLQuery() (v url.Values)
URLQuery serializes ExampleListParams's query parameters as `url.Values`.
type ExampleListParamsAsOfUnion ¶
type ExampleListParamsAsOfUnion interface {
ImplementsExampleListParamsAsOfUnion()
}
Only modifications made on or before this time are included. If None, the latest version of the dataset is used.
Satisfied by shared.UnionTime, shared.UnionString.
type ExampleListParamsOrder ¶
type ExampleListParamsOrder string
const ( ExampleListParamsOrderRecent ExampleListParamsOrder = "recent" ExampleListParamsOrderRandom ExampleListParamsOrder = "random" ExampleListParamsOrderRecentlyCreated ExampleListParamsOrder = "recently_created" ExampleListParamsOrderID ExampleListParamsOrder = "id" )
func (ExampleListParamsOrder) IsKnown ¶
func (r ExampleListParamsOrder) IsKnown() bool
type ExampleNewParams ¶
type ExampleNewParams struct {
DatasetID param.Field[string] `json:"dataset_id" api:"required" format:"uuid"`
ID param.Field[string] `json:"id" format:"uuid"`
CreatedAt param.Field[string] `json:"created_at"`
Inputs param.Field[map[string]interface{}] `json:"inputs"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Outputs param.Field[map[string]interface{}] `json:"outputs"`
SourceRunID param.Field[string] `json:"source_run_id" format:"uuid"`
Split param.Field[ExampleNewParamsSplitUnion] `json:"split"`
// Use Legacy Message Format for LLM runs
UseLegacyMessageFormat param.Field[bool] `json:"use_legacy_message_format"`
UseSourceRunAttachments param.Field[[]string] `json:"use_source_run_attachments"`
UseSourceRunIo param.Field[bool] `json:"use_source_run_io"`
}
func (ExampleNewParams) MarshalJSON ¶
func (r ExampleNewParams) MarshalJSON() (data []byte, err error)
type ExampleNewParamsSplitArray ¶
type ExampleNewParamsSplitArray []string
func (ExampleNewParamsSplitArray) ImplementsExampleNewParamsSplitUnion ¶
func (r ExampleNewParamsSplitArray) ImplementsExampleNewParamsSplitUnion()
type ExampleNewParamsSplitUnion ¶
type ExampleNewParamsSplitUnion interface {
ImplementsExampleNewParamsSplitUnion()
}
Satisfied by ExampleNewParamsSplitArray, shared.UnionString.
type ExampleSelect ¶
type ExampleSelect string
const ( ExampleSelectID ExampleSelect = "id" ExampleSelectCreatedAt ExampleSelect = "created_at" ExampleSelectModifiedAt ExampleSelect = "modified_at" ExampleSelectName ExampleSelect = "name" ExampleSelectDatasetID ExampleSelect = "dataset_id" ExampleSelectSourceRunID ExampleSelect = "source_run_id" ExampleSelectMetadata ExampleSelect = "metadata" ExampleSelectInputs ExampleSelect = "inputs" ExampleSelectOutputs ExampleSelect = "outputs" ExampleSelectAttachmentURLs ExampleSelect = "attachment_urls" )
func (ExampleSelect) IsKnown ¶
func (r ExampleSelect) IsKnown() bool
type ExampleService ¶
type ExampleService struct {
Options []option.RequestOption
Bulk *ExampleBulkService
Validate *ExampleValidateService
}
ExampleService contains methods and other services that help with interacting with the langChain 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 NewExampleService method instead.
func NewExampleService ¶
func NewExampleService(opts ...option.RequestOption) (r *ExampleService)
NewExampleService 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 (*ExampleService) Delete ¶
func (r *ExampleService) Delete(ctx context.Context, exampleID string, opts ...option.RequestOption) (res *ExampleDeleteResponse, err error)
Soft delete an example. Only deletes the example in the 'latest' version of the dataset.
func (*ExampleService) DeleteAll ¶
func (r *ExampleService) DeleteAll(ctx context.Context, body ExampleDeleteAllParams, opts ...option.RequestOption) (res *ExampleDeleteAllResponse, err error)
Soft delete examples. Only deletes the examples in the 'latest' version of the dataset.
func (*ExampleService) Get ¶
func (r *ExampleService) Get(ctx context.Context, exampleID string, query ExampleGetParams, opts ...option.RequestOption) (res *Example, err error)
Get a specific example.
func (*ExampleService) GetCount ¶
func (r *ExampleService) GetCount(ctx context.Context, query ExampleGetCountParams, opts ...option.RequestOption) (res *int64, err error)
Count all examples by query params
func (*ExampleService) List ¶
func (r *ExampleService) List(ctx context.Context, query ExampleListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[Example], err error)
Get all examples by query params
func (*ExampleService) ListAutoPaging ¶
func (r *ExampleService) ListAutoPaging(ctx context.Context, query ExampleListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[Example]
Get all examples by query params
func (*ExampleService) New ¶
func (r *ExampleService) New(ctx context.Context, body ExampleNewParams, opts ...option.RequestOption) (res *Example, err error)
Create a new example.
func (*ExampleService) Update ¶
func (r *ExampleService) Update(ctx context.Context, exampleID string, body ExampleUpdateParams, opts ...option.RequestOption) (res *ExampleUpdateResponse, err error)
Update a specific example.
func (*ExampleService) UploadFromCsv ¶
func (r *ExampleService) UploadFromCsv(ctx context.Context, datasetID string, body ExampleUploadFromCsvParams, opts ...option.RequestOption) (res *[]Example, err error)
Upload examples from a CSV file.
Note: For non-csv upload, please use the POST /v1/platform/datasets/{dataset_id}/examples endpoint which provides more efficient upload.
type ExampleUpdateParams ¶
type ExampleUpdateParams struct {
AttachmentsOperations param.Field[AttachmentsOperationsParam] `json:"attachments_operations"`
DatasetID param.Field[string] `json:"dataset_id" format:"uuid"`
Inputs param.Field[map[string]interface{}] `json:"inputs"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Outputs param.Field[map[string]interface{}] `json:"outputs"`
Overwrite param.Field[bool] `json:"overwrite"`
Split param.Field[ExampleUpdateParamsSplitUnion] `json:"split"`
}
func (ExampleUpdateParams) MarshalJSON ¶
func (r ExampleUpdateParams) MarshalJSON() (data []byte, err error)
type ExampleUpdateParamsSplitArray ¶
type ExampleUpdateParamsSplitArray []string
func (ExampleUpdateParamsSplitArray) ImplementsExampleUpdateParamsSplitUnion ¶
func (r ExampleUpdateParamsSplitArray) ImplementsExampleUpdateParamsSplitUnion()
type ExampleUpdateParamsSplitUnion ¶
type ExampleUpdateParamsSplitUnion interface {
ImplementsExampleUpdateParamsSplitUnion()
}
Satisfied by ExampleUpdateParamsSplitArray, shared.UnionString.
type ExampleUpdateResponse ¶
type ExampleUpdateResponse = interface{}
type ExampleUploadFromCsvParams ¶
type ExampleUploadFromCsvParams struct {
File param.Field[io.Reader] `json:"file" api:"required" format:"binary"`
InputKeys param.Field[[]string] `json:"input_keys" api:"required"`
MetadataKeys param.Field[[]string] `json:"metadata_keys"`
OutputKeys param.Field[[]string] `json:"output_keys"`
}
func (ExampleUploadFromCsvParams) MarshalMultipart ¶
func (r ExampleUploadFromCsvParams) MarshalMultipart() (data []byte, contentType string, err error)
type ExampleValidateService ¶
type ExampleValidateService struct {
Options []option.RequestOption
}
ExampleValidateService contains methods and other services that help with interacting with the langChain 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 NewExampleValidateService method instead.
func NewExampleValidateService ¶
func NewExampleValidateService(opts ...option.RequestOption) (r *ExampleValidateService)
NewExampleValidateService 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 (*ExampleValidateService) Bulk ¶
func (r *ExampleValidateService) Bulk(ctx context.Context, opts ...option.RequestOption) (res *[]ExampleValidationResult, err error)
Validate examples in bulk.
func (*ExampleValidateService) New ¶
func (r *ExampleValidateService) New(ctx context.Context, opts ...option.RequestOption) (res *ExampleValidationResult, err error)
Validate an example.
type ExampleValidationResult ¶
type ExampleValidationResult struct {
ID string `json:"id" api:"nullable" format:"uuid"`
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
DatasetID string `json:"dataset_id" api:"nullable" format:"uuid"`
Inputs map[string]interface{} `json:"inputs" api:"nullable"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
Outputs map[string]interface{} `json:"outputs" api:"nullable"`
Overwrite bool `json:"overwrite"`
SourceRunID string `json:"source_run_id" api:"nullable" format:"uuid"`
Split ExampleValidationResultSplitUnion `json:"split" api:"nullable"`
UseSourceRunIo bool `json:"use_source_run_io"`
JSON exampleValidationResultJSON `json:"-"`
}
Validation result for Example, combining fields from Create/Base/Update schemas.
func (*ExampleValidationResult) UnmarshalJSON ¶
func (r *ExampleValidationResult) UnmarshalJSON(data []byte) (err error)
type ExampleValidationResultSplitArray ¶
type ExampleValidationResultSplitArray []string
func (ExampleValidationResultSplitArray) ImplementsExampleValidationResultSplitUnion ¶
func (r ExampleValidationResultSplitArray) ImplementsExampleValidationResultSplitUnion()
type ExampleValidationResultSplitUnion ¶
type ExampleValidationResultSplitUnion interface {
ImplementsExampleValidationResultSplitUnion()
}
Union satisfied by ExampleValidationResultSplitArray or shared.UnionString.
type ExampleWithRunsCh ¶
type ExampleWithRunsCh struct {
ID string `json:"id" api:"required" format:"uuid"`
DatasetID string `json:"dataset_id" api:"required" format:"uuid"`
Inputs map[string]interface{} `json:"inputs" api:"required"`
Name string `json:"name" api:"required"`
Runs []ExampleWithRunsChRun `json:"runs" api:"required"`
AttachmentURLs map[string]interface{} `json:"attachment_urls" api:"nullable"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
ModifiedAt time.Time `json:"modified_at" api:"nullable" format:"date-time"`
Outputs map[string]interface{} `json:"outputs" api:"nullable"`
SourceRunID string `json:"source_run_id" api:"nullable" format:"uuid"`
JSON exampleWithRunsChJSON `json:"-"`
}
Example schema with list of runs from ClickHouse.
For non-grouped endpoint (/datasets/{dataset_id}/runs): runs from single session. For grouped endpoint (/datasets/{dataset_id}/group/runs): flat array of runs from all sessions, where each run has a session_id field for frontend to determine column placement.
func (*ExampleWithRunsCh) UnmarshalJSON ¶
func (r *ExampleWithRunsCh) UnmarshalJSON(data []byte) (err error)
type ExampleWithRunsChRun ¶
type ExampleWithRunsChRun struct {
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
// Enum for run types.
RunType RunTypeEnum `json:"run_type" api:"required"`
SessionID string `json:"session_id" api:"required" format:"uuid"`
Status string `json:"status" api:"required"`
TraceID string `json:"trace_id" api:"required" format:"uuid"`
AppPath string `json:"app_path" api:"nullable"`
CompletionCost string `json:"completion_cost" api:"nullable"`
CompletionTokens int64 `json:"completion_tokens" api:"nullable"`
DottedOrder string `json:"dotted_order" api:"nullable"`
EndTime time.Time `json:"end_time" api:"nullable" format:"date-time"`
Error string `json:"error" api:"nullable"`
Events []map[string]interface{} `json:"events" api:"nullable"`
ExecutionOrder int64 `json:"execution_order"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
FeedbackStats map[string]map[string]interface{} `json:"feedback_stats" api:"nullable"`
Feedbacks []FeedbackSchema `json:"feedbacks"`
Inputs map[string]interface{} `json:"inputs" api:"nullable"`
InputsPreview string `json:"inputs_preview" api:"nullable"`
InputsS3URLs map[string]interface{} `json:"inputs_s3_urls" api:"nullable"`
ManifestID string `json:"manifest_id" api:"nullable" format:"uuid"`
ManifestS3ID string `json:"manifest_s3_id" api:"nullable" format:"uuid"`
Outputs map[string]interface{} `json:"outputs" api:"nullable"`
OutputsPreview string `json:"outputs_preview" api:"nullable"`
OutputsS3URLs map[string]interface{} `json:"outputs_s3_urls" api:"nullable"`
ParentRunID string `json:"parent_run_id" api:"nullable" format:"uuid"`
PromptCost string `json:"prompt_cost" api:"nullable"`
PromptTokens int64 `json:"prompt_tokens" api:"nullable"`
ReferenceExampleID string `json:"reference_example_id" api:"nullable" format:"uuid"`
S3URLs map[string]interface{} `json:"s3_urls" api:"nullable"`
Serialized map[string]interface{} `json:"serialized" api:"nullable"`
StartTime time.Time `json:"start_time" format:"date-time"`
Tags []string `json:"tags" api:"nullable"`
TotalCost string `json:"total_cost" api:"nullable"`
TotalTokens int64 `json:"total_tokens" api:"nullable"`
TraceMaxStartTime time.Time `json:"trace_max_start_time" api:"nullable" format:"date-time"`
TraceMinStartTime time.Time `json:"trace_min_start_time" api:"nullable" format:"date-time"`
JSON exampleWithRunsChRunJSON `json:"-"`
}
Run schema for comparison view.
func (*ExampleWithRunsChRun) UnmarshalJSON ¶
func (r *ExampleWithRunsChRun) UnmarshalJSON(data []byte) (err error)
type FeedbackConfigDeleteParams ¶
type FeedbackConfigDeleteParams struct {
FeedbackKey param.Field[string] `query:"feedback_key" api:"required"`
}
func (FeedbackConfigDeleteParams) URLQuery ¶
func (r FeedbackConfigDeleteParams) URLQuery() (v url.Values)
URLQuery serializes FeedbackConfigDeleteParams's query parameters as `url.Values`.
type FeedbackConfigService ¶
type FeedbackConfigService struct {
Options []option.RequestOption
}
FeedbackConfigService contains methods and other services that help with interacting with the langChain 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 NewFeedbackConfigService method instead.
func NewFeedbackConfigService ¶
func NewFeedbackConfigService(opts ...option.RequestOption) (r *FeedbackConfigService)
NewFeedbackConfigService 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 (*FeedbackConfigService) Delete ¶
func (r *FeedbackConfigService) Delete(ctx context.Context, body FeedbackConfigDeleteParams, opts ...option.RequestOption) (err error)
Soft delete a feedback config by marking it as deleted.
The config can be recreated later with the same key (simple reuse pattern). Existing feedback records with this key will remain unchanged.
type FeedbackCreateSchemaCorrectionMapParam ¶
type FeedbackCreateSchemaCorrectionMapParam map[string]interface{}
func (FeedbackCreateSchemaCorrectionMapParam) ImplementsFeedbackCreateSchemaCorrectionUnionParam ¶
func (r FeedbackCreateSchemaCorrectionMapParam) ImplementsFeedbackCreateSchemaCorrectionUnionParam()
type FeedbackCreateSchemaCorrectionUnionParam ¶
type FeedbackCreateSchemaCorrectionUnionParam interface {
ImplementsFeedbackCreateSchemaCorrectionUnionParam()
}
Satisfied by FeedbackCreateSchemaCorrectionMapParam, shared.UnionString.
type FeedbackCreateSchemaFeedbackConfigCategoryParam ¶
type FeedbackCreateSchemaFeedbackConfigCategoryParam struct {
Value param.Field[float64] `json:"value" api:"required"`
Label param.Field[string] `json:"label"`
}
Specific value and label pair for feedback
func (FeedbackCreateSchemaFeedbackConfigCategoryParam) MarshalJSON ¶
func (r FeedbackCreateSchemaFeedbackConfigCategoryParam) MarshalJSON() (data []byte, err error)
type FeedbackCreateSchemaFeedbackConfigParam ¶
type FeedbackCreateSchemaFeedbackConfigParam struct {
// Enum for feedback types.
Type param.Field[FeedbackCreateSchemaFeedbackConfigType] `json:"type" api:"required"`
Categories param.Field[[]FeedbackCreateSchemaFeedbackConfigCategoryParam] `json:"categories"`
Max param.Field[float64] `json:"max"`
Min param.Field[float64] `json:"min"`
}
func (FeedbackCreateSchemaFeedbackConfigParam) MarshalJSON ¶
func (r FeedbackCreateSchemaFeedbackConfigParam) MarshalJSON() (data []byte, err error)
type FeedbackCreateSchemaFeedbackConfigType ¶
type FeedbackCreateSchemaFeedbackConfigType string
Enum for feedback types.
const ( FeedbackCreateSchemaFeedbackConfigTypeContinuous FeedbackCreateSchemaFeedbackConfigType = "continuous" FeedbackCreateSchemaFeedbackConfigTypeCategorical FeedbackCreateSchemaFeedbackConfigType = "categorical" FeedbackCreateSchemaFeedbackConfigTypeFreeform FeedbackCreateSchemaFeedbackConfigType = "freeform" )
func (FeedbackCreateSchemaFeedbackConfigType) IsKnown ¶
func (r FeedbackCreateSchemaFeedbackConfigType) IsKnown() bool
type FeedbackCreateSchemaFeedbackSourceParam ¶
type FeedbackCreateSchemaFeedbackSourceParam struct {
Metadata param.Field[interface{}] `json:"metadata"`
Type param.Field[FeedbackCreateSchemaFeedbackSourceType] `json:"type"`
}
Feedback from the LangChainPlus App.
func (FeedbackCreateSchemaFeedbackSourceParam) MarshalJSON ¶
func (r FeedbackCreateSchemaFeedbackSourceParam) MarshalJSON() (data []byte, err error)
type FeedbackCreateSchemaFeedbackSourceType ¶
type FeedbackCreateSchemaFeedbackSourceType string
const ( FeedbackCreateSchemaFeedbackSourceTypeApp FeedbackCreateSchemaFeedbackSourceType = "app" FeedbackCreateSchemaFeedbackSourceTypeAPI FeedbackCreateSchemaFeedbackSourceType = "api" FeedbackCreateSchemaFeedbackSourceTypeModel FeedbackCreateSchemaFeedbackSourceType = "model" FeedbackCreateSchemaFeedbackSourceTypeAutoEval FeedbackCreateSchemaFeedbackSourceType = "auto_eval" )
func (FeedbackCreateSchemaFeedbackSourceType) IsKnown ¶
func (r FeedbackCreateSchemaFeedbackSourceType) IsKnown() bool
type FeedbackCreateSchemaFeedbackSourceUnionParam ¶
type FeedbackCreateSchemaFeedbackSourceUnionParam interface {
// contains filtered or unexported methods
}
Feedback from the LangChainPlus App.
Satisfied by AppFeedbackSourceParam, APIFeedbackSourceParam, ModelFeedbackSourceParam, AutoEvalFeedbackSourceParam, FeedbackCreateSchemaFeedbackSourceParam.
type FeedbackCreateSchemaParam ¶
type FeedbackCreateSchemaParam struct {
Key param.Field[string] `json:"key" api:"required"`
ID param.Field[string] `json:"id" format:"uuid"`
Comment param.Field[string] `json:"comment"`
ComparativeExperimentID param.Field[string] `json:"comparative_experiment_id" format:"uuid"`
Correction param.Field[FeedbackCreateSchemaCorrectionUnionParam] `json:"correction"`
CreatedAt param.Field[time.Time] `json:"created_at" format:"date-time"`
Error param.Field[bool] `json:"error"`
FeedbackConfig param.Field[FeedbackCreateSchemaFeedbackConfigParam] `json:"feedback_config"`
FeedbackGroupID param.Field[string] `json:"feedback_group_id" format:"uuid"`
// Feedback from the LangChainPlus App.
FeedbackSource param.Field[FeedbackCreateSchemaFeedbackSourceUnionParam] `json:"feedback_source"`
ModifiedAt param.Field[time.Time] `json:"modified_at" format:"date-time"`
RunID param.Field[string] `json:"run_id" format:"uuid"`
Score param.Field[FeedbackCreateSchemaScoreUnionParam] `json:"score"`
SessionID param.Field[string] `json:"session_id" format:"uuid"`
StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
TraceID param.Field[string] `json:"trace_id" format:"uuid"`
Value param.Field[FeedbackCreateSchemaValueUnionParam] `json:"value"`
}
Schema used for creating feedback.
func (FeedbackCreateSchemaParam) MarshalJSON ¶
func (r FeedbackCreateSchemaParam) MarshalJSON() (data []byte, err error)
type FeedbackCreateSchemaScoreUnionParam ¶
type FeedbackCreateSchemaScoreUnionParam interface {
ImplementsFeedbackCreateSchemaScoreUnionParam()
}
Satisfied by shared.UnionFloat, shared.UnionBool.
type FeedbackCreateSchemaValueMapParam ¶
type FeedbackCreateSchemaValueMapParam map[string]interface{}
func (FeedbackCreateSchemaValueMapParam) ImplementsFeedbackCreateSchemaValueUnionParam ¶
func (r FeedbackCreateSchemaValueMapParam) ImplementsFeedbackCreateSchemaValueUnionParam()
type FeedbackCreateSchemaValueUnionParam ¶
type FeedbackCreateSchemaValueUnionParam interface {
ImplementsFeedbackCreateSchemaValueUnionParam()
}
Satisfied by shared.UnionFloat, shared.UnionBool, shared.UnionString, FeedbackCreateSchemaValueMapParam.
type FeedbackDeleteResponse ¶
type FeedbackDeleteResponse = interface{}
type FeedbackGetParams ¶
func (FeedbackGetParams) URLQuery ¶
func (r FeedbackGetParams) URLQuery() (v url.Values)
URLQuery serializes FeedbackGetParams's query parameters as `url.Values`.
type FeedbackIngestTokenCreateSchemaFeedbackConfigCategoryParam ¶
type FeedbackIngestTokenCreateSchemaFeedbackConfigCategoryParam struct {
Value param.Field[float64] `json:"value" api:"required"`
Label param.Field[string] `json:"label"`
}
Specific value and label pair for feedback
func (FeedbackIngestTokenCreateSchemaFeedbackConfigCategoryParam) MarshalJSON ¶
func (r FeedbackIngestTokenCreateSchemaFeedbackConfigCategoryParam) MarshalJSON() (data []byte, err error)
type FeedbackIngestTokenCreateSchemaFeedbackConfigParam ¶
type FeedbackIngestTokenCreateSchemaFeedbackConfigParam struct {
// Enum for feedback types.
Type param.Field[FeedbackIngestTokenCreateSchemaFeedbackConfigType] `json:"type" api:"required"`
Categories param.Field[[]FeedbackIngestTokenCreateSchemaFeedbackConfigCategoryParam] `json:"categories"`
Max param.Field[float64] `json:"max"`
Min param.Field[float64] `json:"min"`
}
func (FeedbackIngestTokenCreateSchemaFeedbackConfigParam) MarshalJSON ¶
func (r FeedbackIngestTokenCreateSchemaFeedbackConfigParam) MarshalJSON() (data []byte, err error)
type FeedbackIngestTokenCreateSchemaFeedbackConfigType ¶
type FeedbackIngestTokenCreateSchemaFeedbackConfigType string
Enum for feedback types.
const ( FeedbackIngestTokenCreateSchemaFeedbackConfigTypeContinuous FeedbackIngestTokenCreateSchemaFeedbackConfigType = "continuous" FeedbackIngestTokenCreateSchemaFeedbackConfigTypeCategorical FeedbackIngestTokenCreateSchemaFeedbackConfigType = "categorical" FeedbackIngestTokenCreateSchemaFeedbackConfigTypeFreeform FeedbackIngestTokenCreateSchemaFeedbackConfigType = "freeform" )
func (FeedbackIngestTokenCreateSchemaFeedbackConfigType) IsKnown ¶
func (r FeedbackIngestTokenCreateSchemaFeedbackConfigType) IsKnown() bool
type FeedbackIngestTokenCreateSchemaParam ¶
type FeedbackIngestTokenCreateSchemaParam struct {
FeedbackKey param.Field[string] `json:"feedback_key" api:"required"`
RunID param.Field[string] `json:"run_id" api:"required" format:"uuid"`
ExpiresAt param.Field[time.Time] `json:"expires_at" format:"date-time"`
// Timedelta input.
ExpiresIn param.Field[TimedeltaInputParam] `json:"expires_in"`
FeedbackConfig param.Field[FeedbackIngestTokenCreateSchemaFeedbackConfigParam] `json:"feedback_config"`
}
Feedback ingest token create schema.
func (FeedbackIngestTokenCreateSchemaParam) MarshalJSON ¶
func (r FeedbackIngestTokenCreateSchemaParam) MarshalJSON() (data []byte, err error)
type FeedbackIngestTokenSchema ¶
type FeedbackIngestTokenSchema struct {
ID string `json:"id" api:"required" format:"uuid"`
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
FeedbackKey string `json:"feedback_key" api:"required"`
URL string `json:"url" api:"required"`
JSON feedbackIngestTokenSchemaJSON `json:"-"`
}
Feedback ingest token schema.
func (*FeedbackIngestTokenSchema) UnmarshalJSON ¶
func (r *FeedbackIngestTokenSchema) UnmarshalJSON(data []byte) (err error)
type FeedbackLevel ¶
type FeedbackLevel string
Enum for feedback levels.
const ( FeedbackLevelRun FeedbackLevel = "run" FeedbackLevelSession FeedbackLevel = "session" )
func (FeedbackLevel) IsKnown ¶
func (r FeedbackLevel) IsKnown() bool
type FeedbackListParams ¶
type FeedbackListParams struct {
ComparativeExperimentID param.Field[string] `query:"comparative_experiment_id" format:"uuid"`
HasComment param.Field[bool] `query:"has_comment"`
HasScore param.Field[bool] `query:"has_score"`
IncludeUserNames param.Field[bool] `query:"include_user_names"`
Key param.Field[[]string] `query:"key"`
// Enum for feedback levels.
Level param.Field[FeedbackLevel] `query:"level"`
Limit param.Field[int64] `query:"limit"`
MaxCreatedAt param.Field[time.Time] `query:"max_created_at" format:"date-time"`
MinCreatedAt param.Field[time.Time] `query:"min_created_at" format:"date-time"`
Offset param.Field[int64] `query:"offset"`
Run param.Field[FeedbackListParamsRunUnion] `query:"run" format:"uuid"`
Session param.Field[FeedbackListParamsSessionUnion] `query:"session" format:"uuid"`
Source param.Field[[]SourceType] `query:"source"`
User param.Field[[]string] `query:"user" format:"uuid"`
}
func (FeedbackListParams) URLQuery ¶
func (r FeedbackListParams) URLQuery() (v url.Values)
URLQuery serializes FeedbackListParams's query parameters as `url.Values`.
type FeedbackListParamsRunArray ¶
type FeedbackListParamsRunArray []string
func (FeedbackListParamsRunArray) ImplementsFeedbackListParamsRunUnion ¶
func (r FeedbackListParamsRunArray) ImplementsFeedbackListParamsRunUnion()
type FeedbackListParamsRunUnion ¶
type FeedbackListParamsRunUnion interface {
ImplementsFeedbackListParamsRunUnion()
}
Satisfied by FeedbackListParamsRunArray, shared.UnionString.
type FeedbackListParamsSessionArray ¶
type FeedbackListParamsSessionArray []string
func (FeedbackListParamsSessionArray) ImplementsFeedbackListParamsSessionUnion ¶
func (r FeedbackListParamsSessionArray) ImplementsFeedbackListParamsSessionUnion()
type FeedbackListParamsSessionUnion ¶
type FeedbackListParamsSessionUnion interface {
ImplementsFeedbackListParamsSessionUnion()
}
Satisfied by FeedbackListParamsSessionArray, shared.UnionString.
type FeedbackNewParams ¶
type FeedbackNewParams struct {
// Schema used for creating feedback.
FeedbackCreateSchema FeedbackCreateSchemaParam `json:"feedback_create_schema" api:"required"`
}
func (FeedbackNewParams) MarshalJSON ¶
func (r FeedbackNewParams) MarshalJSON() (data []byte, err error)
type FeedbackSchema ¶
type FeedbackSchema struct {
ID string `json:"id" api:"required" format:"uuid"`
Key string `json:"key" api:"required"`
Comment string `json:"comment" api:"nullable"`
ComparativeExperimentID string `json:"comparative_experiment_id" api:"nullable" format:"uuid"`
Correction FeedbackSchemaCorrectionUnion `json:"correction" api:"nullable"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
FeedbackGroupID string `json:"feedback_group_id" api:"nullable" format:"uuid"`
// The feedback source loaded from the database.
FeedbackSource FeedbackSchemaFeedbackSource `json:"feedback_source" api:"nullable"`
FeedbackThreadID string `json:"feedback_thread_id" api:"nullable"`
ModifiedAt time.Time `json:"modified_at" format:"date-time"`
RunID string `json:"run_id" api:"nullable" format:"uuid"`
Score FeedbackSchemaScoreUnion `json:"score" api:"nullable"`
SessionID string `json:"session_id" api:"nullable" format:"uuid"`
StartTime time.Time `json:"start_time" api:"nullable" format:"date-time"`
TraceID string `json:"trace_id" api:"nullable" format:"uuid"`
Value FeedbackSchemaValueUnion `json:"value" api:"nullable"`
JSON feedbackSchemaJSON `json:"-"`
}
Schema for getting feedback.
func (*FeedbackSchema) UnmarshalJSON ¶
func (r *FeedbackSchema) UnmarshalJSON(data []byte) (err error)
type FeedbackSchemaCorrectionMap ¶
type FeedbackSchemaCorrectionMap map[string]interface{}
func (FeedbackSchemaCorrectionMap) ImplementsFeedbackSchemaCorrectionUnion ¶
func (r FeedbackSchemaCorrectionMap) ImplementsFeedbackSchemaCorrectionUnion()
type FeedbackSchemaCorrectionUnion ¶
type FeedbackSchemaCorrectionUnion interface {
ImplementsFeedbackSchemaCorrectionUnion()
}
Union satisfied by FeedbackSchemaCorrectionMap or shared.UnionString.
type FeedbackSchemaFeedbackSource ¶
type FeedbackSchemaFeedbackSource struct {
LsUserID string `json:"ls_user_id" api:"nullable" format:"uuid"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
Type string `json:"type" api:"nullable"`
UserID string `json:"user_id" api:"nullable" format:"uuid"`
UserName string `json:"user_name" api:"nullable"`
JSON feedbackSchemaFeedbackSourceJSON `json:"-"`
}
The feedback source loaded from the database.
func (*FeedbackSchemaFeedbackSource) UnmarshalJSON ¶
func (r *FeedbackSchemaFeedbackSource) UnmarshalJSON(data []byte) (err error)
type FeedbackSchemaScoreUnion ¶
type FeedbackSchemaScoreUnion interface {
ImplementsFeedbackSchemaScoreUnion()
}
Union satisfied by shared.UnionFloat or shared.UnionBool.
type FeedbackSchemaValueMap ¶
type FeedbackSchemaValueMap map[string]interface{}
func (FeedbackSchemaValueMap) ImplementsFeedbackSchemaValueUnion ¶
func (r FeedbackSchemaValueMap) ImplementsFeedbackSchemaValueUnion()
type FeedbackSchemaValueUnion ¶
type FeedbackSchemaValueUnion interface {
ImplementsFeedbackSchemaValueUnion()
}
Union satisfied by shared.UnionFloat, shared.UnionBool, shared.UnionString or FeedbackSchemaValueMap.
type FeedbackService ¶
type FeedbackService struct {
Options []option.RequestOption
Tokens *FeedbackTokenService
Configs *FeedbackConfigService
}
FeedbackService contains methods and other services that help with interacting with the langChain 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 NewFeedbackService method instead.
func NewFeedbackService ¶
func NewFeedbackService(opts ...option.RequestOption) (r *FeedbackService)
NewFeedbackService 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 (*FeedbackService) Delete ¶
func (r *FeedbackService) Delete(ctx context.Context, feedbackID string, opts ...option.RequestOption) (res *FeedbackDeleteResponse, err error)
Delete a feedback.
func (*FeedbackService) Get ¶
func (r *FeedbackService) Get(ctx context.Context, feedbackID string, query FeedbackGetParams, opts ...option.RequestOption) (res *FeedbackSchema, err error)
Get a specific feedback.
func (*FeedbackService) List ¶
func (r *FeedbackService) List(ctx context.Context, query FeedbackListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[FeedbackSchema], err error)
List all Feedback by query params.
func (*FeedbackService) ListAutoPaging ¶
func (r *FeedbackService) ListAutoPaging(ctx context.Context, query FeedbackListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[FeedbackSchema]
List all Feedback by query params.
func (*FeedbackService) New ¶
func (r *FeedbackService) New(ctx context.Context, body FeedbackNewParams, opts ...option.RequestOption) (res *FeedbackSchema, err error)
Create a new feedback.
func (*FeedbackService) Update ¶
func (r *FeedbackService) Update(ctx context.Context, feedbackID string, body FeedbackUpdateParams, opts ...option.RequestOption) (res *FeedbackSchema, err error)
Replace an existing feedback entry with a new, modified entry.
type FeedbackTokenGetParams ¶
type FeedbackTokenGetParams struct {
Comment param.Field[string] `query:"comment"`
Correction param.Field[string] `query:"correction"`
Score param.Field[FeedbackTokenGetParamsScoreUnion] `query:"score"`
Value param.Field[FeedbackTokenGetParamsValueUnion] `query:"value"`
}
func (FeedbackTokenGetParams) URLQuery ¶
func (r FeedbackTokenGetParams) URLQuery() (v url.Values)
URLQuery serializes FeedbackTokenGetParams's query parameters as `url.Values`.
type FeedbackTokenGetParamsScoreUnion ¶
type FeedbackTokenGetParamsScoreUnion interface {
ImplementsFeedbackTokenGetParamsScoreUnion()
}
Satisfied by shared.UnionFloat, shared.UnionBool.
type FeedbackTokenGetParamsValueUnion ¶
type FeedbackTokenGetParamsValueUnion interface {
ImplementsFeedbackTokenGetParamsValueUnion()
}
Satisfied by shared.UnionFloat, shared.UnionBool, shared.UnionString.
type FeedbackTokenGetResponse ¶
type FeedbackTokenGetResponse = interface{}
type FeedbackTokenListParams ¶
type FeedbackTokenListParams struct {
RunID param.Field[string] `query:"run_id" api:"required" format:"uuid"`
}
func (FeedbackTokenListParams) URLQuery ¶
func (r FeedbackTokenListParams) URLQuery() (v url.Values)
URLQuery serializes FeedbackTokenListParams's query parameters as `url.Values`.
type FeedbackTokenNewParams ¶
type FeedbackTokenNewParams struct {
// Feedback ingest token create schema.
Body FeedbackTokenNewParamsBodyUnion `json:"body" api:"required"`
}
func (FeedbackTokenNewParams) MarshalJSON ¶
func (r FeedbackTokenNewParams) MarshalJSON() (data []byte, err error)
type FeedbackTokenNewParamsBodyArray ¶
type FeedbackTokenNewParamsBodyArray []FeedbackIngestTokenCreateSchemaParam
type FeedbackTokenNewParamsBodyUnion ¶
type FeedbackTokenNewParamsBodyUnion interface {
// contains filtered or unexported methods
}
Feedback ingest token create schema.
Satisfied by FeedbackIngestTokenCreateSchemaParam, FeedbackTokenNewParamsBodyArray.
type FeedbackTokenNewResponseArray ¶
type FeedbackTokenNewResponseArray []FeedbackIngestTokenSchema
type FeedbackTokenNewResponseUnion ¶
type FeedbackTokenNewResponseUnion interface {
// contains filtered or unexported methods
}
Feedback ingest token schema.
Union satisfied by FeedbackIngestTokenSchema or FeedbackTokenNewResponseArray.
type FeedbackTokenService ¶
type FeedbackTokenService struct {
Options []option.RequestOption
}
FeedbackTokenService contains methods and other services that help with interacting with the langChain 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 NewFeedbackTokenService method instead.
func NewFeedbackTokenService ¶
func NewFeedbackTokenService(opts ...option.RequestOption) (r *FeedbackTokenService)
NewFeedbackTokenService 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 (*FeedbackTokenService) Get ¶
func (r *FeedbackTokenService) Get(ctx context.Context, token string, query FeedbackTokenGetParams, opts ...option.RequestOption) (res *FeedbackTokenGetResponse, err error)
Create a new feedback with a token.
func (*FeedbackTokenService) List ¶
func (r *FeedbackTokenService) List(ctx context.Context, query FeedbackTokenListParams, opts ...option.RequestOption) (res *[]FeedbackIngestTokenSchema, err error)
List all feedback ingest tokens for a run.
func (*FeedbackTokenService) New ¶
func (r *FeedbackTokenService) New(ctx context.Context, body FeedbackTokenNewParams, opts ...option.RequestOption) (res *FeedbackTokenNewResponseUnion, err error)
Create a new feedback ingest token.
func (*FeedbackTokenService) Update ¶
func (r *FeedbackTokenService) Update(ctx context.Context, token string, body FeedbackTokenUpdateParams, opts ...option.RequestOption) (res *FeedbackTokenUpdateResponse, err error)
Create a new feedback with a token.
type FeedbackTokenUpdateParams ¶
type FeedbackTokenUpdateParams struct {
Comment param.Field[string] `json:"comment"`
Correction param.Field[FeedbackTokenUpdateParamsCorrectionUnion] `json:"correction"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Score param.Field[FeedbackTokenUpdateParamsScoreUnion] `json:"score"`
Value param.Field[FeedbackTokenUpdateParamsValueUnion] `json:"value"`
}
func (FeedbackTokenUpdateParams) MarshalJSON ¶
func (r FeedbackTokenUpdateParams) MarshalJSON() (data []byte, err error)
type FeedbackTokenUpdateParamsCorrectionMap ¶
type FeedbackTokenUpdateParamsCorrectionMap map[string]interface{}
func (FeedbackTokenUpdateParamsCorrectionMap) ImplementsFeedbackTokenUpdateParamsCorrectionUnion ¶
func (r FeedbackTokenUpdateParamsCorrectionMap) ImplementsFeedbackTokenUpdateParamsCorrectionUnion()
type FeedbackTokenUpdateParamsCorrectionUnion ¶
type FeedbackTokenUpdateParamsCorrectionUnion interface {
ImplementsFeedbackTokenUpdateParamsCorrectionUnion()
}
Satisfied by FeedbackTokenUpdateParamsCorrectionMap, shared.UnionString.
type FeedbackTokenUpdateParamsScoreUnion ¶
type FeedbackTokenUpdateParamsScoreUnion interface {
ImplementsFeedbackTokenUpdateParamsScoreUnion()
}
Satisfied by shared.UnionFloat, shared.UnionBool.
type FeedbackTokenUpdateParamsValueUnion ¶
type FeedbackTokenUpdateParamsValueUnion interface {
ImplementsFeedbackTokenUpdateParamsValueUnion()
}
Satisfied by shared.UnionFloat, shared.UnionBool, shared.UnionString.
type FeedbackTokenUpdateResponse ¶
type FeedbackTokenUpdateResponse = interface{}
type FeedbackUpdateParams ¶
type FeedbackUpdateParams struct {
Comment param.Field[string] `json:"comment"`
Correction param.Field[FeedbackUpdateParamsCorrectionUnion] `json:"correction"`
FeedbackConfig param.Field[FeedbackUpdateParamsFeedbackConfig] `json:"feedback_config"`
Score param.Field[FeedbackUpdateParamsScoreUnion] `json:"score"`
Value param.Field[FeedbackUpdateParamsValueUnion] `json:"value"`
}
func (FeedbackUpdateParams) MarshalJSON ¶
func (r FeedbackUpdateParams) MarshalJSON() (data []byte, err error)
type FeedbackUpdateParamsCorrectionMap ¶
type FeedbackUpdateParamsCorrectionMap map[string]interface{}
func (FeedbackUpdateParamsCorrectionMap) ImplementsFeedbackUpdateParamsCorrectionUnion ¶
func (r FeedbackUpdateParamsCorrectionMap) ImplementsFeedbackUpdateParamsCorrectionUnion()
type FeedbackUpdateParamsCorrectionUnion ¶
type FeedbackUpdateParamsCorrectionUnion interface {
ImplementsFeedbackUpdateParamsCorrectionUnion()
}
Satisfied by FeedbackUpdateParamsCorrectionMap, shared.UnionString.
type FeedbackUpdateParamsFeedbackConfig ¶
type FeedbackUpdateParamsFeedbackConfig struct {
// Enum for feedback types.
Type param.Field[FeedbackUpdateParamsFeedbackConfigType] `json:"type" api:"required"`
Categories param.Field[[]FeedbackUpdateParamsFeedbackConfigCategory] `json:"categories"`
Max param.Field[float64] `json:"max"`
Min param.Field[float64] `json:"min"`
}
func (FeedbackUpdateParamsFeedbackConfig) MarshalJSON ¶
func (r FeedbackUpdateParamsFeedbackConfig) MarshalJSON() (data []byte, err error)
type FeedbackUpdateParamsFeedbackConfigCategory ¶
type FeedbackUpdateParamsFeedbackConfigCategory struct {
Value param.Field[float64] `json:"value" api:"required"`
Label param.Field[string] `json:"label"`
}
Specific value and label pair for feedback
func (FeedbackUpdateParamsFeedbackConfigCategory) MarshalJSON ¶
func (r FeedbackUpdateParamsFeedbackConfigCategory) MarshalJSON() (data []byte, err error)
type FeedbackUpdateParamsFeedbackConfigType ¶
type FeedbackUpdateParamsFeedbackConfigType string
Enum for feedback types.
const ( FeedbackUpdateParamsFeedbackConfigTypeContinuous FeedbackUpdateParamsFeedbackConfigType = "continuous" FeedbackUpdateParamsFeedbackConfigTypeCategorical FeedbackUpdateParamsFeedbackConfigType = "categorical" FeedbackUpdateParamsFeedbackConfigTypeFreeform FeedbackUpdateParamsFeedbackConfigType = "freeform" )
func (FeedbackUpdateParamsFeedbackConfigType) IsKnown ¶
func (r FeedbackUpdateParamsFeedbackConfigType) IsKnown() bool
type FeedbackUpdateParamsScoreUnion ¶
type FeedbackUpdateParamsScoreUnion interface {
ImplementsFeedbackUpdateParamsScoreUnion()
}
Satisfied by shared.UnionFloat, shared.UnionBool.
type FeedbackUpdateParamsValueMap ¶
type FeedbackUpdateParamsValueMap map[string]interface{}
func (FeedbackUpdateParamsValueMap) ImplementsFeedbackUpdateParamsValueUnion ¶
func (r FeedbackUpdateParamsValueMap) ImplementsFeedbackUpdateParamsValueUnion()
type FeedbackUpdateParamsValueUnion ¶
type FeedbackUpdateParamsValueUnion interface {
ImplementsFeedbackUpdateParamsValueUnion()
}
Satisfied by shared.UnionFloat, shared.UnionBool, shared.UnionString, FeedbackUpdateParamsValueMap.
type GenerateInsightsParams ¶ added in v0.2.1
type GetInsightsReportParams ¶ added in v0.2.1
type GetInsightsReportParams struct {
Report *InsightsReport
ID string
ProjectID string
IncludeRuns bool
}
type GetRepoResponse ¶
type GetRepoResponse struct {
// All database fields for repos, plus helpful computed fields.
Repo RepoWithLookups `json:"repo" api:"required"`
JSON getRepoResponseJSON `json:"-"`
}
func (*GetRepoResponse) UnmarshalJSON ¶
func (r *GetRepoResponse) UnmarshalJSON(data []byte) (err error)
type InsightsReport ¶ added in v0.2.1
type InsightsReport struct {
ID string
Name string
Status string
Error string
ProjectID string
TenantID string
HostURL string
}
func (*InsightsReport) Link ¶ added in v0.2.1
func (r *InsightsReport) Link() string
type InsightsReportResult ¶ added in v0.2.1
type InsightsReportResult struct {
ID string
Name string
Status string
StartTime *time.Time
EndTime *time.Time
ConfigID string
Metadata map[string]interface{}
Shape map[string]int64
Error string
Clusters []SessionInsightGetJobResponseCluster
Report *SessionInsightGetJobResponseReport
Runs []map[string]interface{}
}
type MissingParam ¶
type MissingParam struct {
Missing param.Field[Missing_Missing] `json:"__missing__" api:"required"`
}
func (MissingParam) ImplementsAnnotationQueueUpdateParamsNumReviewersPerItemUnion ¶
func (r MissingParam) ImplementsAnnotationQueueUpdateParamsNumReviewersPerItemUnion()
func (MissingParam) ImplementsDatasetUpdateParamsBaselineExperimentIDUnion ¶
func (r MissingParam) ImplementsDatasetUpdateParamsBaselineExperimentIDUnion()
func (MissingParam) ImplementsDatasetUpdateParamsDescriptionUnion ¶
func (r MissingParam) ImplementsDatasetUpdateParamsDescriptionUnion()
func (MissingParam) ImplementsDatasetUpdateParamsNameUnion ¶
func (r MissingParam) ImplementsDatasetUpdateParamsNameUnion()
func (MissingParam) MarshalJSON ¶
func (r MissingParam) MarshalJSON() (data []byte, err error)
type Missing_Missing ¶
type Missing_Missing string
const (
Missing_Missing_Missing Missing_Missing = "__missing__"
)
func (Missing_Missing) IsKnown ¶
func (r Missing_Missing) IsKnown() bool
type ModelFeedbackSourceParam ¶
type ModelFeedbackSourceParam struct {
Metadata param.Field[map[string]interface{}] `json:"metadata"`
Type param.Field[ModelFeedbackSourceType] `json:"type"`
}
Model feedback source.
func (ModelFeedbackSourceParam) MarshalJSON ¶
func (r ModelFeedbackSourceParam) MarshalJSON() (data []byte, err error)
type ModelFeedbackSourceType ¶
type ModelFeedbackSourceType string
const (
ModelFeedbackSourceTypeModel ModelFeedbackSourceType = "model"
)
func (ModelFeedbackSourceType) IsKnown ¶
func (r ModelFeedbackSourceType) IsKnown() bool
type OTelTracer ¶ added in v0.2.2
type OTelTracer struct {
// contains filtered or unexported fields
}
OTelTracer manages a LangSmith span processor registered on an OpenTelemetry tracer provider.
func NewOTel ¶ added in v0.2.2
func NewOTel(tp *sdktrace.TracerProvider, opts ...OTelTracerOption) (*OTelTracer, error)
NewOTel registers a LangSmith exporter on the provided TracerProvider.
Example:
tp := sdktrace.NewTracerProvider()
defer tp.Shutdown(context.Background())
otel.SetTracerProvider(tp)
ls, err := langsmith.NewOTel(tp,
langsmith.WithAPIKey("your-api-key"),
langsmith.WithProjectName("my-project"),
)
if err != nil {
log.Fatal(err)
}
defer ls.Shutdown(context.Background())
func NewOTelTracer ¶ added in v0.2.2
func NewOTelTracer(opts ...OTelTracerOption) (*OTelTracer, error)
NewOTelTracer creates a new OTelTracer that owns its own TracerProvider. For sharing a TracerProvider with other libraries, use NewOTel instead.
func (*OTelTracer) Shutdown ¶ added in v0.2.2
func (t *OTelTracer) Shutdown(ctx context.Context) error
Shutdown gracefully shuts down the tracer. If the OTelTracer was created with NewOTel, only the LangSmith processor is shut down. If it was created with NewOTelTracer, the entire TracerProvider is shut down.
func (*OTelTracer) Tracer ¶ added in v0.2.2
func (t *OTelTracer) Tracer(name string) trace.Tracer
Tracer returns a trace.Tracer with the given name.
func (*OTelTracer) TracerProvider ¶ added in v0.2.2
func (t *OTelTracer) TracerProvider() trace.TracerProvider
TracerProvider returns the underlying trace.TracerProvider.
type OTelTracerOption ¶ added in v0.2.2
type OTelTracerOption func(*tracerConfig)
OTelTracerOption configures an OTelTracer.
func WithAPIKey ¶
func WithAPIKey(apiKey string) OTelTracerOption
WithAPIKey sets the LangSmith API key.
func WithBatchTimeout ¶
func WithBatchTimeout(timeout time.Duration) OTelTracerOption
WithBatchTimeout sets the batch timeout for trace exports.
func WithEndpoint ¶
func WithEndpoint(endpoint string) OTelTracerOption
WithEndpoint sets the LangSmith endpoint URL.
func WithProjectName ¶
func WithProjectName(projectName string) OTelTracerOption
WithProjectName sets the LangSmith project name.
func WithServiceName ¶
func WithServiceName(serviceName string) OTelTracerOption
WithServiceName sets the service name for the tracer.
type PollInsightsParams ¶ added in v0.2.1
type PublicDatasetGetSessionsBulkParams ¶
type PublicDatasetGetSessionsBulkParams struct {
}
func (PublicDatasetGetSessionsBulkParams) URLQuery ¶
func (r PublicDatasetGetSessionsBulkParams) URLQuery() (v url.Values)
URLQuery serializes PublicDatasetGetSessionsBulkParams's query parameters as `url.Values`.
type PublicDatasetListComparativeParams ¶
type PublicDatasetListComparativeParams struct {
Limit param.Field[int64] `query:"limit"`
Name param.Field[string] `query:"name"`
NameContains param.Field[string] `query:"name_contains"`
Offset param.Field[int64] `query:"offset"`
// Enum for available comparative experiment columns to sort by.
SortBy param.Field[SortByComparativeExperimentColumn] `query:"sort_by"`
SortByDesc param.Field[bool] `query:"sort_by_desc"`
}
func (PublicDatasetListComparativeParams) URLQuery ¶
func (r PublicDatasetListComparativeParams) URLQuery() (v url.Values)
URLQuery serializes PublicDatasetListComparativeParams's query parameters as `url.Values`.
type PublicDatasetListComparativeResponse ¶
type PublicDatasetListComparativeResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
ExperimentsInfo []SimpleExperimentInfo `json:"experiments_info" api:"required"`
ModifiedAt time.Time `json:"modified_at" api:"required" format:"date-time"`
Description string `json:"description" api:"nullable"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
FeedbackStats map[string]interface{} `json:"feedback_stats" api:"nullable"`
Name string `json:"name" api:"nullable"`
JSON publicDatasetListComparativeResponseJSON `json:"-"`
}
Publicly-shared ComparativeExperiment schema.
func (*PublicDatasetListComparativeResponse) UnmarshalJSON ¶
func (r *PublicDatasetListComparativeResponse) UnmarshalJSON(data []byte) (err error)
type PublicDatasetListFeedbackParams ¶
type PublicDatasetListFeedbackParams struct {
HasComment param.Field[bool] `query:"has_comment"`
HasScore param.Field[bool] `query:"has_score"`
Key param.Field[[]string] `query:"key"`
// Enum for feedback levels.
Level param.Field[FeedbackLevel] `query:"level"`
Limit param.Field[int64] `query:"limit"`
Offset param.Field[int64] `query:"offset"`
Run param.Field[[]string] `query:"run" format:"uuid"`
Session param.Field[[]string] `query:"session" format:"uuid"`
Source param.Field[[]SourceType] `query:"source"`
User param.Field[[]string] `query:"user" format:"uuid"`
}
func (PublicDatasetListFeedbackParams) URLQuery ¶
func (r PublicDatasetListFeedbackParams) URLQuery() (v url.Values)
URLQuery serializes PublicDatasetListFeedbackParams's query parameters as `url.Values`.
type PublicDatasetListParams ¶
type PublicDatasetListParams struct {
Limit param.Field[int64] `query:"limit"`
Offset param.Field[int64] `query:"offset"`
// Enum for available dataset columns to sort by.
SortBy param.Field[SortByDatasetColumn] `query:"sort_by"`
SortByDesc param.Field[bool] `query:"sort_by_desc"`
}
func (PublicDatasetListParams) URLQuery ¶
func (r PublicDatasetListParams) URLQuery() (v url.Values)
URLQuery serializes PublicDatasetListParams's query parameters as `url.Values`.
type PublicDatasetListResponse ¶
type PublicDatasetListResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
ExampleCount int64 `json:"example_count" api:"required"`
Name string `json:"name" api:"required"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Enum for dataset data types.
DataType DataType `json:"data_type" api:"nullable"`
Description string `json:"description" api:"nullable"`
ExternallyManaged bool `json:"externally_managed" api:"nullable"`
InputsSchemaDefinition map[string]interface{} `json:"inputs_schema_definition" api:"nullable"`
OutputsSchemaDefinition map[string]interface{} `json:"outputs_schema_definition" api:"nullable"`
Transformations []DatasetTransformation `json:"transformations" api:"nullable"`
JSON publicDatasetListResponseJSON `json:"-"`
}
Public schema for datasets.
Doesn't currently include session counts/stats since public test project sharing is not yet shipped
func (*PublicDatasetListResponse) UnmarshalJSON ¶
func (r *PublicDatasetListResponse) UnmarshalJSON(data []byte) (err error)
type PublicDatasetListSessionsParams ¶
type PublicDatasetListSessionsParams struct {
ID param.Field[[]string] `query:"id" format:"uuid"`
DatasetVersion param.Field[string] `query:"dataset_version"`
Facets param.Field[bool] `query:"facets"`
Limit param.Field[int64] `query:"limit"`
Name param.Field[string] `query:"name"`
NameContains param.Field[string] `query:"name_contains"`
Offset param.Field[int64] `query:"offset"`
SortBy param.Field[SessionSortableColumns] `query:"sort_by"`
SortByDesc param.Field[bool] `query:"sort_by_desc"`
SortByFeedbackKey param.Field[string] `query:"sort_by_feedback_key"`
Accept param.Field[string] `header:"accept"`
}
func (PublicDatasetListSessionsParams) URLQuery ¶
func (r PublicDatasetListSessionsParams) URLQuery() (v url.Values)
URLQuery serializes PublicDatasetListSessionsParams's query parameters as `url.Values`.
type PublicDatasetService ¶
type PublicDatasetService struct {
Options []option.RequestOption
}
PublicDatasetService contains methods and other services that help with interacting with the langChain 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 NewPublicDatasetService method instead.
func NewPublicDatasetService ¶
func NewPublicDatasetService(opts ...option.RequestOption) (r *PublicDatasetService)
NewPublicDatasetService 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 (*PublicDatasetService) GetSessionsBulk ¶
func (r *PublicDatasetService) GetSessionsBulk(ctx context.Context, query PublicDatasetGetSessionsBulkParams, opts ...option.RequestOption) (res *[]TracerSession, err error)
Get sessions from multiple datasets using share tokens.
func (*PublicDatasetService) List ¶
func (r *PublicDatasetService) List(ctx context.Context, shareToken string, query PublicDatasetListParams, opts ...option.RequestOption) (res *PublicDatasetListResponse, err error)
Get dataset by ids or the shared dataset if not specifed.
func (*PublicDatasetService) ListComparative ¶
func (r *PublicDatasetService) ListComparative(ctx context.Context, shareToken string, query PublicDatasetListComparativeParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[PublicDatasetListComparativeResponse], err error)
Get all comparative experiments for a given dataset.
func (*PublicDatasetService) ListComparativeAutoPaging ¶
func (r *PublicDatasetService) ListComparativeAutoPaging(ctx context.Context, shareToken string, query PublicDatasetListComparativeParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[PublicDatasetListComparativeResponse]
Get all comparative experiments for a given dataset.
func (*PublicDatasetService) ListFeedback ¶
func (r *PublicDatasetService) ListFeedback(ctx context.Context, shareToken string, query PublicDatasetListFeedbackParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[FeedbackSchema], err error)
Get feedback for runs in projects run over a dataset that has been shared.
func (*PublicDatasetService) ListFeedbackAutoPaging ¶
func (r *PublicDatasetService) ListFeedbackAutoPaging(ctx context.Context, shareToken string, query PublicDatasetListFeedbackParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[FeedbackSchema]
Get feedback for runs in projects run over a dataset that has been shared.
func (*PublicDatasetService) ListSessions ¶
func (r *PublicDatasetService) ListSessions(ctx context.Context, shareToken string, params PublicDatasetListSessionsParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[TracerSession], err error)
Get projects run on a dataset that has been shared.
func (*PublicDatasetService) ListSessionsAutoPaging ¶
func (r *PublicDatasetService) ListSessionsAutoPaging(ctx context.Context, shareToken string, params PublicDatasetListSessionsParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[TracerSession]
Get projects run on a dataset that has been shared.
type PublicGetFeedbacksParams ¶
type PublicGetFeedbacksParams struct {
HasComment param.Field[bool] `query:"has_comment"`
HasScore param.Field[bool] `query:"has_score"`
Key param.Field[[]string] `query:"key"`
// Enum for feedback levels.
Level param.Field[FeedbackLevel] `query:"level"`
Limit param.Field[int64] `query:"limit"`
Offset param.Field[int64] `query:"offset"`
Run param.Field[[]string] `query:"run" format:"uuid"`
Session param.Field[[]string] `query:"session" format:"uuid"`
Source param.Field[[]SourceType] `query:"source"`
User param.Field[[]string] `query:"user" format:"uuid"`
}
func (PublicGetFeedbacksParams) URLQuery ¶
func (r PublicGetFeedbacksParams) URLQuery() (v url.Values)
URLQuery serializes PublicGetFeedbacksParams's query parameters as `url.Values`.
type PublicService ¶
type PublicService struct {
Options []option.RequestOption
Datasets *PublicDatasetService
}
PublicService contains methods and other services that help with interacting with the langChain 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 NewPublicService method instead.
func NewPublicService ¶
func NewPublicService(opts ...option.RequestOption) (r *PublicService)
NewPublicService 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 (*PublicService) GetFeedbacks ¶
func (r *PublicService) GetFeedbacks(ctx context.Context, shareToken string, query PublicGetFeedbacksParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[FeedbackSchema], err error)
Read Shared Feedbacks
func (*PublicService) GetFeedbacksAutoPaging ¶
func (r *PublicService) GetFeedbacksAutoPaging(ctx context.Context, shareToken string, query PublicGetFeedbacksParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[FeedbackSchema]
Read Shared Feedbacks
type QueryFeedbackDeltaParam ¶
type QueryFeedbackDeltaParam struct {
BaselineSessionID param.Field[string] `json:"baseline_session_id" api:"required" format:"uuid"`
ComparisonSessionIDs param.Field[[]string] `json:"comparison_session_ids" api:"required" format:"uuid"`
FeedbackKey param.Field[string] `json:"feedback_key" api:"required"`
ComparativeExperimentID param.Field[string] `json:"comparative_experiment_id" format:"uuid"`
Filters param.Field[map[string][]string] `json:"filters"`
Limit param.Field[int64] `json:"limit"`
Offset param.Field[int64] `json:"offset"`
}
func (QueryFeedbackDeltaParam) MarshalJSON ¶
func (r QueryFeedbackDeltaParam) MarshalJSON() (data []byte, err error)
type RepoDeleteResponse ¶
type RepoDeleteResponse = interface{}
type RepoListParams ¶
type RepoListParams struct {
HasCommits param.Field[bool] `query:"has_commits"`
IsArchived param.Field[RepoListParamsIsArchived] `query:"is_archived"`
IsPublic param.Field[RepoListParamsIsPublic] `query:"is_public"`
Limit param.Field[int64] `query:"limit"`
Offset param.Field[int64] `query:"offset"`
Query param.Field[string] `query:"query"`
RepoType param.Field[RepoListParamsRepoType] `query:"repo_type"`
SortDirection param.Field[RepoListParamsSortDirection] `query:"sort_direction"`
SortField param.Field[RepoListParamsSortField] `query:"sort_field"`
TagValueID param.Field[[]string] `query:"tag_value_id" format:"uuid"`
Tags param.Field[[]string] `query:"tags"`
TenantHandle param.Field[string] `query:"tenant_handle"`
TenantID param.Field[string] `query:"tenant_id" format:"uuid"`
UpstreamRepoHandle param.Field[string] `query:"upstream_repo_handle"`
UpstreamRepoOwner param.Field[string] `query:"upstream_repo_owner"`
WithLatestManifest param.Field[bool] `query:"with_latest_manifest"`
}
func (RepoListParams) URLQuery ¶
func (r RepoListParams) URLQuery() (v url.Values)
URLQuery serializes RepoListParams's query parameters as `url.Values`.
type RepoListParamsIsArchived ¶
type RepoListParamsIsArchived string
const ( RepoListParamsIsArchivedTrue RepoListParamsIsArchived = "true" RepoListParamsIsArchivedAllow RepoListParamsIsArchived = "allow" RepoListParamsIsArchivedFalse RepoListParamsIsArchived = "false" )
func (RepoListParamsIsArchived) IsKnown ¶
func (r RepoListParamsIsArchived) IsKnown() bool
type RepoListParamsIsPublic ¶
type RepoListParamsIsPublic string
const ( RepoListParamsIsPublicTrue RepoListParamsIsPublic = "true" RepoListParamsIsPublicFalse RepoListParamsIsPublic = "false" )
func (RepoListParamsIsPublic) IsKnown ¶
func (r RepoListParamsIsPublic) IsKnown() bool
type RepoListParamsRepoType ¶ added in v0.2.0
type RepoListParamsRepoType string
const ( RepoListParamsRepoTypePrompt RepoListParamsRepoType = "prompt" RepoListParamsRepoTypeFile RepoListParamsRepoType = "file" RepoListParamsRepoTypeAgent RepoListParamsRepoType = "agent" RepoListParamsRepoTypeSkill RepoListParamsRepoType = "skill" )
func (RepoListParamsRepoType) IsKnown ¶ added in v0.2.0
func (r RepoListParamsRepoType) IsKnown() bool
type RepoListParamsSortDirection ¶
type RepoListParamsSortDirection string
const ( RepoListParamsSortDirectionAsc RepoListParamsSortDirection = "asc" RepoListParamsSortDirectionDesc RepoListParamsSortDirection = "desc" )
func (RepoListParamsSortDirection) IsKnown ¶
func (r RepoListParamsSortDirection) IsKnown() bool
type RepoListParamsSortField ¶
type RepoListParamsSortField string
const ( RepoListParamsSortFieldNumLikes RepoListParamsSortField = "num_likes" RepoListParamsSortFieldNumDownloads RepoListParamsSortField = "num_downloads" RepoListParamsSortFieldNumViews RepoListParamsSortField = "num_views" RepoListParamsSortFieldUpdatedAt RepoListParamsSortField = "updated_at" RepoListParamsSortFieldRelevance RepoListParamsSortField = "relevance" )
func (RepoListParamsSortField) IsKnown ¶
func (r RepoListParamsSortField) IsKnown() bool
type RepoNewParams ¶
type RepoNewParams struct {
IsPublic param.Field[bool] `json:"is_public" api:"required"`
RepoHandle param.Field[string] `json:"repo_handle" api:"required"`
Description param.Field[string] `json:"description"`
Readme param.Field[string] `json:"readme"`
RepoType param.Field[RepoNewParamsRepoType] `json:"repo_type"`
RestrictedMode param.Field[bool] `json:"restricted_mode"`
Tags param.Field[[]string] `json:"tags"`
}
func (RepoNewParams) MarshalJSON ¶
func (r RepoNewParams) MarshalJSON() (data []byte, err error)
type RepoNewParamsRepoType ¶ added in v0.2.0
type RepoNewParamsRepoType string
const ( RepoNewParamsRepoTypePrompt RepoNewParamsRepoType = "prompt" RepoNewParamsRepoTypeFile RepoNewParamsRepoType = "file" RepoNewParamsRepoTypeAgent RepoNewParamsRepoType = "agent" RepoNewParamsRepoTypeSkill RepoNewParamsRepoType = "skill" )
func (RepoNewParamsRepoType) IsKnown ¶ added in v0.2.0
func (r RepoNewParamsRepoType) IsKnown() bool
type RepoService ¶
type RepoService struct {
Options []option.RequestOption
}
RepoService contains methods and other services that help with interacting with the langChain 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 NewRepoService method instead.
func NewRepoService ¶
func NewRepoService(opts ...option.RequestOption) (r *RepoService)
NewRepoService 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 (*RepoService) Delete ¶
func (r *RepoService) Delete(ctx context.Context, owner string, repo string, opts ...option.RequestOption) (res *RepoDeleteResponse, err error)
Delete a repo.
func (*RepoService) Get ¶
func (r *RepoService) Get(ctx context.Context, owner string, repo string, opts ...option.RequestOption) (res *GetRepoResponse, err error)
Get a repo.
func (*RepoService) List ¶
func (r *RepoService) List(ctx context.Context, query RepoListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationRepos[RepoWithLookups], err error)
Get all repos.
func (*RepoService) ListAutoPaging ¶
func (r *RepoService) ListAutoPaging(ctx context.Context, query RepoListParams, opts ...option.RequestOption) *pagination.OffsetPaginationReposAutoPager[RepoWithLookups]
Get all repos.
func (*RepoService) New ¶
func (r *RepoService) New(ctx context.Context, body RepoNewParams, opts ...option.RequestOption) (res *CreateRepoResponse, err error)
Create a repo.
func (*RepoService) Update ¶
func (r *RepoService) Update(ctx context.Context, owner string, repo string, body RepoUpdateParams, opts ...option.RequestOption) (res *CreateRepoResponse, err error)
Update a repo.
type RepoUpdateParams ¶
type RepoUpdateParams struct {
Description param.Field[string] `json:"description"`
IsArchived param.Field[bool] `json:"is_archived"`
IsPublic param.Field[bool] `json:"is_public"`
Readme param.Field[string] `json:"readme"`
RestrictedMode param.Field[bool] `json:"restricted_mode"`
Tags param.Field[[]string] `json:"tags"`
}
func (RepoUpdateParams) MarshalJSON ¶
func (r RepoUpdateParams) MarshalJSON() (data []byte, err error)
type RepoWithLookups ¶
type RepoWithLookups struct {
ID string `json:"id" api:"required" format:"uuid"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
FullName string `json:"full_name" api:"required"`
IsArchived bool `json:"is_archived" api:"required"`
IsPublic bool `json:"is_public" api:"required"`
NumCommits int64 `json:"num_commits" api:"required"`
NumDownloads int64 `json:"num_downloads" api:"required"`
NumLikes int64 `json:"num_likes" api:"required"`
NumViews int64 `json:"num_views" api:"required"`
Owner string `json:"owner" api:"required,nullable"`
RepoHandle string `json:"repo_handle" api:"required"`
RepoType RepoWithLookupsRepoType `json:"repo_type" api:"required"`
Tags []string `json:"tags" api:"required"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
CommitTags []string `json:"commit_tags"`
CreatedBy string `json:"created_by" api:"nullable"`
Description string `json:"description" api:"nullable"`
LastCommitHash string `json:"last_commit_hash" api:"nullable"`
// Response model for get_commit_manifest.
LatestCommitManifest CommitManifestResponse `json:"latest_commit_manifest" api:"nullable"`
LikedByAuthUser bool `json:"liked_by_auth_user" api:"nullable"`
OriginalRepoFullName string `json:"original_repo_full_name" api:"nullable"`
OriginalRepoID string `json:"original_repo_id" api:"nullable" format:"uuid"`
Readme string `json:"readme" api:"nullable"`
RestrictedMode bool `json:"restricted_mode"`
UpstreamRepoFullName string `json:"upstream_repo_full_name" api:"nullable"`
UpstreamRepoID string `json:"upstream_repo_id" api:"nullable" format:"uuid"`
JSON repoWithLookupsJSON `json:"-"`
}
All database fields for repos, plus helpful computed fields.
func (*RepoWithLookups) UnmarshalJSON ¶
func (r *RepoWithLookups) UnmarshalJSON(data []byte) (err error)
type RepoWithLookupsRepoType ¶ added in v0.2.0
type RepoWithLookupsRepoType string
const ( RepoWithLookupsRepoTypePrompt RepoWithLookupsRepoType = "prompt" RepoWithLookupsRepoTypeFile RepoWithLookupsRepoType = "file" RepoWithLookupsRepoTypeAgent RepoWithLookupsRepoType = "agent" RepoWithLookupsRepoTypeSkill RepoWithLookupsRepoType = "skill" )
func (RepoWithLookupsRepoType) IsKnown ¶ added in v0.2.0
func (r RepoWithLookupsRepoType) IsKnown() bool
type RunCreate ¶ added in v0.2.2
type RunCreate = langsmithtracing.RunCreate
RunCreate holds parameters for creating a new run (multipart post).
type RunGetParams ¶ added in v0.2.0
type RunGetParams struct {
ExcludeS3StoredAttributes param.Field[bool] `query:"exclude_s3_stored_attributes"`
ExcludeSerialized param.Field[bool] `query:"exclude_serialized"`
IncludeMessages param.Field[bool] `query:"include_messages"`
SessionID param.Field[string] `query:"session_id" format:"uuid"`
StartTime param.Field[time.Time] `query:"start_time" format:"date-time"`
}
func (RunGetParams) URLQuery ¶ added in v0.2.0
func (r RunGetParams) URLQuery() (v url.Values)
URLQuery serializes RunGetParams's query parameters as `url.Values`.
type RunIngestBatchParams ¶
type RunIngestBatchParams struct {
Patch param.Field[[]RunParam] `json:"patch"`
Post param.Field[[]RunParam] `json:"post"`
}
func (RunIngestBatchParams) MarshalJSON ¶
func (r RunIngestBatchParams) MarshalJSON() (data []byte, err error)
type RunIngestBatchResponse ¶
type RunIngestBatchResponse map[string]RunIngestBatchResponseItem
type RunIngestBatchResponseItem ¶
type RunIngestBatchResponseItem struct {
JSON runIngestBatchResponseItemJSON `json:"-"`
}
func (*RunIngestBatchResponseItem) UnmarshalJSON ¶
func (r *RunIngestBatchResponseItem) UnmarshalJSON(data []byte) (err error)
type RunNewParams ¶ added in v0.2.0
type RunNewParams struct {
Run RunParam `json:"run" api:"required"`
}
func (RunNewParams) MarshalJSON ¶ added in v0.2.0
func (r RunNewParams) MarshalJSON() (data []byte, err error)
type RunNewResponse ¶ added in v0.2.0
type RunNewResponse map[string]RunNewResponseItem
type RunNewResponseItem ¶ added in v0.2.0
type RunNewResponseItem struct {
JSON runNewResponseItemJSON `json:"-"`
}
func (*RunNewResponseItem) UnmarshalJSON ¶ added in v0.2.0
func (r *RunNewResponseItem) UnmarshalJSON(data []byte) (err error)
type RunOp ¶ added in v0.2.2
type RunOp = langsmithtracing.RunOp
RunOp is a decoded run operation exposed to transform hooks.
type RunParam ¶
type RunParam struct {
ID param.Field[string] `json:"id"`
DottedOrder param.Field[string] `json:"dotted_order"`
EndTime param.Field[string] `json:"end_time"`
Error param.Field[string] `json:"error"`
Events param.Field[[]map[string]interface{}] `json:"events"`
Extra param.Field[map[string]interface{}] `json:"extra"`
InputAttachments param.Field[map[string]interface{}] `json:"input_attachments"`
Inputs param.Field[map[string]interface{}] `json:"inputs"`
Name param.Field[string] `json:"name"`
OutputAttachments param.Field[map[string]interface{}] `json:"output_attachments"`
Outputs param.Field[map[string]interface{}] `json:"outputs"`
ParentRunID param.Field[string] `json:"parent_run_id"`
ReferenceExampleID param.Field[string] `json:"reference_example_id"`
RunType param.Field[RunRunType] `json:"run_type"`
Serialized param.Field[map[string]interface{}] `json:"serialized"`
SessionID param.Field[string] `json:"session_id"`
SessionName param.Field[string] `json:"session_name"`
StartTime param.Field[string] `json:"start_time"`
Status param.Field[string] `json:"status"`
Tags param.Field[[]string] `json:"tags"`
TraceID param.Field[string] `json:"trace_id"`
}
func (RunParam) MarshalJSON ¶
type RunQueryParams ¶
type RunQueryParams struct {
ID param.Field[[]string] `json:"id" format:"uuid"`
Cursor param.Field[string] `json:"cursor"`
// Enum for run data source types.
DataSourceType param.Field[RunsFilterDataSourceTypeEnum] `json:"data_source_type"`
EndTime param.Field[time.Time] `json:"end_time" format:"date-time"`
Error param.Field[bool] `json:"error"`
ExecutionOrder param.Field[int64] `json:"execution_order"`
Filter param.Field[string] `json:"filter"`
IsRoot param.Field[bool] `json:"is_root"`
Limit param.Field[int64] `json:"limit"`
// Enum for run start date order.
Order param.Field[RunQueryParamsOrder] `json:"order"`
ParentRun param.Field[string] `json:"parent_run" format:"uuid"`
Query param.Field[string] `json:"query"`
ReferenceExample param.Field[[]string] `json:"reference_example" format:"uuid"`
// Enum for run types.
RunType param.Field[RunTypeEnum] `json:"run_type"`
SearchFilter param.Field[string] `json:"search_filter"`
Select param.Field[[]RunQueryParamsSelect] `json:"select"`
Session param.Field[[]string] `json:"session" format:"uuid"`
SkipPagination param.Field[bool] `json:"skip_pagination"`
SkipPrevCursor param.Field[bool] `json:"skip_prev_cursor"`
StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
Trace param.Field[string] `json:"trace" format:"uuid"`
TraceFilter param.Field[string] `json:"trace_filter"`
TreeFilter param.Field[string] `json:"tree_filter"`
UseExperimentalSearch param.Field[bool] `json:"use_experimental_search"`
}
func (RunQueryParams) MarshalJSON ¶
func (r RunQueryParams) MarshalJSON() (data []byte, err error)
type RunQueryParamsOrder ¶
type RunQueryParamsOrder string
Enum for run start date order.
const ( RunQueryParamsOrderAsc RunQueryParamsOrder = "asc" RunQueryParamsOrderDesc RunQueryParamsOrder = "desc" )
func (RunQueryParamsOrder) IsKnown ¶
func (r RunQueryParamsOrder) IsKnown() bool
type RunQueryParamsSelect ¶
type RunQueryParamsSelect string
Enum for available run columns.
const ( RunQueryParamsSelectID RunQueryParamsSelect = "id" RunQueryParamsSelectName RunQueryParamsSelect = "name" RunQueryParamsSelectRunType RunQueryParamsSelect = "run_type" RunQueryParamsSelectStartTime RunQueryParamsSelect = "start_time" RunQueryParamsSelectEndTime RunQueryParamsSelect = "end_time" RunQueryParamsSelectStatus RunQueryParamsSelect = "status" RunQueryParamsSelectError RunQueryParamsSelect = "error" RunQueryParamsSelectExtra RunQueryParamsSelect = "extra" RunQueryParamsSelectEvents RunQueryParamsSelect = "events" RunQueryParamsSelectInputs RunQueryParamsSelect = "inputs" RunQueryParamsSelectInputsPreview RunQueryParamsSelect = "inputs_preview" RunQueryParamsSelectInputsS3URLs RunQueryParamsSelect = "inputs_s3_urls" RunQueryParamsSelectInputsOrSignedURL RunQueryParamsSelect = "inputs_or_signed_url" RunQueryParamsSelectOutputs RunQueryParamsSelect = "outputs" RunQueryParamsSelectOutputsPreview RunQueryParamsSelect = "outputs_preview" RunQueryParamsSelectOutputsS3URLs RunQueryParamsSelect = "outputs_s3_urls" RunQueryParamsSelectOutputsOrSignedURL RunQueryParamsSelect = "outputs_or_signed_url" RunQueryParamsSelectS3URLs RunQueryParamsSelect = "s3_urls" RunQueryParamsSelectErrorOrSignedURL RunQueryParamsSelect = "error_or_signed_url" RunQueryParamsSelectEventsOrSignedURL RunQueryParamsSelect = "events_or_signed_url" RunQueryParamsSelectExtraOrSignedURL RunQueryParamsSelect = "extra_or_signed_url" RunQueryParamsSelectSerializedOrSignedURL RunQueryParamsSelect = "serialized_or_signed_url" RunQueryParamsSelectParentRunID RunQueryParamsSelect = "parent_run_id" RunQueryParamsSelectManifestID RunQueryParamsSelect = "manifest_id" RunQueryParamsSelectManifestS3ID RunQueryParamsSelect = "manifest_s3_id" RunQueryParamsSelectManifest RunQueryParamsSelect = "manifest" RunQueryParamsSelectSessionID RunQueryParamsSelect = "session_id" RunQueryParamsSelectSerialized RunQueryParamsSelect = "serialized" RunQueryParamsSelectReferenceExampleID RunQueryParamsSelect = "reference_example_id" RunQueryParamsSelectReferenceDatasetID RunQueryParamsSelect = "reference_dataset_id" RunQueryParamsSelectTotalTokens RunQueryParamsSelect = "total_tokens" RunQueryParamsSelectPromptTokens RunQueryParamsSelect = "prompt_tokens" RunQueryParamsSelectPromptTokenDetails RunQueryParamsSelect = "prompt_token_details" RunQueryParamsSelectCompletionTokens RunQueryParamsSelect = "completion_tokens" RunQueryParamsSelectCompletionTokenDetails RunQueryParamsSelect = "completion_token_details" RunQueryParamsSelectTotalCost RunQueryParamsSelect = "total_cost" RunQueryParamsSelectPromptCost RunQueryParamsSelect = "prompt_cost" RunQueryParamsSelectPromptCostDetails RunQueryParamsSelect = "prompt_cost_details" RunQueryParamsSelectCompletionCost RunQueryParamsSelect = "completion_cost" RunQueryParamsSelectCompletionCostDetails RunQueryParamsSelect = "completion_cost_details" RunQueryParamsSelectPriceModelID RunQueryParamsSelect = "price_model_id" RunQueryParamsSelectFirstTokenTime RunQueryParamsSelect = "first_token_time" RunQueryParamsSelectTraceID RunQueryParamsSelect = "trace_id" RunQueryParamsSelectDottedOrder RunQueryParamsSelect = "dotted_order" RunQueryParamsSelectLastQueuedAt RunQueryParamsSelect = "last_queued_at" RunQueryParamsSelectFeedbackStats RunQueryParamsSelect = "feedback_stats" RunQueryParamsSelectChildRunIDs RunQueryParamsSelect = "child_run_ids" RunQueryParamsSelectParentRunIDs RunQueryParamsSelect = "parent_run_ids" RunQueryParamsSelectTags RunQueryParamsSelect = "tags" RunQueryParamsSelectInDataset RunQueryParamsSelect = "in_dataset" RunQueryParamsSelectAppPath RunQueryParamsSelect = "app_path" RunQueryParamsSelectTraceTier RunQueryParamsSelect = "trace_tier" RunQueryParamsSelectTraceFirstReceivedAt RunQueryParamsSelect = "trace_first_received_at" RunQueryParamsSelectTtlSeconds RunQueryParamsSelect = "ttl_seconds" RunQueryParamsSelectTraceUpgrade RunQueryParamsSelect = "trace_upgrade" RunQueryParamsSelectThreadID RunQueryParamsSelect = "thread_id" RunQueryParamsSelectTraceMinMaxStartTime RunQueryParamsSelect = "trace_min_max_start_time" RunQueryParamsSelectMessages RunQueryParamsSelect = "messages" RunQueryParamsSelectInsertedAt RunQueryParamsSelect = "inserted_at" )
func (RunQueryParamsSelect) IsKnown ¶
func (r RunQueryParamsSelect) IsKnown() bool
type RunQueryResponse ¶
type RunQueryResponse struct {
Cursors map[string]string `json:"cursors" api:"required"`
Runs []RunSchema `json:"runs" api:"required"`
ParsedQuery string `json:"parsed_query" api:"nullable"`
SearchCursors map[string]interface{} `json:"search_cursors" api:"nullable"`
JSON runQueryResponseJSON `json:"-"`
}
func (*RunQueryResponse) UnmarshalJSON ¶
func (r *RunQueryResponse) UnmarshalJSON(data []byte) (err error)
type RunRuleService ¶ added in v0.2.0
type RunRuleService struct {
Options []option.RequestOption
}
RunRuleService contains methods and other services that help with interacting with the langChain 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 NewRunRuleService method instead.
func NewRunRuleService ¶ added in v0.2.0
func NewRunRuleService(opts ...option.RequestOption) (r *RunRuleService)
NewRunRuleService 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 RunRunType ¶
type RunRunType string
const ( RunRunTypeTool RunRunType = "tool" RunRunTypeChain RunRunType = "chain" RunRunTypeLlm RunRunType = "llm" RunRunTypeRetriever RunRunType = "retriever" RunRunTypeEmbedding RunRunType = "embedding" RunRunTypePrompt RunRunType = "prompt" RunRunTypeParser RunRunType = "parser" )
func (RunRunType) IsKnown ¶
func (r RunRunType) IsKnown() bool
type RunSchema ¶ added in v0.2.0
type RunSchema struct {
ID string `json:"id" api:"required" format:"uuid"`
AppPath string `json:"app_path" api:"required"`
DottedOrder string `json:"dotted_order" api:"required"`
Name string `json:"name" api:"required"`
// Enum for run types.
RunType RunTypeEnum `json:"run_type" api:"required"`
SessionID string `json:"session_id" api:"required" format:"uuid"`
Status string `json:"status" api:"required"`
TraceID string `json:"trace_id" api:"required" format:"uuid"`
ChildRunIDs []string `json:"child_run_ids" api:"nullable" format:"uuid"`
CompletionCost string `json:"completion_cost" api:"nullable"`
CompletionCostDetails map[string]string `json:"completion_cost_details" api:"nullable"`
CompletionTokenDetails map[string]int64 `json:"completion_token_details" api:"nullable"`
CompletionTokens int64 `json:"completion_tokens"`
DirectChildRunIDs []string `json:"direct_child_run_ids" api:"nullable" format:"uuid"`
EndTime time.Time `json:"end_time" api:"nullable" format:"date-time"`
Error string `json:"error" api:"nullable"`
Events []map[string]interface{} `json:"events" api:"nullable"`
ExecutionOrder int64 `json:"execution_order"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
FeedbackStats map[string]map[string]interface{} `json:"feedback_stats" api:"nullable"`
FirstTokenTime time.Time `json:"first_token_time" api:"nullable" format:"date-time"`
InDataset bool `json:"in_dataset" api:"nullable"`
Inputs map[string]interface{} `json:"inputs" api:"nullable"`
InputsPreview string `json:"inputs_preview" api:"nullable"`
InputsS3URLs map[string]interface{} `json:"inputs_s3_urls" api:"nullable"`
LastQueuedAt time.Time `json:"last_queued_at" api:"nullable" format:"date-time"`
ManifestID string `json:"manifest_id" api:"nullable" format:"uuid"`
ManifestS3ID string `json:"manifest_s3_id" api:"nullable" format:"uuid"`
Messages []map[string]interface{} `json:"messages" api:"nullable"`
Outputs map[string]interface{} `json:"outputs" api:"nullable"`
OutputsPreview string `json:"outputs_preview" api:"nullable"`
OutputsS3URLs map[string]interface{} `json:"outputs_s3_urls" api:"nullable"`
ParentRunID string `json:"parent_run_id" api:"nullable" format:"uuid"`
ParentRunIDs []string `json:"parent_run_ids" api:"nullable" format:"uuid"`
PriceModelID string `json:"price_model_id" api:"nullable" format:"uuid"`
PromptCost string `json:"prompt_cost" api:"nullable"`
PromptCostDetails map[string]string `json:"prompt_cost_details" api:"nullable"`
PromptTokenDetails map[string]int64 `json:"prompt_token_details" api:"nullable"`
PromptTokens int64 `json:"prompt_tokens"`
ReferenceDatasetID string `json:"reference_dataset_id" api:"nullable" format:"uuid"`
ReferenceExampleID string `json:"reference_example_id" api:"nullable" format:"uuid"`
S3URLs map[string]interface{} `json:"s3_urls" api:"nullable"`
Serialized map[string]interface{} `json:"serialized" api:"nullable"`
StartTime time.Time `json:"start_time" format:"date-time"`
Tags []string `json:"tags" api:"nullable"`
ThreadID string `json:"thread_id" api:"nullable"`
TotalCost string `json:"total_cost" api:"nullable"`
TotalTokens int64 `json:"total_tokens"`
TraceFirstReceivedAt time.Time `json:"trace_first_received_at" api:"nullable" format:"date-time"`
TraceMaxStartTime time.Time `json:"trace_max_start_time" api:"nullable" format:"date-time"`
TraceMinStartTime time.Time `json:"trace_min_start_time" api:"nullable" format:"date-time"`
TraceTier RunSchemaTraceTier `json:"trace_tier" api:"nullable"`
TraceUpgrade bool `json:"trace_upgrade"`
TtlSeconds int64 `json:"ttl_seconds" api:"nullable"`
JSON runSchemaJSON `json:"-"`
}
Run schema.
func (*RunSchema) UnmarshalJSON ¶ added in v0.2.0
type RunSchemaTraceTier ¶ added in v0.2.0
type RunSchemaTraceTier string
const ( RunSchemaTraceTierLonglived RunSchemaTraceTier = "longlived" RunSchemaTraceTierShortlived RunSchemaTraceTier = "shortlived" )
func (RunSchemaTraceTier) IsKnown ¶ added in v0.2.0
func (r RunSchemaTraceTier) IsKnown() bool
type RunSchemaWithAnnotationQueueInfo ¶
type RunSchemaWithAnnotationQueueInfo struct {
ID string `json:"id" api:"required" format:"uuid"`
AppPath string `json:"app_path" api:"required"`
DottedOrder string `json:"dotted_order" api:"required"`
Name string `json:"name" api:"required"`
QueueRunID string `json:"queue_run_id" api:"required" format:"uuid"`
// Enum for run types.
RunType RunTypeEnum `json:"run_type" api:"required"`
SessionID string `json:"session_id" api:"required" format:"uuid"`
Status string `json:"status" api:"required"`
TraceID string `json:"trace_id" api:"required" format:"uuid"`
AddedAt time.Time `json:"added_at" api:"nullable" format:"date-time"`
ChildRunIDs []string `json:"child_run_ids" api:"nullable" format:"uuid"`
CompletedCount int64 `json:"completed_count"`
CompletionCost string `json:"completion_cost" api:"nullable"`
CompletionCostDetails map[string]string `json:"completion_cost_details" api:"nullable"`
CompletionTokenDetails map[string]int64 `json:"completion_token_details" api:"nullable"`
CompletionTokens int64 `json:"completion_tokens"`
DirectChildRunIDs []string `json:"direct_child_run_ids" api:"nullable" format:"uuid"`
EffectiveAddedAt time.Time `json:"effective_added_at" api:"nullable" format:"date-time"`
EndTime time.Time `json:"end_time" api:"nullable" format:"date-time"`
Error string `json:"error" api:"nullable"`
Events []map[string]interface{} `json:"events" api:"nullable"`
ExecutionOrder int64 `json:"execution_order"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
FeedbackStats map[string]map[string]interface{} `json:"feedback_stats" api:"nullable"`
FirstTokenTime time.Time `json:"first_token_time" api:"nullable" format:"date-time"`
InDataset bool `json:"in_dataset" api:"nullable"`
Inputs map[string]interface{} `json:"inputs" api:"nullable"`
InputsPreview string `json:"inputs_preview" api:"nullable"`
InputsS3URLs map[string]interface{} `json:"inputs_s3_urls" api:"nullable"`
LastQueuedAt time.Time `json:"last_queued_at" api:"nullable" format:"date-time"`
LastReviewedTime time.Time `json:"last_reviewed_time" api:"nullable" format:"date-time"`
ManifestID string `json:"manifest_id" api:"nullable" format:"uuid"`
ManifestS3ID string `json:"manifest_s3_id" api:"nullable" format:"uuid"`
Messages []map[string]interface{} `json:"messages" api:"nullable"`
Outputs map[string]interface{} `json:"outputs" api:"nullable"`
OutputsPreview string `json:"outputs_preview" api:"nullable"`
OutputsS3URLs map[string]interface{} `json:"outputs_s3_urls" api:"nullable"`
ParentRunID string `json:"parent_run_id" api:"nullable" format:"uuid"`
ParentRunIDs []string `json:"parent_run_ids" api:"nullable" format:"uuid"`
PriceModelID string `json:"price_model_id" api:"nullable" format:"uuid"`
PromptCost string `json:"prompt_cost" api:"nullable"`
PromptCostDetails map[string]string `json:"prompt_cost_details" api:"nullable"`
PromptTokenDetails map[string]int64 `json:"prompt_token_details" api:"nullable"`
PromptTokens int64 `json:"prompt_tokens"`
ReferenceDatasetID string `json:"reference_dataset_id" api:"nullable" format:"uuid"`
ReferenceExampleID string `json:"reference_example_id" api:"nullable" format:"uuid"`
ReservationCount int64 `json:"reservation_count"`
S3URLs map[string]interface{} `json:"s3_urls" api:"nullable"`
Serialized map[string]interface{} `json:"serialized" api:"nullable"`
StartTime time.Time `json:"start_time" format:"date-time"`
Tags []string `json:"tags" api:"nullable"`
ThreadID string `json:"thread_id" api:"nullable"`
TotalCost string `json:"total_cost" api:"nullable"`
TotalTokens int64 `json:"total_tokens"`
TraceFirstReceivedAt time.Time `json:"trace_first_received_at" api:"nullable" format:"date-time"`
TraceMaxStartTime time.Time `json:"trace_max_start_time" api:"nullable" format:"date-time"`
TraceMinStartTime time.Time `json:"trace_min_start_time" api:"nullable" format:"date-time"`
TraceTier RunSchemaWithAnnotationQueueInfoTraceTier `json:"trace_tier" api:"nullable"`
TraceUpgrade bool `json:"trace_upgrade"`
TtlSeconds int64 `json:"ttl_seconds" api:"nullable"`
JSON runSchemaWithAnnotationQueueInfoJSON `json:"-"`
}
Run schema with annotation queue info.
func (*RunSchemaWithAnnotationQueueInfo) UnmarshalJSON ¶
func (r *RunSchemaWithAnnotationQueueInfo) UnmarshalJSON(data []byte) (err error)
type RunSchemaWithAnnotationQueueInfoTraceTier ¶
type RunSchemaWithAnnotationQueueInfoTraceTier string
const ( RunSchemaWithAnnotationQueueInfoTraceTierLonglived RunSchemaWithAnnotationQueueInfoTraceTier = "longlived" RunSchemaWithAnnotationQueueInfoTraceTierShortlived RunSchemaWithAnnotationQueueInfoTraceTier = "shortlived" )
func (RunSchemaWithAnnotationQueueInfoTraceTier) IsKnown ¶
func (r RunSchemaWithAnnotationQueueInfoTraceTier) IsKnown() bool
type RunService ¶
type RunService struct {
Options []option.RequestOption
Rules *RunRuleService
}
RunService contains methods and other services that help with interacting with the langChain 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 NewRunService method instead.
func NewRunService ¶
func NewRunService(opts ...option.RequestOption) (r *RunService)
NewRunService 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 (*RunService) Get ¶ added in v0.2.0
func (r *RunService) Get(ctx context.Context, runID string, query RunGetParams, opts ...option.RequestOption) (res *RunSchema, err error)
Get a specific run.
func (*RunService) IngestBatch ¶
func (r *RunService) IngestBatch(ctx context.Context, body RunIngestBatchParams, opts ...option.RequestOption) (res *RunIngestBatchResponse, err error)
Ingests a batch of runs in a single JSON payload. The payload must have `post` and/or `patch` arrays containing run objects. Prefer this endpoint over single‑run ingestion when submitting hundreds of runs, but `/runs/multipart` offers better handling for very large fields and attachments.
func (*RunService) New ¶ added in v0.2.0
func (r *RunService) New(ctx context.Context, body RunNewParams, opts ...option.RequestOption) (res *RunNewResponse, err error)
Queues a single run for ingestion. The request body must be a JSON-encoded run object that follows the Run schema.
func (*RunService) Query ¶
func (r *RunService) Query(ctx context.Context, body RunQueryParams, opts ...option.RequestOption) (res *RunQueryResponse, err error)
Query Runs
func (*RunService) Stats ¶ added in v0.2.0
func (r *RunService) Stats(ctx context.Context, body RunStatsParams, opts ...option.RequestOption) (res *RunStatsResponseUnion, err error)
Get all runs by query in body payload.
func (*RunService) Update ¶ added in v0.2.0
func (r *RunService) Update(ctx context.Context, runID string, body RunUpdateParams, opts ...option.RequestOption) (res *RunUpdateResponse, err error)
Updates a run identified by its ID. The body should contain only the fields to be changed; unknown fields are ignored.
func (*RunService) Update2 ¶ added in v0.2.0
func (r *RunService) Update2(ctx context.Context, runID string, opts ...option.RequestOption) (res *RunUpdate2Response, err error)
Update a run.
type RunStatsGroupByAttribute ¶
type RunStatsGroupByAttribute string
const ( RunStatsGroupByAttributeName RunStatsGroupByAttribute = "name" RunStatsGroupByAttributeRunType RunStatsGroupByAttribute = "run_type" RunStatsGroupByAttributeTag RunStatsGroupByAttribute = "tag" RunStatsGroupByAttributeMetadata RunStatsGroupByAttribute = "metadata" )
func (RunStatsGroupByAttribute) IsKnown ¶
func (r RunStatsGroupByAttribute) IsKnown() bool
type RunStatsGroupByParam ¶
type RunStatsGroupByParam struct {
Attribute param.Field[RunStatsGroupByAttribute] `json:"attribute" api:"required"`
MaxGroups param.Field[int64] `json:"max_groups"`
Path param.Field[string] `json:"path"`
}
Group by param for run stats.
func (RunStatsGroupByParam) MarshalJSON ¶
func (r RunStatsGroupByParam) MarshalJSON() (data []byte, err error)
type RunStatsParams ¶ added in v0.2.0
type RunStatsParams struct {
// Query params for run stats.
RunStatsQueryParams RunStatsQueryParams `json:"run_stats_query_params" api:"required"`
}
func (RunStatsParams) MarshalJSON ¶ added in v0.2.0
func (r RunStatsParams) MarshalJSON() (data []byte, err error)
type RunStatsQueryParams ¶ added in v0.2.0
type RunStatsQueryParams struct {
ID param.Field[[]string] `json:"id" format:"uuid"`
// Enum for run data source types.
DataSourceType param.Field[RunsFilterDataSourceTypeEnum] `json:"data_source_type"`
EndTime param.Field[time.Time] `json:"end_time" format:"date-time"`
Error param.Field[bool] `json:"error"`
ExecutionOrder param.Field[int64] `json:"execution_order"`
Filter param.Field[string] `json:"filter"`
// Group by param for run stats.
GroupBy param.Field[RunStatsGroupByParam] `json:"group_by"`
Groups param.Field[[]string] `json:"groups"`
IsRoot param.Field[bool] `json:"is_root"`
ParentRun param.Field[string] `json:"parent_run" format:"uuid"`
Query param.Field[string] `json:"query"`
ReferenceExample param.Field[[]string] `json:"reference_example" format:"uuid"`
// Enum for run types.
RunType param.Field[RunTypeEnum] `json:"run_type"`
SearchFilter param.Field[string] `json:"search_filter"`
Select param.Field[[]RunStatsQueryParamsSelect] `json:"select"`
Session param.Field[[]string] `json:"session" format:"uuid"`
SkipPagination param.Field[bool] `json:"skip_pagination"`
StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
Trace param.Field[string] `json:"trace" format:"uuid"`
TraceFilter param.Field[string] `json:"trace_filter"`
TreeFilter param.Field[string] `json:"tree_filter"`
UseExperimentalSearch param.Field[bool] `json:"use_experimental_search"`
}
Query params for run stats.
func (RunStatsQueryParams) MarshalJSON ¶ added in v0.2.0
func (r RunStatsQueryParams) MarshalJSON() (data []byte, err error)
type RunStatsQueryParamsSelect ¶ added in v0.2.0
type RunStatsQueryParamsSelect string
Metrics you can select from run stats endpoint.
const ( RunStatsQueryParamsSelectRunCount RunStatsQueryParamsSelect = "run_count" RunStatsQueryParamsSelectLatencyP50 RunStatsQueryParamsSelect = "latency_p50" RunStatsQueryParamsSelectLatencyP99 RunStatsQueryParamsSelect = "latency_p99" RunStatsQueryParamsSelectLatencyAvg RunStatsQueryParamsSelect = "latency_avg" RunStatsQueryParamsSelectFirstTokenP50 RunStatsQueryParamsSelect = "first_token_p50" RunStatsQueryParamsSelectFirstTokenP99 RunStatsQueryParamsSelect = "first_token_p99" RunStatsQueryParamsSelectTotalTokens RunStatsQueryParamsSelect = "total_tokens" RunStatsQueryParamsSelectPromptTokens RunStatsQueryParamsSelect = "prompt_tokens" RunStatsQueryParamsSelectCompletionTokens RunStatsQueryParamsSelect = "completion_tokens" RunStatsQueryParamsSelectMedianTokens RunStatsQueryParamsSelect = "median_tokens" RunStatsQueryParamsSelectCompletionTokensP50 RunStatsQueryParamsSelect = "completion_tokens_p50" RunStatsQueryParamsSelectPromptTokensP50 RunStatsQueryParamsSelect = "prompt_tokens_p50" RunStatsQueryParamsSelectTokensP99 RunStatsQueryParamsSelect = "tokens_p99" RunStatsQueryParamsSelectCompletionTokensP99 RunStatsQueryParamsSelect = "completion_tokens_p99" RunStatsQueryParamsSelectPromptTokensP99 RunStatsQueryParamsSelect = "prompt_tokens_p99" RunStatsQueryParamsSelectLastRunStartTime RunStatsQueryParamsSelect = "last_run_start_time" RunStatsQueryParamsSelectFeedbackStats RunStatsQueryParamsSelect = "feedback_stats" RunStatsQueryParamsSelectThreadFeedbackStats RunStatsQueryParamsSelect = "thread_feedback_stats" RunStatsQueryParamsSelectRunFacets RunStatsQueryParamsSelect = "run_facets" RunStatsQueryParamsSelectErrorRate RunStatsQueryParamsSelect = "error_rate" RunStatsQueryParamsSelectStreamingRate RunStatsQueryParamsSelect = "streaming_rate" RunStatsQueryParamsSelectTotalCost RunStatsQueryParamsSelect = "total_cost" RunStatsQueryParamsSelectPromptCost RunStatsQueryParamsSelect = "prompt_cost" RunStatsQueryParamsSelectCompletionCost RunStatsQueryParamsSelect = "completion_cost" RunStatsQueryParamsSelectCostP50 RunStatsQueryParamsSelect = "cost_p50" RunStatsQueryParamsSelectCostP99 RunStatsQueryParamsSelect = "cost_p99" RunStatsQueryParamsSelectSessionFeedbackStats RunStatsQueryParamsSelect = "session_feedback_stats" RunStatsQueryParamsSelectAllRunStats RunStatsQueryParamsSelect = "all_run_stats" RunStatsQueryParamsSelectAllTokenStats RunStatsQueryParamsSelect = "all_token_stats" RunStatsQueryParamsSelectPromptTokenDetails RunStatsQueryParamsSelect = "prompt_token_details" RunStatsQueryParamsSelectCompletionTokenDetails RunStatsQueryParamsSelect = "completion_token_details" RunStatsQueryParamsSelectPromptCostDetails RunStatsQueryParamsSelect = "prompt_cost_details" RunStatsQueryParamsSelectCompletionCostDetails RunStatsQueryParamsSelect = "completion_cost_details" )
func (RunStatsQueryParamsSelect) IsKnown ¶ added in v0.2.0
func (r RunStatsQueryParamsSelect) IsKnown() bool
type RunStatsResponseMap ¶ added in v0.2.0
type RunStatsResponseMap map[string]RunStatsResponseMapItem
type RunStatsResponseMapItem ¶ added in v0.2.0
type RunStatsResponseMapItem struct {
CompletionCost string `json:"completion_cost" api:"nullable"`
CompletionCostDetails map[string]interface{} `json:"completion_cost_details" api:"nullable"`
CompletionTokenDetails map[string]interface{} `json:"completion_token_details" api:"nullable"`
CompletionTokens int64 `json:"completion_tokens" api:"nullable"`
CompletionTokensP50 int64 `json:"completion_tokens_p50" api:"nullable"`
CompletionTokensP99 int64 `json:"completion_tokens_p99" api:"nullable"`
CostP50 string `json:"cost_p50" api:"nullable"`
CostP99 string `json:"cost_p99" api:"nullable"`
ErrorRate float64 `json:"error_rate" api:"nullable"`
FeedbackStats map[string]interface{} `json:"feedback_stats" api:"nullable"`
FirstTokenP50 float64 `json:"first_token_p50" api:"nullable"`
FirstTokenP99 float64 `json:"first_token_p99" api:"nullable"`
LastRunStartTime time.Time `json:"last_run_start_time" api:"nullable" format:"date-time"`
LatencyP50 float64 `json:"latency_p50" api:"nullable"`
LatencyP99 float64 `json:"latency_p99" api:"nullable"`
MedianTokens int64 `json:"median_tokens" api:"nullable"`
PromptCost string `json:"prompt_cost" api:"nullable"`
PromptCostDetails map[string]interface{} `json:"prompt_cost_details" api:"nullable"`
PromptTokenDetails map[string]interface{} `json:"prompt_token_details" api:"nullable"`
PromptTokens int64 `json:"prompt_tokens" api:"nullable"`
PromptTokensP50 int64 `json:"prompt_tokens_p50" api:"nullable"`
PromptTokensP99 int64 `json:"prompt_tokens_p99" api:"nullable"`
RunCount int64 `json:"run_count" api:"nullable"`
RunFacets []map[string]interface{} `json:"run_facets" api:"nullable"`
StreamingRate float64 `json:"streaming_rate" api:"nullable"`
TokensP99 int64 `json:"tokens_p99" api:"nullable"`
TotalCost string `json:"total_cost" api:"nullable"`
TotalTokens int64 `json:"total_tokens" api:"nullable"`
JSON runStatsResponseMapItemJSON `json:"-"`
}
func (*RunStatsResponseMapItem) UnmarshalJSON ¶ added in v0.2.0
func (r *RunStatsResponseMapItem) UnmarshalJSON(data []byte) (err error)
type RunStatsResponseRunStats ¶ added in v0.2.0
type RunStatsResponseRunStats struct {
CompletionCost string `json:"completion_cost" api:"nullable"`
CompletionCostDetails map[string]interface{} `json:"completion_cost_details" api:"nullable"`
CompletionTokenDetails map[string]interface{} `json:"completion_token_details" api:"nullable"`
CompletionTokens int64 `json:"completion_tokens" api:"nullable"`
CompletionTokensP50 int64 `json:"completion_tokens_p50" api:"nullable"`
CompletionTokensP99 int64 `json:"completion_tokens_p99" api:"nullable"`
CostP50 string `json:"cost_p50" api:"nullable"`
CostP99 string `json:"cost_p99" api:"nullable"`
ErrorRate float64 `json:"error_rate" api:"nullable"`
FeedbackStats map[string]interface{} `json:"feedback_stats" api:"nullable"`
FirstTokenP50 float64 `json:"first_token_p50" api:"nullable"`
FirstTokenP99 float64 `json:"first_token_p99" api:"nullable"`
LastRunStartTime time.Time `json:"last_run_start_time" api:"nullable" format:"date-time"`
LatencyP50 float64 `json:"latency_p50" api:"nullable"`
LatencyP99 float64 `json:"latency_p99" api:"nullable"`
MedianTokens int64 `json:"median_tokens" api:"nullable"`
PromptCost string `json:"prompt_cost" api:"nullable"`
PromptCostDetails map[string]interface{} `json:"prompt_cost_details" api:"nullable"`
PromptTokenDetails map[string]interface{} `json:"prompt_token_details" api:"nullable"`
PromptTokens int64 `json:"prompt_tokens" api:"nullable"`
PromptTokensP50 int64 `json:"prompt_tokens_p50" api:"nullable"`
PromptTokensP99 int64 `json:"prompt_tokens_p99" api:"nullable"`
RunCount int64 `json:"run_count" api:"nullable"`
RunFacets []map[string]interface{} `json:"run_facets" api:"nullable"`
StreamingRate float64 `json:"streaming_rate" api:"nullable"`
TokensP99 int64 `json:"tokens_p99" api:"nullable"`
TotalCost string `json:"total_cost" api:"nullable"`
TotalTokens int64 `json:"total_tokens" api:"nullable"`
JSON runStatsResponseRunStatsJSON `json:"-"`
}
func (*RunStatsResponseRunStats) UnmarshalJSON ¶ added in v0.2.0
func (r *RunStatsResponseRunStats) UnmarshalJSON(data []byte) (err error)
type RunStatsResponseUnion ¶ added in v0.2.0
type RunStatsResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by RunStatsResponseRunStats or RunStatsResponseMap.
type RunTransformFunc ¶ added in v0.2.2
type RunTransformFunc = langsmithtracing.RunTransformFunc
RunTransformFunc is a pre-export transform hook.
type RunTypeEnum ¶ added in v0.2.0
type RunTypeEnum string
Enum for run types.
const ( RunTypeEnumTool RunTypeEnum = "tool" RunTypeEnumChain RunTypeEnum = "chain" RunTypeEnumLlm RunTypeEnum = "llm" RunTypeEnumRetriever RunTypeEnum = "retriever" RunTypeEnumEmbedding RunTypeEnum = "embedding" RunTypeEnumPrompt RunTypeEnum = "prompt" RunTypeEnumParser RunTypeEnum = "parser" )
func (RunTypeEnum) IsKnown ¶ added in v0.2.0
func (r RunTypeEnum) IsKnown() bool
type RunUpdate ¶ added in v0.2.2
type RunUpdate = langsmithtracing.RunUpdate
RunUpdate holds parameters for updating an existing run (multipart patch).
type RunUpdate2Response ¶ added in v0.2.0
type RunUpdate2Response = interface{}
type RunUpdateParams ¶ added in v0.2.0
type RunUpdateParams struct {
Run RunParam `json:"run" api:"required"`
}
func (RunUpdateParams) MarshalJSON ¶ added in v0.2.0
func (r RunUpdateParams) MarshalJSON() (data []byte, err error)
type RunUpdateResponse ¶ added in v0.2.0
type RunUpdateResponse map[string]RunUpdateResponseItem
type RunUpdateResponseItem ¶ added in v0.2.0
type RunUpdateResponseItem struct {
JSON runUpdateResponseItemJSON `json:"-"`
}
func (*RunUpdateResponseItem) UnmarshalJSON ¶ added in v0.2.0
func (r *RunUpdateResponseItem) UnmarshalJSON(data []byte) (err error)
type RunnableConfigParam ¶
type RunnableConfigParam struct {
Callbacks param.Field[[]interface{}] `json:"callbacks"`
Configurable param.Field[map[string]interface{}] `json:"configurable"`
MaxConcurrency param.Field[int64] `json:"max_concurrency"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
RecursionLimit param.Field[int64] `json:"recursion_limit"`
RunID param.Field[string] `json:"run_id" format:"uuid"`
RunName param.Field[string] `json:"run_name"`
Tags param.Field[[]string] `json:"tags"`
}
Configuration for a `Runnable`.
!!! note Custom values
The `TypedDict` has `total=False` set intentionally to:
- Allow partial configs to be created and merged together via `merge_configs`
- Support config propagation from parent to child runnables via
`var_child_runnable_config` (a `ContextVar` that automatically passes
config down the call stack without explicit parameter passing), where
configs are merged rather than replaced
!!! example
```python
# Parent sets tags
chain.invoke(input, config={"tags": ["parent"]})
# Child automatically inherits and can add:
# ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}
```
func (RunnableConfigParam) MarshalJSON ¶
func (r RunnableConfigParam) MarshalJSON() (data []byte, err error)
type RunnerContextEnum ¶
type RunnerContextEnum string
const ( RunnerContextEnumLangsmithUi RunnerContextEnum = "langsmith_ui" RunnerContextEnumLangsmithAlignEvals RunnerContextEnum = "langsmith_align_evals" )
func (RunnerContextEnum) IsKnown ¶
func (r RunnerContextEnum) IsKnown() bool
type RunsFilterDataSourceTypeEnum ¶ added in v0.2.0
type RunsFilterDataSourceTypeEnum string
Enum for run data source types.
const ( RunsFilterDataSourceTypeEnumCurrent RunsFilterDataSourceTypeEnum = "current" RunsFilterDataSourceTypeEnumHistorical RunsFilterDataSourceTypeEnum = "historical" RunsFilterDataSourceTypeEnumLite RunsFilterDataSourceTypeEnum = "lite" RunsFilterDataSourceTypeEnumRootLite RunsFilterDataSourceTypeEnum = "root_lite" RunsFilterDataSourceTypeEnumRunsFeedbacksRmtWide RunsFilterDataSourceTypeEnum = "runs_feedbacks_rmt_wide" )
func (RunsFilterDataSourceTypeEnum) IsKnown ¶ added in v0.2.0
func (r RunsFilterDataSourceTypeEnum) IsKnown() bool
type SessionDashboardParams ¶
type SessionDashboardParams struct {
CustomChartsSectionRequest CustomChartsSectionRequestParam `json:"custom_charts_section_request" api:"required"`
Accept param.Field[string] `header:"accept"`
}
func (SessionDashboardParams) MarshalJSON ¶
func (r SessionDashboardParams) MarshalJSON() (data []byte, err error)
type SessionDeleteResponse ¶
type SessionDeleteResponse = interface{}
type SessionFeedbackDelta ¶
type SessionFeedbackDelta struct {
FeedbackDeltas map[string]SessionFeedbackDeltaFeedbackDelta `json:"feedback_deltas" api:"required"`
JSON sessionFeedbackDeltaJSON `json:"-"`
}
List of feedback keys with number of improvements and regressions for each.
func (*SessionFeedbackDelta) UnmarshalJSON ¶
func (r *SessionFeedbackDelta) UnmarshalJSON(data []byte) (err error)
type SessionFeedbackDeltaFeedbackDelta ¶
type SessionFeedbackDeltaFeedbackDelta struct {
ImprovedExamples []string `json:"improved_examples" api:"required" format:"uuid"`
RegressedExamples []string `json:"regressed_examples" api:"required" format:"uuid"`
JSON sessionFeedbackDeltaFeedbackDeltaJSON `json:"-"`
}
Feedback key with number of improvements and regressions.
func (*SessionFeedbackDeltaFeedbackDelta) UnmarshalJSON ¶
func (r *SessionFeedbackDeltaFeedbackDelta) UnmarshalJSON(data []byte) (err error)
type SessionGetParams ¶
type SessionGetParams struct {
IncludeStats param.Field[bool] `query:"include_stats"`
StatsStartTime param.Field[time.Time] `query:"stats_start_time" format:"date-time"`
Accept param.Field[string] `header:"accept"`
}
func (SessionGetParams) URLQuery ¶
func (r SessionGetParams) URLQuery() (v url.Values)
URLQuery serializes SessionGetParams's query parameters as `url.Values`.
type SessionInsightDeleteResponse ¶
type SessionInsightDeleteResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
Message string `json:"message" api:"required"`
JSON sessionInsightDeleteResponseJSON `json:"-"`
}
Response to delete a session cluster job.
func (*SessionInsightDeleteResponse) UnmarshalJSON ¶
func (r *SessionInsightDeleteResponse) UnmarshalJSON(data []byte) (err error)
type SessionInsightGetJobResponse ¶
type SessionInsightGetJobResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
Clusters []SessionInsightGetJobResponseCluster `json:"clusters" api:"required"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Name string `json:"name" api:"required"`
Status string `json:"status" api:"required"`
ConfigID string `json:"config_id" api:"nullable" format:"uuid"`
EndTime time.Time `json:"end_time" api:"nullable" format:"date-time"`
Error string `json:"error" api:"nullable"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
// High level summary of an insights job that pulls out patterns and specific
// traces.
Report SessionInsightGetJobResponseReport `json:"report" api:"nullable"`
Shape map[string]int64 `json:"shape" api:"nullable"`
StartTime time.Time `json:"start_time" api:"nullable" format:"date-time"`
JSON sessionInsightGetJobResponseJSON `json:"-"`
}
Response to get a specific cluster job for a session.
func (*SessionInsightGetJobResponse) UnmarshalJSON ¶
func (r *SessionInsightGetJobResponse) UnmarshalJSON(data []byte) (err error)
type SessionInsightGetJobResponseCluster ¶
type SessionInsightGetJobResponseCluster struct {
ID string `json:"id" api:"required" format:"uuid"`
Description string `json:"description" api:"required"`
Level int64 `json:"level" api:"required"`
Name string `json:"name" api:"required"`
NumRuns int64 `json:"num_runs" api:"required"`
Stats map[string]interface{} `json:"stats" api:"required,nullable"`
ParentID string `json:"parent_id" api:"nullable" format:"uuid"`
ParentName string `json:"parent_name" api:"nullable"`
JSON sessionInsightGetJobResponseClusterJSON `json:"-"`
}
A single cluster of runs.
func (*SessionInsightGetJobResponseCluster) UnmarshalJSON ¶
func (r *SessionInsightGetJobResponseCluster) UnmarshalJSON(data []byte) (err error)
type SessionInsightGetJobResponseReport ¶
type SessionInsightGetJobResponseReport struct {
CreatedAt time.Time `json:"created_at" api:"nullable" format:"date-time"`
HighlightedTraces []SessionInsightGetJobResponseReportHighlightedTrace `json:"highlighted_traces"`
KeyPoints []string `json:"key_points"`
Title string `json:"title" api:"nullable"`
JSON sessionInsightGetJobResponseReportJSON `json:"-"`
}
High level summary of an insights job that pulls out patterns and specific traces.
func (*SessionInsightGetJobResponseReport) UnmarshalJSON ¶
func (r *SessionInsightGetJobResponseReport) UnmarshalJSON(data []byte) (err error)
type SessionInsightGetJobResponseReportHighlightedTrace ¶
type SessionInsightGetJobResponseReportHighlightedTrace struct {
HighlightReason string `json:"highlight_reason" api:"required"`
Rank int64 `json:"rank" api:"required"`
RunID string `json:"run_id" api:"required" format:"uuid"`
ClusterID string `json:"cluster_id" api:"nullable" format:"uuid"`
ClusterName string `json:"cluster_name" api:"nullable"`
Summary string `json:"summary" api:"nullable"`
JSON sessionInsightGetJobResponseReportHighlightedTraceJSON `json:"-"`
}
A trace highlighted in an insights report summary. Up to 10 per insights job.
func (*SessionInsightGetJobResponseReportHighlightedTrace) UnmarshalJSON ¶
func (r *SessionInsightGetJobResponseReportHighlightedTrace) UnmarshalJSON(data []byte) (err error)
type SessionInsightGetRunsParams ¶
type SessionInsightGetRunsParams struct {
AttributeSortKey param.Field[string] `query:"attribute_sort_key"`
AttributeSortOrder param.Field[SessionInsightGetRunsParamsAttributeSortOrder] `query:"attribute_sort_order"`
ClusterID param.Field[string] `query:"cluster_id" format:"uuid"`
Limit param.Field[int64] `query:"limit"`
Offset param.Field[int64] `query:"offset"`
}
func (SessionInsightGetRunsParams) URLQuery ¶
func (r SessionInsightGetRunsParams) URLQuery() (v url.Values)
URLQuery serializes SessionInsightGetRunsParams's query parameters as `url.Values`.
type SessionInsightGetRunsParamsAttributeSortOrder ¶
type SessionInsightGetRunsParamsAttributeSortOrder string
const ( SessionInsightGetRunsParamsAttributeSortOrderAsc SessionInsightGetRunsParamsAttributeSortOrder = "asc" SessionInsightGetRunsParamsAttributeSortOrderDesc SessionInsightGetRunsParamsAttributeSortOrder = "desc" )
func (SessionInsightGetRunsParamsAttributeSortOrder) IsKnown ¶
func (r SessionInsightGetRunsParamsAttributeSortOrder) IsKnown() bool
type SessionInsightGetRunsResponse ¶
type SessionInsightGetRunsResponse struct {
Offset int64 `json:"offset" api:"required,nullable"`
Runs []map[string]interface{} `json:"runs" api:"required"`
JSON sessionInsightGetRunsResponseJSON `json:"-"`
}
func (*SessionInsightGetRunsResponse) UnmarshalJSON ¶
func (r *SessionInsightGetRunsResponse) UnmarshalJSON(data []byte) (err error)
type SessionInsightListParams ¶ added in v0.2.2
type SessionInsightListParams struct {
ConfigID param.Field[string] `query:"config_id" format:"uuid"`
Legacy param.Field[bool] `query:"legacy"`
Limit param.Field[int64] `query:"limit"`
Offset param.Field[int64] `query:"offset"`
}
func (SessionInsightListParams) URLQuery ¶ added in v0.2.2
func (r SessionInsightListParams) URLQuery() (v url.Values)
URLQuery serializes SessionInsightListParams's query parameters as `url.Values`.
type SessionInsightListResponse ¶ added in v0.2.2
type SessionInsightListResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Name string `json:"name" api:"required"`
Status string `json:"status" api:"required"`
ConfigID string `json:"config_id" api:"nullable" format:"uuid"`
EndTime time.Time `json:"end_time" api:"nullable" format:"date-time"`
Error string `json:"error" api:"nullable"`
Metadata map[string]interface{} `json:"metadata" api:"nullable"`
Shape map[string]int64 `json:"shape" api:"nullable"`
StartTime time.Time `json:"start_time" api:"nullable" format:"date-time"`
JSON sessionInsightListResponseJSON `json:"-"`
}
Session cluster job
func (*SessionInsightListResponse) UnmarshalJSON ¶ added in v0.2.2
func (r *SessionInsightListResponse) UnmarshalJSON(data []byte) (err error)
type SessionInsightNewParams ¶
type SessionInsightNewParams struct {
// Request to create a run clustering job.
CreateRunClusteringJobRequest CreateRunClusteringJobRequestParam `json:"create_run_clustering_job_request" api:"required"`
}
func (SessionInsightNewParams) MarshalJSON ¶
func (r SessionInsightNewParams) MarshalJSON() (data []byte, err error)
type SessionInsightNewResponse ¶
type SessionInsightNewResponse struct {
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
Status string `json:"status" api:"required"`
Error string `json:"error" api:"nullable"`
JSON sessionInsightNewResponseJSON `json:"-"`
}
Response to creating a run clustering job.
func (*SessionInsightNewResponse) UnmarshalJSON ¶
func (r *SessionInsightNewResponse) UnmarshalJSON(data []byte) (err error)
type SessionInsightService ¶
type SessionInsightService struct {
Options []option.RequestOption
}
SessionInsightService contains methods and other services that help with interacting with the langChain 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 NewSessionInsightService method instead.
func NewSessionInsightService ¶
func NewSessionInsightService(opts ...option.RequestOption) (r *SessionInsightService)
NewSessionInsightService 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 (*SessionInsightService) Delete ¶
func (r *SessionInsightService) Delete(ctx context.Context, sessionID string, jobID string, opts ...option.RequestOption) (res *SessionInsightDeleteResponse, err error)
Delete a session cluster job.
func (*SessionInsightService) GetJob ¶
func (r *SessionInsightService) GetJob(ctx context.Context, sessionID string, jobID string, opts ...option.RequestOption) (res *SessionInsightGetJobResponse, err error)
Get a specific cluster job for a session.
func (*SessionInsightService) GetRuns ¶
func (r *SessionInsightService) GetRuns(ctx context.Context, sessionID string, jobID string, query SessionInsightGetRunsParams, opts ...option.RequestOption) (res *SessionInsightGetRunsResponse, err error)
Get all runs for a cluster job, optionally filtered by cluster.
func (*SessionInsightService) List ¶ added in v0.2.2
func (r *SessionInsightService) List(ctx context.Context, sessionID string, query SessionInsightListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationInsightsClusteringJobs[SessionInsightListResponse], err error)
Get all clusters for a session.
func (*SessionInsightService) ListAutoPaging ¶ added in v0.2.2
func (r *SessionInsightService) ListAutoPaging(ctx context.Context, sessionID string, query SessionInsightListParams, opts ...option.RequestOption) *pagination.OffsetPaginationInsightsClusteringJobsAutoPager[SessionInsightListResponse]
Get all clusters for a session.
func (*SessionInsightService) New ¶
func (r *SessionInsightService) New(ctx context.Context, sessionID string, body SessionInsightNewParams, opts ...option.RequestOption) (res *SessionInsightNewResponse, err error)
Create an insights job.
func (*SessionInsightService) Update ¶
func (r *SessionInsightService) Update(ctx context.Context, sessionID string, jobID string, body SessionInsightUpdateParams, opts ...option.RequestOption) (res *SessionInsightUpdateResponse, err error)
Update a session cluster job.
type SessionInsightUpdateParams ¶
func (SessionInsightUpdateParams) MarshalJSON ¶
func (r SessionInsightUpdateParams) MarshalJSON() (data []byte, err error)
type SessionInsightUpdateResponse ¶
type SessionInsightUpdateResponse struct {
Name string `json:"name" api:"required"`
Status string `json:"status" api:"required"`
JSON sessionInsightUpdateResponseJSON `json:"-"`
}
Response to update a session cluster job.
func (*SessionInsightUpdateResponse) UnmarshalJSON ¶
func (r *SessionInsightUpdateResponse) UnmarshalJSON(data []byte) (err error)
type SessionListParams ¶
type SessionListParams struct {
ID param.Field[[]string] `query:"id" format:"uuid"`
DatasetVersion param.Field[string] `query:"dataset_version"`
Facets param.Field[bool] `query:"facets"`
Filter param.Field[string] `query:"filter"`
IncludeStats param.Field[bool] `query:"include_stats"`
Limit param.Field[int64] `query:"limit"`
Metadata param.Field[string] `query:"metadata"`
Name param.Field[string] `query:"name"`
NameContains param.Field[string] `query:"name_contains"`
Offset param.Field[int64] `query:"offset"`
ReferenceDataset param.Field[[]string] `query:"reference_dataset" format:"uuid"`
ReferenceFree param.Field[bool] `query:"reference_free"`
SortBy param.Field[SessionSortableColumns] `query:"sort_by"`
SortByDesc param.Field[bool] `query:"sort_by_desc"`
SortByFeedbackKey param.Field[string] `query:"sort_by_feedback_key"`
StatsStartTime param.Field[time.Time] `query:"stats_start_time" format:"date-time"`
TagValueID param.Field[[]string] `query:"tag_value_id" format:"uuid"`
UseApproxStats param.Field[bool] `query:"use_approx_stats"`
Accept param.Field[string] `header:"accept"`
}
func (SessionListParams) URLQuery ¶
func (r SessionListParams) URLQuery() (v url.Values)
URLQuery serializes SessionListParams's query parameters as `url.Values`.
type SessionNewParams ¶
type SessionNewParams struct {
Upsert param.Field[bool] `query:"upsert"`
ID param.Field[string] `json:"id" format:"uuid"`
DefaultDatasetID param.Field[string] `json:"default_dataset_id" format:"uuid"`
Description param.Field[string] `json:"description"`
EndTime param.Field[time.Time] `json:"end_time" format:"date-time"`
Extra param.Field[map[string]interface{}] `json:"extra"`
Name param.Field[string] `json:"name"`
ReferenceDatasetID param.Field[string] `json:"reference_dataset_id" format:"uuid"`
StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
TraceTier param.Field[SessionNewParamsTraceTier] `json:"trace_tier"`
}
func (SessionNewParams) MarshalJSON ¶
func (r SessionNewParams) MarshalJSON() (data []byte, err error)
func (SessionNewParams) URLQuery ¶
func (r SessionNewParams) URLQuery() (v url.Values)
URLQuery serializes SessionNewParams's query parameters as `url.Values`.
type SessionNewParamsTraceTier ¶
type SessionNewParamsTraceTier string
const ( SessionNewParamsTraceTierLonglived SessionNewParamsTraceTier = "longlived" SessionNewParamsTraceTierShortlived SessionNewParamsTraceTier = "shortlived" )
func (SessionNewParamsTraceTier) IsKnown ¶
func (r SessionNewParamsTraceTier) IsKnown() bool
type SessionService ¶
type SessionService struct {
Options []option.RequestOption
Insights *SessionInsightService
}
SessionService contains methods and other services that help with interacting with the langChain 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 NewSessionService method instead.
func NewSessionService ¶
func NewSessionService(opts ...option.RequestOption) (r *SessionService)
NewSessionService 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 (*SessionService) Dashboard ¶
func (r *SessionService) Dashboard(ctx context.Context, sessionID string, params SessionDashboardParams, opts ...option.RequestOption) (res *CustomChartsSection, err error)
Get a prebuilt dashboard for a tracing project.
func (*SessionService) Delete ¶
func (r *SessionService) Delete(ctx context.Context, sessionID string, opts ...option.RequestOption) (res *SessionDeleteResponse, err error)
Delete a specific session.
func (*SessionService) Get ¶
func (r *SessionService) Get(ctx context.Context, sessionID string, params SessionGetParams, opts ...option.RequestOption) (res *TracerSession, err error)
Get a specific session.
func (*SessionService) List ¶
func (r *SessionService) List(ctx context.Context, params SessionListParams, opts ...option.RequestOption) (res *pagination.OffsetPaginationTopLevelArray[TracerSession], err error)
Get all sessions.
func (*SessionService) ListAutoPaging ¶
func (r *SessionService) ListAutoPaging(ctx context.Context, params SessionListParams, opts ...option.RequestOption) *pagination.OffsetPaginationTopLevelArrayAutoPager[TracerSession]
Get all sessions.
func (*SessionService) New ¶
func (r *SessionService) New(ctx context.Context, params SessionNewParams, opts ...option.RequestOption) (res *TracerSessionWithoutVirtualFields, err error)
Create a new session.
func (*SessionService) Update ¶
func (r *SessionService) Update(ctx context.Context, sessionID string, body SessionUpdateParams, opts ...option.RequestOption) (res *TracerSessionWithoutVirtualFields, err error)
Create a new session.
type SessionSortableColumns ¶
type SessionSortableColumns string
const ( SessionSortableColumnsName SessionSortableColumns = "name" SessionSortableColumnsStartTime SessionSortableColumns = "start_time" SessionSortableColumnsLastRunStartTime SessionSortableColumns = "last_run_start_time" SessionSortableColumnsLatencyP50 SessionSortableColumns = "latency_p50" SessionSortableColumnsLatencyP99 SessionSortableColumns = "latency_p99" SessionSortableColumnsErrorRate SessionSortableColumns = "error_rate" SessionSortableColumnsFeedback SessionSortableColumns = "feedback" SessionSortableColumnsRunsCount SessionSortableColumns = "runs_count" )
func (SessionSortableColumns) IsKnown ¶
func (r SessionSortableColumns) IsKnown() bool
type SessionUpdateParams ¶
type SessionUpdateParams struct {
DefaultDatasetID param.Field[string] `json:"default_dataset_id" format:"uuid"`
Description param.Field[string] `json:"description"`
EndTime param.Field[time.Time] `json:"end_time" format:"date-time"`
Extra param.Field[map[string]interface{}] `json:"extra"`
Name param.Field[string] `json:"name"`
TraceTier param.Field[SessionUpdateParamsTraceTier] `json:"trace_tier"`
}
func (SessionUpdateParams) MarshalJSON ¶
func (r SessionUpdateParams) MarshalJSON() (data []byte, err error)
type SessionUpdateParamsTraceTier ¶
type SessionUpdateParamsTraceTier string
const ( SessionUpdateParamsTraceTierLonglived SessionUpdateParamsTraceTier = "longlived" SessionUpdateParamsTraceTierShortlived SessionUpdateParamsTraceTier = "shortlived" )
func (SessionUpdateParamsTraceTier) IsKnown ¶
func (r SessionUpdateParamsTraceTier) IsKnown() bool
type SettingService ¶
type SettingService struct {
Options []option.RequestOption
}
SettingService contains methods and other services that help with interacting with the langChain 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 NewSettingService method instead.
func NewSettingService ¶
func NewSettingService(opts ...option.RequestOption) (r *SettingService)
NewSettingService 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 (*SettingService) List ¶
func (r *SettingService) List(ctx context.Context, opts ...option.RequestOption) (res *AppHubCrudTenantsTenant, err error)
Get settings.
type SimpleExperimentInfo ¶
type SimpleExperimentInfo struct {
ID string `json:"id" api:"required" format:"uuid"`
Name string `json:"name" api:"required"`
JSON simpleExperimentInfoJSON `json:"-"`
}
Simple experiment info schema for use with comparative experiments
func (*SimpleExperimentInfo) UnmarshalJSON ¶
func (r *SimpleExperimentInfo) UnmarshalJSON(data []byte) (err error)
type SortByComparativeExperimentColumn ¶
type SortByComparativeExperimentColumn string
Enum for available comparative experiment columns to sort by.
const ( SortByComparativeExperimentColumnName SortByComparativeExperimentColumn = "name" SortByComparativeExperimentColumnCreatedAt SortByComparativeExperimentColumn = "created_at" )
func (SortByComparativeExperimentColumn) IsKnown ¶
func (r SortByComparativeExperimentColumn) IsKnown() bool
type SortByDatasetColumn ¶
type SortByDatasetColumn string
Enum for available dataset columns to sort by.
const ( SortByDatasetColumnName SortByDatasetColumn = "name" SortByDatasetColumnCreatedAt SortByDatasetColumn = "created_at" SortByDatasetColumnLastSessionStartTime SortByDatasetColumn = "last_session_start_time" SortByDatasetColumnExampleCount SortByDatasetColumn = "example_count" SortByDatasetColumnSessionCount SortByDatasetColumn = "session_count" SortByDatasetColumnModifiedAt SortByDatasetColumn = "modified_at" )
func (SortByDatasetColumn) IsKnown ¶
func (r SortByDatasetColumn) IsKnown() bool
type SortParamsForRunsComparisonView ¶
type SortParamsForRunsComparisonView struct {
SortBy param.Field[string] `json:"sort_by" api:"required"`
SortOrder param.Field[SortParamsForRunsComparisonViewSortOrder] `json:"sort_order"`
}
func (SortParamsForRunsComparisonView) MarshalJSON ¶
func (r SortParamsForRunsComparisonView) MarshalJSON() (data []byte, err error)
type SortParamsForRunsComparisonViewSortOrder ¶
type SortParamsForRunsComparisonViewSortOrder string
const ( SortParamsForRunsComparisonViewSortOrderAsc SortParamsForRunsComparisonViewSortOrder = "ASC" SortParamsForRunsComparisonViewSortOrderDesc SortParamsForRunsComparisonViewSortOrder = "DESC" )
func (SortParamsForRunsComparisonViewSortOrder) IsKnown ¶
func (r SortParamsForRunsComparisonViewSortOrder) IsKnown() bool
type SourceType ¶
type SourceType string
Enum for feedback source types.
const ( SourceTypeAPI SourceType = "api" SourceTypeModel SourceType = "model" SourceTypeApp SourceType = "app" SourceTypeAutoEval SourceType = "auto_eval" )
func (SourceType) IsKnown ¶
func (r SourceType) IsKnown() bool
type TimedeltaInputParam ¶
type TimedeltaInputParam struct {
Days param.Field[int64] `json:"days"`
Hours param.Field[int64] `json:"hours"`
Minutes param.Field[int64] `json:"minutes"`
}
Timedelta input.
func (TimedeltaInputParam) MarshalJSON ¶
func (r TimedeltaInputParam) MarshalJSON() (data []byte, err error)
type Tracer
deprecated
type Tracer = OTelTracer
Deprecated: Use OTelTracer instead.
type TracerOption
deprecated
type TracerOption = OTelTracerOption
Deprecated: Use OTelTracerOption instead.
type TracerSession ¶
type TracerSession struct {
ID string `json:"id" api:"required" format:"uuid"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
CompletionCost string `json:"completion_cost" api:"nullable"`
CompletionTokens int64 `json:"completion_tokens" api:"nullable"`
DefaultDatasetID string `json:"default_dataset_id" api:"nullable" format:"uuid"`
Description string `json:"description" api:"nullable"`
EndTime time.Time `json:"end_time" api:"nullable" format:"date-time"`
ErrorRate float64 `json:"error_rate" api:"nullable"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
FeedbackStats map[string]interface{} `json:"feedback_stats" api:"nullable"`
FirstTokenP50 float64 `json:"first_token_p50" api:"nullable"`
FirstTokenP99 float64 `json:"first_token_p99" api:"nullable"`
LastRunStartTime time.Time `json:"last_run_start_time" api:"nullable" format:"date-time"`
LastRunStartTimeLive time.Time `json:"last_run_start_time_live" api:"nullable" format:"date-time"`
LatencyP50 float64 `json:"latency_p50" api:"nullable"`
LatencyP99 float64 `json:"latency_p99" api:"nullable"`
Name string `json:"name"`
PromptCost string `json:"prompt_cost" api:"nullable"`
PromptTokens int64 `json:"prompt_tokens" api:"nullable"`
ReferenceDatasetID string `json:"reference_dataset_id" api:"nullable" format:"uuid"`
RunCount int64 `json:"run_count" api:"nullable"`
RunFacets []map[string]interface{} `json:"run_facets" api:"nullable"`
SessionFeedbackStats map[string]interface{} `json:"session_feedback_stats" api:"nullable"`
StartTime time.Time `json:"start_time" format:"date-time"`
StreamingRate float64 `json:"streaming_rate" api:"nullable"`
TestRunNumber int64 `json:"test_run_number" api:"nullable"`
TotalCost string `json:"total_cost" api:"nullable"`
TotalTokens int64 `json:"total_tokens" api:"nullable"`
TraceTier TracerSessionTraceTier `json:"trace_tier" api:"nullable"`
JSON tracerSessionJSON `json:"-"`
}
TracerSession schema.
func (*TracerSession) UnmarshalJSON ¶
func (r *TracerSession) UnmarshalJSON(data []byte) (err error)
type TracerSessionTraceTier ¶
type TracerSessionTraceTier string
const ( TracerSessionTraceTierLonglived TracerSessionTraceTier = "longlived" TracerSessionTraceTierShortlived TracerSessionTraceTier = "shortlived" )
func (TracerSessionTraceTier) IsKnown ¶
func (r TracerSessionTraceTier) IsKnown() bool
type TracerSessionWithoutVirtualFields ¶
type TracerSessionWithoutVirtualFields struct {
ID string `json:"id" api:"required" format:"uuid"`
TenantID string `json:"tenant_id" api:"required" format:"uuid"`
DefaultDatasetID string `json:"default_dataset_id" api:"nullable" format:"uuid"`
Description string `json:"description" api:"nullable"`
EndTime time.Time `json:"end_time" api:"nullable" format:"date-time"`
Extra map[string]interface{} `json:"extra" api:"nullable"`
LastRunStartTimeLive time.Time `json:"last_run_start_time_live" api:"nullable" format:"date-time"`
Name string `json:"name"`
ReferenceDatasetID string `json:"reference_dataset_id" api:"nullable" format:"uuid"`
StartTime time.Time `json:"start_time" format:"date-time"`
TraceTier TracerSessionWithoutVirtualFieldsTraceTier `json:"trace_tier" api:"nullable"`
JSON tracerSessionWithoutVirtualFieldsJSON `json:"-"`
}
TracerSession schema.
func (*TracerSessionWithoutVirtualFields) UnmarshalJSON ¶
func (r *TracerSessionWithoutVirtualFields) UnmarshalJSON(data []byte) (err error)
type TracerSessionWithoutVirtualFieldsTraceTier ¶
type TracerSessionWithoutVirtualFieldsTraceTier string
const ( TracerSessionWithoutVirtualFieldsTraceTierLonglived TracerSessionWithoutVirtualFieldsTraceTier = "longlived" TracerSessionWithoutVirtualFieldsTraceTierShortlived TracerSessionWithoutVirtualFieldsTraceTier = "shortlived" )
func (TracerSessionWithoutVirtualFieldsTraceTier) IsKnown ¶
func (r TracerSessionWithoutVirtualFieldsTraceTier) IsKnown() bool
type TracingAttachment ¶ added in v0.2.2
type TracingAttachment = langsmithtracing.Attachment
TracingAttachment is a binary file to upload alongside a run.
type TracingClient ¶ added in v0.2.2
type TracingClient = langsmithtracing.TracingClient
TracingClient sends runs to LangSmith via the multipart ingestion endpoint.
type TracingLogger ¶ added in v0.2.2
type TracingLogger = langsmithtracing.Logger
TracingLogger is the interface used by TracingClient for diagnostic output.
type TracingOption ¶ added in v0.2.2
type TracingOption = langsmithtracing.Option
TracingOption configures a TracingClient.
Source Files
¶
- aliases.go
- annotationqueue.go
- annotationqueueinfo.go
- annotationqueuerun.go
- client.go
- commit.go
- dataset.go
- datasetcomparative.go
- datasetexperiment.go
- datasetgroup.go
- datasetplaygroundexperiment.go
- datasetrun.go
- datasetshare.go
- datasetsplit.go
- datasetversion.go
- example.go
- examplebulk.go
- examplevalidate.go
- feedback.go
- feedbackconfig.go
- feedbacktoken.go
- field.go
- insights.go
- public.go
- publicdataset.go
- repo.go
- run.go
- runrule.go
- session.go
- sessioninsight.go
- setting.go
- tracer.go
- tracing.go
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
dataset
command
|
|
|
e2e_eval
command
|
|
|
list_runs
command
|
|
|
otel_anthropic
command
|
|
|
otel_go_client_openai
command
|
|
|
otel_ingestion
command
|
|
|
otel_openai
command
|
|
|
prompt_management
command
|
|
|
record_experiment
command
|
|
|
instrumentation
|
|
|
traceanthropic
Package traceanthropic provides OpenTelemetry tracing for the Anthropic API client using LangSmith-compatible spans.
|
Package traceanthropic provides OpenTelemetry tracing for the Anthropic API client using LangSmith-compatible spans. |
|
traceopenai
Package openaitrace provides OpenTelemetry middleware for OpenAI API requests.
|
Package openaitrace provides OpenTelemetry middleware for OpenAI API requests. |
|
lib
|
|
|
packages
|
|