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
47 changes: 47 additions & 0 deletions langfuse/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
scim,
score_configs,
scores,
skills,
trace,
unstable,
utils,
Expand Down Expand Up @@ -384,6 +385,22 @@
ScoreV3_Text,
TextScoreV3,
)
from .skills import (
CreateSkillVersionRequest,
DeleteSkillVersionResponse,
SkillFile,
SkillFileContent,
SkillFileContentsResponse,
SkillListPagination,
SkillMeta,
SkillMetaListResponse,
SkillVersion,
SkillVersionFileCreateInput,
SkillVersionFileInput,
SkillVersionFileReference,
UpdateSkillLabelsRequest,
UpdateSkillRequest,
)
from .trace import DeleteTraceResponse
_dynamic_imports: typing.Dict[str, str] = {
"AccessDeniedError": ".commons",
Expand Down Expand Up @@ -462,6 +479,7 @@
"CreateScoreValue": ".commons",
"CreateScoresRequest": ".scores",
"CreateScoresResponse": ".scores",
"CreateSkillVersionRequest": ".skills",
"CreateTextPromptRequest": ".prompts",
"CreateTextPromptType": ".prompts",
"Creator": ".evaluators",
Expand All @@ -478,6 +496,7 @@
"DeleteDatasetItemResponse": ".dataset_items",
"DeleteLlmConnectionResponse": ".llm_connections",
"DeleteMembershipRequest": ".organizations",
"DeleteSkillVersionResponse": ".skills",
"DeleteTraceResponse": ".trace",
"DeletedEvaluationRule": ".evaluation_rules",
"DeletedEvaluator": ".evaluators",
Expand Down Expand Up @@ -680,6 +699,16 @@
"Score_Text": ".commons",
"ServiceProviderConfig": ".scim",
"ServiceUnavailableError": ".health",
"SkillFile": ".skills",
"SkillFileContent": ".skills",
"SkillFileContentsResponse": ".skills",
"SkillListPagination": ".skills",
"SkillMeta": ".skills",
"SkillMetaListResponse": ".skills",
"SkillVersion": ".skills",
"SkillVersionFileCreateInput": ".skills",
"SkillVersionFileInput": ".skills",
"SkillVersionFileReference": ".skills",
"StringEvaluationRuleFilter": ".evaluation_commons",
"StringObjectEvaluationRuleFilter": ".evaluation_commons",
"StringOptionsEvaluationRuleFilter": ".evaluation_commons",
Expand All @@ -697,6 +726,8 @@
"UpdateEvaluatorRequest": ".evaluators",
"UpdateLlmAsJudgeEvaluatorRequest": ".evaluators",
"UpdateScoreConfigRequest": ".score_configs",
"UpdateSkillLabelsRequest": ".skills",
"UpdateSkillRequest": ".skills",
"UpsertLlmConnectionRequest": ".llm_connections",
"Usage": ".commons",
"UserMeta": ".scim",
Expand Down Expand Up @@ -726,6 +757,7 @@
"scim": ".scim",
"score_configs": ".score_configs",
"scores": ".scores",
"skills": ".skills",
"trace": ".trace",
"unstable": ".unstable",
"utils": ".utils",
Expand Down Expand Up @@ -836,6 +868,7 @@ def __dir__():
"CreateScoreValue",
"CreateScoresRequest",
"CreateScoresResponse",
"CreateSkillVersionRequest",
"CreateTextPromptRequest",
"CreateTextPromptType",
"Creator",
Expand All @@ -852,6 +885,7 @@ def __dir__():
"DeleteDatasetItemResponse",
"DeleteLlmConnectionResponse",
"DeleteMembershipRequest",
"DeleteSkillVersionResponse",
"DeleteTraceResponse",
"DeletedEvaluationRule",
"DeletedEvaluator",
Expand Down Expand Up @@ -1054,6 +1088,16 @@ def __dir__():
"Score_Text",
"ServiceProviderConfig",
"ServiceUnavailableError",
"SkillFile",
"SkillFileContent",
"SkillFileContentsResponse",
"SkillListPagination",
"SkillMeta",
"SkillMetaListResponse",
"SkillVersion",
"SkillVersionFileCreateInput",
"SkillVersionFileInput",
"SkillVersionFileReference",
"StringEvaluationRuleFilter",
"StringObjectEvaluationRuleFilter",
"StringOptionsEvaluationRuleFilter",
Expand All @@ -1071,6 +1115,8 @@ def __dir__():
"UpdateEvaluatorRequest",
"UpdateLlmAsJudgeEvaluatorRequest",
"UpdateScoreConfigRequest",
"UpdateSkillLabelsRequest",
"UpdateSkillRequest",
"UpsertLlmConnectionRequest",
"Usage",
"UserMeta",
Expand Down Expand Up @@ -1100,6 +1146,7 @@ def __dir__():
"scim",
"score_configs",
"scores",
"skills",
"trace",
"unstable",
"utils",
Expand Down
19 changes: 19 additions & 0 deletions langfuse/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from .scim.client import AsyncScimClient, ScimClient
from .score_configs.client import AsyncScoreConfigsClient, ScoreConfigsClient
from .scores.client import AsyncScoresClient, ScoresClient
from .skills.client import AsyncSkillsClient, SkillsClient
from .trace.client import AsyncTraceClient, TraceClient
from .unstable.client import AsyncUnstableClient, UnstableClient

Expand Down Expand Up @@ -147,6 +148,7 @@ def __init__(
self._scim: typing.Optional[ScimClient] = None
self._score_configs: typing.Optional[ScoreConfigsClient] = None
self._scores: typing.Optional[ScoresClient] = None
self._skills: typing.Optional[SkillsClient] = None
self._trace: typing.Optional[TraceClient] = None
self._unstable: typing.Optional[UnstableClient] = None

Expand Down Expand Up @@ -352,6 +354,14 @@ def scores(self):
self._scores = ScoresClient(client_wrapper=self._client_wrapper)
return self._scores

@property
def skills(self):
if self._skills is None:
from .skills.client import SkillsClient # noqa: E402
Comment thread
tobi12345 marked this conversation as resolved.
Resolved

self._skills = SkillsClient(client_wrapper=self._client_wrapper)
return self._skills

@property
def trace(self):
if self._trace is None:
Expand Down Expand Up @@ -472,6 +482,7 @@ def __init__(
self._scim: typing.Optional[AsyncScimClient] = None
self._score_configs: typing.Optional[AsyncScoreConfigsClient] = None
self._scores: typing.Optional[AsyncScoresClient] = None
self._skills: typing.Optional[AsyncSkillsClient] = None
self._trace: typing.Optional[AsyncTraceClient] = None
self._unstable: typing.Optional[AsyncUnstableClient] = None

Expand Down Expand Up @@ -685,6 +696,14 @@ def scores(self):
self._scores = AsyncScoresClient(client_wrapper=self._client_wrapper)
return self._scores

@property
def skills(self):
if self._skills is None:
from .skills.client import AsyncSkillsClient # noqa: E402

self._skills = AsyncSkillsClient(client_wrapper=self._client_wrapper)
return self._skills

@property
def trace(self):
if self._trace is None:
Expand Down
Loading
Loading