Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 4 additions & 120 deletions langfuse/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
experiments,
feedback,
health,
ingestion,
llm_connections,
media,
metrics,
Expand Down Expand Up @@ -101,6 +100,7 @@
NumericScore,
ObservationLevel,
ObservationV2,
OpenAiUsage,
PricingTier,
PricingTierAttributeCondition,
PricingTierAttributeSource,
Expand Down Expand Up @@ -257,47 +257,6 @@
SubmitFeedbackResponse,
)
from .health import HealthResponse, ServiceUnavailableError
from .ingestion import (
BaseEvent,
CreateEventBody,
CreateEventEvent,
CreateGenerationBody,
CreateGenerationEvent,
CreateObservationEvent,
CreateSpanBody,
CreateSpanEvent,
IngestionError,
IngestionEvent,
IngestionEvent_EventCreate,
IngestionEvent_GenerationCreate,
IngestionEvent_GenerationUpdate,
IngestionEvent_ObservationCreate,
IngestionEvent_ObservationUpdate,
IngestionEvent_ScoreCreate,
IngestionEvent_SpanCreate,
IngestionEvent_SpanUpdate,
IngestionEvent_TraceCreate,
IngestionResponse,
IngestionSuccess,
IngestionUsage,
ObservationBody,
ObservationType,
OpenAiCompletionUsageSchema,
OpenAiResponseUsageSchema,
OpenAiUsage,
OptionalObservationBody,
ScoreBody,
ScoreEvent,
TraceBody,
TraceEvent,
UpdateEventBody,
UpdateGenerationBody,
UpdateGenerationEvent,
UpdateObservationEvent,
UpdateSpanBody,
UpdateSpanEvent,
UsageDetails,
)
from .llm_connections import (
DeleteLlmConnectionResponse,
LlmAdapter,
Expand Down Expand Up @@ -407,6 +366,7 @@
GetScoresV3Meta,
GetScoresV3Response,
NumericScoreV3,
ScoreBody,
ScoreSubjectExperimentV3,
ScoreSubjectObservationV3,
ScoreSubjectSessionV3,
Expand Down Expand Up @@ -440,7 +400,6 @@
"AsyncLangfuseAPI": ".client",
"AuthenticationScheme": ".scim",
"BadRequestError": ".evaluation_errors",
"BaseEvent": ".ingestion",
"BasePrompt": ".prompts",
"BaseScore": ".commons",
"BaseScoreV3": ".scores",
Expand Down Expand Up @@ -491,13 +450,8 @@
"CreateEvaluatorRequest": ".evaluators",
"CreateEvaluatorRequest_Code": ".evaluators",
"CreateEvaluatorRequest_LlmAsJudge": ".evaluators",
"CreateEventBody": ".ingestion",
"CreateEventEvent": ".ingestion",
"CreateGenerationBody": ".ingestion",
"CreateGenerationEvent": ".ingestion",
"CreateLlmAsJudgeEvaluatorRequest": ".evaluators",
"CreateModelRequest": ".models",
"CreateObservationEvent": ".ingestion",
"CreatePromptRequest": ".prompts",
"CreateScoreBatchError": ".scores",
"CreateScoreBatchResponse": ".scores",
Expand All @@ -508,8 +462,6 @@
"CreateScoreValue": ".commons",
"CreateScoresRequest": ".scores",
"CreateScoresResponse": ".scores",
"CreateSpanBody": ".ingestion",
"CreateSpanEvent": ".ingestion",
"CreateTextPromptRequest": ".prompts",
"CreateTextPromptType": ".prompts",
"Creator": ".evaluators",
Expand Down Expand Up @@ -600,20 +552,6 @@
"GetScoresV3Meta": ".scores",
"GetScoresV3Response": ".scores",
"HealthResponse": ".health",
"IngestionError": ".ingestion",
"IngestionEvent": ".ingestion",
"IngestionEvent_EventCreate": ".ingestion",
"IngestionEvent_GenerationCreate": ".ingestion",
"IngestionEvent_GenerationUpdate": ".ingestion",
"IngestionEvent_ObservationCreate": ".ingestion",
"IngestionEvent_ObservationUpdate": ".ingestion",
"IngestionEvent_ScoreCreate": ".ingestion",
"IngestionEvent_SpanCreate": ".ingestion",
"IngestionEvent_SpanUpdate": ".ingestion",
"IngestionEvent_TraceCreate": ".ingestion",
"IngestionResponse": ".ingestion",
"IngestionSuccess": ".ingestion",
"IngestionUsage": ".ingestion",
"InternalServerError": ".evaluation_errors",
"LangfuseAPI": ".client",
"LegacyEvaluationObject": ".evaluation_commons",
Expand Down Expand Up @@ -641,16 +579,11 @@
"NumberObjectEvaluationRuleFilter": ".evaluation_commons",
"NumericScore": ".commons",
"NumericScoreV3": ".scores",
"ObservationBody": ".ingestion",
"ObservationLevel": ".commons",
"ObservationType": ".ingestion",
"ObservationV2": ".commons",
"ObservationsV2Meta": ".observations",
"ObservationsV2Response": ".observations",
"OpenAiCompletionUsageSchema": ".ingestion",
"OpenAiResponseUsageSchema": ".ingestion",
"OpenAiUsage": ".ingestion",
"OptionalObservationBody": ".ingestion",
"OpenAiUsage": ".commons",
"Organization": ".projects",
"OrganizationApiKey": ".organizations",
"OrganizationApiKeysResponse": ".organizations",
Expand Down Expand Up @@ -719,12 +652,11 @@
"ScimUser": ".scim",
"ScimUsersListResponse": ".scim",
"Score": ".commons",
"ScoreBody": ".ingestion",
"ScoreBody": ".scores",
"ScoreConfig": ".commons",
"ScoreConfigDataType": ".commons",
"ScoreConfigs": ".score_configs",
"ScoreDataType": ".commons",
"ScoreEvent": ".ingestion",
"ScoreSource": ".commons",
"ScoreSubjectExperimentV3": ".scores",
"ScoreSubjectObservationV3": ".scores",
Expand Down Expand Up @@ -757,25 +689,16 @@
"TextScore": ".commons",
"TextScoreV3": ".scores",
"TooManyRequestsError": ".evaluation_errors",
"TraceBody": ".ingestion",
"TraceEvent": ".ingestion",
"UnauthorizedError": ".commons",
"UpdateAnnotationQueueItemRequest": ".annotation_queues",
"UpdateCodeEvaluatorRequest": ".evaluators",
"UpdateEvaluationRuleRequest": ".evaluation_rules",
"UpdateEvaluatorMetadataRequest": ".evaluators",
"UpdateEvaluatorRequest": ".evaluators",
"UpdateEventBody": ".ingestion",
"UpdateGenerationBody": ".ingestion",
"UpdateGenerationEvent": ".ingestion",
"UpdateLlmAsJudgeEvaluatorRequest": ".evaluators",
"UpdateObservationEvent": ".ingestion",
"UpdateScoreConfigRequest": ".score_configs",
"UpdateSpanBody": ".ingestion",
"UpdateSpanEvent": ".ingestion",
"UpsertLlmConnectionRequest": ".llm_connections",
"Usage": ".commons",
"UsageDetails": ".ingestion",
"UserMeta": ".scim",
"annotation_queues": ".annotation_queues",
"blob_storage_integrations": ".blob_storage_integrations",
Expand All @@ -790,7 +713,6 @@
"experiments": ".experiments",
"feedback": ".feedback",
"health": ".health",
"ingestion": ".ingestion",
"llm_connections": ".llm_connections",
"media": ".media",
"metrics": ".metrics",
Expand Down Expand Up @@ -852,7 +774,6 @@ def __dir__():
"AsyncLangfuseAPI",
"AuthenticationScheme",
"BadRequestError",
"BaseEvent",
"BasePrompt",
"BaseScore",
"BaseScoreV3",
Expand Down Expand Up @@ -903,13 +824,8 @@ def __dir__():
"CreateEvaluatorRequest",
"CreateEvaluatorRequest_Code",
"CreateEvaluatorRequest_LlmAsJudge",
"CreateEventBody",
"CreateEventEvent",
"CreateGenerationBody",
"CreateGenerationEvent",
"CreateLlmAsJudgeEvaluatorRequest",
"CreateModelRequest",
"CreateObservationEvent",
"CreatePromptRequest",
"CreateScoreBatchError",
"CreateScoreBatchResponse",
Expand All @@ -920,8 +836,6 @@ def __dir__():
"CreateScoreValue",
"CreateScoresRequest",
"CreateScoresResponse",
"CreateSpanBody",
"CreateSpanEvent",
"CreateTextPromptRequest",
"CreateTextPromptType",
"Creator",
Expand Down Expand Up @@ -1012,20 +926,6 @@ def __dir__():
"GetScoresV3Meta",
"GetScoresV3Response",
"HealthResponse",
"IngestionError",
"IngestionEvent",
"IngestionEvent_EventCreate",
"IngestionEvent_GenerationCreate",
"IngestionEvent_GenerationUpdate",
"IngestionEvent_ObservationCreate",
"IngestionEvent_ObservationUpdate",
"IngestionEvent_ScoreCreate",
"IngestionEvent_SpanCreate",
"IngestionEvent_SpanUpdate",
"IngestionEvent_TraceCreate",
"IngestionResponse",
"IngestionSuccess",
"IngestionUsage",
"InternalServerError",
"LangfuseAPI",
"LegacyEvaluationObject",
Expand Down Expand Up @@ -1053,16 +953,11 @@ def __dir__():
"NumberObjectEvaluationRuleFilter",
"NumericScore",
"NumericScoreV3",
"ObservationBody",
"ObservationLevel",
"ObservationType",
"ObservationV2",
"ObservationsV2Meta",
"ObservationsV2Response",
"OpenAiCompletionUsageSchema",
"OpenAiResponseUsageSchema",
"OpenAiUsage",
"OptionalObservationBody",
"Organization",
"OrganizationApiKey",
"OrganizationApiKeysResponse",
Expand Down Expand Up @@ -1136,7 +1031,6 @@ def __dir__():
"ScoreConfigDataType",
"ScoreConfigs",
"ScoreDataType",
"ScoreEvent",
"ScoreSource",
"ScoreSubjectExperimentV3",
"ScoreSubjectObservationV3",
Expand Down Expand Up @@ -1169,25 +1063,16 @@ def __dir__():
"TextScore",
"TextScoreV3",
"TooManyRequestsError",
"TraceBody",
"TraceEvent",
"UnauthorizedError",
"UpdateAnnotationQueueItemRequest",
"UpdateCodeEvaluatorRequest",
"UpdateEvaluationRuleRequest",
"UpdateEvaluatorMetadataRequest",
"UpdateEvaluatorRequest",
"UpdateEventBody",
"UpdateGenerationBody",
"UpdateGenerationEvent",
"UpdateLlmAsJudgeEvaluatorRequest",
"UpdateObservationEvent",
"UpdateScoreConfigRequest",
"UpdateSpanBody",
"UpdateSpanEvent",
"UpsertLlmConnectionRequest",
"Usage",
"UsageDetails",
"UserMeta",
"annotation_queues",
"blob_storage_integrations",
Expand All @@ -1202,7 +1087,6 @@ def __dir__():
"experiments",
"feedback",
"health",
"ingestion",
"llm_connections",
"media",
"metrics",
Expand Down
19 changes: 0 additions & 19 deletions langfuse/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from .experiments.client import AsyncExperimentsClient, ExperimentsClient
from .feedback.client import AsyncFeedbackClient, FeedbackClient
from .health.client import AsyncHealthClient, HealthClient
from .ingestion.client import AsyncIngestionClient, IngestionClient
from .llm_connections.client import AsyncLlmConnectionsClient, LlmConnectionsClient
from .media.client import AsyncMediaClient, MediaClient
from .metrics.client import AsyncMetricsClient, MetricsClient
Expand Down Expand Up @@ -135,7 +134,6 @@ def __init__(
self._experiments: typing.Optional[ExperimentsClient] = None
self._feedback: typing.Optional[FeedbackClient] = None
self._health: typing.Optional[HealthClient] = None
self._ingestion: typing.Optional[IngestionClient] = None
self._llm_connections: typing.Optional[LlmConnectionsClient] = None
self._media: typing.Optional[MediaClient] = None
self._metrics: typing.Optional[MetricsClient] = None
Expand Down Expand Up @@ -240,14 +238,6 @@ def health(self):
self._health = HealthClient(client_wrapper=self._client_wrapper)
return self._health

@property
def ingestion(self):
if self._ingestion is None:
from .ingestion.client import IngestionClient # noqa: E402

self._ingestion = IngestionClient(client_wrapper=self._client_wrapper)
return self._ingestion

@property
def llm_connections(self):
if self._llm_connections is None:
Expand Down Expand Up @@ -469,7 +459,6 @@ def __init__(
self._experiments: typing.Optional[AsyncExperimentsClient] = None
self._feedback: typing.Optional[AsyncFeedbackClient] = None
self._health: typing.Optional[AsyncHealthClient] = None
self._ingestion: typing.Optional[AsyncIngestionClient] = None
self._llm_connections: typing.Optional[AsyncLlmConnectionsClient] = None
self._media: typing.Optional[AsyncMediaClient] = None
self._metrics: typing.Optional[AsyncMetricsClient] = None
Expand Down Expand Up @@ -580,14 +569,6 @@ def health(self):
self._health = AsyncHealthClient(client_wrapper=self._client_wrapper)
return self._health

@property
def ingestion(self):
if self._ingestion is None:
from .ingestion.client import AsyncIngestionClient # noqa: E402

self._ingestion = AsyncIngestionClient(client_wrapper=self._client_wrapper)
return self._ingestion

@property
def llm_connections(self):
if self._llm_connections is None:
Expand Down
3 changes: 3 additions & 0 deletions langfuse/api/commons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
NumericScore,
ObservationLevel,
ObservationV2,
OpenAiUsage,
PricingTier,
PricingTierAttributeCondition,
PricingTierAttributeSource,
Expand Down Expand Up @@ -85,6 +86,7 @@
"NumericScore": ".types",
"ObservationLevel": ".types",
"ObservationV2": ".types",
"OpenAiUsage": ".types",
"PricingTier": ".types",
"PricingTierAttributeCondition": ".types",
"PricingTierAttributeSource": ".types",
Expand Down Expand Up @@ -164,6 +166,7 @@ def __dir__():
"NumericScore",
"ObservationLevel",
"ObservationV2",
"OpenAiUsage",
"PricingTier",
"PricingTierAttributeCondition",
"PricingTierAttributeSource",
Expand Down
Loading
Loading