diff --git a/langfuse/api/resources/comments/types/create_comment_request.py b/langfuse/api/resources/comments/types/create_comment_request.py index 3c35c64e2..0c3367f25 100644 --- a/langfuse/api/resources/comments/types/create_comment_request.py +++ b/langfuse/api/resources/comments/types/create_comment_request.py @@ -35,6 +35,32 @@ class CreateCommentRequest(pydantic_v1.BaseModel): The id of the user who created the comment. """ + data_field: typing.Optional[str] = pydantic_v1.Field( + alias="dataField", default=None + ) + """ + For inline comments on IO, specifies which field (input, output, or metadata). Must be set together with path, rangeStart, and rangeEnd. + """ + + path: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None) + """ + JSON Path expressions specifying comment location within the dataField. Must have same length as rangeStart and rangeEnd. + """ + + range_start: typing.Optional[typing.List[int]] = pydantic_v1.Field( + alias="rangeStart", default=None + ) + """ + Start character offsets (inclusive, UTF-16 code units) for each path entry. + """ + + range_end: typing.Optional[typing.List[int]] = pydantic_v1.Field( + alias="rangeEnd", default=None + ) + """ + End character offsets (exclusive, UTF-16 code units) for each path entry. + """ + def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = { "by_alias": True, diff --git a/langfuse/api/resources/commons/types/comment.py b/langfuse/api/resources/commons/types/comment.py index 4d8b1916a..b9c986e2e 100644 --- a/langfuse/api/resources/commons/types/comment.py +++ b/langfuse/api/resources/commons/types/comment.py @@ -19,6 +19,31 @@ class Comment(pydantic_v1.BaseModel): author_user_id: typing.Optional[str] = pydantic_v1.Field( alias="authorUserId", default=None ) + data_field: typing.Optional[str] = pydantic_v1.Field( + alias="dataField", default=None + ) + """ + For inline comments, the IO field (input, output, metadata) + """ + + path: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None) + """ + JSON Path expressions for comment location + """ + + range_start: typing.Optional[typing.List[int]] = pydantic_v1.Field( + alias="rangeStart", default=None + ) + """ + Start character offsets (inclusive, UTF-16) + """ + + range_end: typing.Optional[typing.List[int]] = pydantic_v1.Field( + alias="rangeEnd", default=None + ) + """ + End character offsets (exclusive, UTF-16) + """ def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {