langfuse.api

  1# This file was auto-generated by Fern from our API Definition.
  2
  3from .resources import (
  4    AccessDeniedError,
  5    AnnotationQueue,
  6    AnnotationQueueAssignmentRequest,
  7    AnnotationQueueItem,
  8    AnnotationQueueObjectType,
  9    AnnotationQueueStatus,
 10    ApiKeyDeletionResponse,
 11    ApiKeyList,
 12    ApiKeyResponse,
 13    ApiKeySummary,
 14    AuthenticationScheme,
 15    BaseEvent,
 16    BasePrompt,
 17    BaseScore,
 18    BaseScoreV1,
 19    BooleanScore,
 20    BooleanScoreV1,
 21    BulkConfig,
 22    CategoricalScore,
 23    CategoricalScoreV1,
 24    ChatMessage,
 25    ChatMessageWithPlaceholders,
 26    ChatMessageWithPlaceholders_Chatmessage,
 27    ChatMessageWithPlaceholders_Placeholder,
 28    ChatPrompt,
 29    Comment,
 30    CommentObjectType,
 31    ConfigCategory,
 32    CreateAnnotationQueueAssignmentResponse,
 33    CreateAnnotationQueueItemRequest,
 34    CreateAnnotationQueueRequest,
 35    CreateChatPromptRequest,
 36    CreateCommentRequest,
 37    CreateCommentResponse,
 38    CreateDatasetItemRequest,
 39    CreateDatasetRequest,
 40    CreateDatasetRunItemRequest,
 41    CreateEventBody,
 42    CreateEventEvent,
 43    CreateGenerationBody,
 44    CreateGenerationEvent,
 45    CreateModelRequest,
 46    CreateObservationEvent,
 47    CreatePromptRequest,
 48    CreatePromptRequest_Chat,
 49    CreatePromptRequest_Text,
 50    CreateScoreConfigRequest,
 51    CreateScoreRequest,
 52    CreateScoreResponse,
 53    CreateScoreValue,
 54    CreateSpanBody,
 55    CreateSpanEvent,
 56    CreateTextPromptRequest,
 57    Dataset,
 58    DatasetItem,
 59    DatasetRun,
 60    DatasetRunItem,
 61    DatasetRunWithItems,
 62    DatasetStatus,
 63    DeleteAnnotationQueueAssignmentResponse,
 64    DeleteAnnotationQueueItemResponse,
 65    DeleteDatasetItemResponse,
 66    DeleteDatasetRunResponse,
 67    DeleteTraceResponse,
 68    EmptyResponse,
 69    Error,
 70    FilterConfig,
 71    GetCommentsResponse,
 72    GetMediaResponse,
 73    GetMediaUploadUrlRequest,
 74    GetMediaUploadUrlResponse,
 75    GetScoresResponse,
 76    GetScoresResponseData,
 77    GetScoresResponseDataBoolean,
 78    GetScoresResponseDataCategorical,
 79    GetScoresResponseDataNumeric,
 80    GetScoresResponseData_Boolean,
 81    GetScoresResponseData_Categorical,
 82    GetScoresResponseData_Numeric,
 83    GetScoresResponseTraceData,
 84    HealthResponse,
 85    IngestionError,
 86    IngestionEvent,
 87    IngestionEvent_EventCreate,
 88    IngestionEvent_GenerationCreate,
 89    IngestionEvent_GenerationUpdate,
 90    IngestionEvent_ObservationCreate,
 91    IngestionEvent_ObservationUpdate,
 92    IngestionEvent_ScoreCreate,
 93    IngestionEvent_SdkLog,
 94    IngestionEvent_SpanCreate,
 95    IngestionEvent_SpanUpdate,
 96    IngestionEvent_TraceCreate,
 97    IngestionResponse,
 98    IngestionSuccess,
 99    IngestionUsage,
100    LlmAdapter,
101    LlmConnection,
102    MapValue,
103    MediaContentType,
104    MembershipRequest,
105    MembershipResponse,
106    MembershipRole,
107    MembershipsResponse,
108    MethodNotAllowedError,
109    MetricsResponse,
110    Model,
111    ModelPrice,
112    ModelUsageUnit,
113    NotFoundError,
114    NumericScore,
115    NumericScoreV1,
116    Observation,
117    ObservationBody,
118    ObservationLevel,
119    ObservationType,
120    Observations,
121    ObservationsView,
122    ObservationsViews,
123    OpenAiCompletionUsageSchema,
124    OpenAiResponseUsageSchema,
125    OpenAiUsage,
126    OptionalObservationBody,
127    OrganizationProject,
128    OrganizationProjectsResponse,
129    PaginatedAnnotationQueueItems,
130    PaginatedAnnotationQueues,
131    PaginatedDatasetItems,
132    PaginatedDatasetRunItems,
133    PaginatedDatasetRuns,
134    PaginatedDatasets,
135    PaginatedLlmConnections,
136    PaginatedModels,
137    PaginatedSessions,
138    PatchMediaBody,
139    PlaceholderMessage,
140    Project,
141    ProjectDeletionResponse,
142    Projects,
143    Prompt,
144    PromptMeta,
145    PromptMetaListResponse,
146    Prompt_Chat,
147    Prompt_Text,
148    ResourceMeta,
149    ResourceType,
150    ResourceTypesResponse,
151    SchemaExtension,
152    SchemaResource,
153    SchemasResponse,
154    ScimEmail,
155    ScimFeatureSupport,
156    ScimName,
157    ScimUser,
158    ScimUsersListResponse,
159    Score,
160    ScoreBody,
161    ScoreConfig,
162    ScoreConfigs,
163    ScoreDataType,
164    ScoreEvent,
165    ScoreSource,
166    ScoreV1,
167    ScoreV1_Boolean,
168    ScoreV1_Categorical,
169    ScoreV1_Numeric,
170    Score_Boolean,
171    Score_Categorical,
172    Score_Numeric,
173    SdkLogBody,
174    SdkLogEvent,
175    ServiceProviderConfig,
176    ServiceUnavailableError,
177    Session,
178    SessionWithTraces,
179    Sort,
180    TextPrompt,
181    Trace,
182    TraceBody,
183    TraceEvent,
184    TraceWithDetails,
185    TraceWithFullDetails,
186    Traces,
187    UnauthorizedError,
188    UpdateAnnotationQueueItemRequest,
189    UpdateEventBody,
190    UpdateGenerationBody,
191    UpdateGenerationEvent,
192    UpdateObservationEvent,
193    UpdateSpanBody,
194    UpdateSpanEvent,
195    UpsertLlmConnectionRequest,
196    Usage,
197    UsageDetails,
198    UserMeta,
199    annotation_queues,
200    comments,
201    commons,
202    dataset_items,
203    dataset_run_items,
204    datasets,
205    health,
206    ingestion,
207    llm_connections,
208    media,
209    metrics,
210    models,
211    observations,
212    organizations,
213    projects,
214    prompt_version,
215    prompts,
216    scim,
217    score,
218    score_configs,
219    score_v_2,
220    sessions,
221    trace,
222    utils,
223)
224
225__all__ = [
226    "AccessDeniedError",
227    "AnnotationQueue",
228    "AnnotationQueueAssignmentRequest",
229    "AnnotationQueueItem",
230    "AnnotationQueueObjectType",
231    "AnnotationQueueStatus",
232    "ApiKeyDeletionResponse",
233    "ApiKeyList",
234    "ApiKeyResponse",
235    "ApiKeySummary",
236    "AuthenticationScheme",
237    "BaseEvent",
238    "BasePrompt",
239    "BaseScore",
240    "BaseScoreV1",
241    "BooleanScore",
242    "BooleanScoreV1",
243    "BulkConfig",
244    "CategoricalScore",
245    "CategoricalScoreV1",
246    "ChatMessage",
247    "ChatMessageWithPlaceholders",
248    "ChatMessageWithPlaceholders_Chatmessage",
249    "ChatMessageWithPlaceholders_Placeholder",
250    "ChatPrompt",
251    "Comment",
252    "CommentObjectType",
253    "ConfigCategory",
254    "CreateAnnotationQueueAssignmentResponse",
255    "CreateAnnotationQueueItemRequest",
256    "CreateAnnotationQueueRequest",
257    "CreateChatPromptRequest",
258    "CreateCommentRequest",
259    "CreateCommentResponse",
260    "CreateDatasetItemRequest",
261    "CreateDatasetRequest",
262    "CreateDatasetRunItemRequest",
263    "CreateEventBody",
264    "CreateEventEvent",
265    "CreateGenerationBody",
266    "CreateGenerationEvent",
267    "CreateModelRequest",
268    "CreateObservationEvent",
269    "CreatePromptRequest",
270    "CreatePromptRequest_Chat",
271    "CreatePromptRequest_Text",
272    "CreateScoreConfigRequest",
273    "CreateScoreRequest",
274    "CreateScoreResponse",
275    "CreateScoreValue",
276    "CreateSpanBody",
277    "CreateSpanEvent",
278    "CreateTextPromptRequest",
279    "Dataset",
280    "DatasetItem",
281    "DatasetRun",
282    "DatasetRunItem",
283    "DatasetRunWithItems",
284    "DatasetStatus",
285    "DeleteAnnotationQueueAssignmentResponse",
286    "DeleteAnnotationQueueItemResponse",
287    "DeleteDatasetItemResponse",
288    "DeleteDatasetRunResponse",
289    "DeleteTraceResponse",
290    "EmptyResponse",
291    "Error",
292    "FilterConfig",
293    "GetCommentsResponse",
294    "GetMediaResponse",
295    "GetMediaUploadUrlRequest",
296    "GetMediaUploadUrlResponse",
297    "GetScoresResponse",
298    "GetScoresResponseData",
299    "GetScoresResponseDataBoolean",
300    "GetScoresResponseDataCategorical",
301    "GetScoresResponseDataNumeric",
302    "GetScoresResponseData_Boolean",
303    "GetScoresResponseData_Categorical",
304    "GetScoresResponseData_Numeric",
305    "GetScoresResponseTraceData",
306    "HealthResponse",
307    "IngestionError",
308    "IngestionEvent",
309    "IngestionEvent_EventCreate",
310    "IngestionEvent_GenerationCreate",
311    "IngestionEvent_GenerationUpdate",
312    "IngestionEvent_ObservationCreate",
313    "IngestionEvent_ObservationUpdate",
314    "IngestionEvent_ScoreCreate",
315    "IngestionEvent_SdkLog",
316    "IngestionEvent_SpanCreate",
317    "IngestionEvent_SpanUpdate",
318    "IngestionEvent_TraceCreate",
319    "IngestionResponse",
320    "IngestionSuccess",
321    "IngestionUsage",
322    "LlmAdapter",
323    "LlmConnection",
324    "MapValue",
325    "MediaContentType",
326    "MembershipRequest",
327    "MembershipResponse",
328    "MembershipRole",
329    "MembershipsResponse",
330    "MethodNotAllowedError",
331    "MetricsResponse",
332    "Model",
333    "ModelPrice",
334    "ModelUsageUnit",
335    "NotFoundError",
336    "NumericScore",
337    "NumericScoreV1",
338    "Observation",
339    "ObservationBody",
340    "ObservationLevel",
341    "ObservationType",
342    "Observations",
343    "ObservationsView",
344    "ObservationsViews",
345    "OpenAiCompletionUsageSchema",
346    "OpenAiResponseUsageSchema",
347    "OpenAiUsage",
348    "OptionalObservationBody",
349    "OrganizationProject",
350    "OrganizationProjectsResponse",
351    "PaginatedAnnotationQueueItems",
352    "PaginatedAnnotationQueues",
353    "PaginatedDatasetItems",
354    "PaginatedDatasetRunItems",
355    "PaginatedDatasetRuns",
356    "PaginatedDatasets",
357    "PaginatedLlmConnections",
358    "PaginatedModels",
359    "PaginatedSessions",
360    "PatchMediaBody",
361    "PlaceholderMessage",
362    "Project",
363    "ProjectDeletionResponse",
364    "Projects",
365    "Prompt",
366    "PromptMeta",
367    "PromptMetaListResponse",
368    "Prompt_Chat",
369    "Prompt_Text",
370    "ResourceMeta",
371    "ResourceType",
372    "ResourceTypesResponse",
373    "SchemaExtension",
374    "SchemaResource",
375    "SchemasResponse",
376    "ScimEmail",
377    "ScimFeatureSupport",
378    "ScimName",
379    "ScimUser",
380    "ScimUsersListResponse",
381    "Score",
382    "ScoreBody",
383    "ScoreConfig",
384    "ScoreConfigs",
385    "ScoreDataType",
386    "ScoreEvent",
387    "ScoreSource",
388    "ScoreV1",
389    "ScoreV1_Boolean",
390    "ScoreV1_Categorical",
391    "ScoreV1_Numeric",
392    "Score_Boolean",
393    "Score_Categorical",
394    "Score_Numeric",
395    "SdkLogBody",
396    "SdkLogEvent",
397    "ServiceProviderConfig",
398    "ServiceUnavailableError",
399    "Session",
400    "SessionWithTraces",
401    "Sort",
402    "TextPrompt",
403    "Trace",
404    "TraceBody",
405    "TraceEvent",
406    "TraceWithDetails",
407    "TraceWithFullDetails",
408    "Traces",
409    "UnauthorizedError",
410    "UpdateAnnotationQueueItemRequest",
411    "UpdateEventBody",
412    "UpdateGenerationBody",
413    "UpdateGenerationEvent",
414    "UpdateObservationEvent",
415    "UpdateSpanBody",
416    "UpdateSpanEvent",
417    "UpsertLlmConnectionRequest",
418    "Usage",
419    "UsageDetails",
420    "UserMeta",
421    "annotation_queues",
422    "comments",
423    "commons",
424    "dataset_items",
425    "dataset_run_items",
426    "datasets",
427    "health",
428    "ingestion",
429    "llm_connections",
430    "media",
431    "metrics",
432    "models",
433    "observations",
434    "organizations",
435    "projects",
436    "prompt_version",
437    "prompts",
438    "scim",
439    "score",
440    "score_configs",
441    "score_v_2",
442    "sessions",
443    "trace",
444    "utils",
445]
class AccessDeniedError(langfuse.api.core.api_error.ApiError):
 9class AccessDeniedError(ApiError):
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=403, body=body)

Common base class for all non-exit exceptions.

AccessDeniedError(body: Any)
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=403, body=body)
class AnnotationQueue(pydantic.v1.main.BaseModel):
11class AnnotationQueue(pydantic_v1.BaseModel):
12    id: str
13    name: str
14    description: typing.Optional[str] = None
15    score_config_ids: typing.List[str] = pydantic_v1.Field(alias="scoreConfigIds")
16    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
17    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
18
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)
26
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )
43
44    class Config:
45        frozen = True
46        smart_union = True
47        allow_population_by_field_name = True
48        populate_by_name = True
49        extra = pydantic_v1.Extra.allow
50        json_encoders = {dt.datetime: serialize_datetime}
id: str
name: str
description: Optional[str]
score_config_ids: List[str]
created_at: datetime.datetime
updated_at: datetime.datetime
def json(self, **kwargs: Any) -> str:
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class AnnotationQueue.Config:
44    class Config:
45        frozen = True
46        smart_union = True
47        allow_population_by_field_name = True
48        populate_by_name = True
49        extra = pydantic_v1.Extra.allow
50        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class AnnotationQueueAssignmentRequest(pydantic.v1.main.BaseModel):
11class AnnotationQueueAssignmentRequest(pydantic_v1.BaseModel):
12    user_id: str = pydantic_v1.Field(alias="userId")
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        allow_population_by_field_name = True
43        populate_by_name = True
44        extra = pydantic_v1.Extra.allow
45        json_encoders = {dt.datetime: serialize_datetime}
user_id: str
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class AnnotationQueueAssignmentRequest.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        allow_population_by_field_name = True
43        populate_by_name = True
44        extra = pydantic_v1.Extra.allow
45        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class AnnotationQueueItem(pydantic.v1.main.BaseModel):
13class AnnotationQueueItem(pydantic_v1.BaseModel):
14    id: str
15    queue_id: str = pydantic_v1.Field(alias="queueId")
16    object_id: str = pydantic_v1.Field(alias="objectId")
17    object_type: AnnotationQueueObjectType = pydantic_v1.Field(alias="objectType")
18    status: AnnotationQueueStatus
19    completed_at: typing.Optional[dt.datetime] = pydantic_v1.Field(
20        alias="completedAt", default=None
21    )
22    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
23    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
24
25    def json(self, **kwargs: typing.Any) -> str:
26        kwargs_with_defaults: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        return super().json(**kwargs_with_defaults)
32
33    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
34        kwargs_with_defaults_exclude_unset: typing.Any = {
35            "by_alias": True,
36            "exclude_unset": True,
37            **kwargs,
38        }
39        kwargs_with_defaults_exclude_none: typing.Any = {
40            "by_alias": True,
41            "exclude_none": True,
42            **kwargs,
43        }
44
45        return deep_union_pydantic_dicts(
46            super().dict(**kwargs_with_defaults_exclude_unset),
47            super().dict(**kwargs_with_defaults_exclude_none),
48        )
49
50    class Config:
51        frozen = True
52        smart_union = True
53        allow_population_by_field_name = True
54        populate_by_name = True
55        extra = pydantic_v1.Extra.allow
56        json_encoders = {dt.datetime: serialize_datetime}
id: str
queue_id: str
object_id: str
completed_at: Optional[datetime.datetime]
created_at: datetime.datetime
updated_at: datetime.datetime
def json(self, **kwargs: Any) -> str:
25    def json(self, **kwargs: typing.Any) -> str:
26        kwargs_with_defaults: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
33    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
34        kwargs_with_defaults_exclude_unset: typing.Any = {
35            "by_alias": True,
36            "exclude_unset": True,
37            **kwargs,
38        }
39        kwargs_with_defaults_exclude_none: typing.Any = {
40            "by_alias": True,
41            "exclude_none": True,
42            **kwargs,
43        }
44
45        return deep_union_pydantic_dicts(
46            super().dict(**kwargs_with_defaults_exclude_unset),
47            super().dict(**kwargs_with_defaults_exclude_none),
48        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class AnnotationQueueItem.Config:
50    class Config:
51        frozen = True
52        smart_union = True
53        allow_population_by_field_name = True
54        populate_by_name = True
55        extra = pydantic_v1.Extra.allow
56        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class AnnotationQueueObjectType(builtins.str, enum.Enum):
10class AnnotationQueueObjectType(str, enum.Enum):
11    TRACE = "TRACE"
12    OBSERVATION = "OBSERVATION"
13
14    def visit(
15        self,
16        trace: typing.Callable[[], T_Result],
17        observation: typing.Callable[[], T_Result],
18    ) -> T_Result:
19        if self is AnnotationQueueObjectType.TRACE:
20            return trace()
21        if self is AnnotationQueueObjectType.OBSERVATION:
22            return observation()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

TRACE = <AnnotationQueueObjectType.TRACE: 'TRACE'>
OBSERVATION = <AnnotationQueueObjectType.OBSERVATION: 'OBSERVATION'>
def visit( self, trace: Callable[[], ~T_Result], observation: Callable[[], ~T_Result]) -> ~T_Result:
14    def visit(
15        self,
16        trace: typing.Callable[[], T_Result],
17        observation: typing.Callable[[], T_Result],
18    ) -> T_Result:
19        if self is AnnotationQueueObjectType.TRACE:
20            return trace()
21        if self is AnnotationQueueObjectType.OBSERVATION:
22            return observation()
class AnnotationQueueStatus(builtins.str, enum.Enum):
10class AnnotationQueueStatus(str, enum.Enum):
11    PENDING = "PENDING"
12    COMPLETED = "COMPLETED"
13
14    def visit(
15        self,
16        pending: typing.Callable[[], T_Result],
17        completed: typing.Callable[[], T_Result],
18    ) -> T_Result:
19        if self is AnnotationQueueStatus.PENDING:
20            return pending()
21        if self is AnnotationQueueStatus.COMPLETED:
22            return completed()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

PENDING = <AnnotationQueueStatus.PENDING: 'PENDING'>
COMPLETED = <AnnotationQueueStatus.COMPLETED: 'COMPLETED'>
def visit( self, pending: Callable[[], ~T_Result], completed: Callable[[], ~T_Result]) -> ~T_Result:
14    def visit(
15        self,
16        pending: typing.Callable[[], T_Result],
17        completed: typing.Callable[[], T_Result],
18    ) -> T_Result:
19        if self is AnnotationQueueStatus.PENDING:
20            return pending()
21        if self is AnnotationQueueStatus.COMPLETED:
22            return completed()
class ApiKeyDeletionResponse(pydantic.v1.main.BaseModel):
11class ApiKeyDeletionResponse(pydantic_v1.BaseModel):
12    """
13    Response for API key deletion
14    """
15
16    success: bool
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}

Response for API key deletion

success: bool
def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ApiKeyDeletionResponse.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ApiKeyList(pydantic.v1.main.BaseModel):
12class ApiKeyList(pydantic_v1.BaseModel):
13    """
14    List of API keys for a project
15    """
16
17    api_keys: typing.List[ApiKeySummary] = pydantic_v1.Field(alias="apiKeys")
18
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)
26
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )
43
44    class Config:
45        frozen = True
46        smart_union = True
47        allow_population_by_field_name = True
48        populate_by_name = True
49        extra = pydantic_v1.Extra.allow
50        json_encoders = {dt.datetime: serialize_datetime}

List of API keys for a project

api_keys: List[ApiKeySummary]
def json(self, **kwargs: Any) -> str:
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ApiKeyList.Config:
44    class Config:
45        frozen = True
46        smart_union = True
47        allow_population_by_field_name = True
48        populate_by_name = True
49        extra = pydantic_v1.Extra.allow
50        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ApiKeyResponse(pydantic.v1.main.BaseModel):
11class ApiKeyResponse(pydantic_v1.BaseModel):
12    """
13    Response for API key creation
14    """
15
16    id: str
17    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
18    public_key: str = pydantic_v1.Field(alias="publicKey")
19    secret_key: str = pydantic_v1.Field(alias="secretKey")
20    display_secret_key: str = pydantic_v1.Field(alias="displaySecretKey")
21    note: typing.Optional[str] = None
22
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)
30
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )
47
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}

Response for API key creation

id: str
created_at: datetime.datetime
public_key: str
secret_key: str
display_secret_key: str
note: Optional[str]
def json(self, **kwargs: Any) -> str:
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ApiKeyResponse.Config:
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ApiKeySummary(pydantic.v1.main.BaseModel):
11class ApiKeySummary(pydantic_v1.BaseModel):
12    """
13    Summary of an API key
14    """
15
16    id: str
17    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
18    expires_at: typing.Optional[dt.datetime] = pydantic_v1.Field(
19        alias="expiresAt", default=None
20    )
21    last_used_at: typing.Optional[dt.datetime] = pydantic_v1.Field(
22        alias="lastUsedAt", default=None
23    )
24    note: typing.Optional[str] = None
25    public_key: str = pydantic_v1.Field(alias="publicKey")
26    display_secret_key: str = pydantic_v1.Field(alias="displaySecretKey")
27
28    def json(self, **kwargs: typing.Any) -> str:
29        kwargs_with_defaults: typing.Any = {
30            "by_alias": True,
31            "exclude_unset": True,
32            **kwargs,
33        }
34        return super().json(**kwargs_with_defaults)
35
36    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
37        kwargs_with_defaults_exclude_unset: typing.Any = {
38            "by_alias": True,
39            "exclude_unset": True,
40            **kwargs,
41        }
42        kwargs_with_defaults_exclude_none: typing.Any = {
43            "by_alias": True,
44            "exclude_none": True,
45            **kwargs,
46        }
47
48        return deep_union_pydantic_dicts(
49            super().dict(**kwargs_with_defaults_exclude_unset),
50            super().dict(**kwargs_with_defaults_exclude_none),
51        )
52
53    class Config:
54        frozen = True
55        smart_union = True
56        allow_population_by_field_name = True
57        populate_by_name = True
58        extra = pydantic_v1.Extra.allow
59        json_encoders = {dt.datetime: serialize_datetime}

Summary of an API key

id: str
created_at: datetime.datetime
expires_at: Optional[datetime.datetime]
last_used_at: Optional[datetime.datetime]
note: Optional[str]
public_key: str
display_secret_key: str
def json(self, **kwargs: Any) -> str:
28    def json(self, **kwargs: typing.Any) -> str:
29        kwargs_with_defaults: typing.Any = {
30            "by_alias": True,
31            "exclude_unset": True,
32            **kwargs,
33        }
34        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
36    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
37        kwargs_with_defaults_exclude_unset: typing.Any = {
38            "by_alias": True,
39            "exclude_unset": True,
40            **kwargs,
41        }
42        kwargs_with_defaults_exclude_none: typing.Any = {
43            "by_alias": True,
44            "exclude_none": True,
45            **kwargs,
46        }
47
48        return deep_union_pydantic_dicts(
49            super().dict(**kwargs_with_defaults_exclude_unset),
50            super().dict(**kwargs_with_defaults_exclude_none),
51        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ApiKeySummary.Config:
53    class Config:
54        frozen = True
55        smart_union = True
56        allow_population_by_field_name = True
57        populate_by_name = True
58        extra = pydantic_v1.Extra.allow
59        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class AuthenticationScheme(pydantic.v1.main.BaseModel):
11class AuthenticationScheme(pydantic_v1.BaseModel):
12    name: str
13    description: str
14    spec_uri: str = pydantic_v1.Field(alias="specUri")
15    type: str
16    primary: bool
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
name: str
description: str
spec_uri: str
type: str
primary: bool
def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class AuthenticationScheme.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class BaseEvent(pydantic.v1.main.BaseModel):
11class BaseEvent(pydantic_v1.BaseModel):
12    id: str = pydantic_v1.Field()
13    """
14    UUID v4 that identifies the event
15    """
16
17    timestamp: str = pydantic_v1.Field()
18    """
19    Datetime (ISO 8601) of event creation in client. Should be as close to actual event creation in client as possible, this timestamp will be used for ordering of events in future release. Resolution: milliseconds (required), microseconds (optimal).
20    """
21
22    metadata: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
23    """
24    Optional. Metadata field used by the Langfuse SDKs for debugging.
25    """
26
27    def json(self, **kwargs: typing.Any) -> str:
28        kwargs_with_defaults: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        return super().json(**kwargs_with_defaults)
34
35    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
36        kwargs_with_defaults_exclude_unset: typing.Any = {
37            "by_alias": True,
38            "exclude_unset": True,
39            **kwargs,
40        }
41        kwargs_with_defaults_exclude_none: typing.Any = {
42            "by_alias": True,
43            "exclude_none": True,
44            **kwargs,
45        }
46
47        return deep_union_pydantic_dicts(
48            super().dict(**kwargs_with_defaults_exclude_unset),
49            super().dict(**kwargs_with_defaults_exclude_none),
50        )
51
52    class Config:
53        frozen = True
54        smart_union = True
55        extra = pydantic_v1.Extra.allow
56        json_encoders = {dt.datetime: serialize_datetime}
id: str

UUID v4 that identifies the event

timestamp: str

Datetime (ISO 8601) of event creation in client. Should be as close to actual event creation in client as possible, this timestamp will be used for ordering of events in future release. Resolution: milliseconds (required), microseconds (optimal).

metadata: Optional[Any]

Optional. Metadata field used by the Langfuse SDKs for debugging.

def json(self, **kwargs: Any) -> str:
27    def json(self, **kwargs: typing.Any) -> str:
28        kwargs_with_defaults: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
35    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
36        kwargs_with_defaults_exclude_unset: typing.Any = {
37            "by_alias": True,
38            "exclude_unset": True,
39            **kwargs,
40        }
41        kwargs_with_defaults_exclude_none: typing.Any = {
42            "by_alias": True,
43            "exclude_none": True,
44            **kwargs,
45        }
46
47        return deep_union_pydantic_dicts(
48            super().dict(**kwargs_with_defaults_exclude_unset),
49            super().dict(**kwargs_with_defaults_exclude_none),
50        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class BaseEvent.Config:
52    class Config:
53        frozen = True
54        smart_union = True
55        extra = pydantic_v1.Extra.allow
56        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class BasePrompt(pydantic.v1.main.BaseModel):
11class BasePrompt(pydantic_v1.BaseModel):
12    name: str
13    version: int
14    config: typing.Any
15    labels: typing.List[str] = pydantic_v1.Field()
16    """
17    List of deployment labels of this prompt version.
18    """
19
20    tags: typing.List[str] = pydantic_v1.Field()
21    """
22    List of tags. Used to filter via UI and API. The same across versions of a prompt.
23    """
24
25    commit_message: typing.Optional[str] = pydantic_v1.Field(
26        alias="commitMessage", default=None
27    )
28    """
29    Commit message for this prompt version.
30    """
31
32    resolution_graph: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(
33        alias="resolutionGraph", default=None
34    )
35    """
36    The dependency resolution graph for the current prompt. Null if prompt has no dependencies.
37    """
38
39    def json(self, **kwargs: typing.Any) -> str:
40        kwargs_with_defaults: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        return super().json(**kwargs_with_defaults)
46
47    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
48        kwargs_with_defaults_exclude_unset: typing.Any = {
49            "by_alias": True,
50            "exclude_unset": True,
51            **kwargs,
52        }
53        kwargs_with_defaults_exclude_none: typing.Any = {
54            "by_alias": True,
55            "exclude_none": True,
56            **kwargs,
57        }
58
59        return deep_union_pydantic_dicts(
60            super().dict(**kwargs_with_defaults_exclude_unset),
61            super().dict(**kwargs_with_defaults_exclude_none),
62        )
63
64    class Config:
65        frozen = True
66        smart_union = True
67        allow_population_by_field_name = True
68        populate_by_name = True
69        extra = pydantic_v1.Extra.allow
70        json_encoders = {dt.datetime: serialize_datetime}
name: str
version: int
config: Any
labels: List[str]

List of deployment labels of this prompt version.

tags: List[str]

List of tags. Used to filter via UI and API. The same across versions of a prompt.

commit_message: Optional[str]

Commit message for this prompt version.

resolution_graph: Optional[Dict[str, Any]]

The dependency resolution graph for the current prompt. Null if prompt has no dependencies.

def json(self, **kwargs: Any) -> str:
39    def json(self, **kwargs: typing.Any) -> str:
40        kwargs_with_defaults: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
47    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
48        kwargs_with_defaults_exclude_unset: typing.Any = {
49            "by_alias": True,
50            "exclude_unset": True,
51            **kwargs,
52        }
53        kwargs_with_defaults_exclude_none: typing.Any = {
54            "by_alias": True,
55            "exclude_none": True,
56            **kwargs,
57        }
58
59        return deep_union_pydantic_dicts(
60            super().dict(**kwargs_with_defaults_exclude_unset),
61            super().dict(**kwargs_with_defaults_exclude_none),
62        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class BasePrompt.Config:
64    class Config:
65        frozen = True
66        smart_union = True
67        allow_population_by_field_name = True
68        populate_by_name = True
69        extra = pydantic_v1.Extra.allow
70        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class BaseScore(pydantic.v1.main.BaseModel):
12class BaseScore(pydantic_v1.BaseModel):
13    id: str
14    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
15    session_id: typing.Optional[str] = pydantic_v1.Field(
16        alias="sessionId", default=None
17    )
18    observation_id: typing.Optional[str] = pydantic_v1.Field(
19        alias="observationId", default=None
20    )
21    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
22        alias="datasetRunId", default=None
23    )
24    name: str
25    source: ScoreSource
26    timestamp: dt.datetime
27    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
28    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
29    author_user_id: typing.Optional[str] = pydantic_v1.Field(
30        alias="authorUserId", default=None
31    )
32    comment: typing.Optional[str] = None
33    metadata: typing.Optional[typing.Any] = None
34    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
35    """
36    Reference a score config on a score. When set, config and score name must be equal and value must comply to optionally defined numerical range
37    """
38
39    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
40    """
41    Reference an annotation queue on a score. Populated if the score was initially created in an annotation queue.
42    """
43
44    environment: typing.Optional[str] = pydantic_v1.Field(default=None)
45    """
46    The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.
47    """
48
49    def json(self, **kwargs: typing.Any) -> str:
50        kwargs_with_defaults: typing.Any = {
51            "by_alias": True,
52            "exclude_unset": True,
53            **kwargs,
54        }
55        return super().json(**kwargs_with_defaults)
56
57    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
58        kwargs_with_defaults_exclude_unset: typing.Any = {
59            "by_alias": True,
60            "exclude_unset": True,
61            **kwargs,
62        }
63        kwargs_with_defaults_exclude_none: typing.Any = {
64            "by_alias": True,
65            "exclude_none": True,
66            **kwargs,
67        }
68
69        return deep_union_pydantic_dicts(
70            super().dict(**kwargs_with_defaults_exclude_unset),
71            super().dict(**kwargs_with_defaults_exclude_none),
72        )
73
74    class Config:
75        frozen = True
76        smart_union = True
77        allow_population_by_field_name = True
78        populate_by_name = True
79        extra = pydantic_v1.Extra.allow
80        json_encoders = {dt.datetime: serialize_datetime}
id: str
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
source: ScoreSource
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]

Reference a score config on a score. When set, config and score name must be equal and value must comply to optionally defined numerical range

queue_id: Optional[str]

Reference an annotation queue on a score. Populated if the score was initially created in an annotation queue.

environment: Optional[str]

The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.

def json(self, **kwargs: Any) -> str:
49    def json(self, **kwargs: typing.Any) -> str:
50        kwargs_with_defaults: typing.Any = {
51            "by_alias": True,
52            "exclude_unset": True,
53            **kwargs,
54        }
55        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
57    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
58        kwargs_with_defaults_exclude_unset: typing.Any = {
59            "by_alias": True,
60            "exclude_unset": True,
61            **kwargs,
62        }
63        kwargs_with_defaults_exclude_none: typing.Any = {
64            "by_alias": True,
65            "exclude_none": True,
66            **kwargs,
67        }
68
69        return deep_union_pydantic_dicts(
70            super().dict(**kwargs_with_defaults_exclude_unset),
71            super().dict(**kwargs_with_defaults_exclude_none),
72        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class BaseScore.Config:
74    class Config:
75        frozen = True
76        smart_union = True
77        allow_population_by_field_name = True
78        populate_by_name = True
79        extra = pydantic_v1.Extra.allow
80        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class BaseScoreV1(pydantic.v1.main.BaseModel):
12class BaseScoreV1(pydantic_v1.BaseModel):
13    id: str
14    trace_id: str = pydantic_v1.Field(alias="traceId")
15    name: str
16    source: ScoreSource
17    observation_id: typing.Optional[str] = pydantic_v1.Field(
18        alias="observationId", default=None
19    )
20    timestamp: dt.datetime
21    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
22    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
23    author_user_id: typing.Optional[str] = pydantic_v1.Field(
24        alias="authorUserId", default=None
25    )
26    comment: typing.Optional[str] = None
27    metadata: typing.Optional[typing.Any] = None
28    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
29    """
30    Reference a score config on a score. When set, config and score name must be equal and value must comply to optionally defined numerical range
31    """
32
33    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
34    """
35    Reference an annotation queue on a score. Populated if the score was initially created in an annotation queue.
36    """
37
38    environment: typing.Optional[str] = pydantic_v1.Field(default=None)
39    """
40    The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.
41    """
42
43    def json(self, **kwargs: typing.Any) -> str:
44        kwargs_with_defaults: typing.Any = {
45            "by_alias": True,
46            "exclude_unset": True,
47            **kwargs,
48        }
49        return super().json(**kwargs_with_defaults)
50
51    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
52        kwargs_with_defaults_exclude_unset: typing.Any = {
53            "by_alias": True,
54            "exclude_unset": True,
55            **kwargs,
56        }
57        kwargs_with_defaults_exclude_none: typing.Any = {
58            "by_alias": True,
59            "exclude_none": True,
60            **kwargs,
61        }
62
63        return deep_union_pydantic_dicts(
64            super().dict(**kwargs_with_defaults_exclude_unset),
65            super().dict(**kwargs_with_defaults_exclude_none),
66        )
67
68    class Config:
69        frozen = True
70        smart_union = True
71        allow_population_by_field_name = True
72        populate_by_name = True
73        extra = pydantic_v1.Extra.allow
74        json_encoders = {dt.datetime: serialize_datetime}
id: str
trace_id: str
name: str
source: ScoreSource
observation_id: Optional[str]
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]

Reference a score config on a score. When set, config and score name must be equal and value must comply to optionally defined numerical range

queue_id: Optional[str]

Reference an annotation queue on a score. Populated if the score was initially created in an annotation queue.

environment: Optional[str]

The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.

def json(self, **kwargs: Any) -> str:
43    def json(self, **kwargs: typing.Any) -> str:
44        kwargs_with_defaults: typing.Any = {
45            "by_alias": True,
46            "exclude_unset": True,
47            **kwargs,
48        }
49        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
51    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
52        kwargs_with_defaults_exclude_unset: typing.Any = {
53            "by_alias": True,
54            "exclude_unset": True,
55            **kwargs,
56        }
57        kwargs_with_defaults_exclude_none: typing.Any = {
58            "by_alias": True,
59            "exclude_none": True,
60            **kwargs,
61        }
62
63        return deep_union_pydantic_dicts(
64            super().dict(**kwargs_with_defaults_exclude_unset),
65            super().dict(**kwargs_with_defaults_exclude_none),
66        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class BaseScoreV1.Config:
68    class Config:
69        frozen = True
70        smart_union = True
71        allow_population_by_field_name = True
72        populate_by_name = True
73        extra = pydantic_v1.Extra.allow
74        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class BooleanScore(langfuse.api.BaseScore):
12class BooleanScore(BaseScore):
13    value: float = pydantic_v1.Field()
14    """
15    The numeric value of the score. Equals 1 for "True" and 0 for "False"
16    """
17
18    string_value: str = pydantic_v1.Field(alias="stringValue")
19    """
20    The string representation of the score value. Is inferred from the numeric value and equals "True" or "False"
21    """
22
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)
30
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )
47
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
value: float

The numeric value of the score. Equals 1 for "True" and 0 for "False"

string_value: str

The string representation of the score value. Is inferred from the numeric value and equals "True" or "False"

def json(self, **kwargs: Any) -> str:
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class BooleanScore.Config:
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class BooleanScoreV1(langfuse.api.BaseScoreV1):
12class BooleanScoreV1(BaseScoreV1):
13    value: float = pydantic_v1.Field()
14    """
15    The numeric value of the score. Equals 1 for "True" and 0 for "False"
16    """
17
18    string_value: str = pydantic_v1.Field(alias="stringValue")
19    """
20    The string representation of the score value. Is inferred from the numeric value and equals "True" or "False"
21    """
22
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)
30
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )
47
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
value: float

The numeric value of the score. Equals 1 for "True" and 0 for "False"

string_value: str

The string representation of the score value. Is inferred from the numeric value and equals "True" or "False"

def json(self, **kwargs: Any) -> str:
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class BooleanScoreV1.Config:
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class BulkConfig(pydantic.v1.main.BaseModel):
11class BulkConfig(pydantic_v1.BaseModel):
12    supported: bool
13    max_operations: int = pydantic_v1.Field(alias="maxOperations")
14    max_payload_size: int = pydantic_v1.Field(alias="maxPayloadSize")
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
supported: bool
max_operations: int
max_payload_size: int
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class BulkConfig.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CategoricalScore(langfuse.api.BaseScore):
12class CategoricalScore(BaseScore):
13    value: typing.Optional[float] = pydantic_v1.Field(default=None)
14    """
15    Only defined if a config is linked. Represents the numeric category mapping of the stringValue
16    """
17
18    string_value: str = pydantic_v1.Field(alias="stringValue")
19    """
20    The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category
21    """
22
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)
30
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )
47
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
value: Optional[float]

Only defined if a config is linked. Represents the numeric category mapping of the stringValue

string_value: str

The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category

def json(self, **kwargs: Any) -> str:
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CategoricalScore.Config:
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CategoricalScoreV1(langfuse.api.BaseScoreV1):
12class CategoricalScoreV1(BaseScoreV1):
13    value: typing.Optional[float] = pydantic_v1.Field(default=None)
14    """
15    Only defined if a config is linked. Represents the numeric category mapping of the stringValue
16    """
17
18    string_value: str = pydantic_v1.Field(alias="stringValue")
19    """
20    The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category
21    """
22
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)
30
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )
47
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
value: Optional[float]

Only defined if a config is linked. Represents the numeric category mapping of the stringValue

string_value: str

The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category

def json(self, **kwargs: Any) -> str:
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CategoricalScoreV1.Config:
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ChatMessage(pydantic.v1.main.BaseModel):
11class ChatMessage(pydantic_v1.BaseModel):
12    role: str
13    content: str
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
role: str
content: str
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ChatMessage.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ChatMessageWithPlaceholders_Chatmessage(pydantic.v1.main.BaseModel):
13class ChatMessageWithPlaceholders_Chatmessage(pydantic_v1.BaseModel):
14    role: str
15    content: str
16    type: typing.Literal["chatmessage"] = "chatmessage"
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
role: str
content: str
type: Literal['chatmessage']
def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ChatMessageWithPlaceholders_Chatmessage.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ChatMessageWithPlaceholders_Placeholder(pydantic.v1.main.BaseModel):
50class ChatMessageWithPlaceholders_Placeholder(pydantic_v1.BaseModel):
51    name: str
52    type: typing.Literal["placeholder"] = "placeholder"
53
54    def json(self, **kwargs: typing.Any) -> str:
55        kwargs_with_defaults: typing.Any = {
56            "by_alias": True,
57            "exclude_unset": True,
58            **kwargs,
59        }
60        return super().json(**kwargs_with_defaults)
61
62    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
63        kwargs_with_defaults_exclude_unset: typing.Any = {
64            "by_alias": True,
65            "exclude_unset": True,
66            **kwargs,
67        }
68        kwargs_with_defaults_exclude_none: typing.Any = {
69            "by_alias": True,
70            "exclude_none": True,
71            **kwargs,
72        }
73
74        return deep_union_pydantic_dicts(
75            super().dict(**kwargs_with_defaults_exclude_unset),
76            super().dict(**kwargs_with_defaults_exclude_none),
77        )
78
79    class Config:
80        frozen = True
81        smart_union = True
82        extra = pydantic_v1.Extra.allow
83        json_encoders = {dt.datetime: serialize_datetime}
name: str
type: Literal['placeholder']
def json(self, **kwargs: Any) -> str:
54    def json(self, **kwargs: typing.Any) -> str:
55        kwargs_with_defaults: typing.Any = {
56            "by_alias": True,
57            "exclude_unset": True,
58            **kwargs,
59        }
60        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
62    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
63        kwargs_with_defaults_exclude_unset: typing.Any = {
64            "by_alias": True,
65            "exclude_unset": True,
66            **kwargs,
67        }
68        kwargs_with_defaults_exclude_none: typing.Any = {
69            "by_alias": True,
70            "exclude_none": True,
71            **kwargs,
72        }
73
74        return deep_union_pydantic_dicts(
75            super().dict(**kwargs_with_defaults_exclude_unset),
76            super().dict(**kwargs_with_defaults_exclude_none),
77        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ChatMessageWithPlaceholders_Placeholder.Config:
79    class Config:
80        frozen = True
81        smart_union = True
82        extra = pydantic_v1.Extra.allow
83        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ChatPrompt(langfuse.api.BasePrompt):
13class ChatPrompt(BasePrompt):
14    prompt: typing.List[ChatMessageWithPlaceholders]
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ChatPrompt.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Comment(pydantic.v1.main.BaseModel):
12class Comment(pydantic_v1.BaseModel):
13    id: str
14    project_id: str = pydantic_v1.Field(alias="projectId")
15    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
16    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
17    object_type: CommentObjectType = pydantic_v1.Field(alias="objectType")
18    object_id: str = pydantic_v1.Field(alias="objectId")
19    content: str
20    author_user_id: typing.Optional[str] = pydantic_v1.Field(
21        alias="authorUserId", default=None
22    )
23
24    def json(self, **kwargs: typing.Any) -> str:
25        kwargs_with_defaults: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        return super().json(**kwargs_with_defaults)
31
32    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
33        kwargs_with_defaults_exclude_unset: typing.Any = {
34            "by_alias": True,
35            "exclude_unset": True,
36            **kwargs,
37        }
38        kwargs_with_defaults_exclude_none: typing.Any = {
39            "by_alias": True,
40            "exclude_none": True,
41            **kwargs,
42        }
43
44        return deep_union_pydantic_dicts(
45            super().dict(**kwargs_with_defaults_exclude_unset),
46            super().dict(**kwargs_with_defaults_exclude_none),
47        )
48
49    class Config:
50        frozen = True
51        smart_union = True
52        allow_population_by_field_name = True
53        populate_by_name = True
54        extra = pydantic_v1.Extra.allow
55        json_encoders = {dt.datetime: serialize_datetime}
id: str
project_id: str
created_at: datetime.datetime
updated_at: datetime.datetime
object_type: CommentObjectType
object_id: str
content: str
author_user_id: Optional[str]
def json(self, **kwargs: Any) -> str:
24    def json(self, **kwargs: typing.Any) -> str:
25        kwargs_with_defaults: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
32    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
33        kwargs_with_defaults_exclude_unset: typing.Any = {
34            "by_alias": True,
35            "exclude_unset": True,
36            **kwargs,
37        }
38        kwargs_with_defaults_exclude_none: typing.Any = {
39            "by_alias": True,
40            "exclude_none": True,
41            **kwargs,
42        }
43
44        return deep_union_pydantic_dicts(
45            super().dict(**kwargs_with_defaults_exclude_unset),
46            super().dict(**kwargs_with_defaults_exclude_none),
47        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Comment.Config:
49    class Config:
50        frozen = True
51        smart_union = True
52        allow_population_by_field_name = True
53        populate_by_name = True
54        extra = pydantic_v1.Extra.allow
55        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CommentObjectType(builtins.str, enum.Enum):
10class CommentObjectType(str, enum.Enum):
11    TRACE = "TRACE"
12    OBSERVATION = "OBSERVATION"
13    SESSION = "SESSION"
14    PROMPT = "PROMPT"
15
16    def visit(
17        self,
18        trace: typing.Callable[[], T_Result],
19        observation: typing.Callable[[], T_Result],
20        session: typing.Callable[[], T_Result],
21        prompt: typing.Callable[[], T_Result],
22    ) -> T_Result:
23        if self is CommentObjectType.TRACE:
24            return trace()
25        if self is CommentObjectType.OBSERVATION:
26            return observation()
27        if self is CommentObjectType.SESSION:
28            return session()
29        if self is CommentObjectType.PROMPT:
30            return prompt()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

TRACE = <CommentObjectType.TRACE: 'TRACE'>
OBSERVATION = <CommentObjectType.OBSERVATION: 'OBSERVATION'>
SESSION = <CommentObjectType.SESSION: 'SESSION'>
PROMPT = <CommentObjectType.PROMPT: 'PROMPT'>
def visit( self, trace: Callable[[], ~T_Result], observation: Callable[[], ~T_Result], session: Callable[[], ~T_Result], prompt: Callable[[], ~T_Result]) -> ~T_Result:
16    def visit(
17        self,
18        trace: typing.Callable[[], T_Result],
19        observation: typing.Callable[[], T_Result],
20        session: typing.Callable[[], T_Result],
21        prompt: typing.Callable[[], T_Result],
22    ) -> T_Result:
23        if self is CommentObjectType.TRACE:
24            return trace()
25        if self is CommentObjectType.OBSERVATION:
26            return observation()
27        if self is CommentObjectType.SESSION:
28            return session()
29        if self is CommentObjectType.PROMPT:
30            return prompt()
class ConfigCategory(pydantic.v1.main.BaseModel):
11class ConfigCategory(pydantic_v1.BaseModel):
12    value: float
13    label: str
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
value: float
label: str
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ConfigCategory.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateAnnotationQueueAssignmentResponse(pydantic.v1.main.BaseModel):
11class CreateAnnotationQueueAssignmentResponse(pydantic_v1.BaseModel):
12    user_id: str = pydantic_v1.Field(alias="userId")
13    queue_id: str = pydantic_v1.Field(alias="queueId")
14    project_id: str = pydantic_v1.Field(alias="projectId")
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
user_id: str
queue_id: str
project_id: str
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateAnnotationQueueAssignmentResponse.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateAnnotationQueueItemRequest(pydantic.v1.main.BaseModel):
13class CreateAnnotationQueueItemRequest(pydantic_v1.BaseModel):
14    object_id: str = pydantic_v1.Field(alias="objectId")
15    object_type: AnnotationQueueObjectType = pydantic_v1.Field(alias="objectType")
16    status: typing.Optional[AnnotationQueueStatus] = pydantic_v1.Field(default=None)
17    """
18    Defaults to PENDING for new queue items
19    """
20
21    def json(self, **kwargs: typing.Any) -> str:
22        kwargs_with_defaults: typing.Any = {
23            "by_alias": True,
24            "exclude_unset": True,
25            **kwargs,
26        }
27        return super().json(**kwargs_with_defaults)
28
29    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
30        kwargs_with_defaults_exclude_unset: typing.Any = {
31            "by_alias": True,
32            "exclude_unset": True,
33            **kwargs,
34        }
35        kwargs_with_defaults_exclude_none: typing.Any = {
36            "by_alias": True,
37            "exclude_none": True,
38            **kwargs,
39        }
40
41        return deep_union_pydantic_dicts(
42            super().dict(**kwargs_with_defaults_exclude_unset),
43            super().dict(**kwargs_with_defaults_exclude_none),
44        )
45
46    class Config:
47        frozen = True
48        smart_union = True
49        allow_population_by_field_name = True
50        populate_by_name = True
51        extra = pydantic_v1.Extra.allow
52        json_encoders = {dt.datetime: serialize_datetime}
object_id: str
status: Optional[AnnotationQueueStatus]

Defaults to PENDING for new queue items

def json(self, **kwargs: Any) -> str:
21    def json(self, **kwargs: typing.Any) -> str:
22        kwargs_with_defaults: typing.Any = {
23            "by_alias": True,
24            "exclude_unset": True,
25            **kwargs,
26        }
27        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
29    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
30        kwargs_with_defaults_exclude_unset: typing.Any = {
31            "by_alias": True,
32            "exclude_unset": True,
33            **kwargs,
34        }
35        kwargs_with_defaults_exclude_none: typing.Any = {
36            "by_alias": True,
37            "exclude_none": True,
38            **kwargs,
39        }
40
41        return deep_union_pydantic_dicts(
42            super().dict(**kwargs_with_defaults_exclude_unset),
43            super().dict(**kwargs_with_defaults_exclude_none),
44        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateAnnotationQueueItemRequest.Config:
46    class Config:
47        frozen = True
48        smart_union = True
49        allow_population_by_field_name = True
50        populate_by_name = True
51        extra = pydantic_v1.Extra.allow
52        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateAnnotationQueueRequest(pydantic.v1.main.BaseModel):
11class CreateAnnotationQueueRequest(pydantic_v1.BaseModel):
12    name: str
13    description: typing.Optional[str] = None
14    score_config_ids: typing.List[str] = pydantic_v1.Field(alias="scoreConfigIds")
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
name: str
description: Optional[str]
score_config_ids: List[str]
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateAnnotationQueueRequest.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateChatPromptRequest(pydantic.v1.main.BaseModel):
12class CreateChatPromptRequest(pydantic_v1.BaseModel):
13    name: str
14    prompt: typing.List[ChatMessageWithPlaceholders]
15    config: typing.Optional[typing.Any] = None
16    labels: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
17    """
18    List of deployment labels of this prompt version.
19    """
20
21    tags: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
22    """
23    List of tags to apply to all versions of this prompt.
24    """
25
26    commit_message: typing.Optional[str] = pydantic_v1.Field(
27        alias="commitMessage", default=None
28    )
29    """
30    Commit message for this prompt version.
31    """
32
33    def json(self, **kwargs: typing.Any) -> str:
34        kwargs_with_defaults: typing.Any = {
35            "by_alias": True,
36            "exclude_unset": True,
37            **kwargs,
38        }
39        return super().json(**kwargs_with_defaults)
40
41    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
42        kwargs_with_defaults_exclude_unset: typing.Any = {
43            "by_alias": True,
44            "exclude_unset": True,
45            **kwargs,
46        }
47        kwargs_with_defaults_exclude_none: typing.Any = {
48            "by_alias": True,
49            "exclude_none": True,
50            **kwargs,
51        }
52
53        return deep_union_pydantic_dicts(
54            super().dict(**kwargs_with_defaults_exclude_unset),
55            super().dict(**kwargs_with_defaults_exclude_none),
56        )
57
58    class Config:
59        frozen = True
60        smart_union = True
61        allow_population_by_field_name = True
62        populate_by_name = True
63        extra = pydantic_v1.Extra.allow
64        json_encoders = {dt.datetime: serialize_datetime}
name: str
config: Optional[Any]
labels: Optional[List[str]]

List of deployment labels of this prompt version.

tags: Optional[List[str]]

List of tags to apply to all versions of this prompt.

commit_message: Optional[str]

Commit message for this prompt version.

def json(self, **kwargs: Any) -> str:
33    def json(self, **kwargs: typing.Any) -> str:
34        kwargs_with_defaults: typing.Any = {
35            "by_alias": True,
36            "exclude_unset": True,
37            **kwargs,
38        }
39        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
41    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
42        kwargs_with_defaults_exclude_unset: typing.Any = {
43            "by_alias": True,
44            "exclude_unset": True,
45            **kwargs,
46        }
47        kwargs_with_defaults_exclude_none: typing.Any = {
48            "by_alias": True,
49            "exclude_none": True,
50            **kwargs,
51        }
52
53        return deep_union_pydantic_dicts(
54            super().dict(**kwargs_with_defaults_exclude_unset),
55            super().dict(**kwargs_with_defaults_exclude_none),
56        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateChatPromptRequest.Config:
58    class Config:
59        frozen = True
60        smart_union = True
61        allow_population_by_field_name = True
62        populate_by_name = True
63        extra = pydantic_v1.Extra.allow
64        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateCommentRequest(pydantic.v1.main.BaseModel):
11class CreateCommentRequest(pydantic_v1.BaseModel):
12    project_id: str = pydantic_v1.Field(alias="projectId")
13    """
14    The id of the project to attach the comment to.
15    """
16
17    object_type: str = pydantic_v1.Field(alias="objectType")
18    """
19    The type of the object to attach the comment to (trace, observation, session, prompt).
20    """
21
22    object_id: str = pydantic_v1.Field(alias="objectId")
23    """
24    The id of the object to attach the comment to. If this does not reference a valid existing object, an error will be thrown.
25    """
26
27    content: str = pydantic_v1.Field()
28    """
29    The content of the comment. May include markdown. Currently limited to 3000 characters.
30    """
31
32    author_user_id: typing.Optional[str] = pydantic_v1.Field(
33        alias="authorUserId", default=None
34    )
35    """
36    The id of the user who created the comment.
37    """
38
39    def json(self, **kwargs: typing.Any) -> str:
40        kwargs_with_defaults: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        return super().json(**kwargs_with_defaults)
46
47    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
48        kwargs_with_defaults_exclude_unset: typing.Any = {
49            "by_alias": True,
50            "exclude_unset": True,
51            **kwargs,
52        }
53        kwargs_with_defaults_exclude_none: typing.Any = {
54            "by_alias": True,
55            "exclude_none": True,
56            **kwargs,
57        }
58
59        return deep_union_pydantic_dicts(
60            super().dict(**kwargs_with_defaults_exclude_unset),
61            super().dict(**kwargs_with_defaults_exclude_none),
62        )
63
64    class Config:
65        frozen = True
66        smart_union = True
67        allow_population_by_field_name = True
68        populate_by_name = True
69        extra = pydantic_v1.Extra.allow
70        json_encoders = {dt.datetime: serialize_datetime}
project_id: str

The id of the project to attach the comment to.

object_type: str

The type of the object to attach the comment to (trace, observation, session, prompt).

object_id: str

The id of the object to attach the comment to. If this does not reference a valid existing object, an error will be thrown.

content: str

The content of the comment. May include markdown. Currently limited to 3000 characters.

author_user_id: Optional[str]

The id of the user who created the comment.

def json(self, **kwargs: Any) -> str:
39    def json(self, **kwargs: typing.Any) -> str:
40        kwargs_with_defaults: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
47    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
48        kwargs_with_defaults_exclude_unset: typing.Any = {
49            "by_alias": True,
50            "exclude_unset": True,
51            **kwargs,
52        }
53        kwargs_with_defaults_exclude_none: typing.Any = {
54            "by_alias": True,
55            "exclude_none": True,
56            **kwargs,
57        }
58
59        return deep_union_pydantic_dicts(
60            super().dict(**kwargs_with_defaults_exclude_unset),
61            super().dict(**kwargs_with_defaults_exclude_none),
62        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateCommentRequest.Config:
64    class Config:
65        frozen = True
66        smart_union = True
67        allow_population_by_field_name = True
68        populate_by_name = True
69        extra = pydantic_v1.Extra.allow
70        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateCommentResponse(pydantic.v1.main.BaseModel):
11class CreateCommentResponse(pydantic_v1.BaseModel):
12    id: str = pydantic_v1.Field()
13    """
14    The id of the created object in Langfuse
15    """
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
id: str

The id of the created object in Langfuse

def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateCommentResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateDatasetItemRequest(pydantic.v1.main.BaseModel):
12class CreateDatasetItemRequest(pydantic_v1.BaseModel):
13    dataset_name: str = pydantic_v1.Field(alias="datasetName")
14    input: typing.Optional[typing.Any] = None
15    expected_output: typing.Optional[typing.Any] = pydantic_v1.Field(
16        alias="expectedOutput", default=None
17    )
18    metadata: typing.Optional[typing.Any] = None
19    source_trace_id: typing.Optional[str] = pydantic_v1.Field(
20        alias="sourceTraceId", default=None
21    )
22    source_observation_id: typing.Optional[str] = pydantic_v1.Field(
23        alias="sourceObservationId", default=None
24    )
25    id: typing.Optional[str] = pydantic_v1.Field(default=None)
26    """
27    Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets.
28    """
29
30    status: typing.Optional[DatasetStatus] = pydantic_v1.Field(default=None)
31    """
32    Defaults to ACTIVE for newly created items
33    """
34
35    def json(self, **kwargs: typing.Any) -> str:
36        kwargs_with_defaults: typing.Any = {
37            "by_alias": True,
38            "exclude_unset": True,
39            **kwargs,
40        }
41        return super().json(**kwargs_with_defaults)
42
43    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
44        kwargs_with_defaults_exclude_unset: typing.Any = {
45            "by_alias": True,
46            "exclude_unset": True,
47            **kwargs,
48        }
49        kwargs_with_defaults_exclude_none: typing.Any = {
50            "by_alias": True,
51            "exclude_none": True,
52            **kwargs,
53        }
54
55        return deep_union_pydantic_dicts(
56            super().dict(**kwargs_with_defaults_exclude_unset),
57            super().dict(**kwargs_with_defaults_exclude_none),
58        )
59
60    class Config:
61        frozen = True
62        smart_union = True
63        allow_population_by_field_name = True
64        populate_by_name = True
65        extra = pydantic_v1.Extra.allow
66        json_encoders = {dt.datetime: serialize_datetime}
dataset_name: str
input: Optional[Any]
expected_output: Optional[Any]
metadata: Optional[Any]
source_trace_id: Optional[str]
source_observation_id: Optional[str]
id: Optional[str]

Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets.

status: Optional[DatasetStatus]

Defaults to ACTIVE for newly created items

def json(self, **kwargs: Any) -> str:
35    def json(self, **kwargs: typing.Any) -> str:
36        kwargs_with_defaults: typing.Any = {
37            "by_alias": True,
38            "exclude_unset": True,
39            **kwargs,
40        }
41        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
43    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
44        kwargs_with_defaults_exclude_unset: typing.Any = {
45            "by_alias": True,
46            "exclude_unset": True,
47            **kwargs,
48        }
49        kwargs_with_defaults_exclude_none: typing.Any = {
50            "by_alias": True,
51            "exclude_none": True,
52            **kwargs,
53        }
54
55        return deep_union_pydantic_dicts(
56            super().dict(**kwargs_with_defaults_exclude_unset),
57            super().dict(**kwargs_with_defaults_exclude_none),
58        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateDatasetItemRequest.Config:
60    class Config:
61        frozen = True
62        smart_union = True
63        allow_population_by_field_name = True
64        populate_by_name = True
65        extra = pydantic_v1.Extra.allow
66        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateDatasetRequest(pydantic.v1.main.BaseModel):
11class CreateDatasetRequest(pydantic_v1.BaseModel):
12    name: str
13    description: typing.Optional[str] = None
14    metadata: typing.Optional[typing.Any] = None
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        extra = pydantic_v1.Extra.allow
45        json_encoders = {dt.datetime: serialize_datetime}
name: str
description: Optional[str]
metadata: Optional[Any]
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateDatasetRequest.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        extra = pydantic_v1.Extra.allow
45        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateDatasetRunItemRequest(pydantic.v1.main.BaseModel):
11class CreateDatasetRunItemRequest(pydantic_v1.BaseModel):
12    run_name: str = pydantic_v1.Field(alias="runName")
13    run_description: typing.Optional[str] = pydantic_v1.Field(
14        alias="runDescription", default=None
15    )
16    """
17    Description of the run. If run exists, description will be updated.
18    """
19
20    metadata: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
21    """
22    Metadata of the dataset run, updates run if run already exists
23    """
24
25    dataset_item_id: str = pydantic_v1.Field(alias="datasetItemId")
26    observation_id: typing.Optional[str] = pydantic_v1.Field(
27        alias="observationId", default=None
28    )
29    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
30    """
31    traceId should always be provided. For compatibility with older SDK versions it can also be inferred from the provided observationId.
32    """
33
34    def json(self, **kwargs: typing.Any) -> str:
35        kwargs_with_defaults: typing.Any = {
36            "by_alias": True,
37            "exclude_unset": True,
38            **kwargs,
39        }
40        return super().json(**kwargs_with_defaults)
41
42    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
43        kwargs_with_defaults_exclude_unset: typing.Any = {
44            "by_alias": True,
45            "exclude_unset": True,
46            **kwargs,
47        }
48        kwargs_with_defaults_exclude_none: typing.Any = {
49            "by_alias": True,
50            "exclude_none": True,
51            **kwargs,
52        }
53
54        return deep_union_pydantic_dicts(
55            super().dict(**kwargs_with_defaults_exclude_unset),
56            super().dict(**kwargs_with_defaults_exclude_none),
57        )
58
59    class Config:
60        frozen = True
61        smart_union = True
62        allow_population_by_field_name = True
63        populate_by_name = True
64        extra = pydantic_v1.Extra.allow
65        json_encoders = {dt.datetime: serialize_datetime}
run_name: str
run_description: Optional[str]

Description of the run. If run exists, description will be updated.

metadata: Optional[Any]

Metadata of the dataset run, updates run if run already exists

dataset_item_id: str
observation_id: Optional[str]
trace_id: Optional[str]

traceId should always be provided. For compatibility with older SDK versions it can also be inferred from the provided observationId.

def json(self, **kwargs: Any) -> str:
34    def json(self, **kwargs: typing.Any) -> str:
35        kwargs_with_defaults: typing.Any = {
36            "by_alias": True,
37            "exclude_unset": True,
38            **kwargs,
39        }
40        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
42    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
43        kwargs_with_defaults_exclude_unset: typing.Any = {
44            "by_alias": True,
45            "exclude_unset": True,
46            **kwargs,
47        }
48        kwargs_with_defaults_exclude_none: typing.Any = {
49            "by_alias": True,
50            "exclude_none": True,
51            **kwargs,
52        }
53
54        return deep_union_pydantic_dicts(
55            super().dict(**kwargs_with_defaults_exclude_unset),
56            super().dict(**kwargs_with_defaults_exclude_none),
57        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateDatasetRunItemRequest.Config:
59    class Config:
60        frozen = True
61        smart_union = True
62        allow_population_by_field_name = True
63        populate_by_name = True
64        extra = pydantic_v1.Extra.allow
65        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateEventBody(langfuse.api.OptionalObservationBody):
12class CreateEventBody(OptionalObservationBody):
13    id: typing.Optional[str] = None
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
id: Optional[str]
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateEventBody.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateEventEvent(langfuse.api.BaseEvent):
13class CreateEventEvent(BaseEvent):
14    body: CreateEventBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateEventEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateGenerationBody(langfuse.api.CreateSpanBody):
15class CreateGenerationBody(CreateSpanBody):
16    completion_start_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
17        alias="completionStartTime", default=None
18    )
19    model: typing.Optional[str] = None
20    model_parameters: typing.Optional[typing.Dict[str, MapValue]] = pydantic_v1.Field(
21        alias="modelParameters", default=None
22    )
23    usage: typing.Optional[IngestionUsage] = None
24    usage_details: typing.Optional[UsageDetails] = pydantic_v1.Field(
25        alias="usageDetails", default=None
26    )
27    cost_details: typing.Optional[typing.Dict[str, float]] = pydantic_v1.Field(
28        alias="costDetails", default=None
29    )
30    prompt_name: typing.Optional[str] = pydantic_v1.Field(
31        alias="promptName", default=None
32    )
33    prompt_version: typing.Optional[int] = pydantic_v1.Field(
34        alias="promptVersion", default=None
35    )
36
37    def json(self, **kwargs: typing.Any) -> str:
38        kwargs_with_defaults: typing.Any = {
39            "by_alias": True,
40            "exclude_unset": True,
41            **kwargs,
42        }
43        return super().json(**kwargs_with_defaults)
44
45    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
46        kwargs_with_defaults_exclude_unset: typing.Any = {
47            "by_alias": True,
48            "exclude_unset": True,
49            **kwargs,
50        }
51        kwargs_with_defaults_exclude_none: typing.Any = {
52            "by_alias": True,
53            "exclude_none": True,
54            **kwargs,
55        }
56
57        return deep_union_pydantic_dicts(
58            super().dict(**kwargs_with_defaults_exclude_unset),
59            super().dict(**kwargs_with_defaults_exclude_none),
60        )
61
62    class Config:
63        frozen = True
64        smart_union = True
65        allow_population_by_field_name = True
66        populate_by_name = True
67        extra = pydantic_v1.Extra.allow
68        json_encoders = {dt.datetime: serialize_datetime}
completion_start_time: Optional[datetime.datetime]
model: Optional[str]
model_parameters: Optional[Dict[str, Union[str, NoneType, int, bool, List[str]]]]
usage: Union[Usage, OpenAiUsage, NoneType]
usage_details: Union[Dict[str, int], OpenAiCompletionUsageSchema, OpenAiResponseUsageSchema, NoneType]
cost_details: Optional[Dict[str, float]]
prompt_name: Optional[str]
prompt_version: Optional[int]
def json(self, **kwargs: Any) -> str:
37    def json(self, **kwargs: typing.Any) -> str:
38        kwargs_with_defaults: typing.Any = {
39            "by_alias": True,
40            "exclude_unset": True,
41            **kwargs,
42        }
43        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
45    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
46        kwargs_with_defaults_exclude_unset: typing.Any = {
47            "by_alias": True,
48            "exclude_unset": True,
49            **kwargs,
50        }
51        kwargs_with_defaults_exclude_none: typing.Any = {
52            "by_alias": True,
53            "exclude_none": True,
54            **kwargs,
55        }
56
57        return deep_union_pydantic_dicts(
58            super().dict(**kwargs_with_defaults_exclude_unset),
59            super().dict(**kwargs_with_defaults_exclude_none),
60        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateGenerationBody.Config:
62    class Config:
63        frozen = True
64        smart_union = True
65        allow_population_by_field_name = True
66        populate_by_name = True
67        extra = pydantic_v1.Extra.allow
68        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateGenerationEvent(langfuse.api.BaseEvent):
13class CreateGenerationEvent(BaseEvent):
14    body: CreateGenerationBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateGenerationEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateModelRequest(pydantic.v1.main.BaseModel):
 12class CreateModelRequest(pydantic_v1.BaseModel):
 13    model_name: str = pydantic_v1.Field(alias="modelName")
 14    """
 15    Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime<observation.startTime
 16    """
 17
 18    match_pattern: str = pydantic_v1.Field(alias="matchPattern")
 19    """
 20    Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use `(?i)^modelname$`
 21    """
 22
 23    start_date: typing.Optional[dt.datetime] = pydantic_v1.Field(
 24        alias="startDate", default=None
 25    )
 26    """
 27    Apply only to generations which are newer than this ISO date.
 28    """
 29
 30    unit: typing.Optional[ModelUsageUnit] = pydantic_v1.Field(default=None)
 31    """
 32    Unit used by this model.
 33    """
 34
 35    input_price: typing.Optional[float] = pydantic_v1.Field(
 36        alias="inputPrice", default=None
 37    )
 38    """
 39    Price (USD) per input unit
 40    """
 41
 42    output_price: typing.Optional[float] = pydantic_v1.Field(
 43        alias="outputPrice", default=None
 44    )
 45    """
 46    Price (USD) per output unit
 47    """
 48
 49    total_price: typing.Optional[float] = pydantic_v1.Field(
 50        alias="totalPrice", default=None
 51    )
 52    """
 53    Price (USD) per total units. Cannot be set if input or output price is set.
 54    """
 55
 56    tokenizer_id: typing.Optional[str] = pydantic_v1.Field(
 57        alias="tokenizerId", default=None
 58    )
 59    """
 60    Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
 61    """
 62
 63    tokenizer_config: typing.Optional[typing.Any] = pydantic_v1.Field(
 64        alias="tokenizerConfig", default=None
 65    )
 66    """
 67    Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.
 68    """
 69
 70    def json(self, **kwargs: typing.Any) -> str:
 71        kwargs_with_defaults: typing.Any = {
 72            "by_alias": True,
 73            "exclude_unset": True,
 74            **kwargs,
 75        }
 76        return super().json(**kwargs_with_defaults)
 77
 78    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 79        kwargs_with_defaults_exclude_unset: typing.Any = {
 80            "by_alias": True,
 81            "exclude_unset": True,
 82            **kwargs,
 83        }
 84        kwargs_with_defaults_exclude_none: typing.Any = {
 85            "by_alias": True,
 86            "exclude_none": True,
 87            **kwargs,
 88        }
 89
 90        return deep_union_pydantic_dicts(
 91            super().dict(**kwargs_with_defaults_exclude_unset),
 92            super().dict(**kwargs_with_defaults_exclude_none),
 93        )
 94
 95    class Config:
 96        frozen = True
 97        smart_union = True
 98        allow_population_by_field_name = True
 99        populate_by_name = True
100        extra = pydantic_v1.Extra.allow
101        json_encoders = {dt.datetime: serialize_datetime}
model_name: str

Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime

match_pattern: str

Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use (?i)^modelname$

start_date: Optional[datetime.datetime]

Apply only to generations which are newer than this ISO date.

unit: Optional[ModelUsageUnit]

Unit used by this model.

input_price: Optional[float]

Price (USD) per input unit

output_price: Optional[float]

Price (USD) per output unit

total_price: Optional[float]

Price (USD) per total units. Cannot be set if input or output price is set.

tokenizer_id: Optional[str]

Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.

tokenizer_config: Optional[Any]

Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.

def json(self, **kwargs: Any) -> str:
70    def json(self, **kwargs: typing.Any) -> str:
71        kwargs_with_defaults: typing.Any = {
72            "by_alias": True,
73            "exclude_unset": True,
74            **kwargs,
75        }
76        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
78    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
79        kwargs_with_defaults_exclude_unset: typing.Any = {
80            "by_alias": True,
81            "exclude_unset": True,
82            **kwargs,
83        }
84        kwargs_with_defaults_exclude_none: typing.Any = {
85            "by_alias": True,
86            "exclude_none": True,
87            **kwargs,
88        }
89
90        return deep_union_pydantic_dicts(
91            super().dict(**kwargs_with_defaults_exclude_unset),
92            super().dict(**kwargs_with_defaults_exclude_none),
93        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateModelRequest.Config:
 95    class Config:
 96        frozen = True
 97        smart_union = True
 98        allow_population_by_field_name = True
 99        populate_by_name = True
100        extra = pydantic_v1.Extra.allow
101        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateObservationEvent(langfuse.api.BaseEvent):
13class CreateObservationEvent(BaseEvent):
14    body: ObservationBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateObservationEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
CreatePromptRequest = typing.Union[CreatePromptRequest_Chat, CreatePromptRequest_Text]
class CreatePromptRequest_Chat(pydantic.v1.main.BaseModel):
14class CreatePromptRequest_Chat(pydantic_v1.BaseModel):
15    name: str
16    prompt: typing.List[ChatMessageWithPlaceholders]
17    config: typing.Optional[typing.Any] = None
18    labels: typing.Optional[typing.List[str]] = None
19    tags: typing.Optional[typing.List[str]] = None
20    commit_message: typing.Optional[str] = pydantic_v1.Field(
21        alias="commitMessage", default=None
22    )
23    type: typing.Literal["chat"] = "chat"
24
25    def json(self, **kwargs: typing.Any) -> str:
26        kwargs_with_defaults: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        return super().json(**kwargs_with_defaults)
32
33    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
34        kwargs_with_defaults_exclude_unset: typing.Any = {
35            "by_alias": True,
36            "exclude_unset": True,
37            **kwargs,
38        }
39        kwargs_with_defaults_exclude_none: typing.Any = {
40            "by_alias": True,
41            "exclude_none": True,
42            **kwargs,
43        }
44
45        return deep_union_pydantic_dicts(
46            super().dict(**kwargs_with_defaults_exclude_unset),
47            super().dict(**kwargs_with_defaults_exclude_none),
48        )
49
50    class Config:
51        frozen = True
52        smart_union = True
53        allow_population_by_field_name = True
54        populate_by_name = True
55        extra = pydantic_v1.Extra.allow
56        json_encoders = {dt.datetime: serialize_datetime}
name: str
config: Optional[Any]
labels: Optional[List[str]]
tags: Optional[List[str]]
commit_message: Optional[str]
type: Literal['chat']
def json(self, **kwargs: Any) -> str:
25    def json(self, **kwargs: typing.Any) -> str:
26        kwargs_with_defaults: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
33    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
34        kwargs_with_defaults_exclude_unset: typing.Any = {
35            "by_alias": True,
36            "exclude_unset": True,
37            **kwargs,
38        }
39        kwargs_with_defaults_exclude_none: typing.Any = {
40            "by_alias": True,
41            "exclude_none": True,
42            **kwargs,
43        }
44
45        return deep_union_pydantic_dicts(
46            super().dict(**kwargs_with_defaults_exclude_unset),
47            super().dict(**kwargs_with_defaults_exclude_none),
48        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreatePromptRequest_Chat.Config:
50    class Config:
51        frozen = True
52        smart_union = True
53        allow_population_by_field_name = True
54        populate_by_name = True
55        extra = pydantic_v1.Extra.allow
56        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreatePromptRequest_Text(pydantic.v1.main.BaseModel):
 59class CreatePromptRequest_Text(pydantic_v1.BaseModel):
 60    name: str
 61    prompt: str
 62    config: typing.Optional[typing.Any] = None
 63    labels: typing.Optional[typing.List[str]] = None
 64    tags: typing.Optional[typing.List[str]] = None
 65    commit_message: typing.Optional[str] = pydantic_v1.Field(
 66        alias="commitMessage", default=None
 67    )
 68    type: typing.Literal["text"] = "text"
 69
 70    def json(self, **kwargs: typing.Any) -> str:
 71        kwargs_with_defaults: typing.Any = {
 72            "by_alias": True,
 73            "exclude_unset": True,
 74            **kwargs,
 75        }
 76        return super().json(**kwargs_with_defaults)
 77
 78    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 79        kwargs_with_defaults_exclude_unset: typing.Any = {
 80            "by_alias": True,
 81            "exclude_unset": True,
 82            **kwargs,
 83        }
 84        kwargs_with_defaults_exclude_none: typing.Any = {
 85            "by_alias": True,
 86            "exclude_none": True,
 87            **kwargs,
 88        }
 89
 90        return deep_union_pydantic_dicts(
 91            super().dict(**kwargs_with_defaults_exclude_unset),
 92            super().dict(**kwargs_with_defaults_exclude_none),
 93        )
 94
 95    class Config:
 96        frozen = True
 97        smart_union = True
 98        allow_population_by_field_name = True
 99        populate_by_name = True
100        extra = pydantic_v1.Extra.allow
101        json_encoders = {dt.datetime: serialize_datetime}
name: str
prompt: str
config: Optional[Any]
labels: Optional[List[str]]
tags: Optional[List[str]]
commit_message: Optional[str]
type: Literal['text']
def json(self, **kwargs: Any) -> str:
70    def json(self, **kwargs: typing.Any) -> str:
71        kwargs_with_defaults: typing.Any = {
72            "by_alias": True,
73            "exclude_unset": True,
74            **kwargs,
75        }
76        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
78    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
79        kwargs_with_defaults_exclude_unset: typing.Any = {
80            "by_alias": True,
81            "exclude_unset": True,
82            **kwargs,
83        }
84        kwargs_with_defaults_exclude_none: typing.Any = {
85            "by_alias": True,
86            "exclude_none": True,
87            **kwargs,
88        }
89
90        return deep_union_pydantic_dicts(
91            super().dict(**kwargs_with_defaults_exclude_unset),
92            super().dict(**kwargs_with_defaults_exclude_none),
93        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreatePromptRequest_Text.Config:
 95    class Config:
 96        frozen = True
 97        smart_union = True
 98        allow_population_by_field_name = True
 99        populate_by_name = True
100        extra = pydantic_v1.Extra.allow
101        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateScoreConfigRequest(pydantic.v1.main.BaseModel):
13class CreateScoreConfigRequest(pydantic_v1.BaseModel):
14    name: str
15    data_type: ScoreDataType = pydantic_v1.Field(alias="dataType")
16    categories: typing.Optional[typing.List[ConfigCategory]] = pydantic_v1.Field(
17        default=None
18    )
19    """
20    Configure custom categories for categorical scores. Pass a list of objects with `label` and `value` properties. Categories are autogenerated for boolean configs and cannot be passed
21    """
22
23    min_value: typing.Optional[float] = pydantic_v1.Field(
24        alias="minValue", default=None
25    )
26    """
27    Configure a minimum value for numerical scores. If not set, the minimum value defaults to -∞
28    """
29
30    max_value: typing.Optional[float] = pydantic_v1.Field(
31        alias="maxValue", default=None
32    )
33    """
34    Configure a maximum value for numerical scores. If not set, the maximum value defaults to +∞
35    """
36
37    description: typing.Optional[str] = pydantic_v1.Field(default=None)
38    """
39    Description is shown across the Langfuse UI and can be used to e.g. explain the config categories in detail, why a numeric range was set, or provide additional context on config name or usage
40    """
41
42    def json(self, **kwargs: typing.Any) -> str:
43        kwargs_with_defaults: typing.Any = {
44            "by_alias": True,
45            "exclude_unset": True,
46            **kwargs,
47        }
48        return super().json(**kwargs_with_defaults)
49
50    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
51        kwargs_with_defaults_exclude_unset: typing.Any = {
52            "by_alias": True,
53            "exclude_unset": True,
54            **kwargs,
55        }
56        kwargs_with_defaults_exclude_none: typing.Any = {
57            "by_alias": True,
58            "exclude_none": True,
59            **kwargs,
60        }
61
62        return deep_union_pydantic_dicts(
63            super().dict(**kwargs_with_defaults_exclude_unset),
64            super().dict(**kwargs_with_defaults_exclude_none),
65        )
66
67    class Config:
68        frozen = True
69        smart_union = True
70        allow_population_by_field_name = True
71        populate_by_name = True
72        extra = pydantic_v1.Extra.allow
73        json_encoders = {dt.datetime: serialize_datetime}
name: str
data_type: ScoreDataType
categories: Optional[List[ConfigCategory]]

Configure custom categories for categorical scores. Pass a list of objects with label and value properties. Categories are autogenerated for boolean configs and cannot be passed

min_value: Optional[float]

Configure a minimum value for numerical scores. If not set, the minimum value defaults to -∞

max_value: Optional[float]

Configure a maximum value for numerical scores. If not set, the maximum value defaults to +∞

description: Optional[str]

Description is shown across the Langfuse UI and can be used to e.g. explain the config categories in detail, why a numeric range was set, or provide additional context on config name or usage

def json(self, **kwargs: Any) -> str:
42    def json(self, **kwargs: typing.Any) -> str:
43        kwargs_with_defaults: typing.Any = {
44            "by_alias": True,
45            "exclude_unset": True,
46            **kwargs,
47        }
48        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
50    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
51        kwargs_with_defaults_exclude_unset: typing.Any = {
52            "by_alias": True,
53            "exclude_unset": True,
54            **kwargs,
55        }
56        kwargs_with_defaults_exclude_none: typing.Any = {
57            "by_alias": True,
58            "exclude_none": True,
59            **kwargs,
60        }
61
62        return deep_union_pydantic_dicts(
63            super().dict(**kwargs_with_defaults_exclude_unset),
64            super().dict(**kwargs_with_defaults_exclude_none),
65        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateScoreConfigRequest.Config:
67    class Config:
68        frozen = True
69        smart_union = True
70        allow_population_by_field_name = True
71        populate_by_name = True
72        extra = pydantic_v1.Extra.allow
73        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateScoreRequest(pydantic.v1.main.BaseModel):
13class CreateScoreRequest(pydantic_v1.BaseModel):
14    """
15    Examples
16    --------
17    from langfuse import CreateScoreRequest
18
19    CreateScoreRequest(
20        name="novelty",
21        value=0.9,
22        trace_id="cdef-1234-5678-90ab",
23    )
24    """
25
26    id: typing.Optional[str] = None
27    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
28    session_id: typing.Optional[str] = pydantic_v1.Field(
29        alias="sessionId", default=None
30    )
31    observation_id: typing.Optional[str] = pydantic_v1.Field(
32        alias="observationId", default=None
33    )
34    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
35        alias="datasetRunId", default=None
36    )
37    name: str
38    value: CreateScoreValue = pydantic_v1.Field()
39    """
40    The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false)
41    """
42
43    comment: typing.Optional[str] = None
44    metadata: typing.Optional[typing.Any] = None
45    environment: typing.Optional[str] = pydantic_v1.Field(default=None)
46    """
47    The environment of the score. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.
48    """
49
50    data_type: typing.Optional[ScoreDataType] = pydantic_v1.Field(
51        alias="dataType", default=None
52    )
53    """
54    The data type of the score. When passing a configId this field is inferred. Otherwise, this field must be passed or will default to numeric.
55    """
56
57    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
58    """
59    Reference a score config on a score. The unique langfuse identifier of a score config. When passing this field, the dataType and stringValue fields are automatically populated.
60    """
61
62    def json(self, **kwargs: typing.Any) -> str:
63        kwargs_with_defaults: typing.Any = {
64            "by_alias": True,
65            "exclude_unset": True,
66            **kwargs,
67        }
68        return super().json(**kwargs_with_defaults)
69
70    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
71        kwargs_with_defaults_exclude_unset: typing.Any = {
72            "by_alias": True,
73            "exclude_unset": True,
74            **kwargs,
75        }
76        kwargs_with_defaults_exclude_none: typing.Any = {
77            "by_alias": True,
78            "exclude_none": True,
79            **kwargs,
80        }
81
82        return deep_union_pydantic_dicts(
83            super().dict(**kwargs_with_defaults_exclude_unset),
84            super().dict(**kwargs_with_defaults_exclude_none),
85        )
86
87    class Config:
88        frozen = True
89        smart_union = True
90        allow_population_by_field_name = True
91        populate_by_name = True
92        extra = pydantic_v1.Extra.allow
93        json_encoders = {dt.datetime: serialize_datetime}

Examples

from langfuse import CreateScoreRequest

CreateScoreRequest( name="novelty", value=0.9, trace_id="cdef-1234-5678-90ab", )

id: Optional[str]
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
value: Union[float, str]

The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false)

comment: Optional[str]
metadata: Optional[Any]
environment: Optional[str]

The environment of the score. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.

data_type: Optional[ScoreDataType]

The data type of the score. When passing a configId this field is inferred. Otherwise, this field must be passed or will default to numeric.

config_id: Optional[str]

Reference a score config on a score. The unique langfuse identifier of a score config. When passing this field, the dataType and stringValue fields are automatically populated.

def json(self, **kwargs: Any) -> str:
62    def json(self, **kwargs: typing.Any) -> str:
63        kwargs_with_defaults: typing.Any = {
64            "by_alias": True,
65            "exclude_unset": True,
66            **kwargs,
67        }
68        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
70    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
71        kwargs_with_defaults_exclude_unset: typing.Any = {
72            "by_alias": True,
73            "exclude_unset": True,
74            **kwargs,
75        }
76        kwargs_with_defaults_exclude_none: typing.Any = {
77            "by_alias": True,
78            "exclude_none": True,
79            **kwargs,
80        }
81
82        return deep_union_pydantic_dicts(
83            super().dict(**kwargs_with_defaults_exclude_unset),
84            super().dict(**kwargs_with_defaults_exclude_none),
85        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateScoreRequest.Config:
87    class Config:
88        frozen = True
89        smart_union = True
90        allow_population_by_field_name = True
91        populate_by_name = True
92        extra = pydantic_v1.Extra.allow
93        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateScoreResponse(pydantic.v1.main.BaseModel):
11class CreateScoreResponse(pydantic_v1.BaseModel):
12    id: str = pydantic_v1.Field()
13    """
14    The id of the created object in Langfuse
15    """
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
id: str

The id of the created object in Langfuse

def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateScoreResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
CreateScoreValue = typing.Union[float, str]
class CreateSpanBody(langfuse.api.CreateEventBody):
12class CreateSpanBody(CreateEventBody):
13    end_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
14        alias="endTime", default=None
15    )
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        allow_population_by_field_name = True
46        populate_by_name = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
end_time: Optional[datetime.datetime]
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateSpanBody.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        allow_population_by_field_name = True
46        populate_by_name = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateSpanEvent(langfuse.api.BaseEvent):
13class CreateSpanEvent(BaseEvent):
14    body: CreateSpanBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateSpanEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class CreateTextPromptRequest(pydantic.v1.main.BaseModel):
11class CreateTextPromptRequest(pydantic_v1.BaseModel):
12    name: str
13    prompt: str
14    config: typing.Optional[typing.Any] = None
15    labels: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
16    """
17    List of deployment labels of this prompt version.
18    """
19
20    tags: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
21    """
22    List of tags to apply to all versions of this prompt.
23    """
24
25    commit_message: typing.Optional[str] = pydantic_v1.Field(
26        alias="commitMessage", default=None
27    )
28    """
29    Commit message for this prompt version.
30    """
31
32    def json(self, **kwargs: typing.Any) -> str:
33        kwargs_with_defaults: typing.Any = {
34            "by_alias": True,
35            "exclude_unset": True,
36            **kwargs,
37        }
38        return super().json(**kwargs_with_defaults)
39
40    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
41        kwargs_with_defaults_exclude_unset: typing.Any = {
42            "by_alias": True,
43            "exclude_unset": True,
44            **kwargs,
45        }
46        kwargs_with_defaults_exclude_none: typing.Any = {
47            "by_alias": True,
48            "exclude_none": True,
49            **kwargs,
50        }
51
52        return deep_union_pydantic_dicts(
53            super().dict(**kwargs_with_defaults_exclude_unset),
54            super().dict(**kwargs_with_defaults_exclude_none),
55        )
56
57    class Config:
58        frozen = True
59        smart_union = True
60        allow_population_by_field_name = True
61        populate_by_name = True
62        extra = pydantic_v1.Extra.allow
63        json_encoders = {dt.datetime: serialize_datetime}
name: str
prompt: str
config: Optional[Any]
labels: Optional[List[str]]

List of deployment labels of this prompt version.

tags: Optional[List[str]]

List of tags to apply to all versions of this prompt.

commit_message: Optional[str]

Commit message for this prompt version.

def json(self, **kwargs: Any) -> str:
32    def json(self, **kwargs: typing.Any) -> str:
33        kwargs_with_defaults: typing.Any = {
34            "by_alias": True,
35            "exclude_unset": True,
36            **kwargs,
37        }
38        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
40    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
41        kwargs_with_defaults_exclude_unset: typing.Any = {
42            "by_alias": True,
43            "exclude_unset": True,
44            **kwargs,
45        }
46        kwargs_with_defaults_exclude_none: typing.Any = {
47            "by_alias": True,
48            "exclude_none": True,
49            **kwargs,
50        }
51
52        return deep_union_pydantic_dicts(
53            super().dict(**kwargs_with_defaults_exclude_unset),
54            super().dict(**kwargs_with_defaults_exclude_none),
55        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class CreateTextPromptRequest.Config:
57    class Config:
58        frozen = True
59        smart_union = True
60        allow_population_by_field_name = True
61        populate_by_name = True
62        extra = pydantic_v1.Extra.allow
63        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Dataset(pydantic.v1.main.BaseModel):
11class Dataset(pydantic_v1.BaseModel):
12    id: str
13    name: str
14    description: typing.Optional[str] = None
15    metadata: typing.Optional[typing.Any] = None
16    project_id: str = pydantic_v1.Field(alias="projectId")
17    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
18    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
19
20    def json(self, **kwargs: typing.Any) -> str:
21        kwargs_with_defaults: typing.Any = {
22            "by_alias": True,
23            "exclude_unset": True,
24            **kwargs,
25        }
26        return super().json(**kwargs_with_defaults)
27
28    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
29        kwargs_with_defaults_exclude_unset: typing.Any = {
30            "by_alias": True,
31            "exclude_unset": True,
32            **kwargs,
33        }
34        kwargs_with_defaults_exclude_none: typing.Any = {
35            "by_alias": True,
36            "exclude_none": True,
37            **kwargs,
38        }
39
40        return deep_union_pydantic_dicts(
41            super().dict(**kwargs_with_defaults_exclude_unset),
42            super().dict(**kwargs_with_defaults_exclude_none),
43        )
44
45    class Config:
46        frozen = True
47        smart_union = True
48        allow_population_by_field_name = True
49        populate_by_name = True
50        extra = pydantic_v1.Extra.allow
51        json_encoders = {dt.datetime: serialize_datetime}
id: str
name: str
description: Optional[str]
metadata: Optional[Any]
project_id: str
created_at: datetime.datetime
updated_at: datetime.datetime
def json(self, **kwargs: Any) -> str:
20    def json(self, **kwargs: typing.Any) -> str:
21        kwargs_with_defaults: typing.Any = {
22            "by_alias": True,
23            "exclude_unset": True,
24            **kwargs,
25        }
26        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
28    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
29        kwargs_with_defaults_exclude_unset: typing.Any = {
30            "by_alias": True,
31            "exclude_unset": True,
32            **kwargs,
33        }
34        kwargs_with_defaults_exclude_none: typing.Any = {
35            "by_alias": True,
36            "exclude_none": True,
37            **kwargs,
38        }
39
40        return deep_union_pydantic_dicts(
41            super().dict(**kwargs_with_defaults_exclude_unset),
42            super().dict(**kwargs_with_defaults_exclude_none),
43        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Dataset.Config:
45    class Config:
46        frozen = True
47        smart_union = True
48        allow_population_by_field_name = True
49        populate_by_name = True
50        extra = pydantic_v1.Extra.allow
51        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DatasetItem(pydantic.v1.main.BaseModel):
12class DatasetItem(pydantic_v1.BaseModel):
13    id: str
14    status: DatasetStatus
15    input: typing.Optional[typing.Any] = None
16    expected_output: typing.Optional[typing.Any] = pydantic_v1.Field(
17        alias="expectedOutput", default=None
18    )
19    metadata: typing.Optional[typing.Any] = None
20    source_trace_id: typing.Optional[str] = pydantic_v1.Field(
21        alias="sourceTraceId", default=None
22    )
23    source_observation_id: typing.Optional[str] = pydantic_v1.Field(
24        alias="sourceObservationId", default=None
25    )
26    dataset_id: str = pydantic_v1.Field(alias="datasetId")
27    dataset_name: str = pydantic_v1.Field(alias="datasetName")
28    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
29    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
30
31    def json(self, **kwargs: typing.Any) -> str:
32        kwargs_with_defaults: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        return super().json(**kwargs_with_defaults)
38
39    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
40        kwargs_with_defaults_exclude_unset: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        kwargs_with_defaults_exclude_none: typing.Any = {
46            "by_alias": True,
47            "exclude_none": True,
48            **kwargs,
49        }
50
51        return deep_union_pydantic_dicts(
52            super().dict(**kwargs_with_defaults_exclude_unset),
53            super().dict(**kwargs_with_defaults_exclude_none),
54        )
55
56    class Config:
57        frozen = True
58        smart_union = True
59        allow_population_by_field_name = True
60        populate_by_name = True
61        extra = pydantic_v1.Extra.allow
62        json_encoders = {dt.datetime: serialize_datetime}
id: str
status: DatasetStatus
input: Optional[Any]
expected_output: Optional[Any]
metadata: Optional[Any]
source_trace_id: Optional[str]
source_observation_id: Optional[str]
dataset_id: str
dataset_name: str
created_at: datetime.datetime
updated_at: datetime.datetime
def json(self, **kwargs: Any) -> str:
31    def json(self, **kwargs: typing.Any) -> str:
32        kwargs_with_defaults: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
39    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
40        kwargs_with_defaults_exclude_unset: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        kwargs_with_defaults_exclude_none: typing.Any = {
46            "by_alias": True,
47            "exclude_none": True,
48            **kwargs,
49        }
50
51        return deep_union_pydantic_dicts(
52            super().dict(**kwargs_with_defaults_exclude_unset),
53            super().dict(**kwargs_with_defaults_exclude_none),
54        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DatasetItem.Config:
56    class Config:
57        frozen = True
58        smart_union = True
59        allow_population_by_field_name = True
60        populate_by_name = True
61        extra = pydantic_v1.Extra.allow
62        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DatasetRun(pydantic.v1.main.BaseModel):
11class DatasetRun(pydantic_v1.BaseModel):
12    id: str = pydantic_v1.Field()
13    """
14    Unique identifier of the dataset run
15    """
16
17    name: str = pydantic_v1.Field()
18    """
19    Name of the dataset run
20    """
21
22    description: typing.Optional[str] = pydantic_v1.Field(default=None)
23    """
24    Description of the run
25    """
26
27    metadata: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
28    """
29    Metadata of the dataset run
30    """
31
32    dataset_id: str = pydantic_v1.Field(alias="datasetId")
33    """
34    Id of the associated dataset
35    """
36
37    dataset_name: str = pydantic_v1.Field(alias="datasetName")
38    """
39    Name of the associated dataset
40    """
41
42    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
43    """
44    The date and time when the dataset run was created
45    """
46
47    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
48    """
49    The date and time when the dataset run was last updated
50    """
51
52    def json(self, **kwargs: typing.Any) -> str:
53        kwargs_with_defaults: typing.Any = {
54            "by_alias": True,
55            "exclude_unset": True,
56            **kwargs,
57        }
58        return super().json(**kwargs_with_defaults)
59
60    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
61        kwargs_with_defaults_exclude_unset: typing.Any = {
62            "by_alias": True,
63            "exclude_unset": True,
64            **kwargs,
65        }
66        kwargs_with_defaults_exclude_none: typing.Any = {
67            "by_alias": True,
68            "exclude_none": True,
69            **kwargs,
70        }
71
72        return deep_union_pydantic_dicts(
73            super().dict(**kwargs_with_defaults_exclude_unset),
74            super().dict(**kwargs_with_defaults_exclude_none),
75        )
76
77    class Config:
78        frozen = True
79        smart_union = True
80        allow_population_by_field_name = True
81        populate_by_name = True
82        extra = pydantic_v1.Extra.allow
83        json_encoders = {dt.datetime: serialize_datetime}
id: str

Unique identifier of the dataset run

name: str

Name of the dataset run

description: Optional[str]

Description of the run

metadata: Optional[Any]

Metadata of the dataset run

dataset_id: str

Id of the associated dataset

dataset_name: str

Name of the associated dataset

created_at: datetime.datetime

The date and time when the dataset run was created

updated_at: datetime.datetime

The date and time when the dataset run was last updated

def json(self, **kwargs: Any) -> str:
52    def json(self, **kwargs: typing.Any) -> str:
53        kwargs_with_defaults: typing.Any = {
54            "by_alias": True,
55            "exclude_unset": True,
56            **kwargs,
57        }
58        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
60    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
61        kwargs_with_defaults_exclude_unset: typing.Any = {
62            "by_alias": True,
63            "exclude_unset": True,
64            **kwargs,
65        }
66        kwargs_with_defaults_exclude_none: typing.Any = {
67            "by_alias": True,
68            "exclude_none": True,
69            **kwargs,
70        }
71
72        return deep_union_pydantic_dicts(
73            super().dict(**kwargs_with_defaults_exclude_unset),
74            super().dict(**kwargs_with_defaults_exclude_none),
75        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DatasetRun.Config:
77    class Config:
78        frozen = True
79        smart_union = True
80        allow_population_by_field_name = True
81        populate_by_name = True
82        extra = pydantic_v1.Extra.allow
83        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DatasetRunItem(pydantic.v1.main.BaseModel):
11class DatasetRunItem(pydantic_v1.BaseModel):
12    id: str
13    dataset_run_id: str = pydantic_v1.Field(alias="datasetRunId")
14    dataset_run_name: str = pydantic_v1.Field(alias="datasetRunName")
15    dataset_item_id: str = pydantic_v1.Field(alias="datasetItemId")
16    trace_id: str = pydantic_v1.Field(alias="traceId")
17    observation_id: typing.Optional[str] = pydantic_v1.Field(
18        alias="observationId", default=None
19    )
20    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
21    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
22
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)
30
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )
47
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
id: str
dataset_run_id: str
dataset_run_name: str
dataset_item_id: str
trace_id: str
observation_id: Optional[str]
created_at: datetime.datetime
updated_at: datetime.datetime
def json(self, **kwargs: Any) -> str:
23    def json(self, **kwargs: typing.Any) -> str:
24        kwargs_with_defaults: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
31    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32        kwargs_with_defaults_exclude_unset: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        kwargs_with_defaults_exclude_none: typing.Any = {
38            "by_alias": True,
39            "exclude_none": True,
40            **kwargs,
41        }
42
43        return deep_union_pydantic_dicts(
44            super().dict(**kwargs_with_defaults_exclude_unset),
45            super().dict(**kwargs_with_defaults_exclude_none),
46        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DatasetRunItem.Config:
48    class Config:
49        frozen = True
50        smart_union = True
51        allow_population_by_field_name = True
52        populate_by_name = True
53        extra = pydantic_v1.Extra.allow
54        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DatasetRunWithItems(langfuse.api.DatasetRun):
13class DatasetRunWithItems(DatasetRun):
14    dataset_run_items: typing.List[DatasetRunItem] = pydantic_v1.Field(
15        alias="datasetRunItems"
16    )
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
dataset_run_items: List[DatasetRunItem]
def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DatasetRunWithItems.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DatasetStatus(builtins.str, enum.Enum):
10class DatasetStatus(str, enum.Enum):
11    ACTIVE = "ACTIVE"
12    ARCHIVED = "ARCHIVED"
13
14    def visit(
15        self,
16        active: typing.Callable[[], T_Result],
17        archived: typing.Callable[[], T_Result],
18    ) -> T_Result:
19        if self is DatasetStatus.ACTIVE:
20            return active()
21        if self is DatasetStatus.ARCHIVED:
22            return archived()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

ACTIVE = <DatasetStatus.ACTIVE: 'ACTIVE'>
ARCHIVED = <DatasetStatus.ARCHIVED: 'ARCHIVED'>
def visit( self, active: Callable[[], ~T_Result], archived: Callable[[], ~T_Result]) -> ~T_Result:
14    def visit(
15        self,
16        active: typing.Callable[[], T_Result],
17        archived: typing.Callable[[], T_Result],
18    ) -> T_Result:
19        if self is DatasetStatus.ACTIVE:
20            return active()
21        if self is DatasetStatus.ARCHIVED:
22            return archived()
class DeleteAnnotationQueueAssignmentResponse(pydantic.v1.main.BaseModel):
11class DeleteAnnotationQueueAssignmentResponse(pydantic_v1.BaseModel):
12    success: bool
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
success: bool
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DeleteAnnotationQueueAssignmentResponse.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DeleteAnnotationQueueItemResponse(pydantic.v1.main.BaseModel):
11class DeleteAnnotationQueueItemResponse(pydantic_v1.BaseModel):
12    success: bool
13    message: str
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
success: bool
message: str
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DeleteAnnotationQueueItemResponse.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DeleteDatasetItemResponse(pydantic.v1.main.BaseModel):
11class DeleteDatasetItemResponse(pydantic_v1.BaseModel):
12    message: str = pydantic_v1.Field()
13    """
14    Success message after deletion
15    """
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
message: str

Success message after deletion

def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DeleteDatasetItemResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DeleteDatasetRunResponse(pydantic.v1.main.BaseModel):
11class DeleteDatasetRunResponse(pydantic_v1.BaseModel):
12    message: str
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
message: str
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DeleteDatasetRunResponse.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class DeleteTraceResponse(pydantic.v1.main.BaseModel):
11class DeleteTraceResponse(pydantic_v1.BaseModel):
12    message: str
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
message: str
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class DeleteTraceResponse.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class EmptyResponse(pydantic.v1.main.BaseModel):
11class EmptyResponse(pydantic_v1.BaseModel):
12    """
13    Empty response for 204 No Content responses
14    """
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        extra = pydantic_v1.Extra.allow
45        json_encoders = {dt.datetime: serialize_datetime}

Empty response for 204 No Content responses

def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class EmptyResponse.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        extra = pydantic_v1.Extra.allow
45        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Error(langfuse.api.core.api_error.ApiError):
 9class Error(ApiError):
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=400, body=body)

Common base class for all non-exit exceptions.

Error(body: Any)
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=400, body=body)
class FilterConfig(pydantic.v1.main.BaseModel):
11class FilterConfig(pydantic_v1.BaseModel):
12    supported: bool
13    max_results: int = pydantic_v1.Field(alias="maxResults")
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
supported: bool
max_results: int
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class FilterConfig.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetCommentsResponse(pydantic.v1.main.BaseModel):
13class GetCommentsResponse(pydantic_v1.BaseModel):
14    data: typing.List[Comment]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[Comment]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetCommentsResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetMediaResponse(pydantic.v1.main.BaseModel):
11class GetMediaResponse(pydantic_v1.BaseModel):
12    media_id: str = pydantic_v1.Field(alias="mediaId")
13    """
14    The unique langfuse identifier of a media record
15    """
16
17    content_type: str = pydantic_v1.Field(alias="contentType")
18    """
19    The MIME type of the media record
20    """
21
22    content_length: int = pydantic_v1.Field(alias="contentLength")
23    """
24    The size of the media record in bytes
25    """
26
27    uploaded_at: dt.datetime = pydantic_v1.Field(alias="uploadedAt")
28    """
29    The date and time when the media record was uploaded
30    """
31
32    url: str = pydantic_v1.Field()
33    """
34    The download URL of the media record
35    """
36
37    url_expiry: str = pydantic_v1.Field(alias="urlExpiry")
38    """
39    The expiry date and time of the media record download URL
40    """
41
42    def json(self, **kwargs: typing.Any) -> str:
43        kwargs_with_defaults: typing.Any = {
44            "by_alias": True,
45            "exclude_unset": True,
46            **kwargs,
47        }
48        return super().json(**kwargs_with_defaults)
49
50    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
51        kwargs_with_defaults_exclude_unset: typing.Any = {
52            "by_alias": True,
53            "exclude_unset": True,
54            **kwargs,
55        }
56        kwargs_with_defaults_exclude_none: typing.Any = {
57            "by_alias": True,
58            "exclude_none": True,
59            **kwargs,
60        }
61
62        return deep_union_pydantic_dicts(
63            super().dict(**kwargs_with_defaults_exclude_unset),
64            super().dict(**kwargs_with_defaults_exclude_none),
65        )
66
67    class Config:
68        frozen = True
69        smart_union = True
70        allow_population_by_field_name = True
71        populate_by_name = True
72        extra = pydantic_v1.Extra.allow
73        json_encoders = {dt.datetime: serialize_datetime}
media_id: str

The unique langfuse identifier of a media record

content_type: str

The MIME type of the media record

content_length: int

The size of the media record in bytes

uploaded_at: datetime.datetime

The date and time when the media record was uploaded

url: str

The download URL of the media record

url_expiry: str

The expiry date and time of the media record download URL

def json(self, **kwargs: Any) -> str:
42    def json(self, **kwargs: typing.Any) -> str:
43        kwargs_with_defaults: typing.Any = {
44            "by_alias": True,
45            "exclude_unset": True,
46            **kwargs,
47        }
48        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
50    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
51        kwargs_with_defaults_exclude_unset: typing.Any = {
52            "by_alias": True,
53            "exclude_unset": True,
54            **kwargs,
55        }
56        kwargs_with_defaults_exclude_none: typing.Any = {
57            "by_alias": True,
58            "exclude_none": True,
59            **kwargs,
60        }
61
62        return deep_union_pydantic_dicts(
63            super().dict(**kwargs_with_defaults_exclude_unset),
64            super().dict(**kwargs_with_defaults_exclude_none),
65        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetMediaResponse.Config:
67    class Config:
68        frozen = True
69        smart_union = True
70        allow_population_by_field_name = True
71        populate_by_name = True
72        extra = pydantic_v1.Extra.allow
73        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetMediaUploadUrlRequest(pydantic.v1.main.BaseModel):
12class GetMediaUploadUrlRequest(pydantic_v1.BaseModel):
13    trace_id: str = pydantic_v1.Field(alias="traceId")
14    """
15    The trace ID associated with the media record
16    """
17
18    observation_id: typing.Optional[str] = pydantic_v1.Field(
19        alias="observationId", default=None
20    )
21    """
22    The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null.
23    """
24
25    content_type: MediaContentType = pydantic_v1.Field(alias="contentType")
26    content_length: int = pydantic_v1.Field(alias="contentLength")
27    """
28    The size of the media record in bytes
29    """
30
31    sha_256_hash: str = pydantic_v1.Field(alias="sha256Hash")
32    """
33    The SHA-256 hash of the media record
34    """
35
36    field: str = pydantic_v1.Field()
37    """
38    The trace / observation field the media record is associated with. This can be one of `input`, `output`, `metadata`
39    """
40
41    def json(self, **kwargs: typing.Any) -> str:
42        kwargs_with_defaults: typing.Any = {
43            "by_alias": True,
44            "exclude_unset": True,
45            **kwargs,
46        }
47        return super().json(**kwargs_with_defaults)
48
49    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
50        kwargs_with_defaults_exclude_unset: typing.Any = {
51            "by_alias": True,
52            "exclude_unset": True,
53            **kwargs,
54        }
55        kwargs_with_defaults_exclude_none: typing.Any = {
56            "by_alias": True,
57            "exclude_none": True,
58            **kwargs,
59        }
60
61        return deep_union_pydantic_dicts(
62            super().dict(**kwargs_with_defaults_exclude_unset),
63            super().dict(**kwargs_with_defaults_exclude_none),
64        )
65
66    class Config:
67        frozen = True
68        smart_union = True
69        allow_population_by_field_name = True
70        populate_by_name = True
71        extra = pydantic_v1.Extra.allow
72        json_encoders = {dt.datetime: serialize_datetime}
trace_id: str

The trace ID associated with the media record

observation_id: Optional[str]

The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null.

content_type: MediaContentType
content_length: int

The size of the media record in bytes

sha_256_hash: str

The SHA-256 hash of the media record

field: str

The trace / observation field the media record is associated with. This can be one of input, output, metadata

def json(self, **kwargs: Any) -> str:
41    def json(self, **kwargs: typing.Any) -> str:
42        kwargs_with_defaults: typing.Any = {
43            "by_alias": True,
44            "exclude_unset": True,
45            **kwargs,
46        }
47        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
49    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
50        kwargs_with_defaults_exclude_unset: typing.Any = {
51            "by_alias": True,
52            "exclude_unset": True,
53            **kwargs,
54        }
55        kwargs_with_defaults_exclude_none: typing.Any = {
56            "by_alias": True,
57            "exclude_none": True,
58            **kwargs,
59        }
60
61        return deep_union_pydantic_dicts(
62            super().dict(**kwargs_with_defaults_exclude_unset),
63            super().dict(**kwargs_with_defaults_exclude_none),
64        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetMediaUploadUrlRequest.Config:
66    class Config:
67        frozen = True
68        smart_union = True
69        allow_population_by_field_name = True
70        populate_by_name = True
71        extra = pydantic_v1.Extra.allow
72        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetMediaUploadUrlResponse(pydantic.v1.main.BaseModel):
11class GetMediaUploadUrlResponse(pydantic_v1.BaseModel):
12    upload_url: typing.Optional[str] = pydantic_v1.Field(
13        alias="uploadUrl", default=None
14    )
15    """
16    The presigned upload URL. If the asset is already uploaded, this will be null
17    """
18
19    media_id: str = pydantic_v1.Field(alias="mediaId")
20    """
21    The unique langfuse identifier of a media record
22    """
23
24    def json(self, **kwargs: typing.Any) -> str:
25        kwargs_with_defaults: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        return super().json(**kwargs_with_defaults)
31
32    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
33        kwargs_with_defaults_exclude_unset: typing.Any = {
34            "by_alias": True,
35            "exclude_unset": True,
36            **kwargs,
37        }
38        kwargs_with_defaults_exclude_none: typing.Any = {
39            "by_alias": True,
40            "exclude_none": True,
41            **kwargs,
42        }
43
44        return deep_union_pydantic_dicts(
45            super().dict(**kwargs_with_defaults_exclude_unset),
46            super().dict(**kwargs_with_defaults_exclude_none),
47        )
48
49    class Config:
50        frozen = True
51        smart_union = True
52        allow_population_by_field_name = True
53        populate_by_name = True
54        extra = pydantic_v1.Extra.allow
55        json_encoders = {dt.datetime: serialize_datetime}
upload_url: Optional[str]

The presigned upload URL. If the asset is already uploaded, this will be null

media_id: str

The unique langfuse identifier of a media record

def json(self, **kwargs: Any) -> str:
24    def json(self, **kwargs: typing.Any) -> str:
25        kwargs_with_defaults: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
32    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
33        kwargs_with_defaults_exclude_unset: typing.Any = {
34            "by_alias": True,
35            "exclude_unset": True,
36            **kwargs,
37        }
38        kwargs_with_defaults_exclude_none: typing.Any = {
39            "by_alias": True,
40            "exclude_none": True,
41            **kwargs,
42        }
43
44        return deep_union_pydantic_dicts(
45            super().dict(**kwargs_with_defaults_exclude_unset),
46            super().dict(**kwargs_with_defaults_exclude_none),
47        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetMediaUploadUrlResponse.Config:
49    class Config:
50        frozen = True
51        smart_union = True
52        allow_population_by_field_name = True
53        populate_by_name = True
54        extra = pydantic_v1.Extra.allow
55        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetScoresResponse(pydantic.v1.main.BaseModel):
13class GetScoresResponse(pydantic_v1.BaseModel):
14    data: typing.List[GetScoresResponseData]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetScoresResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetScoresResponseDataBoolean(langfuse.api.BooleanScore):
13class GetScoresResponseDataBoolean(BooleanScore):
14    trace: typing.Optional[GetScoresResponseTraceData] = None
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
trace: Optional[GetScoresResponseTraceData]
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetScoresResponseDataBoolean.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetScoresResponseDataCategorical(langfuse.api.CategoricalScore):
13class GetScoresResponseDataCategorical(CategoricalScore):
14    trace: typing.Optional[GetScoresResponseTraceData] = None
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
trace: Optional[GetScoresResponseTraceData]
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetScoresResponseDataCategorical.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetScoresResponseDataNumeric(langfuse.api.NumericScore):
13class GetScoresResponseDataNumeric(NumericScore):
14    trace: typing.Optional[GetScoresResponseTraceData] = None
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
trace: Optional[GetScoresResponseTraceData]
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetScoresResponseDataNumeric.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetScoresResponseData_Boolean(pydantic.v1.main.BaseModel):
146class GetScoresResponseData_Boolean(pydantic_v1.BaseModel):
147    trace: typing.Optional[GetScoresResponseTraceData] = None
148    value: float
149    string_value: str = pydantic_v1.Field(alias="stringValue")
150    id: str
151    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
152    session_id: typing.Optional[str] = pydantic_v1.Field(
153        alias="sessionId", default=None
154    )
155    observation_id: typing.Optional[str] = pydantic_v1.Field(
156        alias="observationId", default=None
157    )
158    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
159        alias="datasetRunId", default=None
160    )
161    name: str
162    source: ScoreSource
163    timestamp: dt.datetime
164    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
165    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
166    author_user_id: typing.Optional[str] = pydantic_v1.Field(
167        alias="authorUserId", default=None
168    )
169    comment: typing.Optional[str] = None
170    metadata: typing.Optional[typing.Any] = None
171    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
172    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
173    environment: typing.Optional[str] = None
174    data_type: typing.Literal["BOOLEAN"] = pydantic_v1.Field(
175        alias="dataType", default="BOOLEAN"
176    )
177
178    def json(self, **kwargs: typing.Any) -> str:
179        kwargs_with_defaults: typing.Any = {
180            "by_alias": True,
181            "exclude_unset": True,
182            **kwargs,
183        }
184        return super().json(**kwargs_with_defaults)
185
186    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
187        kwargs_with_defaults_exclude_unset: typing.Any = {
188            "by_alias": True,
189            "exclude_unset": True,
190            **kwargs,
191        }
192        kwargs_with_defaults_exclude_none: typing.Any = {
193            "by_alias": True,
194            "exclude_none": True,
195            **kwargs,
196        }
197
198        return deep_union_pydantic_dicts(
199            super().dict(**kwargs_with_defaults_exclude_unset),
200            super().dict(**kwargs_with_defaults_exclude_none),
201        )
202
203    class Config:
204        frozen = True
205        smart_union = True
206        allow_population_by_field_name = True
207        populate_by_name = True
208        extra = pydantic_v1.Extra.allow
209        json_encoders = {dt.datetime: serialize_datetime}
trace: Optional[GetScoresResponseTraceData]
value: float
string_value: str
id: str
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
source: ScoreSource
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['BOOLEAN']
def json(self, **kwargs: Any) -> str:
178    def json(self, **kwargs: typing.Any) -> str:
179        kwargs_with_defaults: typing.Any = {
180            "by_alias": True,
181            "exclude_unset": True,
182            **kwargs,
183        }
184        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
186    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
187        kwargs_with_defaults_exclude_unset: typing.Any = {
188            "by_alias": True,
189            "exclude_unset": True,
190            **kwargs,
191        }
192        kwargs_with_defaults_exclude_none: typing.Any = {
193            "by_alias": True,
194            "exclude_none": True,
195            **kwargs,
196        }
197
198        return deep_union_pydantic_dicts(
199            super().dict(**kwargs_with_defaults_exclude_unset),
200            super().dict(**kwargs_with_defaults_exclude_none),
201        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetScoresResponseData_Boolean.Config:
203    class Config:
204        frozen = True
205        smart_union = True
206        allow_population_by_field_name = True
207        populate_by_name = True
208        extra = pydantic_v1.Extra.allow
209        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetScoresResponseData_Categorical(pydantic.v1.main.BaseModel):
 80class GetScoresResponseData_Categorical(pydantic_v1.BaseModel):
 81    trace: typing.Optional[GetScoresResponseTraceData] = None
 82    value: typing.Optional[float] = None
 83    string_value: str = pydantic_v1.Field(alias="stringValue")
 84    id: str
 85    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
 86    session_id: typing.Optional[str] = pydantic_v1.Field(
 87        alias="sessionId", default=None
 88    )
 89    observation_id: typing.Optional[str] = pydantic_v1.Field(
 90        alias="observationId", default=None
 91    )
 92    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
 93        alias="datasetRunId", default=None
 94    )
 95    name: str
 96    source: ScoreSource
 97    timestamp: dt.datetime
 98    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
 99    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
100    author_user_id: typing.Optional[str] = pydantic_v1.Field(
101        alias="authorUserId", default=None
102    )
103    comment: typing.Optional[str] = None
104    metadata: typing.Optional[typing.Any] = None
105    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
106    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
107    environment: typing.Optional[str] = None
108    data_type: typing.Literal["CATEGORICAL"] = pydantic_v1.Field(
109        alias="dataType", default="CATEGORICAL"
110    )
111
112    def json(self, **kwargs: typing.Any) -> str:
113        kwargs_with_defaults: typing.Any = {
114            "by_alias": True,
115            "exclude_unset": True,
116            **kwargs,
117        }
118        return super().json(**kwargs_with_defaults)
119
120    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
121        kwargs_with_defaults_exclude_unset: typing.Any = {
122            "by_alias": True,
123            "exclude_unset": True,
124            **kwargs,
125        }
126        kwargs_with_defaults_exclude_none: typing.Any = {
127            "by_alias": True,
128            "exclude_none": True,
129            **kwargs,
130        }
131
132        return deep_union_pydantic_dicts(
133            super().dict(**kwargs_with_defaults_exclude_unset),
134            super().dict(**kwargs_with_defaults_exclude_none),
135        )
136
137    class Config:
138        frozen = True
139        smart_union = True
140        allow_population_by_field_name = True
141        populate_by_name = True
142        extra = pydantic_v1.Extra.allow
143        json_encoders = {dt.datetime: serialize_datetime}
trace: Optional[GetScoresResponseTraceData]
value: Optional[float]
string_value: str
id: str
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
source: ScoreSource
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['CATEGORICAL']
def json(self, **kwargs: Any) -> str:
112    def json(self, **kwargs: typing.Any) -> str:
113        kwargs_with_defaults: typing.Any = {
114            "by_alias": True,
115            "exclude_unset": True,
116            **kwargs,
117        }
118        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
120    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
121        kwargs_with_defaults_exclude_unset: typing.Any = {
122            "by_alias": True,
123            "exclude_unset": True,
124            **kwargs,
125        }
126        kwargs_with_defaults_exclude_none: typing.Any = {
127            "by_alias": True,
128            "exclude_none": True,
129            **kwargs,
130        }
131
132        return deep_union_pydantic_dicts(
133            super().dict(**kwargs_with_defaults_exclude_unset),
134            super().dict(**kwargs_with_defaults_exclude_none),
135        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetScoresResponseData_Categorical.Config:
137    class Config:
138        frozen = True
139        smart_union = True
140        allow_population_by_field_name = True
141        populate_by_name = True
142        extra = pydantic_v1.Extra.allow
143        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetScoresResponseData_Numeric(pydantic.v1.main.BaseModel):
15class GetScoresResponseData_Numeric(pydantic_v1.BaseModel):
16    trace: typing.Optional[GetScoresResponseTraceData] = None
17    value: float
18    id: str
19    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
20    session_id: typing.Optional[str] = pydantic_v1.Field(
21        alias="sessionId", default=None
22    )
23    observation_id: typing.Optional[str] = pydantic_v1.Field(
24        alias="observationId", default=None
25    )
26    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
27        alias="datasetRunId", default=None
28    )
29    name: str
30    source: ScoreSource
31    timestamp: dt.datetime
32    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
33    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
34    author_user_id: typing.Optional[str] = pydantic_v1.Field(
35        alias="authorUserId", default=None
36    )
37    comment: typing.Optional[str] = None
38    metadata: typing.Optional[typing.Any] = None
39    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
40    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
41    environment: typing.Optional[str] = None
42    data_type: typing.Literal["NUMERIC"] = pydantic_v1.Field(
43        alias="dataType", default="NUMERIC"
44    )
45
46    def json(self, **kwargs: typing.Any) -> str:
47        kwargs_with_defaults: typing.Any = {
48            "by_alias": True,
49            "exclude_unset": True,
50            **kwargs,
51        }
52        return super().json(**kwargs_with_defaults)
53
54    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
55        kwargs_with_defaults_exclude_unset: typing.Any = {
56            "by_alias": True,
57            "exclude_unset": True,
58            **kwargs,
59        }
60        kwargs_with_defaults_exclude_none: typing.Any = {
61            "by_alias": True,
62            "exclude_none": True,
63            **kwargs,
64        }
65
66        return deep_union_pydantic_dicts(
67            super().dict(**kwargs_with_defaults_exclude_unset),
68            super().dict(**kwargs_with_defaults_exclude_none),
69        )
70
71    class Config:
72        frozen = True
73        smart_union = True
74        allow_population_by_field_name = True
75        populate_by_name = True
76        extra = pydantic_v1.Extra.allow
77        json_encoders = {dt.datetime: serialize_datetime}
trace: Optional[GetScoresResponseTraceData]
value: float
id: str
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
source: ScoreSource
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['NUMERIC']
def json(self, **kwargs: Any) -> str:
46    def json(self, **kwargs: typing.Any) -> str:
47        kwargs_with_defaults: typing.Any = {
48            "by_alias": True,
49            "exclude_unset": True,
50            **kwargs,
51        }
52        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
54    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
55        kwargs_with_defaults_exclude_unset: typing.Any = {
56            "by_alias": True,
57            "exclude_unset": True,
58            **kwargs,
59        }
60        kwargs_with_defaults_exclude_none: typing.Any = {
61            "by_alias": True,
62            "exclude_none": True,
63            **kwargs,
64        }
65
66        return deep_union_pydantic_dicts(
67            super().dict(**kwargs_with_defaults_exclude_unset),
68            super().dict(**kwargs_with_defaults_exclude_none),
69        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetScoresResponseData_Numeric.Config:
71    class Config:
72        frozen = True
73        smart_union = True
74        allow_population_by_field_name = True
75        populate_by_name = True
76        extra = pydantic_v1.Extra.allow
77        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class GetScoresResponseTraceData(pydantic.v1.main.BaseModel):
11class GetScoresResponseTraceData(pydantic_v1.BaseModel):
12    user_id: typing.Optional[str] = pydantic_v1.Field(alias="userId", default=None)
13    """
14    The user ID associated with the trace referenced by score
15    """
16
17    tags: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
18    """
19    A list of tags associated with the trace referenced by score
20    """
21
22    environment: typing.Optional[str] = pydantic_v1.Field(default=None)
23    """
24    The environment of the trace referenced by score
25    """
26
27    def json(self, **kwargs: typing.Any) -> str:
28        kwargs_with_defaults: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        return super().json(**kwargs_with_defaults)
34
35    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
36        kwargs_with_defaults_exclude_unset: typing.Any = {
37            "by_alias": True,
38            "exclude_unset": True,
39            **kwargs,
40        }
41        kwargs_with_defaults_exclude_none: typing.Any = {
42            "by_alias": True,
43            "exclude_none": True,
44            **kwargs,
45        }
46
47        return deep_union_pydantic_dicts(
48            super().dict(**kwargs_with_defaults_exclude_unset),
49            super().dict(**kwargs_with_defaults_exclude_none),
50        )
51
52    class Config:
53        frozen = True
54        smart_union = True
55        allow_population_by_field_name = True
56        populate_by_name = True
57        extra = pydantic_v1.Extra.allow
58        json_encoders = {dt.datetime: serialize_datetime}
user_id: Optional[str]

The user ID associated with the trace referenced by score

tags: Optional[List[str]]

A list of tags associated with the trace referenced by score

environment: Optional[str]

The environment of the trace referenced by score

def json(self, **kwargs: Any) -> str:
27    def json(self, **kwargs: typing.Any) -> str:
28        kwargs_with_defaults: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
35    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
36        kwargs_with_defaults_exclude_unset: typing.Any = {
37            "by_alias": True,
38            "exclude_unset": True,
39            **kwargs,
40        }
41        kwargs_with_defaults_exclude_none: typing.Any = {
42            "by_alias": True,
43            "exclude_none": True,
44            **kwargs,
45        }
46
47        return deep_union_pydantic_dicts(
48            super().dict(**kwargs_with_defaults_exclude_unset),
49            super().dict(**kwargs_with_defaults_exclude_none),
50        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class GetScoresResponseTraceData.Config:
52    class Config:
53        frozen = True
54        smart_union = True
55        allow_population_by_field_name = True
56        populate_by_name = True
57        extra = pydantic_v1.Extra.allow
58        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class HealthResponse(pydantic.v1.main.BaseModel):
11class HealthResponse(pydantic_v1.BaseModel):
12    """
13    Examples
14    --------
15    from langfuse import HealthResponse
16
17    HealthResponse(
18        version="1.25.0",
19        status="OK",
20    )
21    """
22
23    version: str = pydantic_v1.Field()
24    """
25    Langfuse server version
26    """
27
28    status: str
29
30    def json(self, **kwargs: typing.Any) -> str:
31        kwargs_with_defaults: typing.Any = {
32            "by_alias": True,
33            "exclude_unset": True,
34            **kwargs,
35        }
36        return super().json(**kwargs_with_defaults)
37
38    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
39        kwargs_with_defaults_exclude_unset: typing.Any = {
40            "by_alias": True,
41            "exclude_unset": True,
42            **kwargs,
43        }
44        kwargs_with_defaults_exclude_none: typing.Any = {
45            "by_alias": True,
46            "exclude_none": True,
47            **kwargs,
48        }
49
50        return deep_union_pydantic_dicts(
51            super().dict(**kwargs_with_defaults_exclude_unset),
52            super().dict(**kwargs_with_defaults_exclude_none),
53        )
54
55    class Config:
56        frozen = True
57        smart_union = True
58        extra = pydantic_v1.Extra.allow
59        json_encoders = {dt.datetime: serialize_datetime}

Examples

from langfuse import HealthResponse

HealthResponse( version="1.25.0", status="OK", )

version: str

Langfuse server version

status: str
def json(self, **kwargs: Any) -> str:
30    def json(self, **kwargs: typing.Any) -> str:
31        kwargs_with_defaults: typing.Any = {
32            "by_alias": True,
33            "exclude_unset": True,
34            **kwargs,
35        }
36        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
38    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
39        kwargs_with_defaults_exclude_unset: typing.Any = {
40            "by_alias": True,
41            "exclude_unset": True,
42            **kwargs,
43        }
44        kwargs_with_defaults_exclude_none: typing.Any = {
45            "by_alias": True,
46            "exclude_none": True,
47            **kwargs,
48        }
49
50        return deep_union_pydantic_dicts(
51            super().dict(**kwargs_with_defaults_exclude_unset),
52            super().dict(**kwargs_with_defaults_exclude_none),
53        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class HealthResponse.Config:
55    class Config:
56        frozen = True
57        smart_union = True
58        extra = pydantic_v1.Extra.allow
59        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionError(pydantic.v1.main.BaseModel):
11class IngestionError(pydantic_v1.BaseModel):
12    id: str
13    status: int
14    message: typing.Optional[str] = None
15    error: typing.Optional[typing.Any] = None
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
id: str
status: int
message: Optional[str]
error: Optional[Any]
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionError.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_EventCreate(pydantic.v1.main.BaseModel):
256class IngestionEvent_EventCreate(pydantic_v1.BaseModel):
257    body: CreateEventBody
258    id: str
259    timestamp: str
260    metadata: typing.Optional[typing.Any] = None
261    type: typing.Literal["event-create"] = "event-create"
262
263    def json(self, **kwargs: typing.Any) -> str:
264        kwargs_with_defaults: typing.Any = {
265            "by_alias": True,
266            "exclude_unset": True,
267            **kwargs,
268        }
269        return super().json(**kwargs_with_defaults)
270
271    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
272        kwargs_with_defaults_exclude_unset: typing.Any = {
273            "by_alias": True,
274            "exclude_unset": True,
275            **kwargs,
276        }
277        kwargs_with_defaults_exclude_none: typing.Any = {
278            "by_alias": True,
279            "exclude_none": True,
280            **kwargs,
281        }
282
283        return deep_union_pydantic_dicts(
284            super().dict(**kwargs_with_defaults_exclude_unset),
285            super().dict(**kwargs_with_defaults_exclude_none),
286        )
287
288    class Config:
289        frozen = True
290        smart_union = True
291        extra = pydantic_v1.Extra.allow
292        json_encoders = {dt.datetime: serialize_datetime}
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['event-create']
def json(self, **kwargs: Any) -> str:
263    def json(self, **kwargs: typing.Any) -> str:
264        kwargs_with_defaults: typing.Any = {
265            "by_alias": True,
266            "exclude_unset": True,
267            **kwargs,
268        }
269        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
271    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
272        kwargs_with_defaults_exclude_unset: typing.Any = {
273            "by_alias": True,
274            "exclude_unset": True,
275            **kwargs,
276        }
277        kwargs_with_defaults_exclude_none: typing.Any = {
278            "by_alias": True,
279            "exclude_none": True,
280            **kwargs,
281        }
282
283        return deep_union_pydantic_dicts(
284            super().dict(**kwargs_with_defaults_exclude_unset),
285            super().dict(**kwargs_with_defaults_exclude_none),
286        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_EventCreate.Config:
288    class Config:
289        frozen = True
290        smart_union = True
291        extra = pydantic_v1.Extra.allow
292        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_GenerationCreate(pydantic.v1.main.BaseModel):
178class IngestionEvent_GenerationCreate(pydantic_v1.BaseModel):
179    body: CreateGenerationBody
180    id: str
181    timestamp: str
182    metadata: typing.Optional[typing.Any] = None
183    type: typing.Literal["generation-create"] = "generation-create"
184
185    def json(self, **kwargs: typing.Any) -> str:
186        kwargs_with_defaults: typing.Any = {
187            "by_alias": True,
188            "exclude_unset": True,
189            **kwargs,
190        }
191        return super().json(**kwargs_with_defaults)
192
193    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
194        kwargs_with_defaults_exclude_unset: typing.Any = {
195            "by_alias": True,
196            "exclude_unset": True,
197            **kwargs,
198        }
199        kwargs_with_defaults_exclude_none: typing.Any = {
200            "by_alias": True,
201            "exclude_none": True,
202            **kwargs,
203        }
204
205        return deep_union_pydantic_dicts(
206            super().dict(**kwargs_with_defaults_exclude_unset),
207            super().dict(**kwargs_with_defaults_exclude_none),
208        )
209
210    class Config:
211        frozen = True
212        smart_union = True
213        extra = pydantic_v1.Extra.allow
214        json_encoders = {dt.datetime: serialize_datetime}
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['generation-create']
def json(self, **kwargs: Any) -> str:
185    def json(self, **kwargs: typing.Any) -> str:
186        kwargs_with_defaults: typing.Any = {
187            "by_alias": True,
188            "exclude_unset": True,
189            **kwargs,
190        }
191        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
193    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
194        kwargs_with_defaults_exclude_unset: typing.Any = {
195            "by_alias": True,
196            "exclude_unset": True,
197            **kwargs,
198        }
199        kwargs_with_defaults_exclude_none: typing.Any = {
200            "by_alias": True,
201            "exclude_none": True,
202            **kwargs,
203        }
204
205        return deep_union_pydantic_dicts(
206            super().dict(**kwargs_with_defaults_exclude_unset),
207            super().dict(**kwargs_with_defaults_exclude_none),
208        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_GenerationCreate.Config:
210    class Config:
211        frozen = True
212        smart_union = True
213        extra = pydantic_v1.Extra.allow
214        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_GenerationUpdate(pydantic.v1.main.BaseModel):
217class IngestionEvent_GenerationUpdate(pydantic_v1.BaseModel):
218    body: UpdateGenerationBody
219    id: str
220    timestamp: str
221    metadata: typing.Optional[typing.Any] = None
222    type: typing.Literal["generation-update"] = "generation-update"
223
224    def json(self, **kwargs: typing.Any) -> str:
225        kwargs_with_defaults: typing.Any = {
226            "by_alias": True,
227            "exclude_unset": True,
228            **kwargs,
229        }
230        return super().json(**kwargs_with_defaults)
231
232    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
233        kwargs_with_defaults_exclude_unset: typing.Any = {
234            "by_alias": True,
235            "exclude_unset": True,
236            **kwargs,
237        }
238        kwargs_with_defaults_exclude_none: typing.Any = {
239            "by_alias": True,
240            "exclude_none": True,
241            **kwargs,
242        }
243
244        return deep_union_pydantic_dicts(
245            super().dict(**kwargs_with_defaults_exclude_unset),
246            super().dict(**kwargs_with_defaults_exclude_none),
247        )
248
249    class Config:
250        frozen = True
251        smart_union = True
252        extra = pydantic_v1.Extra.allow
253        json_encoders = {dt.datetime: serialize_datetime}
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['generation-update']
def json(self, **kwargs: Any) -> str:
224    def json(self, **kwargs: typing.Any) -> str:
225        kwargs_with_defaults: typing.Any = {
226            "by_alias": True,
227            "exclude_unset": True,
228            **kwargs,
229        }
230        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
232    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
233        kwargs_with_defaults_exclude_unset: typing.Any = {
234            "by_alias": True,
235            "exclude_unset": True,
236            **kwargs,
237        }
238        kwargs_with_defaults_exclude_none: typing.Any = {
239            "by_alias": True,
240            "exclude_none": True,
241            **kwargs,
242        }
243
244        return deep_union_pydantic_dicts(
245            super().dict(**kwargs_with_defaults_exclude_unset),
246            super().dict(**kwargs_with_defaults_exclude_none),
247        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_GenerationUpdate.Config:
249    class Config:
250        frozen = True
251        smart_union = True
252        extra = pydantic_v1.Extra.allow
253        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_ObservationCreate(pydantic.v1.main.BaseModel):
334class IngestionEvent_ObservationCreate(pydantic_v1.BaseModel):
335    body: ObservationBody
336    id: str
337    timestamp: str
338    metadata: typing.Optional[typing.Any] = None
339    type: typing.Literal["observation-create"] = "observation-create"
340
341    def json(self, **kwargs: typing.Any) -> str:
342        kwargs_with_defaults: typing.Any = {
343            "by_alias": True,
344            "exclude_unset": True,
345            **kwargs,
346        }
347        return super().json(**kwargs_with_defaults)
348
349    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
350        kwargs_with_defaults_exclude_unset: typing.Any = {
351            "by_alias": True,
352            "exclude_unset": True,
353            **kwargs,
354        }
355        kwargs_with_defaults_exclude_none: typing.Any = {
356            "by_alias": True,
357            "exclude_none": True,
358            **kwargs,
359        }
360
361        return deep_union_pydantic_dicts(
362            super().dict(**kwargs_with_defaults_exclude_unset),
363            super().dict(**kwargs_with_defaults_exclude_none),
364        )
365
366    class Config:
367        frozen = True
368        smart_union = True
369        extra = pydantic_v1.Extra.allow
370        json_encoders = {dt.datetime: serialize_datetime}
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['observation-create']
def json(self, **kwargs: Any) -> str:
341    def json(self, **kwargs: typing.Any) -> str:
342        kwargs_with_defaults: typing.Any = {
343            "by_alias": True,
344            "exclude_unset": True,
345            **kwargs,
346        }
347        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
349    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
350        kwargs_with_defaults_exclude_unset: typing.Any = {
351            "by_alias": True,
352            "exclude_unset": True,
353            **kwargs,
354        }
355        kwargs_with_defaults_exclude_none: typing.Any = {
356            "by_alias": True,
357            "exclude_none": True,
358            **kwargs,
359        }
360
361        return deep_union_pydantic_dicts(
362            super().dict(**kwargs_with_defaults_exclude_unset),
363            super().dict(**kwargs_with_defaults_exclude_none),
364        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_ObservationCreate.Config:
366    class Config:
367        frozen = True
368        smart_union = True
369        extra = pydantic_v1.Extra.allow
370        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_ObservationUpdate(pydantic.v1.main.BaseModel):
373class IngestionEvent_ObservationUpdate(pydantic_v1.BaseModel):
374    body: ObservationBody
375    id: str
376    timestamp: str
377    metadata: typing.Optional[typing.Any] = None
378    type: typing.Literal["observation-update"] = "observation-update"
379
380    def json(self, **kwargs: typing.Any) -> str:
381        kwargs_with_defaults: typing.Any = {
382            "by_alias": True,
383            "exclude_unset": True,
384            **kwargs,
385        }
386        return super().json(**kwargs_with_defaults)
387
388    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
389        kwargs_with_defaults_exclude_unset: typing.Any = {
390            "by_alias": True,
391            "exclude_unset": True,
392            **kwargs,
393        }
394        kwargs_with_defaults_exclude_none: typing.Any = {
395            "by_alias": True,
396            "exclude_none": True,
397            **kwargs,
398        }
399
400        return deep_union_pydantic_dicts(
401            super().dict(**kwargs_with_defaults_exclude_unset),
402            super().dict(**kwargs_with_defaults_exclude_none),
403        )
404
405    class Config:
406        frozen = True
407        smart_union = True
408        extra = pydantic_v1.Extra.allow
409        json_encoders = {dt.datetime: serialize_datetime}
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['observation-update']
def json(self, **kwargs: Any) -> str:
380    def json(self, **kwargs: typing.Any) -> str:
381        kwargs_with_defaults: typing.Any = {
382            "by_alias": True,
383            "exclude_unset": True,
384            **kwargs,
385        }
386        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
388    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
389        kwargs_with_defaults_exclude_unset: typing.Any = {
390            "by_alias": True,
391            "exclude_unset": True,
392            **kwargs,
393        }
394        kwargs_with_defaults_exclude_none: typing.Any = {
395            "by_alias": True,
396            "exclude_none": True,
397            **kwargs,
398        }
399
400        return deep_union_pydantic_dicts(
401            super().dict(**kwargs_with_defaults_exclude_unset),
402            super().dict(**kwargs_with_defaults_exclude_none),
403        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_ObservationUpdate.Config:
405    class Config:
406        frozen = True
407        smart_union = True
408        extra = pydantic_v1.Extra.allow
409        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_ScoreCreate(pydantic.v1.main.BaseModel):
61class IngestionEvent_ScoreCreate(pydantic_v1.BaseModel):
62    body: ScoreBody
63    id: str
64    timestamp: str
65    metadata: typing.Optional[typing.Any] = None
66    type: typing.Literal["score-create"] = "score-create"
67
68    def json(self, **kwargs: typing.Any) -> str:
69        kwargs_with_defaults: typing.Any = {
70            "by_alias": True,
71            "exclude_unset": True,
72            **kwargs,
73        }
74        return super().json(**kwargs_with_defaults)
75
76    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
77        kwargs_with_defaults_exclude_unset: typing.Any = {
78            "by_alias": True,
79            "exclude_unset": True,
80            **kwargs,
81        }
82        kwargs_with_defaults_exclude_none: typing.Any = {
83            "by_alias": True,
84            "exclude_none": True,
85            **kwargs,
86        }
87
88        return deep_union_pydantic_dicts(
89            super().dict(**kwargs_with_defaults_exclude_unset),
90            super().dict(**kwargs_with_defaults_exclude_none),
91        )
92
93    class Config:
94        frozen = True
95        smart_union = True
96        extra = pydantic_v1.Extra.allow
97        json_encoders = {dt.datetime: serialize_datetime}
body: ScoreBody
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['score-create']
def json(self, **kwargs: Any) -> str:
68    def json(self, **kwargs: typing.Any) -> str:
69        kwargs_with_defaults: typing.Any = {
70            "by_alias": True,
71            "exclude_unset": True,
72            **kwargs,
73        }
74        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
76    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
77        kwargs_with_defaults_exclude_unset: typing.Any = {
78            "by_alias": True,
79            "exclude_unset": True,
80            **kwargs,
81        }
82        kwargs_with_defaults_exclude_none: typing.Any = {
83            "by_alias": True,
84            "exclude_none": True,
85            **kwargs,
86        }
87
88        return deep_union_pydantic_dicts(
89            super().dict(**kwargs_with_defaults_exclude_unset),
90            super().dict(**kwargs_with_defaults_exclude_none),
91        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_ScoreCreate.Config:
93    class Config:
94        frozen = True
95        smart_union = True
96        extra = pydantic_v1.Extra.allow
97        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_SdkLog(pydantic.v1.main.BaseModel):
295class IngestionEvent_SdkLog(pydantic_v1.BaseModel):
296    body: SdkLogBody
297    id: str
298    timestamp: str
299    metadata: typing.Optional[typing.Any] = None
300    type: typing.Literal["sdk-log"] = "sdk-log"
301
302    def json(self, **kwargs: typing.Any) -> str:
303        kwargs_with_defaults: typing.Any = {
304            "by_alias": True,
305            "exclude_unset": True,
306            **kwargs,
307        }
308        return super().json(**kwargs_with_defaults)
309
310    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
311        kwargs_with_defaults_exclude_unset: typing.Any = {
312            "by_alias": True,
313            "exclude_unset": True,
314            **kwargs,
315        }
316        kwargs_with_defaults_exclude_none: typing.Any = {
317            "by_alias": True,
318            "exclude_none": True,
319            **kwargs,
320        }
321
322        return deep_union_pydantic_dicts(
323            super().dict(**kwargs_with_defaults_exclude_unset),
324            super().dict(**kwargs_with_defaults_exclude_none),
325        )
326
327    class Config:
328        frozen = True
329        smart_union = True
330        extra = pydantic_v1.Extra.allow
331        json_encoders = {dt.datetime: serialize_datetime}
body: SdkLogBody
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['sdk-log']
def json(self, **kwargs: Any) -> str:
302    def json(self, **kwargs: typing.Any) -> str:
303        kwargs_with_defaults: typing.Any = {
304            "by_alias": True,
305            "exclude_unset": True,
306            **kwargs,
307        }
308        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
310    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
311        kwargs_with_defaults_exclude_unset: typing.Any = {
312            "by_alias": True,
313            "exclude_unset": True,
314            **kwargs,
315        }
316        kwargs_with_defaults_exclude_none: typing.Any = {
317            "by_alias": True,
318            "exclude_none": True,
319            **kwargs,
320        }
321
322        return deep_union_pydantic_dicts(
323            super().dict(**kwargs_with_defaults_exclude_unset),
324            super().dict(**kwargs_with_defaults_exclude_none),
325        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_SdkLog.Config:
327    class Config:
328        frozen = True
329        smart_union = True
330        extra = pydantic_v1.Extra.allow
331        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_SpanCreate(pydantic.v1.main.BaseModel):
100class IngestionEvent_SpanCreate(pydantic_v1.BaseModel):
101    body: CreateSpanBody
102    id: str
103    timestamp: str
104    metadata: typing.Optional[typing.Any] = None
105    type: typing.Literal["span-create"] = "span-create"
106
107    def json(self, **kwargs: typing.Any) -> str:
108        kwargs_with_defaults: typing.Any = {
109            "by_alias": True,
110            "exclude_unset": True,
111            **kwargs,
112        }
113        return super().json(**kwargs_with_defaults)
114
115    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
116        kwargs_with_defaults_exclude_unset: typing.Any = {
117            "by_alias": True,
118            "exclude_unset": True,
119            **kwargs,
120        }
121        kwargs_with_defaults_exclude_none: typing.Any = {
122            "by_alias": True,
123            "exclude_none": True,
124            **kwargs,
125        }
126
127        return deep_union_pydantic_dicts(
128            super().dict(**kwargs_with_defaults_exclude_unset),
129            super().dict(**kwargs_with_defaults_exclude_none),
130        )
131
132    class Config:
133        frozen = True
134        smart_union = True
135        extra = pydantic_v1.Extra.allow
136        json_encoders = {dt.datetime: serialize_datetime}
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['span-create']
def json(self, **kwargs: Any) -> str:
107    def json(self, **kwargs: typing.Any) -> str:
108        kwargs_with_defaults: typing.Any = {
109            "by_alias": True,
110            "exclude_unset": True,
111            **kwargs,
112        }
113        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
115    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
116        kwargs_with_defaults_exclude_unset: typing.Any = {
117            "by_alias": True,
118            "exclude_unset": True,
119            **kwargs,
120        }
121        kwargs_with_defaults_exclude_none: typing.Any = {
122            "by_alias": True,
123            "exclude_none": True,
124            **kwargs,
125        }
126
127        return deep_union_pydantic_dicts(
128            super().dict(**kwargs_with_defaults_exclude_unset),
129            super().dict(**kwargs_with_defaults_exclude_none),
130        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_SpanCreate.Config:
132    class Config:
133        frozen = True
134        smart_union = True
135        extra = pydantic_v1.Extra.allow
136        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_SpanUpdate(pydantic.v1.main.BaseModel):
139class IngestionEvent_SpanUpdate(pydantic_v1.BaseModel):
140    body: UpdateSpanBody
141    id: str
142    timestamp: str
143    metadata: typing.Optional[typing.Any] = None
144    type: typing.Literal["span-update"] = "span-update"
145
146    def json(self, **kwargs: typing.Any) -> str:
147        kwargs_with_defaults: typing.Any = {
148            "by_alias": True,
149            "exclude_unset": True,
150            **kwargs,
151        }
152        return super().json(**kwargs_with_defaults)
153
154    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
155        kwargs_with_defaults_exclude_unset: typing.Any = {
156            "by_alias": True,
157            "exclude_unset": True,
158            **kwargs,
159        }
160        kwargs_with_defaults_exclude_none: typing.Any = {
161            "by_alias": True,
162            "exclude_none": True,
163            **kwargs,
164        }
165
166        return deep_union_pydantic_dicts(
167            super().dict(**kwargs_with_defaults_exclude_unset),
168            super().dict(**kwargs_with_defaults_exclude_none),
169        )
170
171    class Config:
172        frozen = True
173        smart_union = True
174        extra = pydantic_v1.Extra.allow
175        json_encoders = {dt.datetime: serialize_datetime}
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['span-update']
def json(self, **kwargs: Any) -> str:
146    def json(self, **kwargs: typing.Any) -> str:
147        kwargs_with_defaults: typing.Any = {
148            "by_alias": True,
149            "exclude_unset": True,
150            **kwargs,
151        }
152        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
154    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
155        kwargs_with_defaults_exclude_unset: typing.Any = {
156            "by_alias": True,
157            "exclude_unset": True,
158            **kwargs,
159        }
160        kwargs_with_defaults_exclude_none: typing.Any = {
161            "by_alias": True,
162            "exclude_none": True,
163            **kwargs,
164        }
165
166        return deep_union_pydantic_dicts(
167            super().dict(**kwargs_with_defaults_exclude_unset),
168            super().dict(**kwargs_with_defaults_exclude_none),
169        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_SpanUpdate.Config:
171    class Config:
172        frozen = True
173        smart_union = True
174        extra = pydantic_v1.Extra.allow
175        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionEvent_TraceCreate(pydantic.v1.main.BaseModel):
22class IngestionEvent_TraceCreate(pydantic_v1.BaseModel):
23    body: TraceBody
24    id: str
25    timestamp: str
26    metadata: typing.Optional[typing.Any] = None
27    type: typing.Literal["trace-create"] = "trace-create"
28
29    def json(self, **kwargs: typing.Any) -> str:
30        kwargs_with_defaults: typing.Any = {
31            "by_alias": True,
32            "exclude_unset": True,
33            **kwargs,
34        }
35        return super().json(**kwargs_with_defaults)
36
37    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
38        kwargs_with_defaults_exclude_unset: typing.Any = {
39            "by_alias": True,
40            "exclude_unset": True,
41            **kwargs,
42        }
43        kwargs_with_defaults_exclude_none: typing.Any = {
44            "by_alias": True,
45            "exclude_none": True,
46            **kwargs,
47        }
48
49        return deep_union_pydantic_dicts(
50            super().dict(**kwargs_with_defaults_exclude_unset),
51            super().dict(**kwargs_with_defaults_exclude_none),
52        )
53
54    class Config:
55        frozen = True
56        smart_union = True
57        extra = pydantic_v1.Extra.allow
58        json_encoders = {dt.datetime: serialize_datetime}
body: TraceBody
id: str
timestamp: str
metadata: Optional[Any]
type: Literal['trace-create']
def json(self, **kwargs: Any) -> str:
29    def json(self, **kwargs: typing.Any) -> str:
30        kwargs_with_defaults: typing.Any = {
31            "by_alias": True,
32            "exclude_unset": True,
33            **kwargs,
34        }
35        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
37    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
38        kwargs_with_defaults_exclude_unset: typing.Any = {
39            "by_alias": True,
40            "exclude_unset": True,
41            **kwargs,
42        }
43        kwargs_with_defaults_exclude_none: typing.Any = {
44            "by_alias": True,
45            "exclude_none": True,
46            **kwargs,
47        }
48
49        return deep_union_pydantic_dicts(
50            super().dict(**kwargs_with_defaults_exclude_unset),
51            super().dict(**kwargs_with_defaults_exclude_none),
52        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionEvent_TraceCreate.Config:
54    class Config:
55        frozen = True
56        smart_union = True
57        extra = pydantic_v1.Extra.allow
58        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionResponse(pydantic.v1.main.BaseModel):
13class IngestionResponse(pydantic_v1.BaseModel):
14    successes: typing.List[IngestionSuccess]
15    errors: typing.List[IngestionError]
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
successes: List[IngestionSuccess]
errors: List[IngestionError]
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class IngestionSuccess(pydantic.v1.main.BaseModel):
11class IngestionSuccess(pydantic_v1.BaseModel):
12    id: str
13    status: int
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
id: str
status: int
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class IngestionSuccess.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
IngestionUsage = typing.Union[Usage, OpenAiUsage]
class LlmAdapter(builtins.str, enum.Enum):
10class LlmAdapter(str, enum.Enum):
11    ANTHROPIC = "anthropic"
12    OPEN_AI = "openai"
13    AZURE = "azure"
14    BEDROCK = "bedrock"
15    GOOGLE_VERTEX_AI = "google-vertex-ai"
16    GOOGLE_AI_STUDIO = "google-ai-studio"
17
18    def visit(
19        self,
20        anthropic: typing.Callable[[], T_Result],
21        open_ai: typing.Callable[[], T_Result],
22        azure: typing.Callable[[], T_Result],
23        bedrock: typing.Callable[[], T_Result],
24        google_vertex_ai: typing.Callable[[], T_Result],
25        google_ai_studio: typing.Callable[[], T_Result],
26    ) -> T_Result:
27        if self is LlmAdapter.ANTHROPIC:
28            return anthropic()
29        if self is LlmAdapter.OPEN_AI:
30            return open_ai()
31        if self is LlmAdapter.AZURE:
32            return azure()
33        if self is LlmAdapter.BEDROCK:
34            return bedrock()
35        if self is LlmAdapter.GOOGLE_VERTEX_AI:
36            return google_vertex_ai()
37        if self is LlmAdapter.GOOGLE_AI_STUDIO:
38            return google_ai_studio()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

ANTHROPIC = <LlmAdapter.ANTHROPIC: 'anthropic'>
OPEN_AI = <LlmAdapter.OPEN_AI: 'openai'>
AZURE = <LlmAdapter.AZURE: 'azure'>
BEDROCK = <LlmAdapter.BEDROCK: 'bedrock'>
GOOGLE_VERTEX_AI = <LlmAdapter.GOOGLE_VERTEX_AI: 'google-vertex-ai'>
GOOGLE_AI_STUDIO = <LlmAdapter.GOOGLE_AI_STUDIO: 'google-ai-studio'>
def visit( self, anthropic: Callable[[], ~T_Result], open_ai: Callable[[], ~T_Result], azure: Callable[[], ~T_Result], bedrock: Callable[[], ~T_Result], google_vertex_ai: Callable[[], ~T_Result], google_ai_studio: Callable[[], ~T_Result]) -> ~T_Result:
18    def visit(
19        self,
20        anthropic: typing.Callable[[], T_Result],
21        open_ai: typing.Callable[[], T_Result],
22        azure: typing.Callable[[], T_Result],
23        bedrock: typing.Callable[[], T_Result],
24        google_vertex_ai: typing.Callable[[], T_Result],
25        google_ai_studio: typing.Callable[[], T_Result],
26    ) -> T_Result:
27        if self is LlmAdapter.ANTHROPIC:
28            return anthropic()
29        if self is LlmAdapter.OPEN_AI:
30            return open_ai()
31        if self is LlmAdapter.AZURE:
32            return azure()
33        if self is LlmAdapter.BEDROCK:
34            return bedrock()
35        if self is LlmAdapter.GOOGLE_VERTEX_AI:
36            return google_vertex_ai()
37        if self is LlmAdapter.GOOGLE_AI_STUDIO:
38            return google_ai_studio()
class LlmConnection(pydantic.v1.main.BaseModel):
11class LlmConnection(pydantic_v1.BaseModel):
12    """
13    LLM API connection configuration (secrets excluded)
14    """
15
16    id: str
17    provider: str = pydantic_v1.Field()
18    """
19    Provider name (e.g., 'openai', 'my-gateway'). Must be unique in project, used for upserting.
20    """
21
22    adapter: str = pydantic_v1.Field()
23    """
24    The adapter used to interface with the LLM
25    """
26
27    display_secret_key: str = pydantic_v1.Field(alias="displaySecretKey")
28    """
29    Masked version of the secret key for display purposes
30    """
31
32    base_url: typing.Optional[str] = pydantic_v1.Field(alias="baseURL", default=None)
33    """
34    Custom base URL for the LLM API
35    """
36
37    custom_models: typing.List[str] = pydantic_v1.Field(alias="customModels")
38    """
39    List of custom model names available for this connection
40    """
41
42    with_default_models: bool = pydantic_v1.Field(alias="withDefaultModels")
43    """
44    Whether to include default models for this adapter
45    """
46
47    extra_header_keys: typing.List[str] = pydantic_v1.Field(alias="extraHeaderKeys")
48    """
49    Keys of extra headers sent with requests (values excluded for security)
50    """
51
52    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
53    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
54
55    def json(self, **kwargs: typing.Any) -> str:
56        kwargs_with_defaults: typing.Any = {
57            "by_alias": True,
58            "exclude_unset": True,
59            **kwargs,
60        }
61        return super().json(**kwargs_with_defaults)
62
63    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
64        kwargs_with_defaults_exclude_unset: typing.Any = {
65            "by_alias": True,
66            "exclude_unset": True,
67            **kwargs,
68        }
69        kwargs_with_defaults_exclude_none: typing.Any = {
70            "by_alias": True,
71            "exclude_none": True,
72            **kwargs,
73        }
74
75        return deep_union_pydantic_dicts(
76            super().dict(**kwargs_with_defaults_exclude_unset),
77            super().dict(**kwargs_with_defaults_exclude_none),
78        )
79
80    class Config:
81        frozen = True
82        smart_union = True
83        allow_population_by_field_name = True
84        populate_by_name = True
85        extra = pydantic_v1.Extra.allow
86        json_encoders = {dt.datetime: serialize_datetime}

LLM API connection configuration (secrets excluded)

id: str
provider: str

Provider name (e.g., 'openai', 'my-gateway'). Must be unique in project, used for upserting.

adapter: str

The adapter used to interface with the LLM

display_secret_key: str

Masked version of the secret key for display purposes

base_url: Optional[str]

Custom base URL for the LLM API

custom_models: List[str]

List of custom model names available for this connection

with_default_models: bool

Whether to include default models for this adapter

extra_header_keys: List[str]

Keys of extra headers sent with requests (values excluded for security)

created_at: datetime.datetime
updated_at: datetime.datetime
def json(self, **kwargs: Any) -> str:
55    def json(self, **kwargs: typing.Any) -> str:
56        kwargs_with_defaults: typing.Any = {
57            "by_alias": True,
58            "exclude_unset": True,
59            **kwargs,
60        }
61        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
63    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
64        kwargs_with_defaults_exclude_unset: typing.Any = {
65            "by_alias": True,
66            "exclude_unset": True,
67            **kwargs,
68        }
69        kwargs_with_defaults_exclude_none: typing.Any = {
70            "by_alias": True,
71            "exclude_none": True,
72            **kwargs,
73        }
74
75        return deep_union_pydantic_dicts(
76            super().dict(**kwargs_with_defaults_exclude_unset),
77            super().dict(**kwargs_with_defaults_exclude_none),
78        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class LlmConnection.Config:
80    class Config:
81        frozen = True
82        smart_union = True
83        allow_population_by_field_name = True
84        populate_by_name = True
85        extra = pydantic_v1.Extra.allow
86        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
MapValue = typing.Union[str, NoneType, int, bool, typing.List[str]]
class MediaContentType(builtins.str, enum.Enum):
 10class MediaContentType(str, enum.Enum):
 11    """
 12    The MIME type of the media record
 13    """
 14
 15    IMAGE_PNG = "image/png"
 16    IMAGE_JPEG = "image/jpeg"
 17    IMAGE_JPG = "image/jpg"
 18    IMAGE_WEBP = "image/webp"
 19    IMAGE_GIF = "image/gif"
 20    IMAGE_SVG_XML = "image/svg+xml"
 21    IMAGE_TIFF = "image/tiff"
 22    IMAGE_BMP = "image/bmp"
 23    AUDIO_MPEG = "audio/mpeg"
 24    AUDIO_MP_3 = "audio/mp3"
 25    AUDIO_WAV = "audio/wav"
 26    AUDIO_OGG = "audio/ogg"
 27    AUDIO_OGA = "audio/oga"
 28    AUDIO_AAC = "audio/aac"
 29    AUDIO_MP_4 = "audio/mp4"
 30    AUDIO_FLAC = "audio/flac"
 31    VIDEO_MP_4 = "video/mp4"
 32    VIDEO_WEBM = "video/webm"
 33    TEXT_PLAIN = "text/plain"
 34    TEXT_HTML = "text/html"
 35    TEXT_CSS = "text/css"
 36    TEXT_CSV = "text/csv"
 37    APPLICATION_PDF = "application/pdf"
 38    APPLICATION_MSWORD = "application/msword"
 39    APPLICATION_MS_EXCEL = "application/vnd.ms-excel"
 40    APPLICATION_ZIP = "application/zip"
 41    APPLICATION_JSON = "application/json"
 42    APPLICATION_XML = "application/xml"
 43    APPLICATION_OCTET_STREAM = "application/octet-stream"
 44
 45    def visit(
 46        self,
 47        image_png: typing.Callable[[], T_Result],
 48        image_jpeg: typing.Callable[[], T_Result],
 49        image_jpg: typing.Callable[[], T_Result],
 50        image_webp: typing.Callable[[], T_Result],
 51        image_gif: typing.Callable[[], T_Result],
 52        image_svg_xml: typing.Callable[[], T_Result],
 53        image_tiff: typing.Callable[[], T_Result],
 54        image_bmp: typing.Callable[[], T_Result],
 55        audio_mpeg: typing.Callable[[], T_Result],
 56        audio_mp_3: typing.Callable[[], T_Result],
 57        audio_wav: typing.Callable[[], T_Result],
 58        audio_ogg: typing.Callable[[], T_Result],
 59        audio_oga: typing.Callable[[], T_Result],
 60        audio_aac: typing.Callable[[], T_Result],
 61        audio_mp_4: typing.Callable[[], T_Result],
 62        audio_flac: typing.Callable[[], T_Result],
 63        video_mp_4: typing.Callable[[], T_Result],
 64        video_webm: typing.Callable[[], T_Result],
 65        text_plain: typing.Callable[[], T_Result],
 66        text_html: typing.Callable[[], T_Result],
 67        text_css: typing.Callable[[], T_Result],
 68        text_csv: typing.Callable[[], T_Result],
 69        application_pdf: typing.Callable[[], T_Result],
 70        application_msword: typing.Callable[[], T_Result],
 71        application_ms_excel: typing.Callable[[], T_Result],
 72        application_zip: typing.Callable[[], T_Result],
 73        application_json: typing.Callable[[], T_Result],
 74        application_xml: typing.Callable[[], T_Result],
 75        application_octet_stream: typing.Callable[[], T_Result],
 76    ) -> T_Result:
 77        if self is MediaContentType.IMAGE_PNG:
 78            return image_png()
 79        if self is MediaContentType.IMAGE_JPEG:
 80            return image_jpeg()
 81        if self is MediaContentType.IMAGE_JPG:
 82            return image_jpg()
 83        if self is MediaContentType.IMAGE_WEBP:
 84            return image_webp()
 85        if self is MediaContentType.IMAGE_GIF:
 86            return image_gif()
 87        if self is MediaContentType.IMAGE_SVG_XML:
 88            return image_svg_xml()
 89        if self is MediaContentType.IMAGE_TIFF:
 90            return image_tiff()
 91        if self is MediaContentType.IMAGE_BMP:
 92            return image_bmp()
 93        if self is MediaContentType.AUDIO_MPEG:
 94            return audio_mpeg()
 95        if self is MediaContentType.AUDIO_MP_3:
 96            return audio_mp_3()
 97        if self is MediaContentType.AUDIO_WAV:
 98            return audio_wav()
 99        if self is MediaContentType.AUDIO_OGG:
100            return audio_ogg()
101        if self is MediaContentType.AUDIO_OGA:
102            return audio_oga()
103        if self is MediaContentType.AUDIO_AAC:
104            return audio_aac()
105        if self is MediaContentType.AUDIO_MP_4:
106            return audio_mp_4()
107        if self is MediaContentType.AUDIO_FLAC:
108            return audio_flac()
109        if self is MediaContentType.VIDEO_MP_4:
110            return video_mp_4()
111        if self is MediaContentType.VIDEO_WEBM:
112            return video_webm()
113        if self is MediaContentType.TEXT_PLAIN:
114            return text_plain()
115        if self is MediaContentType.TEXT_HTML:
116            return text_html()
117        if self is MediaContentType.TEXT_CSS:
118            return text_css()
119        if self is MediaContentType.TEXT_CSV:
120            return text_csv()
121        if self is MediaContentType.APPLICATION_PDF:
122            return application_pdf()
123        if self is MediaContentType.APPLICATION_MSWORD:
124            return application_msword()
125        if self is MediaContentType.APPLICATION_MS_EXCEL:
126            return application_ms_excel()
127        if self is MediaContentType.APPLICATION_ZIP:
128            return application_zip()
129        if self is MediaContentType.APPLICATION_JSON:
130            return application_json()
131        if self is MediaContentType.APPLICATION_XML:
132            return application_xml()
133        if self is MediaContentType.APPLICATION_OCTET_STREAM:
134            return application_octet_stream()

The MIME type of the media record

IMAGE_PNG = <MediaContentType.IMAGE_PNG: 'image/png'>
IMAGE_JPEG = <MediaContentType.IMAGE_JPEG: 'image/jpeg'>
IMAGE_JPG = <MediaContentType.IMAGE_JPG: 'image/jpg'>
IMAGE_WEBP = <MediaContentType.IMAGE_WEBP: 'image/webp'>
IMAGE_GIF = <MediaContentType.IMAGE_GIF: 'image/gif'>
IMAGE_SVG_XML = <MediaContentType.IMAGE_SVG_XML: 'image/svg+xml'>
IMAGE_TIFF = <MediaContentType.IMAGE_TIFF: 'image/tiff'>
IMAGE_BMP = <MediaContentType.IMAGE_BMP: 'image/bmp'>
AUDIO_MPEG = <MediaContentType.AUDIO_MPEG: 'audio/mpeg'>
AUDIO_MP_3 = <MediaContentType.AUDIO_MP_3: 'audio/mp3'>
AUDIO_WAV = <MediaContentType.AUDIO_WAV: 'audio/wav'>
AUDIO_OGG = <MediaContentType.AUDIO_OGG: 'audio/ogg'>
AUDIO_OGA = <MediaContentType.AUDIO_OGA: 'audio/oga'>
AUDIO_AAC = <MediaContentType.AUDIO_AAC: 'audio/aac'>
AUDIO_MP_4 = <MediaContentType.AUDIO_MP_4: 'audio/mp4'>
AUDIO_FLAC = <MediaContentType.AUDIO_FLAC: 'audio/flac'>
VIDEO_MP_4 = <MediaContentType.VIDEO_MP_4: 'video/mp4'>
VIDEO_WEBM = <MediaContentType.VIDEO_WEBM: 'video/webm'>
TEXT_PLAIN = <MediaContentType.TEXT_PLAIN: 'text/plain'>
TEXT_HTML = <MediaContentType.TEXT_HTML: 'text/html'>
TEXT_CSS = <MediaContentType.TEXT_CSS: 'text/css'>
TEXT_CSV = <MediaContentType.TEXT_CSV: 'text/csv'>
APPLICATION_PDF = <MediaContentType.APPLICATION_PDF: 'application/pdf'>
APPLICATION_MSWORD = <MediaContentType.APPLICATION_MSWORD: 'application/msword'>
APPLICATION_MS_EXCEL = <MediaContentType.APPLICATION_MS_EXCEL: 'application/vnd.ms-excel'>
APPLICATION_ZIP = <MediaContentType.APPLICATION_ZIP: 'application/zip'>
APPLICATION_JSON = <MediaContentType.APPLICATION_JSON: 'application/json'>
APPLICATION_XML = <MediaContentType.APPLICATION_XML: 'application/xml'>
APPLICATION_OCTET_STREAM = <MediaContentType.APPLICATION_OCTET_STREAM: 'application/octet-stream'>
def visit( self, image_png: Callable[[], ~T_Result], image_jpeg: Callable[[], ~T_Result], image_jpg: Callable[[], ~T_Result], image_webp: Callable[[], ~T_Result], image_gif: Callable[[], ~T_Result], image_svg_xml: Callable[[], ~T_Result], image_tiff: Callable[[], ~T_Result], image_bmp: Callable[[], ~T_Result], audio_mpeg: Callable[[], ~T_Result], audio_mp_3: Callable[[], ~T_Result], audio_wav: Callable[[], ~T_Result], audio_ogg: Callable[[], ~T_Result], audio_oga: Callable[[], ~T_Result], audio_aac: Callable[[], ~T_Result], audio_mp_4: Callable[[], ~T_Result], audio_flac: Callable[[], ~T_Result], video_mp_4: Callable[[], ~T_Result], video_webm: Callable[[], ~T_Result], text_plain: Callable[[], ~T_Result], text_html: Callable[[], ~T_Result], text_css: Callable[[], ~T_Result], text_csv: Callable[[], ~T_Result], application_pdf: Callable[[], ~T_Result], application_msword: Callable[[], ~T_Result], application_ms_excel: Callable[[], ~T_Result], application_zip: Callable[[], ~T_Result], application_json: Callable[[], ~T_Result], application_xml: Callable[[], ~T_Result], application_octet_stream: Callable[[], ~T_Result]) -> ~T_Result:
 45    def visit(
 46        self,
 47        image_png: typing.Callable[[], T_Result],
 48        image_jpeg: typing.Callable[[], T_Result],
 49        image_jpg: typing.Callable[[], T_Result],
 50        image_webp: typing.Callable[[], T_Result],
 51        image_gif: typing.Callable[[], T_Result],
 52        image_svg_xml: typing.Callable[[], T_Result],
 53        image_tiff: typing.Callable[[], T_Result],
 54        image_bmp: typing.Callable[[], T_Result],
 55        audio_mpeg: typing.Callable[[], T_Result],
 56        audio_mp_3: typing.Callable[[], T_Result],
 57        audio_wav: typing.Callable[[], T_Result],
 58        audio_ogg: typing.Callable[[], T_Result],
 59        audio_oga: typing.Callable[[], T_Result],
 60        audio_aac: typing.Callable[[], T_Result],
 61        audio_mp_4: typing.Callable[[], T_Result],
 62        audio_flac: typing.Callable[[], T_Result],
 63        video_mp_4: typing.Callable[[], T_Result],
 64        video_webm: typing.Callable[[], T_Result],
 65        text_plain: typing.Callable[[], T_Result],
 66        text_html: typing.Callable[[], T_Result],
 67        text_css: typing.Callable[[], T_Result],
 68        text_csv: typing.Callable[[], T_Result],
 69        application_pdf: typing.Callable[[], T_Result],
 70        application_msword: typing.Callable[[], T_Result],
 71        application_ms_excel: typing.Callable[[], T_Result],
 72        application_zip: typing.Callable[[], T_Result],
 73        application_json: typing.Callable[[], T_Result],
 74        application_xml: typing.Callable[[], T_Result],
 75        application_octet_stream: typing.Callable[[], T_Result],
 76    ) -> T_Result:
 77        if self is MediaContentType.IMAGE_PNG:
 78            return image_png()
 79        if self is MediaContentType.IMAGE_JPEG:
 80            return image_jpeg()
 81        if self is MediaContentType.IMAGE_JPG:
 82            return image_jpg()
 83        if self is MediaContentType.IMAGE_WEBP:
 84            return image_webp()
 85        if self is MediaContentType.IMAGE_GIF:
 86            return image_gif()
 87        if self is MediaContentType.IMAGE_SVG_XML:
 88            return image_svg_xml()
 89        if self is MediaContentType.IMAGE_TIFF:
 90            return image_tiff()
 91        if self is MediaContentType.IMAGE_BMP:
 92            return image_bmp()
 93        if self is MediaContentType.AUDIO_MPEG:
 94            return audio_mpeg()
 95        if self is MediaContentType.AUDIO_MP_3:
 96            return audio_mp_3()
 97        if self is MediaContentType.AUDIO_WAV:
 98            return audio_wav()
 99        if self is MediaContentType.AUDIO_OGG:
100            return audio_ogg()
101        if self is MediaContentType.AUDIO_OGA:
102            return audio_oga()
103        if self is MediaContentType.AUDIO_AAC:
104            return audio_aac()
105        if self is MediaContentType.AUDIO_MP_4:
106            return audio_mp_4()
107        if self is MediaContentType.AUDIO_FLAC:
108            return audio_flac()
109        if self is MediaContentType.VIDEO_MP_4:
110            return video_mp_4()
111        if self is MediaContentType.VIDEO_WEBM:
112            return video_webm()
113        if self is MediaContentType.TEXT_PLAIN:
114            return text_plain()
115        if self is MediaContentType.TEXT_HTML:
116            return text_html()
117        if self is MediaContentType.TEXT_CSS:
118            return text_css()
119        if self is MediaContentType.TEXT_CSV:
120            return text_csv()
121        if self is MediaContentType.APPLICATION_PDF:
122            return application_pdf()
123        if self is MediaContentType.APPLICATION_MSWORD:
124            return application_msword()
125        if self is MediaContentType.APPLICATION_MS_EXCEL:
126            return application_ms_excel()
127        if self is MediaContentType.APPLICATION_ZIP:
128            return application_zip()
129        if self is MediaContentType.APPLICATION_JSON:
130            return application_json()
131        if self is MediaContentType.APPLICATION_XML:
132            return application_xml()
133        if self is MediaContentType.APPLICATION_OCTET_STREAM:
134            return application_octet_stream()
class MembershipRequest(pydantic.v1.main.BaseModel):
12class MembershipRequest(pydantic_v1.BaseModel):
13    user_id: str = pydantic_v1.Field(alias="userId")
14    role: MembershipRole
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
user_id: str
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class MembershipRequest.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class MembershipResponse(pydantic.v1.main.BaseModel):
12class MembershipResponse(pydantic_v1.BaseModel):
13    user_id: str = pydantic_v1.Field(alias="userId")
14    role: MembershipRole
15    email: str
16    name: str
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
user_id: str
email: str
name: str
def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class MembershipResponse.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class MembershipRole(builtins.str, enum.Enum):
10class MembershipRole(str, enum.Enum):
11    OWNER = "OWNER"
12    ADMIN = "ADMIN"
13    MEMBER = "MEMBER"
14    VIEWER = "VIEWER"
15
16    def visit(
17        self,
18        owner: typing.Callable[[], T_Result],
19        admin: typing.Callable[[], T_Result],
20        member: typing.Callable[[], T_Result],
21        viewer: typing.Callable[[], T_Result],
22    ) -> T_Result:
23        if self is MembershipRole.OWNER:
24            return owner()
25        if self is MembershipRole.ADMIN:
26            return admin()
27        if self is MembershipRole.MEMBER:
28            return member()
29        if self is MembershipRole.VIEWER:
30            return viewer()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

OWNER = <MembershipRole.OWNER: 'OWNER'>
ADMIN = <MembershipRole.ADMIN: 'ADMIN'>
MEMBER = <MembershipRole.MEMBER: 'MEMBER'>
VIEWER = <MembershipRole.VIEWER: 'VIEWER'>
def visit( self, owner: Callable[[], ~T_Result], admin: Callable[[], ~T_Result], member: Callable[[], ~T_Result], viewer: Callable[[], ~T_Result]) -> ~T_Result:
16    def visit(
17        self,
18        owner: typing.Callable[[], T_Result],
19        admin: typing.Callable[[], T_Result],
20        member: typing.Callable[[], T_Result],
21        viewer: typing.Callable[[], T_Result],
22    ) -> T_Result:
23        if self is MembershipRole.OWNER:
24            return owner()
25        if self is MembershipRole.ADMIN:
26            return admin()
27        if self is MembershipRole.MEMBER:
28            return member()
29        if self is MembershipRole.VIEWER:
30            return viewer()
class MembershipsResponse(pydantic.v1.main.BaseModel):
12class MembershipsResponse(pydantic_v1.BaseModel):
13    memberships: typing.List[MembershipResponse]
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
memberships: List[MembershipResponse]
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class MembershipsResponse.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class MethodNotAllowedError(langfuse.api.core.api_error.ApiError):
 9class MethodNotAllowedError(ApiError):
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=405, body=body)

Common base class for all non-exit exceptions.

MethodNotAllowedError(body: Any)
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=405, body=body)
class MetricsResponse(pydantic.v1.main.BaseModel):
11class MetricsResponse(pydantic_v1.BaseModel):
12    data: typing.List[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
13    """
14    The metrics data. Each item in the list contains the metric values and dimensions requested in the query.
15    Format varies based on the query parameters.
16    Histograms will return an array with [lower, upper, height] tuples.
17    """
18
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)
26
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )
43
44    class Config:
45        frozen = True
46        smart_union = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
data: List[Dict[str, Any]]

The metrics data. Each item in the list contains the metric values and dimensions requested in the query. Format varies based on the query parameters. Histograms will return an array with [lower, upper, height] tuples.

def json(self, **kwargs: Any) -> str:
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class MetricsResponse.Config:
44    class Config:
45        frozen = True
46        smart_union = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Model(pydantic.v1.main.BaseModel):
 13class Model(pydantic_v1.BaseModel):
 14    """
 15    Model definition used for transforming usage into USD cost and/or tokenization.
 16    """
 17
 18    id: str
 19    model_name: str = pydantic_v1.Field(alias="modelName")
 20    """
 21    Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime<observation.startTime
 22    """
 23
 24    match_pattern: str = pydantic_v1.Field(alias="matchPattern")
 25    """
 26    Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use `(?i)^modelname$`
 27    """
 28
 29    start_date: typing.Optional[dt.datetime] = pydantic_v1.Field(
 30        alias="startDate", default=None
 31    )
 32    """
 33    Apply only to generations which are newer than this ISO date.
 34    """
 35
 36    unit: typing.Optional[ModelUsageUnit] = pydantic_v1.Field(default=None)
 37    """
 38    Unit used by this model.
 39    """
 40
 41    input_price: typing.Optional[float] = pydantic_v1.Field(
 42        alias="inputPrice", default=None
 43    )
 44    """
 45    Deprecated. See 'prices' instead. Price (USD) per input unit
 46    """
 47
 48    output_price: typing.Optional[float] = pydantic_v1.Field(
 49        alias="outputPrice", default=None
 50    )
 51    """
 52    Deprecated. See 'prices' instead. Price (USD) per output unit
 53    """
 54
 55    total_price: typing.Optional[float] = pydantic_v1.Field(
 56        alias="totalPrice", default=None
 57    )
 58    """
 59    Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.
 60    """
 61
 62    tokenizer_id: typing.Optional[str] = pydantic_v1.Field(
 63        alias="tokenizerId", default=None
 64    )
 65    """
 66    Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
 67    """
 68
 69    tokenizer_config: typing.Optional[typing.Any] = pydantic_v1.Field(
 70        alias="tokenizerConfig", default=None
 71    )
 72    """
 73    Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.
 74    """
 75
 76    is_langfuse_managed: bool = pydantic_v1.Field(alias="isLangfuseManaged")
 77    prices: typing.Dict[str, ModelPrice] = pydantic_v1.Field()
 78    """
 79    Price (USD) by usage type
 80    """
 81
 82    def json(self, **kwargs: typing.Any) -> str:
 83        kwargs_with_defaults: typing.Any = {
 84            "by_alias": True,
 85            "exclude_unset": True,
 86            **kwargs,
 87        }
 88        return super().json(**kwargs_with_defaults)
 89
 90    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 91        kwargs_with_defaults_exclude_unset: typing.Any = {
 92            "by_alias": True,
 93            "exclude_unset": True,
 94            **kwargs,
 95        }
 96        kwargs_with_defaults_exclude_none: typing.Any = {
 97            "by_alias": True,
 98            "exclude_none": True,
 99            **kwargs,
100        }
101
102        return deep_union_pydantic_dicts(
103            super().dict(**kwargs_with_defaults_exclude_unset),
104            super().dict(**kwargs_with_defaults_exclude_none),
105        )
106
107    class Config:
108        frozen = True
109        smart_union = True
110        allow_population_by_field_name = True
111        populate_by_name = True
112        extra = pydantic_v1.Extra.allow
113        json_encoders = {dt.datetime: serialize_datetime}

Model definition used for transforming usage into USD cost and/or tokenization.

id: str
model_name: str

Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime

match_pattern: str

Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use (?i)^modelname$

start_date: Optional[datetime.datetime]

Apply only to generations which are newer than this ISO date.

unit: Optional[ModelUsageUnit]

Unit used by this model.

input_price: Optional[float]

Deprecated. See 'prices' instead. Price (USD) per input unit

output_price: Optional[float]

Deprecated. See 'prices' instead. Price (USD) per output unit

total_price: Optional[float]

Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.

tokenizer_id: Optional[str]

Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.

tokenizer_config: Optional[Any]

Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.

is_langfuse_managed: bool
prices: Dict[str, ModelPrice]

Price (USD) by usage type

def json(self, **kwargs: Any) -> str:
82    def json(self, **kwargs: typing.Any) -> str:
83        kwargs_with_defaults: typing.Any = {
84            "by_alias": True,
85            "exclude_unset": True,
86            **kwargs,
87        }
88        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
 90    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 91        kwargs_with_defaults_exclude_unset: typing.Any = {
 92            "by_alias": True,
 93            "exclude_unset": True,
 94            **kwargs,
 95        }
 96        kwargs_with_defaults_exclude_none: typing.Any = {
 97            "by_alias": True,
 98            "exclude_none": True,
 99            **kwargs,
100        }
101
102        return deep_union_pydantic_dicts(
103            super().dict(**kwargs_with_defaults_exclude_unset),
104            super().dict(**kwargs_with_defaults_exclude_none),
105        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Model.Config:
107    class Config:
108        frozen = True
109        smart_union = True
110        allow_population_by_field_name = True
111        populate_by_name = True
112        extra = pydantic_v1.Extra.allow
113        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ModelPrice(pydantic.v1.main.BaseModel):
11class ModelPrice(pydantic_v1.BaseModel):
12    price: float
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
price: float
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ModelPrice.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ModelUsageUnit(builtins.str, enum.Enum):
10class ModelUsageUnit(str, enum.Enum):
11    """
12    Unit of usage in Langfuse
13    """
14
15    CHARACTERS = "CHARACTERS"
16    TOKENS = "TOKENS"
17    MILLISECONDS = "MILLISECONDS"
18    SECONDS = "SECONDS"
19    IMAGES = "IMAGES"
20    REQUESTS = "REQUESTS"
21
22    def visit(
23        self,
24        characters: typing.Callable[[], T_Result],
25        tokens: typing.Callable[[], T_Result],
26        milliseconds: typing.Callable[[], T_Result],
27        seconds: typing.Callable[[], T_Result],
28        images: typing.Callable[[], T_Result],
29        requests: typing.Callable[[], T_Result],
30    ) -> T_Result:
31        if self is ModelUsageUnit.CHARACTERS:
32            return characters()
33        if self is ModelUsageUnit.TOKENS:
34            return tokens()
35        if self is ModelUsageUnit.MILLISECONDS:
36            return milliseconds()
37        if self is ModelUsageUnit.SECONDS:
38            return seconds()
39        if self is ModelUsageUnit.IMAGES:
40            return images()
41        if self is ModelUsageUnit.REQUESTS:
42            return requests()

Unit of usage in Langfuse

CHARACTERS = <ModelUsageUnit.CHARACTERS: 'CHARACTERS'>
TOKENS = <ModelUsageUnit.TOKENS: 'TOKENS'>
MILLISECONDS = <ModelUsageUnit.MILLISECONDS: 'MILLISECONDS'>
SECONDS = <ModelUsageUnit.SECONDS: 'SECONDS'>
IMAGES = <ModelUsageUnit.IMAGES: 'IMAGES'>
REQUESTS = <ModelUsageUnit.REQUESTS: 'REQUESTS'>
def visit( self, characters: Callable[[], ~T_Result], tokens: Callable[[], ~T_Result], milliseconds: Callable[[], ~T_Result], seconds: Callable[[], ~T_Result], images: Callable[[], ~T_Result], requests: Callable[[], ~T_Result]) -> ~T_Result:
22    def visit(
23        self,
24        characters: typing.Callable[[], T_Result],
25        tokens: typing.Callable[[], T_Result],
26        milliseconds: typing.Callable[[], T_Result],
27        seconds: typing.Callable[[], T_Result],
28        images: typing.Callable[[], T_Result],
29        requests: typing.Callable[[], T_Result],
30    ) -> T_Result:
31        if self is ModelUsageUnit.CHARACTERS:
32            return characters()
33        if self is ModelUsageUnit.TOKENS:
34            return tokens()
35        if self is ModelUsageUnit.MILLISECONDS:
36            return milliseconds()
37        if self is ModelUsageUnit.SECONDS:
38            return seconds()
39        if self is ModelUsageUnit.IMAGES:
40            return images()
41        if self is ModelUsageUnit.REQUESTS:
42            return requests()
class NotFoundError(langfuse.api.core.api_error.ApiError):
 9class NotFoundError(ApiError):
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=404, body=body)

Common base class for all non-exit exceptions.

NotFoundError(body: Any)
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=404, body=body)
class NumericScore(langfuse.api.BaseScore):
12class NumericScore(BaseScore):
13    value: float = pydantic_v1.Field()
14    """
15    The numeric value of the score
16    """
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
value: float

The numeric value of the score

def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class NumericScore.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class NumericScoreV1(langfuse.api.BaseScoreV1):
12class NumericScoreV1(BaseScoreV1):
13    value: float = pydantic_v1.Field()
14    """
15    The numeric value of the score
16    """
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
value: float

The numeric value of the score

def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class NumericScoreV1.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Observation(pydantic.v1.main.BaseModel):
 14class Observation(pydantic_v1.BaseModel):
 15    id: str = pydantic_v1.Field()
 16    """
 17    The unique identifier of the observation
 18    """
 19
 20    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
 21    """
 22    The trace ID associated with the observation
 23    """
 24
 25    type: str = pydantic_v1.Field()
 26    """
 27    The type of the observation
 28    """
 29
 30    name: typing.Optional[str] = pydantic_v1.Field(default=None)
 31    """
 32    The name of the observation
 33    """
 34
 35    start_time: dt.datetime = pydantic_v1.Field(alias="startTime")
 36    """
 37    The start time of the observation
 38    """
 39
 40    end_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
 41        alias="endTime", default=None
 42    )
 43    """
 44    The end time of the observation.
 45    """
 46
 47    completion_start_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
 48        alias="completionStartTime", default=None
 49    )
 50    """
 51    The completion start time of the observation
 52    """
 53
 54    model: typing.Optional[str] = pydantic_v1.Field(default=None)
 55    """
 56    The model used for the observation
 57    """
 58
 59    model_parameters: typing.Optional[typing.Dict[str, MapValue]] = pydantic_v1.Field(
 60        alias="modelParameters", default=None
 61    )
 62    """
 63    The parameters of the model used for the observation
 64    """
 65
 66    input: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
 67    """
 68    The input data of the observation
 69    """
 70
 71    version: typing.Optional[str] = pydantic_v1.Field(default=None)
 72    """
 73    The version of the observation
 74    """
 75
 76    metadata: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
 77    """
 78    Additional metadata of the observation
 79    """
 80
 81    output: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
 82    """
 83    The output data of the observation
 84    """
 85
 86    usage: typing.Optional[Usage] = pydantic_v1.Field(default=None)
 87    """
 88    (Deprecated. Use usageDetails and costDetails instead.) The usage data of the observation
 89    """
 90
 91    level: ObservationLevel = pydantic_v1.Field()
 92    """
 93    The level of the observation
 94    """
 95
 96    status_message: typing.Optional[str] = pydantic_v1.Field(
 97        alias="statusMessage", default=None
 98    )
 99    """
100    The status message of the observation
101    """
102
103    parent_observation_id: typing.Optional[str] = pydantic_v1.Field(
104        alias="parentObservationId", default=None
105    )
106    """
107    The parent observation ID
108    """
109
110    prompt_id: typing.Optional[str] = pydantic_v1.Field(alias="promptId", default=None)
111    """
112    The prompt ID associated with the observation
113    """
114
115    usage_details: typing.Optional[typing.Dict[str, int]] = pydantic_v1.Field(
116        alias="usageDetails", default=None
117    )
118    """
119    The usage details of the observation. Key is the name of the usage metric, value is the number of units consumed. The total key is the sum of all (non-total) usage metrics or the total value ingested.
120    """
121
122    cost_details: typing.Optional[typing.Dict[str, float]] = pydantic_v1.Field(
123        alias="costDetails", default=None
124    )
125    """
126    The cost details of the observation. Key is the name of the cost metric, value is the cost in USD. The total key is the sum of all (non-total) cost metrics or the total value ingested.
127    """
128
129    environment: typing.Optional[str] = pydantic_v1.Field(default=None)
130    """
131    The environment from which this observation originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.
132    """
133
134    def json(self, **kwargs: typing.Any) -> str:
135        kwargs_with_defaults: typing.Any = {
136            "by_alias": True,
137            "exclude_unset": True,
138            **kwargs,
139        }
140        return super().json(**kwargs_with_defaults)
141
142    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
143        kwargs_with_defaults_exclude_unset: typing.Any = {
144            "by_alias": True,
145            "exclude_unset": True,
146            **kwargs,
147        }
148        kwargs_with_defaults_exclude_none: typing.Any = {
149            "by_alias": True,
150            "exclude_none": True,
151            **kwargs,
152        }
153
154        return deep_union_pydantic_dicts(
155            super().dict(**kwargs_with_defaults_exclude_unset),
156            super().dict(**kwargs_with_defaults_exclude_none),
157        )
158
159    class Config:
160        frozen = True
161        smart_union = True
162        allow_population_by_field_name = True
163        populate_by_name = True
164        extra = pydantic_v1.Extra.allow
165        json_encoders = {dt.datetime: serialize_datetime}
id: str

The unique identifier of the observation

trace_id: Optional[str]

The trace ID associated with the observation

type: str

The type of the observation

name: Optional[str]

The name of the observation

start_time: datetime.datetime

The start time of the observation

end_time: Optional[datetime.datetime]

The end time of the observation.

completion_start_time: Optional[datetime.datetime]

The completion start time of the observation

model: Optional[str]

The model used for the observation

model_parameters: Optional[Dict[str, Union[str, NoneType, int, bool, List[str]]]]

The parameters of the model used for the observation

input: Optional[Any]

The input data of the observation

version: Optional[str]

The version of the observation

metadata: Optional[Any]

Additional metadata of the observation

output: Optional[Any]

The output data of the observation

usage: Optional[Usage]

(Deprecated. Use usageDetails and costDetails instead.) The usage data of the observation

The level of the observation

status_message: Optional[str]

The status message of the observation

parent_observation_id: Optional[str]

The parent observation ID

prompt_id: Optional[str]

The prompt ID associated with the observation

usage_details: Optional[Dict[str, int]]

The usage details of the observation. Key is the name of the usage metric, value is the number of units consumed. The total key is the sum of all (non-total) usage metrics or the total value ingested.

cost_details: Optional[Dict[str, float]]

The cost details of the observation. Key is the name of the cost metric, value is the cost in USD. The total key is the sum of all (non-total) cost metrics or the total value ingested.

environment: Optional[str]

The environment from which this observation originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.

def json(self, **kwargs: Any) -> str:
134    def json(self, **kwargs: typing.Any) -> str:
135        kwargs_with_defaults: typing.Any = {
136            "by_alias": True,
137            "exclude_unset": True,
138            **kwargs,
139        }
140        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
142    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
143        kwargs_with_defaults_exclude_unset: typing.Any = {
144            "by_alias": True,
145            "exclude_unset": True,
146            **kwargs,
147        }
148        kwargs_with_defaults_exclude_none: typing.Any = {
149            "by_alias": True,
150            "exclude_none": True,
151            **kwargs,
152        }
153
154        return deep_union_pydantic_dicts(
155            super().dict(**kwargs_with_defaults_exclude_unset),
156            super().dict(**kwargs_with_defaults_exclude_none),
157        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Observation.Config:
159    class Config:
160        frozen = True
161        smart_union = True
162        allow_population_by_field_name = True
163        populate_by_name = True
164        extra = pydantic_v1.Extra.allow
165        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ObservationBody(pydantic.v1.main.BaseModel):
15class ObservationBody(pydantic_v1.BaseModel):
16    id: typing.Optional[str] = None
17    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
18    type: ObservationType
19    name: typing.Optional[str] = None
20    start_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
21        alias="startTime", default=None
22    )
23    end_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
24        alias="endTime", default=None
25    )
26    completion_start_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
27        alias="completionStartTime", default=None
28    )
29    model: typing.Optional[str] = None
30    model_parameters: typing.Optional[typing.Dict[str, MapValue]] = pydantic_v1.Field(
31        alias="modelParameters", default=None
32    )
33    input: typing.Optional[typing.Any] = None
34    version: typing.Optional[str] = None
35    metadata: typing.Optional[typing.Any] = None
36    output: typing.Optional[typing.Any] = None
37    usage: typing.Optional[Usage] = None
38    level: typing.Optional[ObservationLevel] = None
39    status_message: typing.Optional[str] = pydantic_v1.Field(
40        alias="statusMessage", default=None
41    )
42    parent_observation_id: typing.Optional[str] = pydantic_v1.Field(
43        alias="parentObservationId", default=None
44    )
45    environment: typing.Optional[str] = None
46
47    def json(self, **kwargs: typing.Any) -> str:
48        kwargs_with_defaults: typing.Any = {
49            "by_alias": True,
50            "exclude_unset": True,
51            **kwargs,
52        }
53        return super().json(**kwargs_with_defaults)
54
55    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
56        kwargs_with_defaults_exclude_unset: typing.Any = {
57            "by_alias": True,
58            "exclude_unset": True,
59            **kwargs,
60        }
61        kwargs_with_defaults_exclude_none: typing.Any = {
62            "by_alias": True,
63            "exclude_none": True,
64            **kwargs,
65        }
66
67        return deep_union_pydantic_dicts(
68            super().dict(**kwargs_with_defaults_exclude_unset),
69            super().dict(**kwargs_with_defaults_exclude_none),
70        )
71
72    class Config:
73        frozen = True
74        smart_union = True
75        allow_population_by_field_name = True
76        populate_by_name = True
77        extra = pydantic_v1.Extra.allow
78        json_encoders = {dt.datetime: serialize_datetime}
id: Optional[str]
trace_id: Optional[str]
name: Optional[str]
start_time: Optional[datetime.datetime]
end_time: Optional[datetime.datetime]
completion_start_time: Optional[datetime.datetime]
model: Optional[str]
model_parameters: Optional[Dict[str, Union[str, NoneType, int, bool, List[str]]]]
input: Optional[Any]
version: Optional[str]
metadata: Optional[Any]
output: Optional[Any]
usage: Optional[Usage]
level: Optional[ObservationLevel]
status_message: Optional[str]
parent_observation_id: Optional[str]
environment: Optional[str]
def json(self, **kwargs: Any) -> str:
47    def json(self, **kwargs: typing.Any) -> str:
48        kwargs_with_defaults: typing.Any = {
49            "by_alias": True,
50            "exclude_unset": True,
51            **kwargs,
52        }
53        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
55    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
56        kwargs_with_defaults_exclude_unset: typing.Any = {
57            "by_alias": True,
58            "exclude_unset": True,
59            **kwargs,
60        }
61        kwargs_with_defaults_exclude_none: typing.Any = {
62            "by_alias": True,
63            "exclude_none": True,
64            **kwargs,
65        }
66
67        return deep_union_pydantic_dicts(
68            super().dict(**kwargs_with_defaults_exclude_unset),
69            super().dict(**kwargs_with_defaults_exclude_none),
70        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ObservationBody.Config:
72    class Config:
73        frozen = True
74        smart_union = True
75        allow_population_by_field_name = True
76        populate_by_name = True
77        extra = pydantic_v1.Extra.allow
78        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ObservationLevel(builtins.str, enum.Enum):
10class ObservationLevel(str, enum.Enum):
11    DEBUG = "DEBUG"
12    DEFAULT = "DEFAULT"
13    WARNING = "WARNING"
14    ERROR = "ERROR"
15
16    def visit(
17        self,
18        debug: typing.Callable[[], T_Result],
19        default: typing.Callable[[], T_Result],
20        warning: typing.Callable[[], T_Result],
21        error: typing.Callable[[], T_Result],
22    ) -> T_Result:
23        if self is ObservationLevel.DEBUG:
24            return debug()
25        if self is ObservationLevel.DEFAULT:
26            return default()
27        if self is ObservationLevel.WARNING:
28            return warning()
29        if self is ObservationLevel.ERROR:
30            return error()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

DEBUG = <ObservationLevel.DEBUG: 'DEBUG'>
DEFAULT = <ObservationLevel.DEFAULT: 'DEFAULT'>
WARNING = <ObservationLevel.WARNING: 'WARNING'>
ERROR = <ObservationLevel.ERROR: 'ERROR'>
def visit( self, debug: Callable[[], ~T_Result], default: Callable[[], ~T_Result], warning: Callable[[], ~T_Result], error: Callable[[], ~T_Result]) -> ~T_Result:
16    def visit(
17        self,
18        debug: typing.Callable[[], T_Result],
19        default: typing.Callable[[], T_Result],
20        warning: typing.Callable[[], T_Result],
21        error: typing.Callable[[], T_Result],
22    ) -> T_Result:
23        if self is ObservationLevel.DEBUG:
24            return debug()
25        if self is ObservationLevel.DEFAULT:
26            return default()
27        if self is ObservationLevel.WARNING:
28            return warning()
29        if self is ObservationLevel.ERROR:
30            return error()
class ObservationType(builtins.str, enum.Enum):
10class ObservationType(str, enum.Enum):
11    SPAN = "SPAN"
12    GENERATION = "GENERATION"
13    EVENT = "EVENT"
14    AGENT = "AGENT"
15    TOOL = "TOOL"
16    CHAIN = "CHAIN"
17    RETRIEVER = "RETRIEVER"
18    EVALUATOR = "EVALUATOR"
19    EMBEDDING = "EMBEDDING"
20    GUARDRAIL = "GUARDRAIL"
21
22    def visit(
23        self,
24        span: typing.Callable[[], T_Result],
25        generation: typing.Callable[[], T_Result],
26        event: typing.Callable[[], T_Result],
27        agent: typing.Callable[[], T_Result],
28        tool: typing.Callable[[], T_Result],
29        chain: typing.Callable[[], T_Result],
30        retriever: typing.Callable[[], T_Result],
31        evaluator: typing.Callable[[], T_Result],
32        embedding: typing.Callable[[], T_Result],
33        guardrail: typing.Callable[[], T_Result],
34    ) -> T_Result:
35        if self is ObservationType.SPAN:
36            return span()
37        if self is ObservationType.GENERATION:
38            return generation()
39        if self is ObservationType.EVENT:
40            return event()
41        if self is ObservationType.AGENT:
42            return agent()
43        if self is ObservationType.TOOL:
44            return tool()
45        if self is ObservationType.CHAIN:
46            return chain()
47        if self is ObservationType.RETRIEVER:
48            return retriever()
49        if self is ObservationType.EVALUATOR:
50            return evaluator()
51        if self is ObservationType.EMBEDDING:
52            return embedding()
53        if self is ObservationType.GUARDRAIL:
54            return guardrail()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

SPAN = <ObservationType.SPAN: 'SPAN'>
GENERATION = <ObservationType.GENERATION: 'GENERATION'>
EVENT = <ObservationType.EVENT: 'EVENT'>
AGENT = <ObservationType.AGENT: 'AGENT'>
TOOL = <ObservationType.TOOL: 'TOOL'>
CHAIN = <ObservationType.CHAIN: 'CHAIN'>
RETRIEVER = <ObservationType.RETRIEVER: 'RETRIEVER'>
EVALUATOR = <ObservationType.EVALUATOR: 'EVALUATOR'>
EMBEDDING = <ObservationType.EMBEDDING: 'EMBEDDING'>
GUARDRAIL = <ObservationType.GUARDRAIL: 'GUARDRAIL'>
def visit( self, span: Callable[[], ~T_Result], generation: Callable[[], ~T_Result], event: Callable[[], ~T_Result], agent: Callable[[], ~T_Result], tool: Callable[[], ~T_Result], chain: Callable[[], ~T_Result], retriever: Callable[[], ~T_Result], evaluator: Callable[[], ~T_Result], embedding: Callable[[], ~T_Result], guardrail: Callable[[], ~T_Result]) -> ~T_Result:
22    def visit(
23        self,
24        span: typing.Callable[[], T_Result],
25        generation: typing.Callable[[], T_Result],
26        event: typing.Callable[[], T_Result],
27        agent: typing.Callable[[], T_Result],
28        tool: typing.Callable[[], T_Result],
29        chain: typing.Callable[[], T_Result],
30        retriever: typing.Callable[[], T_Result],
31        evaluator: typing.Callable[[], T_Result],
32        embedding: typing.Callable[[], T_Result],
33        guardrail: typing.Callable[[], T_Result],
34    ) -> T_Result:
35        if self is ObservationType.SPAN:
36            return span()
37        if self is ObservationType.GENERATION:
38            return generation()
39        if self is ObservationType.EVENT:
40            return event()
41        if self is ObservationType.AGENT:
42            return agent()
43        if self is ObservationType.TOOL:
44            return tool()
45        if self is ObservationType.CHAIN:
46            return chain()
47        if self is ObservationType.RETRIEVER:
48            return retriever()
49        if self is ObservationType.EVALUATOR:
50            return evaluator()
51        if self is ObservationType.EMBEDDING:
52            return embedding()
53        if self is ObservationType.GUARDRAIL:
54            return guardrail()
class Observations(pydantic.v1.main.BaseModel):
13class Observations(pydantic_v1.BaseModel):
14    data: typing.List[Observation]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[Observation]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Observations.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ObservationsView(langfuse.api.Observation):
 12class ObservationsView(Observation):
 13    prompt_name: typing.Optional[str] = pydantic_v1.Field(
 14        alias="promptName", default=None
 15    )
 16    """
 17    The name of the prompt associated with the observation
 18    """
 19
 20    prompt_version: typing.Optional[int] = pydantic_v1.Field(
 21        alias="promptVersion", default=None
 22    )
 23    """
 24    The version of the prompt associated with the observation
 25    """
 26
 27    model_id: typing.Optional[str] = pydantic_v1.Field(alias="modelId", default=None)
 28    """
 29    The unique identifier of the model
 30    """
 31
 32    input_price: typing.Optional[float] = pydantic_v1.Field(
 33        alias="inputPrice", default=None
 34    )
 35    """
 36    The price of the input in USD
 37    """
 38
 39    output_price: typing.Optional[float] = pydantic_v1.Field(
 40        alias="outputPrice", default=None
 41    )
 42    """
 43    The price of the output in USD.
 44    """
 45
 46    total_price: typing.Optional[float] = pydantic_v1.Field(
 47        alias="totalPrice", default=None
 48    )
 49    """
 50    The total price in USD.
 51    """
 52
 53    calculated_input_cost: typing.Optional[float] = pydantic_v1.Field(
 54        alias="calculatedInputCost", default=None
 55    )
 56    """
 57    (Deprecated. Use usageDetails and costDetails instead.) The calculated cost of the input in USD
 58    """
 59
 60    calculated_output_cost: typing.Optional[float] = pydantic_v1.Field(
 61        alias="calculatedOutputCost", default=None
 62    )
 63    """
 64    (Deprecated. Use usageDetails and costDetails instead.) The calculated cost of the output in USD
 65    """
 66
 67    calculated_total_cost: typing.Optional[float] = pydantic_v1.Field(
 68        alias="calculatedTotalCost", default=None
 69    )
 70    """
 71    (Deprecated. Use usageDetails and costDetails instead.) The calculated total cost in USD
 72    """
 73
 74    latency: typing.Optional[float] = pydantic_v1.Field(default=None)
 75    """
 76    The latency in seconds.
 77    """
 78
 79    time_to_first_token: typing.Optional[float] = pydantic_v1.Field(
 80        alias="timeToFirstToken", default=None
 81    )
 82    """
 83    The time to the first token in seconds
 84    """
 85
 86    def json(self, **kwargs: typing.Any) -> str:
 87        kwargs_with_defaults: typing.Any = {
 88            "by_alias": True,
 89            "exclude_unset": True,
 90            **kwargs,
 91        }
 92        return super().json(**kwargs_with_defaults)
 93
 94    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 95        kwargs_with_defaults_exclude_unset: typing.Any = {
 96            "by_alias": True,
 97            "exclude_unset": True,
 98            **kwargs,
 99        }
100        kwargs_with_defaults_exclude_none: typing.Any = {
101            "by_alias": True,
102            "exclude_none": True,
103            **kwargs,
104        }
105
106        return deep_union_pydantic_dicts(
107            super().dict(**kwargs_with_defaults_exclude_unset),
108            super().dict(**kwargs_with_defaults_exclude_none),
109        )
110
111    class Config:
112        frozen = True
113        smart_union = True
114        allow_population_by_field_name = True
115        populate_by_name = True
116        extra = pydantic_v1.Extra.allow
117        json_encoders = {dt.datetime: serialize_datetime}
prompt_name: Optional[str]

The name of the prompt associated with the observation

prompt_version: Optional[int]

The version of the prompt associated with the observation

model_id: Optional[str]

The unique identifier of the model

input_price: Optional[float]

The price of the input in USD

output_price: Optional[float]

The price of the output in USD.

total_price: Optional[float]

The total price in USD.

calculated_input_cost: Optional[float]

(Deprecated. Use usageDetails and costDetails instead.) The calculated cost of the input in USD

calculated_output_cost: Optional[float]

(Deprecated. Use usageDetails and costDetails instead.) The calculated cost of the output in USD

calculated_total_cost: Optional[float]

(Deprecated. Use usageDetails and costDetails instead.) The calculated total cost in USD

latency: Optional[float]

The latency in seconds.

time_to_first_token: Optional[float]

The time to the first token in seconds

def json(self, **kwargs: Any) -> str:
86    def json(self, **kwargs: typing.Any) -> str:
87        kwargs_with_defaults: typing.Any = {
88            "by_alias": True,
89            "exclude_unset": True,
90            **kwargs,
91        }
92        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
 94    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 95        kwargs_with_defaults_exclude_unset: typing.Any = {
 96            "by_alias": True,
 97            "exclude_unset": True,
 98            **kwargs,
 99        }
100        kwargs_with_defaults_exclude_none: typing.Any = {
101            "by_alias": True,
102            "exclude_none": True,
103            **kwargs,
104        }
105
106        return deep_union_pydantic_dicts(
107            super().dict(**kwargs_with_defaults_exclude_unset),
108            super().dict(**kwargs_with_defaults_exclude_none),
109        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ObservationsView.Config:
111    class Config:
112        frozen = True
113        smart_union = True
114        allow_population_by_field_name = True
115        populate_by_name = True
116        extra = pydantic_v1.Extra.allow
117        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ObservationsViews(pydantic.v1.main.BaseModel):
13class ObservationsViews(pydantic_v1.BaseModel):
14    data: typing.List[ObservationsView]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[ObservationsView]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ObservationsViews.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class OpenAiCompletionUsageSchema(pydantic.v1.main.BaseModel):
11class OpenAiCompletionUsageSchema(pydantic_v1.BaseModel):
12    """
13    OpenAI Usage schema from (Chat-)Completion APIs
14    """
15
16    prompt_tokens: int
17    completion_tokens: int
18    total_tokens: int
19    prompt_tokens_details: typing.Optional[typing.Dict[str, typing.Optional[int]]] = (
20        None
21    )
22    completion_tokens_details: typing.Optional[
23        typing.Dict[str, typing.Optional[int]]
24    ] = None
25
26    def json(self, **kwargs: typing.Any) -> str:
27        kwargs_with_defaults: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        return super().json(**kwargs_with_defaults)
33
34    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
35        kwargs_with_defaults_exclude_unset: typing.Any = {
36            "by_alias": True,
37            "exclude_unset": True,
38            **kwargs,
39        }
40        kwargs_with_defaults_exclude_none: typing.Any = {
41            "by_alias": True,
42            "exclude_none": True,
43            **kwargs,
44        }
45
46        return deep_union_pydantic_dicts(
47            super().dict(**kwargs_with_defaults_exclude_unset),
48            super().dict(**kwargs_with_defaults_exclude_none),
49        )
50
51    class Config:
52        frozen = True
53        smart_union = True
54        extra = pydantic_v1.Extra.allow
55        json_encoders = {dt.datetime: serialize_datetime}

OpenAI Usage schema from (Chat-)Completion APIs

prompt_tokens: int
completion_tokens: int
total_tokens: int
prompt_tokens_details: Optional[Dict[str, Optional[int]]]
completion_tokens_details: Optional[Dict[str, Optional[int]]]
def json(self, **kwargs: Any) -> str:
26    def json(self, **kwargs: typing.Any) -> str:
27        kwargs_with_defaults: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
34    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
35        kwargs_with_defaults_exclude_unset: typing.Any = {
36            "by_alias": True,
37            "exclude_unset": True,
38            **kwargs,
39        }
40        kwargs_with_defaults_exclude_none: typing.Any = {
41            "by_alias": True,
42            "exclude_none": True,
43            **kwargs,
44        }
45
46        return deep_union_pydantic_dicts(
47            super().dict(**kwargs_with_defaults_exclude_unset),
48            super().dict(**kwargs_with_defaults_exclude_none),
49        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class OpenAiCompletionUsageSchema.Config:
51    class Config:
52        frozen = True
53        smart_union = True
54        extra = pydantic_v1.Extra.allow
55        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class OpenAiResponseUsageSchema(pydantic.v1.main.BaseModel):
11class OpenAiResponseUsageSchema(pydantic_v1.BaseModel):
12    """
13    OpenAI Usage schema from Response API
14    """
15
16    input_tokens: int
17    output_tokens: int
18    total_tokens: int
19    input_tokens_details: typing.Optional[typing.Dict[str, typing.Optional[int]]] = None
20    output_tokens_details: typing.Optional[typing.Dict[str, typing.Optional[int]]] = (
21        None
22    )
23
24    def json(self, **kwargs: typing.Any) -> str:
25        kwargs_with_defaults: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        return super().json(**kwargs_with_defaults)
31
32    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
33        kwargs_with_defaults_exclude_unset: typing.Any = {
34            "by_alias": True,
35            "exclude_unset": True,
36            **kwargs,
37        }
38        kwargs_with_defaults_exclude_none: typing.Any = {
39            "by_alias": True,
40            "exclude_none": True,
41            **kwargs,
42        }
43
44        return deep_union_pydantic_dicts(
45            super().dict(**kwargs_with_defaults_exclude_unset),
46            super().dict(**kwargs_with_defaults_exclude_none),
47        )
48
49    class Config:
50        frozen = True
51        smart_union = True
52        extra = pydantic_v1.Extra.allow
53        json_encoders = {dt.datetime: serialize_datetime}

OpenAI Usage schema from Response API

input_tokens: int
output_tokens: int
total_tokens: int
input_tokens_details: Optional[Dict[str, Optional[int]]]
output_tokens_details: Optional[Dict[str, Optional[int]]]
def json(self, **kwargs: Any) -> str:
24    def json(self, **kwargs: typing.Any) -> str:
25        kwargs_with_defaults: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
32    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
33        kwargs_with_defaults_exclude_unset: typing.Any = {
34            "by_alias": True,
35            "exclude_unset": True,
36            **kwargs,
37        }
38        kwargs_with_defaults_exclude_none: typing.Any = {
39            "by_alias": True,
40            "exclude_none": True,
41            **kwargs,
42        }
43
44        return deep_union_pydantic_dicts(
45            super().dict(**kwargs_with_defaults_exclude_unset),
46            super().dict(**kwargs_with_defaults_exclude_none),
47        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class OpenAiResponseUsageSchema.Config:
49    class Config:
50        frozen = True
51        smart_union = True
52        extra = pydantic_v1.Extra.allow
53        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class OpenAiUsage(pydantic.v1.main.BaseModel):
11class OpenAiUsage(pydantic_v1.BaseModel):
12    """
13    Usage interface of OpenAI for improved compatibility.
14    """
15
16    prompt_tokens: typing.Optional[int] = pydantic_v1.Field(
17        alias="promptTokens", default=None
18    )
19    completion_tokens: typing.Optional[int] = pydantic_v1.Field(
20        alias="completionTokens", default=None
21    )
22    total_tokens: typing.Optional[int] = pydantic_v1.Field(
23        alias="totalTokens", default=None
24    )
25
26    def json(self, **kwargs: typing.Any) -> str:
27        kwargs_with_defaults: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        return super().json(**kwargs_with_defaults)
33
34    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
35        kwargs_with_defaults_exclude_unset: typing.Any = {
36            "by_alias": True,
37            "exclude_unset": True,
38            **kwargs,
39        }
40        kwargs_with_defaults_exclude_none: typing.Any = {
41            "by_alias": True,
42            "exclude_none": True,
43            **kwargs,
44        }
45
46        return deep_union_pydantic_dicts(
47            super().dict(**kwargs_with_defaults_exclude_unset),
48            super().dict(**kwargs_with_defaults_exclude_none),
49        )
50
51    class Config:
52        frozen = True
53        smart_union = True
54        allow_population_by_field_name = True
55        populate_by_name = True
56        extra = pydantic_v1.Extra.allow
57        json_encoders = {dt.datetime: serialize_datetime}

Usage interface of OpenAI for improved compatibility.

prompt_tokens: Optional[int]
completion_tokens: Optional[int]
total_tokens: Optional[int]
def json(self, **kwargs: Any) -> str:
26    def json(self, **kwargs: typing.Any) -> str:
27        kwargs_with_defaults: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
34    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
35        kwargs_with_defaults_exclude_unset: typing.Any = {
36            "by_alias": True,
37            "exclude_unset": True,
38            **kwargs,
39        }
40        kwargs_with_defaults_exclude_none: typing.Any = {
41            "by_alias": True,
42            "exclude_none": True,
43            **kwargs,
44        }
45
46        return deep_union_pydantic_dicts(
47            super().dict(**kwargs_with_defaults_exclude_unset),
48            super().dict(**kwargs_with_defaults_exclude_none),
49        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class OpenAiUsage.Config:
51    class Config:
52        frozen = True
53        smart_union = True
54        allow_population_by_field_name = True
55        populate_by_name = True
56        extra = pydantic_v1.Extra.allow
57        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class OptionalObservationBody(pydantic.v1.main.BaseModel):
12class OptionalObservationBody(pydantic_v1.BaseModel):
13    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
14    name: typing.Optional[str] = None
15    start_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
16        alias="startTime", default=None
17    )
18    metadata: typing.Optional[typing.Any] = None
19    input: typing.Optional[typing.Any] = None
20    output: typing.Optional[typing.Any] = None
21    level: typing.Optional[ObservationLevel] = None
22    status_message: typing.Optional[str] = pydantic_v1.Field(
23        alias="statusMessage", default=None
24    )
25    parent_observation_id: typing.Optional[str] = pydantic_v1.Field(
26        alias="parentObservationId", default=None
27    )
28    version: typing.Optional[str] = None
29    environment: typing.Optional[str] = None
30
31    def json(self, **kwargs: typing.Any) -> str:
32        kwargs_with_defaults: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        return super().json(**kwargs_with_defaults)
38
39    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
40        kwargs_with_defaults_exclude_unset: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        kwargs_with_defaults_exclude_none: typing.Any = {
46            "by_alias": True,
47            "exclude_none": True,
48            **kwargs,
49        }
50
51        return deep_union_pydantic_dicts(
52            super().dict(**kwargs_with_defaults_exclude_unset),
53            super().dict(**kwargs_with_defaults_exclude_none),
54        )
55
56    class Config:
57        frozen = True
58        smart_union = True
59        allow_population_by_field_name = True
60        populate_by_name = True
61        extra = pydantic_v1.Extra.allow
62        json_encoders = {dt.datetime: serialize_datetime}
trace_id: Optional[str]
name: Optional[str]
start_time: Optional[datetime.datetime]
metadata: Optional[Any]
input: Optional[Any]
output: Optional[Any]
level: Optional[ObservationLevel]
status_message: Optional[str]
parent_observation_id: Optional[str]
version: Optional[str]
environment: Optional[str]
def json(self, **kwargs: Any) -> str:
31    def json(self, **kwargs: typing.Any) -> str:
32        kwargs_with_defaults: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
39    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
40        kwargs_with_defaults_exclude_unset: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        kwargs_with_defaults_exclude_none: typing.Any = {
46            "by_alias": True,
47            "exclude_none": True,
48            **kwargs,
49        }
50
51        return deep_union_pydantic_dicts(
52            super().dict(**kwargs_with_defaults_exclude_unset),
53            super().dict(**kwargs_with_defaults_exclude_none),
54        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class OptionalObservationBody.Config:
56    class Config:
57        frozen = True
58        smart_union = True
59        allow_population_by_field_name = True
60        populate_by_name = True
61        extra = pydantic_v1.Extra.allow
62        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class OrganizationProject(pydantic.v1.main.BaseModel):
11class OrganizationProject(pydantic_v1.BaseModel):
12    id: str
13    name: str
14    metadata: typing.Optional[typing.Dict[str, typing.Any]] = None
15    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
16    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
id: str
name: str
metadata: Optional[Dict[str, Any]]
created_at: datetime.datetime
updated_at: datetime.datetime
def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class OrganizationProject.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class OrganizationProjectsResponse(pydantic.v1.main.BaseModel):
12class OrganizationProjectsResponse(pydantic_v1.BaseModel):
13    projects: typing.List[OrganizationProject]
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
projects: List[OrganizationProject]
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class OrganizationProjectsResponse.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedAnnotationQueueItems(pydantic.v1.main.BaseModel):
13class PaginatedAnnotationQueueItems(pydantic_v1.BaseModel):
14    data: typing.List[AnnotationQueueItem]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[AnnotationQueueItem]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedAnnotationQueueItems.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedAnnotationQueues(pydantic.v1.main.BaseModel):
13class PaginatedAnnotationQueues(pydantic_v1.BaseModel):
14    data: typing.List[AnnotationQueue]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[AnnotationQueue]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedAnnotationQueues.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedDatasetItems(pydantic.v1.main.BaseModel):
13class PaginatedDatasetItems(pydantic_v1.BaseModel):
14    data: typing.List[DatasetItem]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[DatasetItem]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedDatasetItems.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedDatasetRunItems(pydantic.v1.main.BaseModel):
13class PaginatedDatasetRunItems(pydantic_v1.BaseModel):
14    data: typing.List[DatasetRunItem]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[DatasetRunItem]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedDatasetRunItems.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedDatasetRuns(pydantic.v1.main.BaseModel):
13class PaginatedDatasetRuns(pydantic_v1.BaseModel):
14    data: typing.List[DatasetRun]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[DatasetRun]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedDatasetRuns.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedDatasets(pydantic.v1.main.BaseModel):
13class PaginatedDatasets(pydantic_v1.BaseModel):
14    data: typing.List[Dataset]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[Dataset]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedDatasets.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedLlmConnections(pydantic.v1.main.BaseModel):
13class PaginatedLlmConnections(pydantic_v1.BaseModel):
14    data: typing.List[LlmConnection]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[LlmConnection]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedLlmConnections.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedModels(pydantic.v1.main.BaseModel):
13class PaginatedModels(pydantic_v1.BaseModel):
14    data: typing.List[Model]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[Model]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedModels.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PaginatedSessions(pydantic.v1.main.BaseModel):
13class PaginatedSessions(pydantic_v1.BaseModel):
14    data: typing.List[Session]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[Session]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PaginatedSessions.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PatchMediaBody(pydantic.v1.main.BaseModel):
11class PatchMediaBody(pydantic_v1.BaseModel):
12    uploaded_at: dt.datetime = pydantic_v1.Field(alias="uploadedAt")
13    """
14    The date and time when the media record was uploaded
15    """
16
17    upload_http_status: int = pydantic_v1.Field(alias="uploadHttpStatus")
18    """
19    The HTTP status code of the upload
20    """
21
22    upload_http_error: typing.Optional[str] = pydantic_v1.Field(
23        alias="uploadHttpError", default=None
24    )
25    """
26    The HTTP error message of the upload
27    """
28
29    upload_time_ms: typing.Optional[int] = pydantic_v1.Field(
30        alias="uploadTimeMs", default=None
31    )
32    """
33    The time in milliseconds it took to upload the media record
34    """
35
36    def json(self, **kwargs: typing.Any) -> str:
37        kwargs_with_defaults: typing.Any = {
38            "by_alias": True,
39            "exclude_unset": True,
40            **kwargs,
41        }
42        return super().json(**kwargs_with_defaults)
43
44    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
45        kwargs_with_defaults_exclude_unset: typing.Any = {
46            "by_alias": True,
47            "exclude_unset": True,
48            **kwargs,
49        }
50        kwargs_with_defaults_exclude_none: typing.Any = {
51            "by_alias": True,
52            "exclude_none": True,
53            **kwargs,
54        }
55
56        return deep_union_pydantic_dicts(
57            super().dict(**kwargs_with_defaults_exclude_unset),
58            super().dict(**kwargs_with_defaults_exclude_none),
59        )
60
61    class Config:
62        frozen = True
63        smart_union = True
64        allow_population_by_field_name = True
65        populate_by_name = True
66        extra = pydantic_v1.Extra.allow
67        json_encoders = {dt.datetime: serialize_datetime}
uploaded_at: datetime.datetime

The date and time when the media record was uploaded

upload_http_status: int

The HTTP status code of the upload

upload_http_error: Optional[str]

The HTTP error message of the upload

upload_time_ms: Optional[int]

The time in milliseconds it took to upload the media record

def json(self, **kwargs: Any) -> str:
36    def json(self, **kwargs: typing.Any) -> str:
37        kwargs_with_defaults: typing.Any = {
38            "by_alias": True,
39            "exclude_unset": True,
40            **kwargs,
41        }
42        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
44    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
45        kwargs_with_defaults_exclude_unset: typing.Any = {
46            "by_alias": True,
47            "exclude_unset": True,
48            **kwargs,
49        }
50        kwargs_with_defaults_exclude_none: typing.Any = {
51            "by_alias": True,
52            "exclude_none": True,
53            **kwargs,
54        }
55
56        return deep_union_pydantic_dicts(
57            super().dict(**kwargs_with_defaults_exclude_unset),
58            super().dict(**kwargs_with_defaults_exclude_none),
59        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PatchMediaBody.Config:
61    class Config:
62        frozen = True
63        smart_union = True
64        allow_population_by_field_name = True
65        populate_by_name = True
66        extra = pydantic_v1.Extra.allow
67        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PlaceholderMessage(pydantic.v1.main.BaseModel):
11class PlaceholderMessage(pydantic_v1.BaseModel):
12    name: str
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
name: str
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PlaceholderMessage.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Project(pydantic.v1.main.BaseModel):
11class Project(pydantic_v1.BaseModel):
12    id: str
13    name: str
14    metadata: typing.Dict[str, typing.Any] = pydantic_v1.Field()
15    """
16    Metadata for the project
17    """
18
19    retention_days: typing.Optional[int] = pydantic_v1.Field(
20        alias="retentionDays", default=None
21    )
22    """
23    Number of days to retain data. Null or 0 means no retention. Omitted if no retention is configured.
24    """
25
26    def json(self, **kwargs: typing.Any) -> str:
27        kwargs_with_defaults: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        return super().json(**kwargs_with_defaults)
33
34    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
35        kwargs_with_defaults_exclude_unset: typing.Any = {
36            "by_alias": True,
37            "exclude_unset": True,
38            **kwargs,
39        }
40        kwargs_with_defaults_exclude_none: typing.Any = {
41            "by_alias": True,
42            "exclude_none": True,
43            **kwargs,
44        }
45
46        return deep_union_pydantic_dicts(
47            super().dict(**kwargs_with_defaults_exclude_unset),
48            super().dict(**kwargs_with_defaults_exclude_none),
49        )
50
51    class Config:
52        frozen = True
53        smart_union = True
54        allow_population_by_field_name = True
55        populate_by_name = True
56        extra = pydantic_v1.Extra.allow
57        json_encoders = {dt.datetime: serialize_datetime}
id: str
name: str
metadata: Dict[str, Any]

Metadata for the project

retention_days: Optional[int]

Number of days to retain data. Null or 0 means no retention. Omitted if no retention is configured.

def json(self, **kwargs: Any) -> str:
26    def json(self, **kwargs: typing.Any) -> str:
27        kwargs_with_defaults: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
34    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
35        kwargs_with_defaults_exclude_unset: typing.Any = {
36            "by_alias": True,
37            "exclude_unset": True,
38            **kwargs,
39        }
40        kwargs_with_defaults_exclude_none: typing.Any = {
41            "by_alias": True,
42            "exclude_none": True,
43            **kwargs,
44        }
45
46        return deep_union_pydantic_dicts(
47            super().dict(**kwargs_with_defaults_exclude_unset),
48            super().dict(**kwargs_with_defaults_exclude_none),
49        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Project.Config:
51    class Config:
52        frozen = True
53        smart_union = True
54        allow_population_by_field_name = True
55        populate_by_name = True
56        extra = pydantic_v1.Extra.allow
57        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ProjectDeletionResponse(pydantic.v1.main.BaseModel):
11class ProjectDeletionResponse(pydantic_v1.BaseModel):
12    success: bool
13    message: str
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
success: bool
message: str
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ProjectDeletionResponse.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Projects(pydantic.v1.main.BaseModel):
12class Projects(pydantic_v1.BaseModel):
13    data: typing.List[Project]
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
data: List[Project]
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Projects.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
Prompt = typing.Union[Prompt_Chat, Prompt_Text]
class PromptMeta(pydantic.v1.main.BaseModel):
11class PromptMeta(pydantic_v1.BaseModel):
12    name: str
13    versions: typing.List[int]
14    labels: typing.List[str]
15    tags: typing.List[str]
16    last_updated_at: dt.datetime = pydantic_v1.Field(alias="lastUpdatedAt")
17    last_config: typing.Any = pydantic_v1.Field(alias="lastConfig")
18    """
19    Config object of the most recent prompt version that matches the filters (if any are provided)
20    """
21
22    def json(self, **kwargs: typing.Any) -> str:
23        kwargs_with_defaults: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        return super().json(**kwargs_with_defaults)
29
30    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
31        kwargs_with_defaults_exclude_unset: typing.Any = {
32            "by_alias": True,
33            "exclude_unset": True,
34            **kwargs,
35        }
36        kwargs_with_defaults_exclude_none: typing.Any = {
37            "by_alias": True,
38            "exclude_none": True,
39            **kwargs,
40        }
41
42        return deep_union_pydantic_dicts(
43            super().dict(**kwargs_with_defaults_exclude_unset),
44            super().dict(**kwargs_with_defaults_exclude_none),
45        )
46
47    class Config:
48        frozen = True
49        smart_union = True
50        allow_population_by_field_name = True
51        populate_by_name = True
52        extra = pydantic_v1.Extra.allow
53        json_encoders = {dt.datetime: serialize_datetime}
name: str
versions: List[int]
labels: List[str]
tags: List[str]
last_updated_at: datetime.datetime
last_config: Any

Config object of the most recent prompt version that matches the filters (if any are provided)

def json(self, **kwargs: Any) -> str:
22    def json(self, **kwargs: typing.Any) -> str:
23        kwargs_with_defaults: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
30    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
31        kwargs_with_defaults_exclude_unset: typing.Any = {
32            "by_alias": True,
33            "exclude_unset": True,
34            **kwargs,
35        }
36        kwargs_with_defaults_exclude_none: typing.Any = {
37            "by_alias": True,
38            "exclude_none": True,
39            **kwargs,
40        }
41
42        return deep_union_pydantic_dicts(
43            super().dict(**kwargs_with_defaults_exclude_unset),
44            super().dict(**kwargs_with_defaults_exclude_none),
45        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PromptMeta.Config:
47    class Config:
48        frozen = True
49        smart_union = True
50        allow_population_by_field_name = True
51        populate_by_name = True
52        extra = pydantic_v1.Extra.allow
53        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class PromptMetaListResponse(pydantic.v1.main.BaseModel):
13class PromptMetaListResponse(pydantic_v1.BaseModel):
14    data: typing.List[PromptMeta]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[PromptMeta]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class PromptMetaListResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Prompt_Chat(pydantic.v1.main.BaseModel):
14class Prompt_Chat(pydantic_v1.BaseModel):
15    prompt: typing.List[ChatMessageWithPlaceholders]
16    name: str
17    version: int
18    config: typing.Any
19    labels: typing.List[str]
20    tags: typing.List[str]
21    commit_message: typing.Optional[str] = pydantic_v1.Field(
22        alias="commitMessage", default=None
23    )
24    resolution_graph: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(
25        alias="resolutionGraph", default=None
26    )
27    type: typing.Literal["chat"] = "chat"
28
29    def json(self, **kwargs: typing.Any) -> str:
30        kwargs_with_defaults: typing.Any = {
31            "by_alias": True,
32            "exclude_unset": True,
33            **kwargs,
34        }
35        return super().json(**kwargs_with_defaults)
36
37    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
38        kwargs_with_defaults_exclude_unset: typing.Any = {
39            "by_alias": True,
40            "exclude_unset": True,
41            **kwargs,
42        }
43        kwargs_with_defaults_exclude_none: typing.Any = {
44            "by_alias": True,
45            "exclude_none": True,
46            **kwargs,
47        }
48
49        return deep_union_pydantic_dicts(
50            super().dict(**kwargs_with_defaults_exclude_unset),
51            super().dict(**kwargs_with_defaults_exclude_none),
52        )
53
54    class Config:
55        frozen = True
56        smart_union = True
57        allow_population_by_field_name = True
58        populate_by_name = True
59        extra = pydantic_v1.Extra.allow
60        json_encoders = {dt.datetime: serialize_datetime}
name: str
version: int
config: Any
labels: List[str]
tags: List[str]
commit_message: Optional[str]
resolution_graph: Optional[Dict[str, Any]]
type: Literal['chat']
def json(self, **kwargs: Any) -> str:
29    def json(self, **kwargs: typing.Any) -> str:
30        kwargs_with_defaults: typing.Any = {
31            "by_alias": True,
32            "exclude_unset": True,
33            **kwargs,
34        }
35        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
37    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
38        kwargs_with_defaults_exclude_unset: typing.Any = {
39            "by_alias": True,
40            "exclude_unset": True,
41            **kwargs,
42        }
43        kwargs_with_defaults_exclude_none: typing.Any = {
44            "by_alias": True,
45            "exclude_none": True,
46            **kwargs,
47        }
48
49        return deep_union_pydantic_dicts(
50            super().dict(**kwargs_with_defaults_exclude_unset),
51            super().dict(**kwargs_with_defaults_exclude_none),
52        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Prompt_Chat.Config:
54    class Config:
55        frozen = True
56        smart_union = True
57        allow_population_by_field_name = True
58        populate_by_name = True
59        extra = pydantic_v1.Extra.allow
60        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Prompt_Text(pydantic.v1.main.BaseModel):
 63class Prompt_Text(pydantic_v1.BaseModel):
 64    prompt: str
 65    name: str
 66    version: int
 67    config: typing.Any
 68    labels: typing.List[str]
 69    tags: typing.List[str]
 70    commit_message: typing.Optional[str] = pydantic_v1.Field(
 71        alias="commitMessage", default=None
 72    )
 73    resolution_graph: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(
 74        alias="resolutionGraph", default=None
 75    )
 76    type: typing.Literal["text"] = "text"
 77
 78    def json(self, **kwargs: typing.Any) -> str:
 79        kwargs_with_defaults: typing.Any = {
 80            "by_alias": True,
 81            "exclude_unset": True,
 82            **kwargs,
 83        }
 84        return super().json(**kwargs_with_defaults)
 85
 86    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 87        kwargs_with_defaults_exclude_unset: typing.Any = {
 88            "by_alias": True,
 89            "exclude_unset": True,
 90            **kwargs,
 91        }
 92        kwargs_with_defaults_exclude_none: typing.Any = {
 93            "by_alias": True,
 94            "exclude_none": True,
 95            **kwargs,
 96        }
 97
 98        return deep_union_pydantic_dicts(
 99            super().dict(**kwargs_with_defaults_exclude_unset),
100            super().dict(**kwargs_with_defaults_exclude_none),
101        )
102
103    class Config:
104        frozen = True
105        smart_union = True
106        allow_population_by_field_name = True
107        populate_by_name = True
108        extra = pydantic_v1.Extra.allow
109        json_encoders = {dt.datetime: serialize_datetime}
prompt: str
name: str
version: int
config: Any
labels: List[str]
tags: List[str]
commit_message: Optional[str]
resolution_graph: Optional[Dict[str, Any]]
type: Literal['text']
def json(self, **kwargs: Any) -> str:
78    def json(self, **kwargs: typing.Any) -> str:
79        kwargs_with_defaults: typing.Any = {
80            "by_alias": True,
81            "exclude_unset": True,
82            **kwargs,
83        }
84        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
 86    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 87        kwargs_with_defaults_exclude_unset: typing.Any = {
 88            "by_alias": True,
 89            "exclude_unset": True,
 90            **kwargs,
 91        }
 92        kwargs_with_defaults_exclude_none: typing.Any = {
 93            "by_alias": True,
 94            "exclude_none": True,
 95            **kwargs,
 96        }
 97
 98        return deep_union_pydantic_dicts(
 99            super().dict(**kwargs_with_defaults_exclude_unset),
100            super().dict(**kwargs_with_defaults_exclude_none),
101        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Prompt_Text.Config:
103    class Config:
104        frozen = True
105        smart_union = True
106        allow_population_by_field_name = True
107        populate_by_name = True
108        extra = pydantic_v1.Extra.allow
109        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ResourceMeta(pydantic.v1.main.BaseModel):
11class ResourceMeta(pydantic_v1.BaseModel):
12    resource_type: str = pydantic_v1.Field(alias="resourceType")
13    location: str
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
resource_type: str
location: str
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ResourceMeta.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ResourceType(pydantic.v1.main.BaseModel):
13class ResourceType(pydantic_v1.BaseModel):
14    schemas: typing.Optional[typing.List[str]] = None
15    id: str
16    name: str
17    endpoint: str
18    description: str
19    schema_: str = pydantic_v1.Field(alias="schema")
20    schema_extensions: typing.List[SchemaExtension] = pydantic_v1.Field(
21        alias="schemaExtensions"
22    )
23    meta: ResourceMeta
24
25    def json(self, **kwargs: typing.Any) -> str:
26        kwargs_with_defaults: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        return super().json(**kwargs_with_defaults)
32
33    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
34        kwargs_with_defaults_exclude_unset: typing.Any = {
35            "by_alias": True,
36            "exclude_unset": True,
37            **kwargs,
38        }
39        kwargs_with_defaults_exclude_none: typing.Any = {
40            "by_alias": True,
41            "exclude_none": True,
42            **kwargs,
43        }
44
45        return deep_union_pydantic_dicts(
46            super().dict(**kwargs_with_defaults_exclude_unset),
47            super().dict(**kwargs_with_defaults_exclude_none),
48        )
49
50    class Config:
51        frozen = True
52        smart_union = True
53        allow_population_by_field_name = True
54        populate_by_name = True
55        extra = pydantic_v1.Extra.allow
56        json_encoders = {dt.datetime: serialize_datetime}
schemas: Optional[List[str]]
id: str
name: str
endpoint: str
description: str
schema_: str
schema_extensions: List[SchemaExtension]
meta: ResourceMeta
def json(self, **kwargs: Any) -> str:
25    def json(self, **kwargs: typing.Any) -> str:
26        kwargs_with_defaults: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
33    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
34        kwargs_with_defaults_exclude_unset: typing.Any = {
35            "by_alias": True,
36            "exclude_unset": True,
37            **kwargs,
38        }
39        kwargs_with_defaults_exclude_none: typing.Any = {
40            "by_alias": True,
41            "exclude_none": True,
42            **kwargs,
43        }
44
45        return deep_union_pydantic_dicts(
46            super().dict(**kwargs_with_defaults_exclude_unset),
47            super().dict(**kwargs_with_defaults_exclude_none),
48        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ResourceType.Config:
50    class Config:
51        frozen = True
52        smart_union = True
53        allow_population_by_field_name = True
54        populate_by_name = True
55        extra = pydantic_v1.Extra.allow
56        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ResourceTypesResponse(pydantic.v1.main.BaseModel):
12class ResourceTypesResponse(pydantic_v1.BaseModel):
13    schemas: typing.List[str]
14    total_results: int = pydantic_v1.Field(alias="totalResults")
15    resources: typing.List[ResourceType] = pydantic_v1.Field(alias="Resources")
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        allow_population_by_field_name = True
46        populate_by_name = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
schemas: List[str]
total_results: int
resources: List[ResourceType]
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ResourceTypesResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        allow_population_by_field_name = True
46        populate_by_name = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class SchemaExtension(pydantic.v1.main.BaseModel):
11class SchemaExtension(pydantic_v1.BaseModel):
12    schema_: str = pydantic_v1.Field(alias="schema")
13    required: bool
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
schema_: str
required: bool
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class SchemaExtension.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class SchemaResource(pydantic.v1.main.BaseModel):
12class SchemaResource(pydantic_v1.BaseModel):
13    id: str
14    name: str
15    description: str
16    attributes: typing.List[typing.Any]
17    meta: ResourceMeta
18
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)
26
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )
43
44    class Config:
45        frozen = True
46        smart_union = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
id: str
name: str
description: str
attributes: List[Any]
meta: ResourceMeta
def json(self, **kwargs: Any) -> str:
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class SchemaResource.Config:
44    class Config:
45        frozen = True
46        smart_union = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class SchemasResponse(pydantic.v1.main.BaseModel):
12class SchemasResponse(pydantic_v1.BaseModel):
13    schemas: typing.List[str]
14    total_results: int = pydantic_v1.Field(alias="totalResults")
15    resources: typing.List[SchemaResource] = pydantic_v1.Field(alias="Resources")
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        allow_population_by_field_name = True
46        populate_by_name = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
schemas: List[str]
total_results: int
resources: List[SchemaResource]
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class SchemasResponse.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        allow_population_by_field_name = True
46        populate_by_name = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScimEmail(pydantic.v1.main.BaseModel):
11class ScimEmail(pydantic_v1.BaseModel):
12    primary: bool
13    value: str
14    type: str
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        extra = pydantic_v1.Extra.allow
45        json_encoders = {dt.datetime: serialize_datetime}
primary: bool
value: str
type: str
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScimEmail.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        extra = pydantic_v1.Extra.allow
45        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScimFeatureSupport(pydantic.v1.main.BaseModel):
11class ScimFeatureSupport(pydantic_v1.BaseModel):
12    supported: bool
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
supported: bool
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScimFeatureSupport.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScimName(pydantic.v1.main.BaseModel):
11class ScimName(pydantic_v1.BaseModel):
12    formatted: typing.Optional[str] = None
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
formatted: Optional[str]
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScimName.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScimUser(pydantic.v1.main.BaseModel):
14class ScimUser(pydantic_v1.BaseModel):
15    schemas: typing.List[str]
16    id: str
17    user_name: str = pydantic_v1.Field(alias="userName")
18    name: ScimName
19    emails: typing.List[ScimEmail]
20    meta: UserMeta
21
22    def json(self, **kwargs: typing.Any) -> str:
23        kwargs_with_defaults: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        return super().json(**kwargs_with_defaults)
29
30    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
31        kwargs_with_defaults_exclude_unset: typing.Any = {
32            "by_alias": True,
33            "exclude_unset": True,
34            **kwargs,
35        }
36        kwargs_with_defaults_exclude_none: typing.Any = {
37            "by_alias": True,
38            "exclude_none": True,
39            **kwargs,
40        }
41
42        return deep_union_pydantic_dicts(
43            super().dict(**kwargs_with_defaults_exclude_unset),
44            super().dict(**kwargs_with_defaults_exclude_none),
45        )
46
47    class Config:
48        frozen = True
49        smart_union = True
50        allow_population_by_field_name = True
51        populate_by_name = True
52        extra = pydantic_v1.Extra.allow
53        json_encoders = {dt.datetime: serialize_datetime}
schemas: List[str]
id: str
user_name: str
name: ScimName
emails: List[ScimEmail]
meta: UserMeta
def json(self, **kwargs: Any) -> str:
22    def json(self, **kwargs: typing.Any) -> str:
23        kwargs_with_defaults: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
30    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
31        kwargs_with_defaults_exclude_unset: typing.Any = {
32            "by_alias": True,
33            "exclude_unset": True,
34            **kwargs,
35        }
36        kwargs_with_defaults_exclude_none: typing.Any = {
37            "by_alias": True,
38            "exclude_none": True,
39            **kwargs,
40        }
41
42        return deep_union_pydantic_dicts(
43            super().dict(**kwargs_with_defaults_exclude_unset),
44            super().dict(**kwargs_with_defaults_exclude_none),
45        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScimUser.Config:
47    class Config:
48        frozen = True
49        smart_union = True
50        allow_population_by_field_name = True
51        populate_by_name = True
52        extra = pydantic_v1.Extra.allow
53        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScimUsersListResponse(pydantic.v1.main.BaseModel):
12class ScimUsersListResponse(pydantic_v1.BaseModel):
13    schemas: typing.List[str]
14    total_results: int = pydantic_v1.Field(alias="totalResults")
15    start_index: int = pydantic_v1.Field(alias="startIndex")
16    items_per_page: int = pydantic_v1.Field(alias="itemsPerPage")
17    resources: typing.List[ScimUser] = pydantic_v1.Field(alias="Resources")
18
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)
26
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )
43
44    class Config:
45        frozen = True
46        smart_union = True
47        allow_population_by_field_name = True
48        populate_by_name = True
49        extra = pydantic_v1.Extra.allow
50        json_encoders = {dt.datetime: serialize_datetime}
schemas: List[str]
total_results: int
start_index: int
items_per_page: int
resources: List[ScimUser]
def json(self, **kwargs: Any) -> str:
19    def json(self, **kwargs: typing.Any) -> str:
20        kwargs_with_defaults: typing.Any = {
21            "by_alias": True,
22            "exclude_unset": True,
23            **kwargs,
24        }
25        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
27    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28        kwargs_with_defaults_exclude_unset: typing.Any = {
29            "by_alias": True,
30            "exclude_unset": True,
31            **kwargs,
32        }
33        kwargs_with_defaults_exclude_none: typing.Any = {
34            "by_alias": True,
35            "exclude_none": True,
36            **kwargs,
37        }
38
39        return deep_union_pydantic_dicts(
40            super().dict(**kwargs_with_defaults_exclude_unset),
41            super().dict(**kwargs_with_defaults_exclude_none),
42        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScimUsersListResponse.Config:
44    class Config:
45        frozen = True
46        smart_union = True
47        allow_population_by_field_name = True
48        populate_by_name = True
49        extra = pydantic_v1.Extra.allow
50        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScoreBody(pydantic.v1.main.BaseModel):
13class ScoreBody(pydantic_v1.BaseModel):
14    """
15    Examples
16    --------
17    from langfuse import ScoreBody
18
19    ScoreBody(
20        name="novelty",
21        value=0.9,
22        trace_id="cdef-1234-5678-90ab",
23    )
24    """
25
26    id: typing.Optional[str] = None
27    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
28    session_id: typing.Optional[str] = pydantic_v1.Field(
29        alias="sessionId", default=None
30    )
31    observation_id: typing.Optional[str] = pydantic_v1.Field(
32        alias="observationId", default=None
33    )
34    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
35        alias="datasetRunId", default=None
36    )
37    name: str
38    environment: typing.Optional[str] = None
39    value: CreateScoreValue = pydantic_v1.Field()
40    """
41    The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false)
42    """
43
44    comment: typing.Optional[str] = None
45    metadata: typing.Optional[typing.Any] = None
46    data_type: typing.Optional[ScoreDataType] = pydantic_v1.Field(
47        alias="dataType", default=None
48    )
49    """
50    When set, must match the score value's type. If not set, will be inferred from the score value or config
51    """
52
53    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
54    """
55    Reference a score config on a score. When set, the score name must equal the config name and scores must comply with the config's range and data type. For categorical scores, the value must map to a config category. Numeric scores might be constrained by the score config's max and min values
56    """
57
58    def json(self, **kwargs: typing.Any) -> str:
59        kwargs_with_defaults: typing.Any = {
60            "by_alias": True,
61            "exclude_unset": True,
62            **kwargs,
63        }
64        return super().json(**kwargs_with_defaults)
65
66    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
67        kwargs_with_defaults_exclude_unset: typing.Any = {
68            "by_alias": True,
69            "exclude_unset": True,
70            **kwargs,
71        }
72        kwargs_with_defaults_exclude_none: typing.Any = {
73            "by_alias": True,
74            "exclude_none": True,
75            **kwargs,
76        }
77
78        return deep_union_pydantic_dicts(
79            super().dict(**kwargs_with_defaults_exclude_unset),
80            super().dict(**kwargs_with_defaults_exclude_none),
81        )
82
83    class Config:
84        frozen = True
85        smart_union = True
86        allow_population_by_field_name = True
87        populate_by_name = True
88        extra = pydantic_v1.Extra.allow
89        json_encoders = {dt.datetime: serialize_datetime}

Examples

from langfuse import ScoreBody

ScoreBody( name="novelty", value=0.9, trace_id="cdef-1234-5678-90ab", )

id: Optional[str]
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
environment: Optional[str]
value: Union[float, str]

The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false)

comment: Optional[str]
metadata: Optional[Any]
data_type: Optional[ScoreDataType]

When set, must match the score value's type. If not set, will be inferred from the score value or config

config_id: Optional[str]

Reference a score config on a score. When set, the score name must equal the config name and scores must comply with the config's range and data type. For categorical scores, the value must map to a config category. Numeric scores might be constrained by the score config's max and min values

def json(self, **kwargs: Any) -> str:
58    def json(self, **kwargs: typing.Any) -> str:
59        kwargs_with_defaults: typing.Any = {
60            "by_alias": True,
61            "exclude_unset": True,
62            **kwargs,
63        }
64        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
66    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
67        kwargs_with_defaults_exclude_unset: typing.Any = {
68            "by_alias": True,
69            "exclude_unset": True,
70            **kwargs,
71        }
72        kwargs_with_defaults_exclude_none: typing.Any = {
73            "by_alias": True,
74            "exclude_none": True,
75            **kwargs,
76        }
77
78        return deep_union_pydantic_dicts(
79            super().dict(**kwargs_with_defaults_exclude_unset),
80            super().dict(**kwargs_with_defaults_exclude_none),
81        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScoreBody.Config:
83    class Config:
84        frozen = True
85        smart_union = True
86        allow_population_by_field_name = True
87        populate_by_name = True
88        extra = pydantic_v1.Extra.allow
89        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScoreConfig(pydantic.v1.main.BaseModel):
13class ScoreConfig(pydantic_v1.BaseModel):
14    """
15    Configuration for a score
16    """
17
18    id: str
19    name: str
20    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
21    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
22    project_id: str = pydantic_v1.Field(alias="projectId")
23    data_type: ScoreDataType = pydantic_v1.Field(alias="dataType")
24    is_archived: bool = pydantic_v1.Field(alias="isArchived")
25    """
26    Whether the score config is archived. Defaults to false
27    """
28
29    min_value: typing.Optional[float] = pydantic_v1.Field(
30        alias="minValue", default=None
31    )
32    """
33    Sets minimum value for numerical scores. If not set, the minimum value defaults to -∞
34    """
35
36    max_value: typing.Optional[float] = pydantic_v1.Field(
37        alias="maxValue", default=None
38    )
39    """
40    Sets maximum value for numerical scores. If not set, the maximum value defaults to +∞
41    """
42
43    categories: typing.Optional[typing.List[ConfigCategory]] = pydantic_v1.Field(
44        default=None
45    )
46    """
47    Configures custom categories for categorical scores
48    """
49
50    description: typing.Optional[str] = None
51
52    def json(self, **kwargs: typing.Any) -> str:
53        kwargs_with_defaults: typing.Any = {
54            "by_alias": True,
55            "exclude_unset": True,
56            **kwargs,
57        }
58        return super().json(**kwargs_with_defaults)
59
60    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
61        kwargs_with_defaults_exclude_unset: typing.Any = {
62            "by_alias": True,
63            "exclude_unset": True,
64            **kwargs,
65        }
66        kwargs_with_defaults_exclude_none: typing.Any = {
67            "by_alias": True,
68            "exclude_none": True,
69            **kwargs,
70        }
71
72        return deep_union_pydantic_dicts(
73            super().dict(**kwargs_with_defaults_exclude_unset),
74            super().dict(**kwargs_with_defaults_exclude_none),
75        )
76
77    class Config:
78        frozen = True
79        smart_union = True
80        allow_population_by_field_name = True
81        populate_by_name = True
82        extra = pydantic_v1.Extra.allow
83        json_encoders = {dt.datetime: serialize_datetime}

Configuration for a score

id: str
name: str
created_at: datetime.datetime
updated_at: datetime.datetime
project_id: str
data_type: ScoreDataType
is_archived: bool

Whether the score config is archived. Defaults to false

min_value: Optional[float]

Sets minimum value for numerical scores. If not set, the minimum value defaults to -∞

max_value: Optional[float]

Sets maximum value for numerical scores. If not set, the maximum value defaults to +∞

categories: Optional[List[ConfigCategory]]

Configures custom categories for categorical scores

description: Optional[str]
def json(self, **kwargs: Any) -> str:
52    def json(self, **kwargs: typing.Any) -> str:
53        kwargs_with_defaults: typing.Any = {
54            "by_alias": True,
55            "exclude_unset": True,
56            **kwargs,
57        }
58        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
60    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
61        kwargs_with_defaults_exclude_unset: typing.Any = {
62            "by_alias": True,
63            "exclude_unset": True,
64            **kwargs,
65        }
66        kwargs_with_defaults_exclude_none: typing.Any = {
67            "by_alias": True,
68            "exclude_none": True,
69            **kwargs,
70        }
71
72        return deep_union_pydantic_dicts(
73            super().dict(**kwargs_with_defaults_exclude_unset),
74            super().dict(**kwargs_with_defaults_exclude_none),
75        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScoreConfig.Config:
77    class Config:
78        frozen = True
79        smart_union = True
80        allow_population_by_field_name = True
81        populate_by_name = True
82        extra = pydantic_v1.Extra.allow
83        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScoreConfigs(pydantic.v1.main.BaseModel):
13class ScoreConfigs(pydantic_v1.BaseModel):
14    data: typing.List[ScoreConfig]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[ScoreConfig]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScoreConfigs.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScoreDataType(builtins.str, enum.Enum):
10class ScoreDataType(str, enum.Enum):
11    NUMERIC = "NUMERIC"
12    BOOLEAN = "BOOLEAN"
13    CATEGORICAL = "CATEGORICAL"
14
15    def visit(
16        self,
17        numeric: typing.Callable[[], T_Result],
18        boolean: typing.Callable[[], T_Result],
19        categorical: typing.Callable[[], T_Result],
20    ) -> T_Result:
21        if self is ScoreDataType.NUMERIC:
22            return numeric()
23        if self is ScoreDataType.BOOLEAN:
24            return boolean()
25        if self is ScoreDataType.CATEGORICAL:
26            return categorical()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

NUMERIC = <ScoreDataType.NUMERIC: 'NUMERIC'>
BOOLEAN = <ScoreDataType.BOOLEAN: 'BOOLEAN'>
CATEGORICAL = <ScoreDataType.CATEGORICAL: 'CATEGORICAL'>
def visit( self, numeric: Callable[[], ~T_Result], boolean: Callable[[], ~T_Result], categorical: Callable[[], ~T_Result]) -> ~T_Result:
15    def visit(
16        self,
17        numeric: typing.Callable[[], T_Result],
18        boolean: typing.Callable[[], T_Result],
19        categorical: typing.Callable[[], T_Result],
20    ) -> T_Result:
21        if self is ScoreDataType.NUMERIC:
22            return numeric()
23        if self is ScoreDataType.BOOLEAN:
24            return boolean()
25        if self is ScoreDataType.CATEGORICAL:
26            return categorical()
class ScoreEvent(langfuse.api.BaseEvent):
13class ScoreEvent(BaseEvent):
14    body: ScoreBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
body: ScoreBody
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScoreEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScoreSource(builtins.str, enum.Enum):
10class ScoreSource(str, enum.Enum):
11    ANNOTATION = "ANNOTATION"
12    API = "API"
13    EVAL = "EVAL"
14
15    def visit(
16        self,
17        annotation: typing.Callable[[], T_Result],
18        api: typing.Callable[[], T_Result],
19        eval: typing.Callable[[], T_Result],
20    ) -> T_Result:
21        if self is ScoreSource.ANNOTATION:
22            return annotation()
23        if self is ScoreSource.API:
24            return api()
25        if self is ScoreSource.EVAL:
26            return eval()

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

ANNOTATION = <ScoreSource.ANNOTATION: 'ANNOTATION'>
API = <ScoreSource.API: 'API'>
EVAL = <ScoreSource.EVAL: 'EVAL'>
def visit( self, annotation: Callable[[], ~T_Result], api: Callable[[], ~T_Result], eval: Callable[[], ~T_Result]) -> ~T_Result:
15    def visit(
16        self,
17        annotation: typing.Callable[[], T_Result],
18        api: typing.Callable[[], T_Result],
19        eval: typing.Callable[[], T_Result],
20    ) -> T_Result:
21        if self is ScoreSource.ANNOTATION:
22            return annotation()
23        if self is ScoreSource.API:
24            return api()
25        if self is ScoreSource.EVAL:
26            return eval()
class ScoreV1_Boolean(pydantic.v1.main.BaseModel):
131class ScoreV1_Boolean(pydantic_v1.BaseModel):
132    value: float
133    string_value: str = pydantic_v1.Field(alias="stringValue")
134    id: str
135    trace_id: str = pydantic_v1.Field(alias="traceId")
136    name: str
137    source: ScoreSource
138    observation_id: typing.Optional[str] = pydantic_v1.Field(
139        alias="observationId", default=None
140    )
141    timestamp: dt.datetime
142    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
143    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
144    author_user_id: typing.Optional[str] = pydantic_v1.Field(
145        alias="authorUserId", default=None
146    )
147    comment: typing.Optional[str] = None
148    metadata: typing.Optional[typing.Any] = None
149    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
150    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
151    environment: typing.Optional[str] = None
152    data_type: typing.Literal["BOOLEAN"] = pydantic_v1.Field(
153        alias="dataType", default="BOOLEAN"
154    )
155
156    def json(self, **kwargs: typing.Any) -> str:
157        kwargs_with_defaults: typing.Any = {
158            "by_alias": True,
159            "exclude_unset": True,
160            **kwargs,
161        }
162        return super().json(**kwargs_with_defaults)
163
164    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
165        kwargs_with_defaults_exclude_unset: typing.Any = {
166            "by_alias": True,
167            "exclude_unset": True,
168            **kwargs,
169        }
170        kwargs_with_defaults_exclude_none: typing.Any = {
171            "by_alias": True,
172            "exclude_none": True,
173            **kwargs,
174        }
175
176        return deep_union_pydantic_dicts(
177            super().dict(**kwargs_with_defaults_exclude_unset),
178            super().dict(**kwargs_with_defaults_exclude_none),
179        )
180
181    class Config:
182        frozen = True
183        smart_union = True
184        allow_population_by_field_name = True
185        populate_by_name = True
186        extra = pydantic_v1.Extra.allow
187        json_encoders = {dt.datetime: serialize_datetime}
value: float
string_value: str
id: str
trace_id: str
name: str
source: ScoreSource
observation_id: Optional[str]
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['BOOLEAN']
def json(self, **kwargs: Any) -> str:
156    def json(self, **kwargs: typing.Any) -> str:
157        kwargs_with_defaults: typing.Any = {
158            "by_alias": True,
159            "exclude_unset": True,
160            **kwargs,
161        }
162        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
164    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
165        kwargs_with_defaults_exclude_unset: typing.Any = {
166            "by_alias": True,
167            "exclude_unset": True,
168            **kwargs,
169        }
170        kwargs_with_defaults_exclude_none: typing.Any = {
171            "by_alias": True,
172            "exclude_none": True,
173            **kwargs,
174        }
175
176        return deep_union_pydantic_dicts(
177            super().dict(**kwargs_with_defaults_exclude_unset),
178            super().dict(**kwargs_with_defaults_exclude_none),
179        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScoreV1_Boolean.Config:
181    class Config:
182        frozen = True
183        smart_union = True
184        allow_population_by_field_name = True
185        populate_by_name = True
186        extra = pydantic_v1.Extra.allow
187        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScoreV1_Categorical(pydantic.v1.main.BaseModel):
 72class ScoreV1_Categorical(pydantic_v1.BaseModel):
 73    value: typing.Optional[float] = None
 74    string_value: str = pydantic_v1.Field(alias="stringValue")
 75    id: str
 76    trace_id: str = pydantic_v1.Field(alias="traceId")
 77    name: str
 78    source: ScoreSource
 79    observation_id: typing.Optional[str] = pydantic_v1.Field(
 80        alias="observationId", default=None
 81    )
 82    timestamp: dt.datetime
 83    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
 84    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
 85    author_user_id: typing.Optional[str] = pydantic_v1.Field(
 86        alias="authorUserId", default=None
 87    )
 88    comment: typing.Optional[str] = None
 89    metadata: typing.Optional[typing.Any] = None
 90    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
 91    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
 92    environment: typing.Optional[str] = None
 93    data_type: typing.Literal["CATEGORICAL"] = pydantic_v1.Field(
 94        alias="dataType", default="CATEGORICAL"
 95    )
 96
 97    def json(self, **kwargs: typing.Any) -> str:
 98        kwargs_with_defaults: typing.Any = {
 99            "by_alias": True,
100            "exclude_unset": True,
101            **kwargs,
102        }
103        return super().json(**kwargs_with_defaults)
104
105    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
106        kwargs_with_defaults_exclude_unset: typing.Any = {
107            "by_alias": True,
108            "exclude_unset": True,
109            **kwargs,
110        }
111        kwargs_with_defaults_exclude_none: typing.Any = {
112            "by_alias": True,
113            "exclude_none": True,
114            **kwargs,
115        }
116
117        return deep_union_pydantic_dicts(
118            super().dict(**kwargs_with_defaults_exclude_unset),
119            super().dict(**kwargs_with_defaults_exclude_none),
120        )
121
122    class Config:
123        frozen = True
124        smart_union = True
125        allow_population_by_field_name = True
126        populate_by_name = True
127        extra = pydantic_v1.Extra.allow
128        json_encoders = {dt.datetime: serialize_datetime}
value: Optional[float]
string_value: str
id: str
trace_id: str
name: str
source: ScoreSource
observation_id: Optional[str]
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['CATEGORICAL']
def json(self, **kwargs: Any) -> str:
 97    def json(self, **kwargs: typing.Any) -> str:
 98        kwargs_with_defaults: typing.Any = {
 99            "by_alias": True,
100            "exclude_unset": True,
101            **kwargs,
102        }
103        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
105    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
106        kwargs_with_defaults_exclude_unset: typing.Any = {
107            "by_alias": True,
108            "exclude_unset": True,
109            **kwargs,
110        }
111        kwargs_with_defaults_exclude_none: typing.Any = {
112            "by_alias": True,
113            "exclude_none": True,
114            **kwargs,
115        }
116
117        return deep_union_pydantic_dicts(
118            super().dict(**kwargs_with_defaults_exclude_unset),
119            super().dict(**kwargs_with_defaults_exclude_none),
120        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScoreV1_Categorical.Config:
122    class Config:
123        frozen = True
124        smart_union = True
125        allow_population_by_field_name = True
126        populate_by_name = True
127        extra = pydantic_v1.Extra.allow
128        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ScoreV1_Numeric(pydantic.v1.main.BaseModel):
14class ScoreV1_Numeric(pydantic_v1.BaseModel):
15    value: float
16    id: str
17    trace_id: str = pydantic_v1.Field(alias="traceId")
18    name: str
19    source: ScoreSource
20    observation_id: typing.Optional[str] = pydantic_v1.Field(
21        alias="observationId", default=None
22    )
23    timestamp: dt.datetime
24    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
25    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
26    author_user_id: typing.Optional[str] = pydantic_v1.Field(
27        alias="authorUserId", default=None
28    )
29    comment: typing.Optional[str] = None
30    metadata: typing.Optional[typing.Any] = None
31    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
32    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
33    environment: typing.Optional[str] = None
34    data_type: typing.Literal["NUMERIC"] = pydantic_v1.Field(
35        alias="dataType", default="NUMERIC"
36    )
37
38    def json(self, **kwargs: typing.Any) -> str:
39        kwargs_with_defaults: typing.Any = {
40            "by_alias": True,
41            "exclude_unset": True,
42            **kwargs,
43        }
44        return super().json(**kwargs_with_defaults)
45
46    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
47        kwargs_with_defaults_exclude_unset: typing.Any = {
48            "by_alias": True,
49            "exclude_unset": True,
50            **kwargs,
51        }
52        kwargs_with_defaults_exclude_none: typing.Any = {
53            "by_alias": True,
54            "exclude_none": True,
55            **kwargs,
56        }
57
58        return deep_union_pydantic_dicts(
59            super().dict(**kwargs_with_defaults_exclude_unset),
60            super().dict(**kwargs_with_defaults_exclude_none),
61        )
62
63    class Config:
64        frozen = True
65        smart_union = True
66        allow_population_by_field_name = True
67        populate_by_name = True
68        extra = pydantic_v1.Extra.allow
69        json_encoders = {dt.datetime: serialize_datetime}
value: float
id: str
trace_id: str
name: str
source: ScoreSource
observation_id: Optional[str]
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['NUMERIC']
def json(self, **kwargs: Any) -> str:
38    def json(self, **kwargs: typing.Any) -> str:
39        kwargs_with_defaults: typing.Any = {
40            "by_alias": True,
41            "exclude_unset": True,
42            **kwargs,
43        }
44        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
46    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
47        kwargs_with_defaults_exclude_unset: typing.Any = {
48            "by_alias": True,
49            "exclude_unset": True,
50            **kwargs,
51        }
52        kwargs_with_defaults_exclude_none: typing.Any = {
53            "by_alias": True,
54            "exclude_none": True,
55            **kwargs,
56        }
57
58        return deep_union_pydantic_dicts(
59            super().dict(**kwargs_with_defaults_exclude_unset),
60            super().dict(**kwargs_with_defaults_exclude_none),
61        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ScoreV1_Numeric.Config:
63    class Config:
64        frozen = True
65        smart_union = True
66        allow_population_by_field_name = True
67        populate_by_name = True
68        extra = pydantic_v1.Extra.allow
69        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Score_Boolean(pydantic.v1.main.BaseModel):
143class Score_Boolean(pydantic_v1.BaseModel):
144    value: float
145    string_value: str = pydantic_v1.Field(alias="stringValue")
146    id: str
147    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
148    session_id: typing.Optional[str] = pydantic_v1.Field(
149        alias="sessionId", default=None
150    )
151    observation_id: typing.Optional[str] = pydantic_v1.Field(
152        alias="observationId", default=None
153    )
154    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
155        alias="datasetRunId", default=None
156    )
157    name: str
158    source: ScoreSource
159    timestamp: dt.datetime
160    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
161    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
162    author_user_id: typing.Optional[str] = pydantic_v1.Field(
163        alias="authorUserId", default=None
164    )
165    comment: typing.Optional[str] = None
166    metadata: typing.Optional[typing.Any] = None
167    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
168    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
169    environment: typing.Optional[str] = None
170    data_type: typing.Literal["BOOLEAN"] = pydantic_v1.Field(
171        alias="dataType", default="BOOLEAN"
172    )
173
174    def json(self, **kwargs: typing.Any) -> str:
175        kwargs_with_defaults: typing.Any = {
176            "by_alias": True,
177            "exclude_unset": True,
178            **kwargs,
179        }
180        return super().json(**kwargs_with_defaults)
181
182    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
183        kwargs_with_defaults_exclude_unset: typing.Any = {
184            "by_alias": True,
185            "exclude_unset": True,
186            **kwargs,
187        }
188        kwargs_with_defaults_exclude_none: typing.Any = {
189            "by_alias": True,
190            "exclude_none": True,
191            **kwargs,
192        }
193
194        return deep_union_pydantic_dicts(
195            super().dict(**kwargs_with_defaults_exclude_unset),
196            super().dict(**kwargs_with_defaults_exclude_none),
197        )
198
199    class Config:
200        frozen = True
201        smart_union = True
202        allow_population_by_field_name = True
203        populate_by_name = True
204        extra = pydantic_v1.Extra.allow
205        json_encoders = {dt.datetime: serialize_datetime}
value: float
string_value: str
id: str
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
source: ScoreSource
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['BOOLEAN']
def json(self, **kwargs: Any) -> str:
174    def json(self, **kwargs: typing.Any) -> str:
175        kwargs_with_defaults: typing.Any = {
176            "by_alias": True,
177            "exclude_unset": True,
178            **kwargs,
179        }
180        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
182    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
183        kwargs_with_defaults_exclude_unset: typing.Any = {
184            "by_alias": True,
185            "exclude_unset": True,
186            **kwargs,
187        }
188        kwargs_with_defaults_exclude_none: typing.Any = {
189            "by_alias": True,
190            "exclude_none": True,
191            **kwargs,
192        }
193
194        return deep_union_pydantic_dicts(
195            super().dict(**kwargs_with_defaults_exclude_unset),
196            super().dict(**kwargs_with_defaults_exclude_none),
197        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Score_Boolean.Config:
199    class Config:
200        frozen = True
201        smart_union = True
202        allow_population_by_field_name = True
203        populate_by_name = True
204        extra = pydantic_v1.Extra.allow
205        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Score_Categorical(pydantic.v1.main.BaseModel):
 78class Score_Categorical(pydantic_v1.BaseModel):
 79    value: typing.Optional[float] = None
 80    string_value: str = pydantic_v1.Field(alias="stringValue")
 81    id: str
 82    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
 83    session_id: typing.Optional[str] = pydantic_v1.Field(
 84        alias="sessionId", default=None
 85    )
 86    observation_id: typing.Optional[str] = pydantic_v1.Field(
 87        alias="observationId", default=None
 88    )
 89    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
 90        alias="datasetRunId", default=None
 91    )
 92    name: str
 93    source: ScoreSource
 94    timestamp: dt.datetime
 95    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
 96    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
 97    author_user_id: typing.Optional[str] = pydantic_v1.Field(
 98        alias="authorUserId", default=None
 99    )
100    comment: typing.Optional[str] = None
101    metadata: typing.Optional[typing.Any] = None
102    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
103    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
104    environment: typing.Optional[str] = None
105    data_type: typing.Literal["CATEGORICAL"] = pydantic_v1.Field(
106        alias="dataType", default="CATEGORICAL"
107    )
108
109    def json(self, **kwargs: typing.Any) -> str:
110        kwargs_with_defaults: typing.Any = {
111            "by_alias": True,
112            "exclude_unset": True,
113            **kwargs,
114        }
115        return super().json(**kwargs_with_defaults)
116
117    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
118        kwargs_with_defaults_exclude_unset: typing.Any = {
119            "by_alias": True,
120            "exclude_unset": True,
121            **kwargs,
122        }
123        kwargs_with_defaults_exclude_none: typing.Any = {
124            "by_alias": True,
125            "exclude_none": True,
126            **kwargs,
127        }
128
129        return deep_union_pydantic_dicts(
130            super().dict(**kwargs_with_defaults_exclude_unset),
131            super().dict(**kwargs_with_defaults_exclude_none),
132        )
133
134    class Config:
135        frozen = True
136        smart_union = True
137        allow_population_by_field_name = True
138        populate_by_name = True
139        extra = pydantic_v1.Extra.allow
140        json_encoders = {dt.datetime: serialize_datetime}
value: Optional[float]
string_value: str
id: str
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
source: ScoreSource
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['CATEGORICAL']
def json(self, **kwargs: Any) -> str:
109    def json(self, **kwargs: typing.Any) -> str:
110        kwargs_with_defaults: typing.Any = {
111            "by_alias": True,
112            "exclude_unset": True,
113            **kwargs,
114        }
115        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
117    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
118        kwargs_with_defaults_exclude_unset: typing.Any = {
119            "by_alias": True,
120            "exclude_unset": True,
121            **kwargs,
122        }
123        kwargs_with_defaults_exclude_none: typing.Any = {
124            "by_alias": True,
125            "exclude_none": True,
126            **kwargs,
127        }
128
129        return deep_union_pydantic_dicts(
130            super().dict(**kwargs_with_defaults_exclude_unset),
131            super().dict(**kwargs_with_defaults_exclude_none),
132        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Score_Categorical.Config:
134    class Config:
135        frozen = True
136        smart_union = True
137        allow_population_by_field_name = True
138        populate_by_name = True
139        extra = pydantic_v1.Extra.allow
140        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Score_Numeric(pydantic.v1.main.BaseModel):
14class Score_Numeric(pydantic_v1.BaseModel):
15    value: float
16    id: str
17    trace_id: typing.Optional[str] = pydantic_v1.Field(alias="traceId", default=None)
18    session_id: typing.Optional[str] = pydantic_v1.Field(
19        alias="sessionId", default=None
20    )
21    observation_id: typing.Optional[str] = pydantic_v1.Field(
22        alias="observationId", default=None
23    )
24    dataset_run_id: typing.Optional[str] = pydantic_v1.Field(
25        alias="datasetRunId", default=None
26    )
27    name: str
28    source: ScoreSource
29    timestamp: dt.datetime
30    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
31    updated_at: dt.datetime = pydantic_v1.Field(alias="updatedAt")
32    author_user_id: typing.Optional[str] = pydantic_v1.Field(
33        alias="authorUserId", default=None
34    )
35    comment: typing.Optional[str] = None
36    metadata: typing.Optional[typing.Any] = None
37    config_id: typing.Optional[str] = pydantic_v1.Field(alias="configId", default=None)
38    queue_id: typing.Optional[str] = pydantic_v1.Field(alias="queueId", default=None)
39    environment: typing.Optional[str] = None
40    data_type: typing.Literal["NUMERIC"] = pydantic_v1.Field(
41        alias="dataType", default="NUMERIC"
42    )
43
44    def json(self, **kwargs: typing.Any) -> str:
45        kwargs_with_defaults: typing.Any = {
46            "by_alias": True,
47            "exclude_unset": True,
48            **kwargs,
49        }
50        return super().json(**kwargs_with_defaults)
51
52    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
53        kwargs_with_defaults_exclude_unset: typing.Any = {
54            "by_alias": True,
55            "exclude_unset": True,
56            **kwargs,
57        }
58        kwargs_with_defaults_exclude_none: typing.Any = {
59            "by_alias": True,
60            "exclude_none": True,
61            **kwargs,
62        }
63
64        return deep_union_pydantic_dicts(
65            super().dict(**kwargs_with_defaults_exclude_unset),
66            super().dict(**kwargs_with_defaults_exclude_none),
67        )
68
69    class Config:
70        frozen = True
71        smart_union = True
72        allow_population_by_field_name = True
73        populate_by_name = True
74        extra = pydantic_v1.Extra.allow
75        json_encoders = {dt.datetime: serialize_datetime}
value: float
id: str
trace_id: Optional[str]
session_id: Optional[str]
observation_id: Optional[str]
dataset_run_id: Optional[str]
name: str
source: ScoreSource
timestamp: datetime.datetime
created_at: datetime.datetime
updated_at: datetime.datetime
author_user_id: Optional[str]
comment: Optional[str]
metadata: Optional[Any]
config_id: Optional[str]
queue_id: Optional[str]
environment: Optional[str]
data_type: Literal['NUMERIC']
def json(self, **kwargs: Any) -> str:
44    def json(self, **kwargs: typing.Any) -> str:
45        kwargs_with_defaults: typing.Any = {
46            "by_alias": True,
47            "exclude_unset": True,
48            **kwargs,
49        }
50        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
52    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
53        kwargs_with_defaults_exclude_unset: typing.Any = {
54            "by_alias": True,
55            "exclude_unset": True,
56            **kwargs,
57        }
58        kwargs_with_defaults_exclude_none: typing.Any = {
59            "by_alias": True,
60            "exclude_none": True,
61            **kwargs,
62        }
63
64        return deep_union_pydantic_dicts(
65            super().dict(**kwargs_with_defaults_exclude_unset),
66            super().dict(**kwargs_with_defaults_exclude_none),
67        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Score_Numeric.Config:
69    class Config:
70        frozen = True
71        smart_union = True
72        allow_population_by_field_name = True
73        populate_by_name = True
74        extra = pydantic_v1.Extra.allow
75        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class SdkLogBody(pydantic.v1.main.BaseModel):
11class SdkLogBody(pydantic_v1.BaseModel):
12    log: typing.Any
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
log: Any
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class SdkLogBody.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class SdkLogEvent(langfuse.api.BaseEvent):
13class SdkLogEvent(BaseEvent):
14    body: SdkLogBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
body: SdkLogBody
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class SdkLogEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ServiceProviderConfig(pydantic.v1.main.BaseModel):
16class ServiceProviderConfig(pydantic_v1.BaseModel):
17    schemas: typing.List[str]
18    documentation_uri: str = pydantic_v1.Field(alias="documentationUri")
19    patch: ScimFeatureSupport
20    bulk: BulkConfig
21    filter: FilterConfig
22    change_password: ScimFeatureSupport = pydantic_v1.Field(alias="changePassword")
23    sort: ScimFeatureSupport
24    etag: ScimFeatureSupport
25    authentication_schemes: typing.List[AuthenticationScheme] = pydantic_v1.Field(
26        alias="authenticationSchemes"
27    )
28    meta: ResourceMeta
29
30    def json(self, **kwargs: typing.Any) -> str:
31        kwargs_with_defaults: typing.Any = {
32            "by_alias": True,
33            "exclude_unset": True,
34            **kwargs,
35        }
36        return super().json(**kwargs_with_defaults)
37
38    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
39        kwargs_with_defaults_exclude_unset: typing.Any = {
40            "by_alias": True,
41            "exclude_unset": True,
42            **kwargs,
43        }
44        kwargs_with_defaults_exclude_none: typing.Any = {
45            "by_alias": True,
46            "exclude_none": True,
47            **kwargs,
48        }
49
50        return deep_union_pydantic_dicts(
51            super().dict(**kwargs_with_defaults_exclude_unset),
52            super().dict(**kwargs_with_defaults_exclude_none),
53        )
54
55    class Config:
56        frozen = True
57        smart_union = True
58        allow_population_by_field_name = True
59        populate_by_name = True
60        extra = pydantic_v1.Extra.allow
61        json_encoders = {dt.datetime: serialize_datetime}
schemas: List[str]
documentation_uri: str
bulk: BulkConfig
filter: FilterConfig
change_password: ScimFeatureSupport
authentication_schemes: List[AuthenticationScheme]
meta: ResourceMeta
def json(self, **kwargs: Any) -> str:
30    def json(self, **kwargs: typing.Any) -> str:
31        kwargs_with_defaults: typing.Any = {
32            "by_alias": True,
33            "exclude_unset": True,
34            **kwargs,
35        }
36        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
38    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
39        kwargs_with_defaults_exclude_unset: typing.Any = {
40            "by_alias": True,
41            "exclude_unset": True,
42            **kwargs,
43        }
44        kwargs_with_defaults_exclude_none: typing.Any = {
45            "by_alias": True,
46            "exclude_none": True,
47            **kwargs,
48        }
49
50        return deep_union_pydantic_dicts(
51            super().dict(**kwargs_with_defaults_exclude_unset),
52            super().dict(**kwargs_with_defaults_exclude_none),
53        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class ServiceProviderConfig.Config:
55    class Config:
56        frozen = True
57        smart_union = True
58        allow_population_by_field_name = True
59        populate_by_name = True
60        extra = pydantic_v1.Extra.allow
61        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class ServiceUnavailableError(langfuse.api.core.api_error.ApiError):
7class ServiceUnavailableError(ApiError):
8    def __init__(self) -> None:
9        super().__init__(status_code=503)

Common base class for all non-exit exceptions.

class Session(pydantic.v1.main.BaseModel):
11class Session(pydantic_v1.BaseModel):
12    id: str
13    created_at: dt.datetime = pydantic_v1.Field(alias="createdAt")
14    project_id: str = pydantic_v1.Field(alias="projectId")
15    environment: typing.Optional[str] = pydantic_v1.Field(default=None)
16    """
17    The environment from which this session originated.
18    """
19
20    def json(self, **kwargs: typing.Any) -> str:
21        kwargs_with_defaults: typing.Any = {
22            "by_alias": True,
23            "exclude_unset": True,
24            **kwargs,
25        }
26        return super().json(**kwargs_with_defaults)
27
28    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
29        kwargs_with_defaults_exclude_unset: typing.Any = {
30            "by_alias": True,
31            "exclude_unset": True,
32            **kwargs,
33        }
34        kwargs_with_defaults_exclude_none: typing.Any = {
35            "by_alias": True,
36            "exclude_none": True,
37            **kwargs,
38        }
39
40        return deep_union_pydantic_dicts(
41            super().dict(**kwargs_with_defaults_exclude_unset),
42            super().dict(**kwargs_with_defaults_exclude_none),
43        )
44
45    class Config:
46        frozen = True
47        smart_union = True
48        allow_population_by_field_name = True
49        populate_by_name = True
50        extra = pydantic_v1.Extra.allow
51        json_encoders = {dt.datetime: serialize_datetime}
id: str
created_at: datetime.datetime
project_id: str
environment: Optional[str]

The environment from which this session originated.

def json(self, **kwargs: Any) -> str:
20    def json(self, **kwargs: typing.Any) -> str:
21        kwargs_with_defaults: typing.Any = {
22            "by_alias": True,
23            "exclude_unset": True,
24            **kwargs,
25        }
26        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
28    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
29        kwargs_with_defaults_exclude_unset: typing.Any = {
30            "by_alias": True,
31            "exclude_unset": True,
32            **kwargs,
33        }
34        kwargs_with_defaults_exclude_none: typing.Any = {
35            "by_alias": True,
36            "exclude_none": True,
37            **kwargs,
38        }
39
40        return deep_union_pydantic_dicts(
41            super().dict(**kwargs_with_defaults_exclude_unset),
42            super().dict(**kwargs_with_defaults_exclude_none),
43        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Session.Config:
45    class Config:
46        frozen = True
47        smart_union = True
48        allow_population_by_field_name = True
49        populate_by_name = True
50        extra = pydantic_v1.Extra.allow
51        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class SessionWithTraces(langfuse.api.Session):
13class SessionWithTraces(Session):
14    traces: typing.List[Trace]
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
traces: List[Trace]
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class SessionWithTraces.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Sort(pydantic.v1.main.BaseModel):
11class Sort(pydantic_v1.BaseModel):
12    id: str
13
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)
21
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )
38
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
id: str
def json(self, **kwargs: Any) -> str:
14    def json(self, **kwargs: typing.Any) -> str:
15        kwargs_with_defaults: typing.Any = {
16            "by_alias": True,
17            "exclude_unset": True,
18            **kwargs,
19        }
20        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
22    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23        kwargs_with_defaults_exclude_unset: typing.Any = {
24            "by_alias": True,
25            "exclude_unset": True,
26            **kwargs,
27        }
28        kwargs_with_defaults_exclude_none: typing.Any = {
29            "by_alias": True,
30            "exclude_none": True,
31            **kwargs,
32        }
33
34        return deep_union_pydantic_dicts(
35            super().dict(**kwargs_with_defaults_exclude_unset),
36            super().dict(**kwargs_with_defaults_exclude_none),
37        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Sort.Config:
39    class Config:
40        frozen = True
41        smart_union = True
42        extra = pydantic_v1.Extra.allow
43        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class TextPrompt(langfuse.api.BasePrompt):
12class TextPrompt(BasePrompt):
13    prompt: str
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
prompt: str
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class TextPrompt.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Trace(pydantic.v1.main.BaseModel):
 11class Trace(pydantic_v1.BaseModel):
 12    id: str = pydantic_v1.Field()
 13    """
 14    The unique identifier of a trace
 15    """
 16
 17    timestamp: dt.datetime = pydantic_v1.Field()
 18    """
 19    The timestamp when the trace was created
 20    """
 21
 22    name: typing.Optional[str] = pydantic_v1.Field(default=None)
 23    """
 24    The name of the trace
 25    """
 26
 27    input: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
 28    """
 29    The input data of the trace. Can be any JSON.
 30    """
 31
 32    output: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
 33    """
 34    The output data of the trace. Can be any JSON.
 35    """
 36
 37    session_id: typing.Optional[str] = pydantic_v1.Field(
 38        alias="sessionId", default=None
 39    )
 40    """
 41    The session identifier associated with the trace
 42    """
 43
 44    release: typing.Optional[str] = pydantic_v1.Field(default=None)
 45    """
 46    The release version of the application when the trace was created
 47    """
 48
 49    version: typing.Optional[str] = pydantic_v1.Field(default=None)
 50    """
 51    The version of the trace
 52    """
 53
 54    user_id: typing.Optional[str] = pydantic_v1.Field(alias="userId", default=None)
 55    """
 56    The user identifier associated with the trace
 57    """
 58
 59    metadata: typing.Optional[typing.Any] = pydantic_v1.Field(default=None)
 60    """
 61    The metadata associated with the trace. Can be any JSON.
 62    """
 63
 64    tags: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
 65    """
 66    The tags associated with the trace. Can be an array of strings or null.
 67    """
 68
 69    public: typing.Optional[bool] = pydantic_v1.Field(default=None)
 70    """
 71    Public traces are accessible via url without login
 72    """
 73
 74    environment: typing.Optional[str] = pydantic_v1.Field(default=None)
 75    """
 76    The environment from which this trace originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.
 77    """
 78
 79    def json(self, **kwargs: typing.Any) -> str:
 80        kwargs_with_defaults: typing.Any = {
 81            "by_alias": True,
 82            "exclude_unset": True,
 83            **kwargs,
 84        }
 85        return super().json(**kwargs_with_defaults)
 86
 87    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 88        kwargs_with_defaults_exclude_unset: typing.Any = {
 89            "by_alias": True,
 90            "exclude_unset": True,
 91            **kwargs,
 92        }
 93        kwargs_with_defaults_exclude_none: typing.Any = {
 94            "by_alias": True,
 95            "exclude_none": True,
 96            **kwargs,
 97        }
 98
 99        return deep_union_pydantic_dicts(
100            super().dict(**kwargs_with_defaults_exclude_unset),
101            super().dict(**kwargs_with_defaults_exclude_none),
102        )
103
104    class Config:
105        frozen = True
106        smart_union = True
107        allow_population_by_field_name = True
108        populate_by_name = True
109        extra = pydantic_v1.Extra.allow
110        json_encoders = {dt.datetime: serialize_datetime}
id: str

The unique identifier of a trace

timestamp: datetime.datetime

The timestamp when the trace was created

name: Optional[str]

The name of the trace

input: Optional[Any]

The input data of the trace. Can be any JSON.

output: Optional[Any]

The output data of the trace. Can be any JSON.

session_id: Optional[str]

The session identifier associated with the trace

release: Optional[str]

The release version of the application when the trace was created

version: Optional[str]

The version of the trace

user_id: Optional[str]

The user identifier associated with the trace

metadata: Optional[Any]

The metadata associated with the trace. Can be any JSON.

tags: Optional[List[str]]

The tags associated with the trace. Can be an array of strings or null.

public: Optional[bool]

Public traces are accessible via url without login

environment: Optional[str]

The environment from which this trace originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.

def json(self, **kwargs: Any) -> str:
79    def json(self, **kwargs: typing.Any) -> str:
80        kwargs_with_defaults: typing.Any = {
81            "by_alias": True,
82            "exclude_unset": True,
83            **kwargs,
84        }
85        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
 87    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
 88        kwargs_with_defaults_exclude_unset: typing.Any = {
 89            "by_alias": True,
 90            "exclude_unset": True,
 91            **kwargs,
 92        }
 93        kwargs_with_defaults_exclude_none: typing.Any = {
 94            "by_alias": True,
 95            "exclude_none": True,
 96            **kwargs,
 97        }
 98
 99        return deep_union_pydantic_dicts(
100            super().dict(**kwargs_with_defaults_exclude_unset),
101            super().dict(**kwargs_with_defaults_exclude_none),
102        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Trace.Config:
104    class Config:
105        frozen = True
106        smart_union = True
107        allow_population_by_field_name = True
108        populate_by_name = True
109        extra = pydantic_v1.Extra.allow
110        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class TraceBody(pydantic.v1.main.BaseModel):
11class TraceBody(pydantic_v1.BaseModel):
12    id: typing.Optional[str] = None
13    timestamp: typing.Optional[dt.datetime] = None
14    name: typing.Optional[str] = None
15    user_id: typing.Optional[str] = pydantic_v1.Field(alias="userId", default=None)
16    input: typing.Optional[typing.Any] = None
17    output: typing.Optional[typing.Any] = None
18    session_id: typing.Optional[str] = pydantic_v1.Field(
19        alias="sessionId", default=None
20    )
21    release: typing.Optional[str] = None
22    version: typing.Optional[str] = None
23    metadata: typing.Optional[typing.Any] = None
24    tags: typing.Optional[typing.List[str]] = None
25    environment: typing.Optional[str] = None
26    public: typing.Optional[bool] = pydantic_v1.Field(default=None)
27    """
28    Make trace publicly accessible via url
29    """
30
31    def json(self, **kwargs: typing.Any) -> str:
32        kwargs_with_defaults: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        return super().json(**kwargs_with_defaults)
38
39    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
40        kwargs_with_defaults_exclude_unset: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        kwargs_with_defaults_exclude_none: typing.Any = {
46            "by_alias": True,
47            "exclude_none": True,
48            **kwargs,
49        }
50
51        return deep_union_pydantic_dicts(
52            super().dict(**kwargs_with_defaults_exclude_unset),
53            super().dict(**kwargs_with_defaults_exclude_none),
54        )
55
56    class Config:
57        frozen = True
58        smart_union = True
59        allow_population_by_field_name = True
60        populate_by_name = True
61        extra = pydantic_v1.Extra.allow
62        json_encoders = {dt.datetime: serialize_datetime}
id: Optional[str]
timestamp: Optional[datetime.datetime]
name: Optional[str]
user_id: Optional[str]
input: Optional[Any]
output: Optional[Any]
session_id: Optional[str]
release: Optional[str]
version: Optional[str]
metadata: Optional[Any]
tags: Optional[List[str]]
environment: Optional[str]
public: Optional[bool]

Make trace publicly accessible via url

def json(self, **kwargs: Any) -> str:
31    def json(self, **kwargs: typing.Any) -> str:
32        kwargs_with_defaults: typing.Any = {
33            "by_alias": True,
34            "exclude_unset": True,
35            **kwargs,
36        }
37        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
39    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
40        kwargs_with_defaults_exclude_unset: typing.Any = {
41            "by_alias": True,
42            "exclude_unset": True,
43            **kwargs,
44        }
45        kwargs_with_defaults_exclude_none: typing.Any = {
46            "by_alias": True,
47            "exclude_none": True,
48            **kwargs,
49        }
50
51        return deep_union_pydantic_dicts(
52            super().dict(**kwargs_with_defaults_exclude_unset),
53            super().dict(**kwargs_with_defaults_exclude_none),
54        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class TraceBody.Config:
56    class Config:
57        frozen = True
58        smart_union = True
59        allow_population_by_field_name = True
60        populate_by_name = True
61        extra = pydantic_v1.Extra.allow
62        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class TraceEvent(langfuse.api.BaseEvent):
13class TraceEvent(BaseEvent):
14    body: TraceBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
body: TraceBody
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class TraceEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class TraceWithDetails(langfuse.api.Trace):
12class TraceWithDetails(Trace):
13    html_path: str = pydantic_v1.Field(alias="htmlPath")
14    """
15    Path of trace in Langfuse UI
16    """
17
18    latency: float = pydantic_v1.Field()
19    """
20    Latency of trace in seconds
21    """
22
23    total_cost: float = pydantic_v1.Field(alias="totalCost")
24    """
25    Cost of trace in USD
26    """
27
28    observations: typing.List[str] = pydantic_v1.Field()
29    """
30    List of observation ids
31    """
32
33    scores: typing.List[str] = pydantic_v1.Field()
34    """
35    List of score ids
36    """
37
38    def json(self, **kwargs: typing.Any) -> str:
39        kwargs_with_defaults: typing.Any = {
40            "by_alias": True,
41            "exclude_unset": True,
42            **kwargs,
43        }
44        return super().json(**kwargs_with_defaults)
45
46    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
47        kwargs_with_defaults_exclude_unset: typing.Any = {
48            "by_alias": True,
49            "exclude_unset": True,
50            **kwargs,
51        }
52        kwargs_with_defaults_exclude_none: typing.Any = {
53            "by_alias": True,
54            "exclude_none": True,
55            **kwargs,
56        }
57
58        return deep_union_pydantic_dicts(
59            super().dict(**kwargs_with_defaults_exclude_unset),
60            super().dict(**kwargs_with_defaults_exclude_none),
61        )
62
63    class Config:
64        frozen = True
65        smart_union = True
66        allow_population_by_field_name = True
67        populate_by_name = True
68        extra = pydantic_v1.Extra.allow
69        json_encoders = {dt.datetime: serialize_datetime}
html_path: str

Path of trace in Langfuse UI

latency: float

Latency of trace in seconds

total_cost: float

Cost of trace in USD

observations: List[str]

List of observation ids

scores: List[str]

List of score ids

def json(self, **kwargs: Any) -> str:
38    def json(self, **kwargs: typing.Any) -> str:
39        kwargs_with_defaults: typing.Any = {
40            "by_alias": True,
41            "exclude_unset": True,
42            **kwargs,
43        }
44        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
46    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
47        kwargs_with_defaults_exclude_unset: typing.Any = {
48            "by_alias": True,
49            "exclude_unset": True,
50            **kwargs,
51        }
52        kwargs_with_defaults_exclude_none: typing.Any = {
53            "by_alias": True,
54            "exclude_none": True,
55            **kwargs,
56        }
57
58        return deep_union_pydantic_dicts(
59            super().dict(**kwargs_with_defaults_exclude_unset),
60            super().dict(**kwargs_with_defaults_exclude_none),
61        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class TraceWithDetails.Config:
63    class Config:
64        frozen = True
65        smart_union = True
66        allow_population_by_field_name = True
67        populate_by_name = True
68        extra = pydantic_v1.Extra.allow
69        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class TraceWithFullDetails(langfuse.api.Trace):
14class TraceWithFullDetails(Trace):
15    html_path: str = pydantic_v1.Field(alias="htmlPath")
16    """
17    Path of trace in Langfuse UI
18    """
19
20    latency: float = pydantic_v1.Field()
21    """
22    Latency of trace in seconds
23    """
24
25    total_cost: float = pydantic_v1.Field(alias="totalCost")
26    """
27    Cost of trace in USD
28    """
29
30    observations: typing.List[ObservationsView] = pydantic_v1.Field()
31    """
32    List of observations
33    """
34
35    scores: typing.List[ScoreV1] = pydantic_v1.Field()
36    """
37    List of scores
38    """
39
40    def json(self, **kwargs: typing.Any) -> str:
41        kwargs_with_defaults: typing.Any = {
42            "by_alias": True,
43            "exclude_unset": True,
44            **kwargs,
45        }
46        return super().json(**kwargs_with_defaults)
47
48    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
49        kwargs_with_defaults_exclude_unset: typing.Any = {
50            "by_alias": True,
51            "exclude_unset": True,
52            **kwargs,
53        }
54        kwargs_with_defaults_exclude_none: typing.Any = {
55            "by_alias": True,
56            "exclude_none": True,
57            **kwargs,
58        }
59
60        return deep_union_pydantic_dicts(
61            super().dict(**kwargs_with_defaults_exclude_unset),
62            super().dict(**kwargs_with_defaults_exclude_none),
63        )
64
65    class Config:
66        frozen = True
67        smart_union = True
68        allow_population_by_field_name = True
69        populate_by_name = True
70        extra = pydantic_v1.Extra.allow
71        json_encoders = {dt.datetime: serialize_datetime}
html_path: str

Path of trace in Langfuse UI

latency: float

Latency of trace in seconds

total_cost: float

Cost of trace in USD

observations: List[ObservationsView]

List of observations

List of scores

def json(self, **kwargs: Any) -> str:
40    def json(self, **kwargs: typing.Any) -> str:
41        kwargs_with_defaults: typing.Any = {
42            "by_alias": True,
43            "exclude_unset": True,
44            **kwargs,
45        }
46        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
48    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
49        kwargs_with_defaults_exclude_unset: typing.Any = {
50            "by_alias": True,
51            "exclude_unset": True,
52            **kwargs,
53        }
54        kwargs_with_defaults_exclude_none: typing.Any = {
55            "by_alias": True,
56            "exclude_none": True,
57            **kwargs,
58        }
59
60        return deep_union_pydantic_dicts(
61            super().dict(**kwargs_with_defaults_exclude_unset),
62            super().dict(**kwargs_with_defaults_exclude_none),
63        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class TraceWithFullDetails.Config:
65    class Config:
66        frozen = True
67        smart_union = True
68        allow_population_by_field_name = True
69        populate_by_name = True
70        extra = pydantic_v1.Extra.allow
71        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Traces(pydantic.v1.main.BaseModel):
13class Traces(pydantic_v1.BaseModel):
14    data: typing.List[TraceWithDetails]
15    meta: MetaResponse
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
data: List[TraceWithDetails]
meta: langfuse.api.resources.utils.resources.pagination.types.meta_response.MetaResponse
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Traces.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class UnauthorizedError(langfuse.api.core.api_error.ApiError):
 9class UnauthorizedError(ApiError):
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=401, body=body)

Common base class for all non-exit exceptions.

UnauthorizedError(body: Any)
10    def __init__(self, body: typing.Any):
11        super().__init__(status_code=401, body=body)
class UpdateAnnotationQueueItemRequest(pydantic.v1.main.BaseModel):
12class UpdateAnnotationQueueItemRequest(pydantic_v1.BaseModel):
13    status: typing.Optional[AnnotationQueueStatus] = None
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
status: Optional[AnnotationQueueStatus]
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UpdateAnnotationQueueItemRequest.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        extra = pydantic_v1.Extra.allow
44        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class UpdateEventBody(langfuse.api.OptionalObservationBody):
12class UpdateEventBody(OptionalObservationBody):
13    id: str
14
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)
22
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )
39
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
id: str
def json(self, **kwargs: Any) -> str:
15    def json(self, **kwargs: typing.Any) -> str:
16        kwargs_with_defaults: typing.Any = {
17            "by_alias": True,
18            "exclude_unset": True,
19            **kwargs,
20        }
21        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
23    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24        kwargs_with_defaults_exclude_unset: typing.Any = {
25            "by_alias": True,
26            "exclude_unset": True,
27            **kwargs,
28        }
29        kwargs_with_defaults_exclude_none: typing.Any = {
30            "by_alias": True,
31            "exclude_none": True,
32            **kwargs,
33        }
34
35        return deep_union_pydantic_dicts(
36            super().dict(**kwargs_with_defaults_exclude_unset),
37            super().dict(**kwargs_with_defaults_exclude_none),
38        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UpdateEventBody.Config:
40    class Config:
41        frozen = True
42        smart_union = True
43        allow_population_by_field_name = True
44        populate_by_name = True
45        extra = pydantic_v1.Extra.allow
46        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class UpdateGenerationBody(langfuse.api.UpdateSpanBody):
15class UpdateGenerationBody(UpdateSpanBody):
16    completion_start_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
17        alias="completionStartTime", default=None
18    )
19    model: typing.Optional[str] = None
20    model_parameters: typing.Optional[typing.Dict[str, MapValue]] = pydantic_v1.Field(
21        alias="modelParameters", default=None
22    )
23    usage: typing.Optional[IngestionUsage] = None
24    prompt_name: typing.Optional[str] = pydantic_v1.Field(
25        alias="promptName", default=None
26    )
27    usage_details: typing.Optional[UsageDetails] = pydantic_v1.Field(
28        alias="usageDetails", default=None
29    )
30    cost_details: typing.Optional[typing.Dict[str, float]] = pydantic_v1.Field(
31        alias="costDetails", default=None
32    )
33    prompt_version: typing.Optional[int] = pydantic_v1.Field(
34        alias="promptVersion", default=None
35    )
36
37    def json(self, **kwargs: typing.Any) -> str:
38        kwargs_with_defaults: typing.Any = {
39            "by_alias": True,
40            "exclude_unset": True,
41            **kwargs,
42        }
43        return super().json(**kwargs_with_defaults)
44
45    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
46        kwargs_with_defaults_exclude_unset: typing.Any = {
47            "by_alias": True,
48            "exclude_unset": True,
49            **kwargs,
50        }
51        kwargs_with_defaults_exclude_none: typing.Any = {
52            "by_alias": True,
53            "exclude_none": True,
54            **kwargs,
55        }
56
57        return deep_union_pydantic_dicts(
58            super().dict(**kwargs_with_defaults_exclude_unset),
59            super().dict(**kwargs_with_defaults_exclude_none),
60        )
61
62    class Config:
63        frozen = True
64        smart_union = True
65        allow_population_by_field_name = True
66        populate_by_name = True
67        extra = pydantic_v1.Extra.allow
68        json_encoders = {dt.datetime: serialize_datetime}
completion_start_time: Optional[datetime.datetime]
model: Optional[str]
model_parameters: Optional[Dict[str, Union[str, NoneType, int, bool, List[str]]]]
usage: Union[Usage, OpenAiUsage, NoneType]
prompt_name: Optional[str]
usage_details: Union[Dict[str, int], OpenAiCompletionUsageSchema, OpenAiResponseUsageSchema, NoneType]
cost_details: Optional[Dict[str, float]]
prompt_version: Optional[int]
def json(self, **kwargs: Any) -> str:
37    def json(self, **kwargs: typing.Any) -> str:
38        kwargs_with_defaults: typing.Any = {
39            "by_alias": True,
40            "exclude_unset": True,
41            **kwargs,
42        }
43        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
45    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
46        kwargs_with_defaults_exclude_unset: typing.Any = {
47            "by_alias": True,
48            "exclude_unset": True,
49            **kwargs,
50        }
51        kwargs_with_defaults_exclude_none: typing.Any = {
52            "by_alias": True,
53            "exclude_none": True,
54            **kwargs,
55        }
56
57        return deep_union_pydantic_dicts(
58            super().dict(**kwargs_with_defaults_exclude_unset),
59            super().dict(**kwargs_with_defaults_exclude_none),
60        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UpdateGenerationBody.Config:
62    class Config:
63        frozen = True
64        smart_union = True
65        allow_population_by_field_name = True
66        populate_by_name = True
67        extra = pydantic_v1.Extra.allow
68        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class UpdateGenerationEvent(langfuse.api.BaseEvent):
13class UpdateGenerationEvent(BaseEvent):
14    body: UpdateGenerationBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UpdateGenerationEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class UpdateObservationEvent(langfuse.api.BaseEvent):
13class UpdateObservationEvent(BaseEvent):
14    body: ObservationBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UpdateObservationEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class UpdateSpanBody(langfuse.api.UpdateEventBody):
12class UpdateSpanBody(UpdateEventBody):
13    end_time: typing.Optional[dt.datetime] = pydantic_v1.Field(
14        alias="endTime", default=None
15    )
16
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)
24
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )
41
42    class Config:
43        frozen = True
44        smart_union = True
45        allow_population_by_field_name = True
46        populate_by_name = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
end_time: Optional[datetime.datetime]
def json(self, **kwargs: Any) -> str:
17    def json(self, **kwargs: typing.Any) -> str:
18        kwargs_with_defaults: typing.Any = {
19            "by_alias": True,
20            "exclude_unset": True,
21            **kwargs,
22        }
23        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
25    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26        kwargs_with_defaults_exclude_unset: typing.Any = {
27            "by_alias": True,
28            "exclude_unset": True,
29            **kwargs,
30        }
31        kwargs_with_defaults_exclude_none: typing.Any = {
32            "by_alias": True,
33            "exclude_none": True,
34            **kwargs,
35        }
36
37        return deep_union_pydantic_dicts(
38            super().dict(**kwargs_with_defaults_exclude_unset),
39            super().dict(**kwargs_with_defaults_exclude_none),
40        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UpdateSpanBody.Config:
42    class Config:
43        frozen = True
44        smart_union = True
45        allow_population_by_field_name = True
46        populate_by_name = True
47        extra = pydantic_v1.Extra.allow
48        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class UpdateSpanEvent(langfuse.api.BaseEvent):
13class UpdateSpanEvent(BaseEvent):
14    body: UpdateSpanBody
15
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)
23
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )
40
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
def json(self, **kwargs: Any) -> str:
16    def json(self, **kwargs: typing.Any) -> str:
17        kwargs_with_defaults: typing.Any = {
18            "by_alias": True,
19            "exclude_unset": True,
20            **kwargs,
21        }
22        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
24    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25        kwargs_with_defaults_exclude_unset: typing.Any = {
26            "by_alias": True,
27            "exclude_unset": True,
28            **kwargs,
29        }
30        kwargs_with_defaults_exclude_none: typing.Any = {
31            "by_alias": True,
32            "exclude_none": True,
33            **kwargs,
34        }
35
36        return deep_union_pydantic_dicts(
37            super().dict(**kwargs_with_defaults_exclude_unset),
38            super().dict(**kwargs_with_defaults_exclude_none),
39        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UpdateSpanEvent.Config:
41    class Config:
42        frozen = True
43        smart_union = True
44        allow_population_by_field_name = True
45        populate_by_name = True
46        extra = pydantic_v1.Extra.allow
47        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class UpsertLlmConnectionRequest(pydantic.v1.main.BaseModel):
12class UpsertLlmConnectionRequest(pydantic_v1.BaseModel):
13    """
14    Request to create or update an LLM connection (upsert)
15    """
16
17    provider: str = pydantic_v1.Field()
18    """
19    Provider name (e.g., 'openai', 'my-gateway'). Must be unique in project, used for upserting.
20    """
21
22    adapter: LlmAdapter = pydantic_v1.Field()
23    """
24    The adapter used to interface with the LLM
25    """
26
27    secret_key: str = pydantic_v1.Field(alias="secretKey")
28    """
29    Secret key for the LLM API.
30    """
31
32    base_url: typing.Optional[str] = pydantic_v1.Field(alias="baseURL", default=None)
33    """
34    Custom base URL for the LLM API
35    """
36
37    custom_models: typing.Optional[typing.List[str]] = pydantic_v1.Field(
38        alias="customModels", default=None
39    )
40    """
41    List of custom model names
42    """
43
44    with_default_models: typing.Optional[bool] = pydantic_v1.Field(
45        alias="withDefaultModels", default=None
46    )
47    """
48    Whether to include default models. Default is true.
49    """
50
51    extra_headers: typing.Optional[typing.Dict[str, str]] = pydantic_v1.Field(
52        alias="extraHeaders", default=None
53    )
54    """
55    Extra headers to send with requests
56    """
57
58    def json(self, **kwargs: typing.Any) -> str:
59        kwargs_with_defaults: typing.Any = {
60            "by_alias": True,
61            "exclude_unset": True,
62            **kwargs,
63        }
64        return super().json(**kwargs_with_defaults)
65
66    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
67        kwargs_with_defaults_exclude_unset: typing.Any = {
68            "by_alias": True,
69            "exclude_unset": True,
70            **kwargs,
71        }
72        kwargs_with_defaults_exclude_none: typing.Any = {
73            "by_alias": True,
74            "exclude_none": True,
75            **kwargs,
76        }
77
78        return deep_union_pydantic_dicts(
79            super().dict(**kwargs_with_defaults_exclude_unset),
80            super().dict(**kwargs_with_defaults_exclude_none),
81        )
82
83    class Config:
84        frozen = True
85        smart_union = True
86        allow_population_by_field_name = True
87        populate_by_name = True
88        extra = pydantic_v1.Extra.allow
89        json_encoders = {dt.datetime: serialize_datetime}

Request to create or update an LLM connection (upsert)

provider: str

Provider name (e.g., 'openai', 'my-gateway'). Must be unique in project, used for upserting.

adapter: LlmAdapter

The adapter used to interface with the LLM

secret_key: str

Secret key for the LLM API.

base_url: Optional[str]

Custom base URL for the LLM API

custom_models: Optional[List[str]]

List of custom model names

with_default_models: Optional[bool]

Whether to include default models. Default is true.

extra_headers: Optional[Dict[str, str]]

Extra headers to send with requests

def json(self, **kwargs: Any) -> str:
58    def json(self, **kwargs: typing.Any) -> str:
59        kwargs_with_defaults: typing.Any = {
60            "by_alias": True,
61            "exclude_unset": True,
62            **kwargs,
63        }
64        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
66    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
67        kwargs_with_defaults_exclude_unset: typing.Any = {
68            "by_alias": True,
69            "exclude_unset": True,
70            **kwargs,
71        }
72        kwargs_with_defaults_exclude_none: typing.Any = {
73            "by_alias": True,
74            "exclude_none": True,
75            **kwargs,
76        }
77
78        return deep_union_pydantic_dicts(
79            super().dict(**kwargs_with_defaults_exclude_unset),
80            super().dict(**kwargs_with_defaults_exclude_none),
81        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UpsertLlmConnectionRequest.Config:
83    class Config:
84        frozen = True
85        smart_union = True
86        allow_population_by_field_name = True
87        populate_by_name = True
88        extra = pydantic_v1.Extra.allow
89        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
class Usage(pydantic.v1.main.BaseModel):
12class Usage(pydantic_v1.BaseModel):
13    """
14    (Deprecated. Use usageDetails and costDetails instead.) Standard interface for usage and cost
15    """
16
17    input: typing.Optional[int] = pydantic_v1.Field(default=None)
18    """
19    Number of input units (e.g. tokens)
20    """
21
22    output: typing.Optional[int] = pydantic_v1.Field(default=None)
23    """
24    Number of output units (e.g. tokens)
25    """
26
27    total: typing.Optional[int] = pydantic_v1.Field(default=None)
28    """
29    Defaults to input+output if not set
30    """
31
32    unit: typing.Optional[ModelUsageUnit] = None
33    input_cost: typing.Optional[float] = pydantic_v1.Field(
34        alias="inputCost", default=None
35    )
36    """
37    USD input cost
38    """
39
40    output_cost: typing.Optional[float] = pydantic_v1.Field(
41        alias="outputCost", default=None
42    )
43    """
44    USD output cost
45    """
46
47    total_cost: typing.Optional[float] = pydantic_v1.Field(
48        alias="totalCost", default=None
49    )
50    """
51    USD total cost, defaults to input+output
52    """
53
54    def json(self, **kwargs: typing.Any) -> str:
55        kwargs_with_defaults: typing.Any = {
56            "by_alias": True,
57            "exclude_unset": True,
58            **kwargs,
59        }
60        return super().json(**kwargs_with_defaults)
61
62    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
63        kwargs_with_defaults_exclude_unset: typing.Any = {
64            "by_alias": True,
65            "exclude_unset": True,
66            **kwargs,
67        }
68        kwargs_with_defaults_exclude_none: typing.Any = {
69            "by_alias": True,
70            "exclude_none": True,
71            **kwargs,
72        }
73
74        return deep_union_pydantic_dicts(
75            super().dict(**kwargs_with_defaults_exclude_unset),
76            super().dict(**kwargs_with_defaults_exclude_none),
77        )
78
79    class Config:
80        frozen = True
81        smart_union = True
82        allow_population_by_field_name = True
83        populate_by_name = True
84        extra = pydantic_v1.Extra.allow
85        json_encoders = {dt.datetime: serialize_datetime}

(Deprecated. Use usageDetails and costDetails instead.) Standard interface for usage and cost

input: Optional[int]

Number of input units (e.g. tokens)

output: Optional[int]

Number of output units (e.g. tokens)

total: Optional[int]

Defaults to input+output if not set

unit: Optional[ModelUsageUnit]
input_cost: Optional[float]

USD input cost

output_cost: Optional[float]

USD output cost

total_cost: Optional[float]

USD total cost, defaults to input+output

def json(self, **kwargs: Any) -> str:
54    def json(self, **kwargs: typing.Any) -> str:
55        kwargs_with_defaults: typing.Any = {
56            "by_alias": True,
57            "exclude_unset": True,
58            **kwargs,
59        }
60        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
62    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
63        kwargs_with_defaults_exclude_unset: typing.Any = {
64            "by_alias": True,
65            "exclude_unset": True,
66            **kwargs,
67        }
68        kwargs_with_defaults_exclude_none: typing.Any = {
69            "by_alias": True,
70            "exclude_none": True,
71            **kwargs,
72        }
73
74        return deep_union_pydantic_dicts(
75            super().dict(**kwargs_with_defaults_exclude_unset),
76            super().dict(**kwargs_with_defaults_exclude_none),
77        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class Usage.Config:
79    class Config:
80        frozen = True
81        smart_union = True
82        allow_population_by_field_name = True
83        populate_by_name = True
84        extra = pydantic_v1.Extra.allow
85        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}
UsageDetails = typing.Union[typing.Dict[str, int], OpenAiCompletionUsageSchema, OpenAiResponseUsageSchema]
class UserMeta(pydantic.v1.main.BaseModel):
11class UserMeta(pydantic_v1.BaseModel):
12    resource_type: str = pydantic_v1.Field(alias="resourceType")
13    created: typing.Optional[str] = None
14    last_modified: typing.Optional[str] = pydantic_v1.Field(
15        alias="lastModified", default=None
16    )
17
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)
25
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )
42
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
resource_type: str
created: Optional[str]
last_modified: Optional[str]
def json(self, **kwargs: Any) -> str:
18    def json(self, **kwargs: typing.Any) -> str:
19        kwargs_with_defaults: typing.Any = {
20            "by_alias": True,
21            "exclude_unset": True,
22            **kwargs,
23        }
24        return super().json(**kwargs_with_defaults)

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

def dict(self, **kwargs: Any) -> Dict[str, Any]:
26    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27        kwargs_with_defaults_exclude_unset: typing.Any = {
28            "by_alias": True,
29            "exclude_unset": True,
30            **kwargs,
31        }
32        kwargs_with_defaults_exclude_none: typing.Any = {
33            "by_alias": True,
34            "exclude_none": True,
35            **kwargs,
36        }
37
38        return deep_union_pydantic_dicts(
39            super().dict(**kwargs_with_defaults_exclude_unset),
40            super().dict(**kwargs_with_defaults_exclude_none),
41        )

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

class UserMeta.Config:
43    class Config:
44        frozen = True
45        smart_union = True
46        allow_population_by_field_name = True
47        populate_by_name = True
48        extra = pydantic_v1.Extra.allow
49        json_encoders = {dt.datetime: serialize_datetime}
frozen = True
smart_union = True
allow_population_by_field_name = True
populate_by_name = True
extra = <Extra.allow: 'allow'>
json_encoders = {<class 'datetime.datetime'>: <function serialize_datetime>}