Skip to content
Merged
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.28] 2025-09-05

- Update metadata support for query logs, `project.update_metadata()`

## [1.0.27] 2025-08-22

- Add user feedback support for query logs, `project.add_user_feedback()`
Expand Down Expand Up @@ -128,7 +132,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial release of the `cleanlab-codex` client library.

[Unreleased]: https://github.com/cleanlab/cleanlab-codex/compare/v1.0.27...HEAD
[Unreleased]: https://github.com/cleanlab/cleanlab-codex/compare/v1.0.28...HEAD
[1.0.28]: https://github.com/cleanlab/cleanlab-codex/compare/v1.0.27...v1.0.28
[1.0.27]: https://github.com/cleanlab/cleanlab-codex/compare/v1.0.26...v1.0.27
[1.0.26]: https://github.com/cleanlab/cleanlab-codex/compare/v1.0.25...v1.0.26
[1.0.25]: https://github.com/cleanlab/cleanlab-codex/compare/v1.0.24...v1.0.25
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
]
dependencies = [
"cleanlab-tlm~=1.1,>=1.1.14",
"codex-sdk==0.1.0a25",
"codex-sdk==0.1.0a26",
"pydantic>=2.0.0, <3",
]

Expand Down
2 changes: 1 addition & 1 deletion src/cleanlab_codex/__about__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# SPDX-License-Identifier: MIT
__version__ = "1.0.27"
__version__ = "1.0.28"
16 changes: 15 additions & 1 deletion src/cleanlab_codex/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from datetime import datetime
from typing import TYPE_CHECKING as _TYPE_CHECKING
from typing import Dict, Optional, Union, cast
from typing import Any, Dict, Optional, Union, cast

from codex import AuthenticationError
from codex.types.project_validate_params import Response, Tool
Expand Down Expand Up @@ -230,3 +230,17 @@ def add_user_feedback(self, log_id: str, key: str) -> None:
key=key,
extra_headers=_AnalyticsMetadata().to_headers(),
)

def update_metadata(self, log_id: str, metadata: dict[str, Any]) -> None:
"""Update the metadata of a query logged in the project, preserving existing metadata.

Args:
log_id (str): The ID of the query log to add feedback to.
metadata (dict[str, Any]): The metadata to update.
"""
self._sdk_client.projects.query_logs.update_metadata(
project_id=self.id,
query_log_id=log_id,
body=metadata,
extra_headers=_AnalyticsMetadata().to_headers(),
)