Skip to content

Commit

Permalink
Add Feedback ID (#98)
Browse files Browse the repository at this point in the history
(already was done client side in the TS client)
  • Loading branch information
hinthornw authored Jul 17, 2023
2 parents 0b1725d + 65f02f0 commit a7ee3dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
cast,
)
from urllib.parse import urlsplit
from uuid import UUID
from uuid import UUID, uuid4

from requests import ConnectionError, HTTPError, Response, Session
from requests.adapters import HTTPAdapter
Expand Down Expand Up @@ -1372,6 +1372,7 @@ def create_feedback(
else:
raise ValueError(f"Unknown feedback source type {feedback_source_type}")
feedback = FeedbackCreate(
id=uuid4(),
run_id=run_id,
key=key,
score=score,
Expand Down
3 changes: 2 additions & 1 deletion python/langsmith/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ class FeedbackSourceType(Enum):
class FeedbackBase(BaseModel):
"""Feedback schema."""

id: Optional[UUID] = None
id: UUID
"""The unique ID of the feedback."""
created_at: Optional[datetime] = None
"""The time the feedback was created."""
modified_at: Optional[datetime] = None
Expand Down

0 comments on commit a7ee3dc

Please sign in to comment.