Skip to content

Commit

Permalink
[python] Ensure timezone (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw authored Nov 20, 2024
1 parent 232b9ca commit a3700dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions python/langsmith/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from typing_extensions import NotRequired, TypedDict

try:
from pydantic.v1 import ( # type: ignore[import]
from pydantic.v1 import (
BaseModel,
Field,
Field, # type: ignore[import]
PrivateAttr,
StrictBool,
StrictFloat,
Expand Down Expand Up @@ -571,6 +571,8 @@ def __init__(self, _host_url: Optional[str] = None, **kwargs: Any) -> None:
"""Initialize a Run object."""
super().__init__(**kwargs)
self._host_url = _host_url
if self.start_time.tzinfo is None:
self.start_time = self.start_time.replace(tzinfo=timezone.utc)

@property
def url(self) -> Optional[str]:
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langsmith"
version = "0.1.144rc1"
version = "0.1.144"
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
authors = ["LangChain <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit a3700dd

Please sign in to comment.