Skip to content
Closed
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
2 changes: 2 additions & 0 deletions langfuse/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
OpenAiResponseUsageSchema,
OpenAiUsage,
OptionalObservationBody,
Organization,
OrganizationApiKey,
OrganizationApiKeysResponse,
OrganizationProject,
Expand Down Expand Up @@ -392,6 +393,7 @@
"OpenAiResponseUsageSchema",
"OpenAiUsage",
"OptionalObservationBody",
"Organization",
"OrganizationApiKey",
"OrganizationApiKeysResponse",
"OrganizationProject",
Expand Down
2 changes: 2 additions & 0 deletions langfuse/api/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
ApiKeyList,
ApiKeyResponse,
ApiKeySummary,
Organization,
Project,
ProjectDeletionResponse,
Projects,
Expand Down Expand Up @@ -412,6 +413,7 @@
"OpenAiResponseUsageSchema",
"OpenAiUsage",
"OptionalObservationBody",
"Organization",
"OrganizationApiKey",
"OrganizationApiKeysResponse",
"OrganizationProject",
Expand Down
2 changes: 2 additions & 0 deletions langfuse/api/resources/projects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ApiKeyList,
ApiKeyResponse,
ApiKeySummary,
Organization,
Project,
ProjectDeletionResponse,
Projects,
Expand All @@ -15,6 +16,7 @@
"ApiKeyList",
"ApiKeyResponse",
"ApiKeySummary",
"Organization",
"Project",
"ProjectDeletionResponse",
"Projects",
Expand Down
2 changes: 2 additions & 0 deletions langfuse/api/resources/projects/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .api_key_list import ApiKeyList
from .api_key_response import ApiKeyResponse
from .api_key_summary import ApiKeySummary
from .organization import Organization
from .project import Project
from .project_deletion_response import ProjectDeletionResponse
from .projects import Projects
Expand All @@ -13,6 +14,7 @@
"ApiKeyList",
"ApiKeyResponse",
"ApiKeySummary",
"Organization",
"Project",
"ProjectDeletionResponse",
"Projects",
Expand Down
50 changes: 50 additions & 0 deletions langfuse/api/resources/projects/types/organization.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ....core.datetime_utils import serialize_datetime
from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1


class Organization(pydantic_v1.BaseModel):
id: str = pydantic_v1.Field()
"""
The unique identifier of the organization
"""

name: str = pydantic_v1.Field()
"""
The name of the organization
"""

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {
"by_alias": True,
"exclude_unset": True,
**kwargs,
}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults_exclude_unset: typing.Any = {
"by_alias": True,
"exclude_unset": True,
**kwargs,
}
kwargs_with_defaults_exclude_none: typing.Any = {
"by_alias": True,
"exclude_none": True,
**kwargs,
}

return deep_union_pydantic_dicts(
super().dict(**kwargs_with_defaults_exclude_unset),
super().dict(**kwargs_with_defaults_exclude_none),
)

class Config:
frozen = True
smart_union = True
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
6 changes: 6 additions & 0 deletions langfuse/api/resources/projects/types/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@

from ....core.datetime_utils import serialize_datetime
from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .organization import Organization


class Project(pydantic_v1.BaseModel):
id: str
name: str
organization: Organization = pydantic_v1.Field()
"""
The organization this project belongs to
"""

metadata: typing.Dict[str, typing.Any] = pydantic_v1.Field()
"""
Metadata for the project
Expand Down
Loading