Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme + Docs #10

Merged
merged 19 commits into from
Feb 6, 2025
Merged

Readme + Docs #10

merged 19 commits into from
Feb 6, 2025

Conversation

axl1313
Copy link
Collaborator

@axl1313 axl1313 commented Jan 24, 2025

To view API reference docs in help.cleanlab.ai locally, check out codex-client-reference-improvements branch of cleanlab-studio-docs, run make install, make update-api-reference, and make docs.

There's some portions that are still WIP, links that need to be added, and things that need to be updated but wanted to get a first pass review on the overall structure and content ASAP.

@axl1313 axl1313 requested a review from elisno January 28, 2025 01:31
@axl1313 axl1313 marked this pull request as ready for review January 28, 2025 01:31
Copy link
Member

@elisno elisno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments.

Not entirely sure whether we'll use /reference/python/codex_types or /reference/python/types. But the links were broken with `codex_types´.

@axl1313 axl1313 requested a review from elisno February 1, 2025 00:00
Copy link
Member

@elisno elisno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left two tiny comments.

README.md Outdated
@@ -1,16 +1,68 @@
# Cleanlab Codex [![Build Status](https://github.com/cleanlab/cleanlab-codex/actions/workflows/ci.yml/badge.svg)](https://github.com/cleanlab/cleanlab-codex/actions/workflows/ci.yml) [![PyPI - Version](https://img.shields.io/pypi/v/cleanlab-codex.svg)](https://pypi.org/project/cleanlab-codex) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cleanlab-codex.svg)](https://pypi.org/project/cleanlab-codex)
<!-- TARGET AUDIENCE: RAG SYSTEM DEVELOPER -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you going to keep this comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope will remove it before actually merging!

@property
def fallback_answer(self) -> Optional[str]:
"""The fallback answer to use if the Codex project cannot answer the question."""
"""The fallback answer to use if the Codex project cannot answer the question. This will be returned from by the tool if the Codex project does not have an answer to the question."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""The fallback answer to use if the Codex project cannot answer the question. This will be returned from by the tool if the Codex project does not have an answer to the question."""
"""The fallback answer to use if the Codex project cannot answer the question. This will be returned by the tool if the Codex project does not have an answer to the question."""

@anishathalye anishathalye self-requested a review February 3, 2025 17:12
README.md Outdated
- **Easy Integration**: Integrate Codex into your RAG/Agentic application with just a few lines of code.
- **Immediate Impact**: SME responses instantly enhance your AI applications.

## How does Codex interact with my AI application?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid duplication with (planned/WIP) docs, and leave these TODO sections out of the README.

"""Converts the tool to a smolagents tool."""
"""Converts the tool to a [smolagents tool](https://huggingface.co/docs/smolagents/reference/tools#smolagents.Tool).

Note: You must have the [`smolagents` library installed](https://github.com/huggingface/smolagents/tree/main?tab=readme-ov-file#quick-demo) to use this method.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note: You must have the [`smolagents` library installed](https://github.com/huggingface/smolagents/tree/main?tab=readme-ov-file#quick-demo) to use this method.
Note: You must have the [`smolagents` library installed](https://github.com/huggingface/smolagents) to use this method.

from codex.types.projects.entry_create_params import EntryCreateParams


class EntryCreate(EntryCreateParams):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a lazydocs config that can have it generate useful documentation for this class without us having to manually write a docstring (still, have a problem here that this docstring can get out of sync with the generated EntryCreateParams).

Perhaps a hack like EntryCreate.__doc__ = EntryCreateParams?

If this is too much effort, we can skip it. Also, this might change if we revamp the docs build system (https://github.com/cleanlab/cleanlab-studio-docs/issues/641).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured out a hack to generate the class previews in the docstrings. Seems like that's the part that's most likely to get out of sync. The stainless SDKs don't actually have autogenerated docstrings, so we do need to manually write some documentation for the redefined type classes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@axl1313 axl1313 merged commit 31c24b9 into main Feb 6, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants