diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de2331..fe7d325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.0.1a7] - 2025-02-15 +## [0.0.1a8] - 2025-02-18 ### Changed - Added and edited docstrings to make the auto-generated API reference more clear. +## [0.0.1a7] - 2025-02-18 + +### Changed + +- Update links in documentation. + ## [0.0.1a6] - 2025-02-14 ### Changed @@ -56,7 +62,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Pre-release of the Cleanlab Codex Python client. -[Unreleased]: https://github.com/cleanlab/cleanlab-codex/compare/v0.0.1a7...HEAD +[Unreleased]: https://github.com/cleanlab/cleanlab-codex/compare/v0.0.1a8...HEAD +[0.0.1a8]: https://github.com/cleanlab/cleanlab-codex/compare/v0.0.1a7...v0.0.1a8 [0.0.1a7]: https://github.com/cleanlab/cleanlab-codex/compare/v0.0.1a6...v0.0.1a7 [0.0.1a6]: https://github.com/cleanlab/cleanlab-codex/compare/v0.0.1a5...v0.0.1a6 [0.0.1a5]: https://github.com/cleanlab/cleanlab-codex/compare/v0.0.1a4...v0.0.1a5 diff --git a/src/cleanlab_codex/client.py b/src/cleanlab_codex/client.py index 2bd7920..b0c80fe 100644 --- a/src/cleanlab_codex/client.py +++ b/src/cleanlab_codex/client.py @@ -73,6 +73,6 @@ def list_organizations(self) -> list[Organization]: Returns: list[Organization]: A list of organizations the authenticated user is a member of. - See [`Organization`](/reference/python/types.organization#class-organization) for more information. + See [`Organization`](/codex/api/python/types.organization#class-organization) for more information. """ return list_organizations(self._client) diff --git a/src/cleanlab_codex/project.py b/src/cleanlab_codex/project.py index 07548cd..3c3354a 100644 --- a/src/cleanlab_codex/project.py +++ b/src/cleanlab_codex/project.py @@ -42,14 +42,14 @@ def __str__(self) -> str: class Project: """Represents a Codex project. - To integrate a Codex project into your RAG/Agentic system, we recommend using one of our abstractions such as [`CodexTool`](/reference/python/codex_tool). + To integrate a Codex project into your RAG/Agentic system, we recommend using one of our abstractions such as [`CodexTool`](/codex/api/python/codex_tool). The [`query`](#method-query) method can also be used directly if none of our existing abstractions are sufficient for your use case. """ def __init__(self, sdk_client: _Codex, project_id: str, *, verify_existence: bool = True): """Initialize the Project. This method is not meant to be used directly. - Instead, use the [`Client.get_project()`](/reference/python/client#method-get_project), - [`Client.create_project()`](/reference/python/client#method-create_project), or [`Project.from_access_key()`](/reference/python/project#classmethod-from_access_key) methods. + Instead, use the [`Client.get_project()`](/codex/api/python/client#method-get_project), + [`Client.create_project()`](/codex/api/python/client#method-create_project), or [`Project.from_access_key()`](/codex/api/python/project#classmethod-from_access_key) methods. Args: sdk_client (Codex): The Codex SDK client to use to interact with the project. @@ -89,7 +89,7 @@ def from_access_key(cls, access_key: str) -> Project: @classmethod def create(cls, sdk_client: _Codex, organization_id: str, name: str, description: str | None = None) -> Project: - """Create a new Codex project. This method is not meant to be used directly. Instead, use the [`create_project`](/reference/python/client#method-create_project) method on the `Client` class. + """Create a new Codex project. This method is not meant to be used directly. Instead, use the [`create_project`](/codex/api/python/client#method-create_project) method on the `Client` class. Args: sdk_client (Codex): The Codex SDK client to use to create the project. This client must be authenticated with a user-level API key. @@ -114,7 +114,7 @@ def create(cls, sdk_client: _Codex, organization_id: str, name: str, description def create_access_key(self, name: str, description: str | None = None, expiration: datetime | None = None) -> str: """Create a new access key for this project. Must be authenticated with a user-level API key to use this method. - See [`Client.create_project()`](/reference/python/client#method-create_project) or [`Client.get_project()`](/reference/python/client#method-get_project). + See [`Client.create_project()`](/codex/api/python/client#method-create_project) or [`Client.get_project()`](/codex/api/python/client#method-get_project). Args: name (str): The name of the access key. @@ -125,7 +125,7 @@ def create_access_key(self, name: str, description: str | None = None, expiratio str: The access key token. Raises: - AuthenticationError: If the Project was created from a project-level access key instead of a [Client instance](/reference/python/client#class-client). + AuthenticationError: If the Project was created from a project-level access key instead of a [Client instance](/codex/api/python/client#class-client). """ try: return self._sdk_client.projects.access_keys.create( @@ -136,13 +136,13 @@ def create_access_key(self, name: str, description: str | None = None, expiratio def add_entries(self, entries: list[EntryCreate]) -> None: """Add a list of entries to this Codex project. Must be authenticated with a user-level API key to use this method. - See [`Client.create_project()`](/reference/python/client#method-create_project) or [`Client.get_project()`](/reference/python/client#method-get_project). + See [`Client.create_project()`](/codex/api/python/client#method-create_project) or [`Client.get_project()`](/codex/api/python/client#method-get_project). Args: - entries (list[EntryCreate]): The entries to add to this project. See [`EntryCreate`](/reference/python/types.entry#class-entrycreate). + entries (list[EntryCreate]): The entries to add to this project. See [`EntryCreate`](/codex/api/python/types.entry#class-entrycreate). Raises: - AuthenticationError: If the Project was created from a project-level access key instead of a [Client instance](/reference/python/client#class-client). + AuthenticationError: If the Project was created from a project-level access key instead of a [Client instance](/codex/api/python/client#class-client). """ try: # TODO: implement batch creation of entries in backend and update this function @@ -170,8 +170,8 @@ def query( Returns: tuple[Optional[str], Optional[Entry]]: A tuple representing the answer for the query and the existing or new entry in the Codex project. - If Codex is able to answer the question, the first element will be the answer returned by Codex and the second element will be the existing [`Entry`](/reference/python/types.entry#class-entry) in the Codex project. - If Codex is unable to answer the question, the first element will be `fallback_answer` if provided, otherwise None. The second element will be a new [`Entry`](/reference/python/types.entry#class-entry) in the Codex project. + If Codex is able to answer the question, the first element will be the answer returned by Codex and the second element will be the existing [`Entry`](/codex/api/python/types.entry#class-entry) in the Codex project. + If Codex is unable to answer the question, the first element will be `fallback_answer` if provided, otherwise None. The second element will be a new [`Entry`](/codex/api/python/types.entry#class-entry) in the Codex project. """ return query_project( client=self._sdk_client,