Skip to content

Commit 710b04c

Browse files
author
langfuse-bot
committed
feat(api): update API spec from langfuse/langfuse e10102e
1 parent 600325d commit 710b04c

6 files changed

Lines changed: 64 additions & 0 deletions

File tree

langfuse/api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
OpenAiResponseUsageSchema,
138138
OpenAiUsage,
139139
OptionalObservationBody,
140+
Organization,
140141
OrganizationApiKey,
141142
OrganizationApiKeysResponse,
142143
OrganizationProject,
@@ -392,6 +393,7 @@
392393
"OpenAiResponseUsageSchema",
393394
"OpenAiUsage",
394395
"OptionalObservationBody",
396+
"Organization",
395397
"OrganizationApiKey",
396398
"OrganizationApiKeysResponse",
397399
"OrganizationProject",

langfuse/api/resources/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
ApiKeyList,
212212
ApiKeyResponse,
213213
ApiKeySummary,
214+
Organization,
214215
Project,
215216
ProjectDeletionResponse,
216217
Projects,
@@ -412,6 +413,7 @@
412413
"OpenAiResponseUsageSchema",
413414
"OpenAiUsage",
414415
"OptionalObservationBody",
416+
"Organization",
415417
"OrganizationApiKey",
416418
"OrganizationApiKeysResponse",
417419
"OrganizationProject",

langfuse/api/resources/projects/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
ApiKeyList,
66
ApiKeyResponse,
77
ApiKeySummary,
8+
Organization,
89
Project,
910
ProjectDeletionResponse,
1011
Projects,
@@ -15,6 +16,7 @@
1516
"ApiKeyList",
1617
"ApiKeyResponse",
1718
"ApiKeySummary",
19+
"Organization",
1820
"Project",
1921
"ProjectDeletionResponse",
2022
"Projects",

langfuse/api/resources/projects/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .api_key_list import ApiKeyList
55
from .api_key_response import ApiKeyResponse
66
from .api_key_summary import ApiKeySummary
7+
from .organization import Organization
78
from .project import Project
89
from .project_deletion_response import ProjectDeletionResponse
910
from .projects import Projects
@@ -13,6 +14,7 @@
1314
"ApiKeyList",
1415
"ApiKeyResponse",
1516
"ApiKeySummary",
17+
"Organization",
1618
"Project",
1719
"ProjectDeletionResponse",
1820
"Projects",
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import datetime as dt
4+
import typing
5+
6+
from ....core.datetime_utils import serialize_datetime
7+
from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8+
9+
10+
class Organization(pydantic_v1.BaseModel):
11+
id: str = pydantic_v1.Field()
12+
"""
13+
The unique identifier of the organization
14+
"""
15+
16+
name: str = pydantic_v1.Field()
17+
"""
18+
The name of the organization
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+
extra = pydantic_v1.Extra.allow
50+
json_encoders = {dt.datetime: serialize_datetime}

langfuse/api/resources/projects/types/project.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55

66
from ....core.datetime_utils import serialize_datetime
77
from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8+
from .organization import Organization
89

910

1011
class Project(pydantic_v1.BaseModel):
1112
id: str
1213
name: str
14+
organization: Organization = pydantic_v1.Field()
15+
"""
16+
The organization this project belongs to
17+
"""
18+
1319
metadata: typing.Dict[str, typing.Any] = pydantic_v1.Field()
1420
"""
1521
Metadata for the project

0 commit comments

Comments
 (0)