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

docs: Update the missing docstrings on different modules (#911) #1079

Merged
merged 19 commits into from
Oct 30, 2024

Conversation

MuggleJinx
Copy link
Collaborator

@MuggleJinx MuggleJinx commented Oct 18, 2024

Add Missing Docstrings to Python Modules (#911)

This PR addresses issue #911 by adding the missing docstrings to various Python modules across the codebase. Following the project’s established docstring guidelines, the newly added docstrings enhance code readability, maintainability, and support documentation tools such as Sphinx.

Motivation and Context

Partially resolves issue #911

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of example)

Implemented Tasks

  • Adding and updating existing docstrings.

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.

Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

Thanks @MuggleJinx 's great contribution! We need to make each line not exceed 79 characters, could you double check the docstring added?

camel/agents/chat_agent.py Outdated Show resolved Hide resolved
camel/agents/chat_agent.py Outdated Show resolved Hide resolved
camel/agents/chat_agent.py Outdated Show resolved Hide resolved
camel/agents/chat_agent.py Outdated Show resolved Hide resolved
@Wendong-Fan Wendong-Fan added the documentation Improvements or additions to documentation label Oct 20, 2024
@Wendong-Fan Wendong-Fan added this to the Sprint 15 milestone Oct 20, 2024
@Wendong-Fan Wendong-Fan linked an issue Oct 20, 2024 that may be closed by this pull request
2 tasks
@Wendong-Fan Wendong-Fan modified the milestones: Sprint 15, Sprint 14 Oct 20, 2024
Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

Thanks @MuggleJinx ! Left some comments below

Comment on lines 232 to 246
prompt = f"Use the function '{tool_name}' to '{tool_description}':\n{tool_json}\n"
prompt = (
Copy link
Member

Choose a reason for hiding this comment

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

no need to change the prompt format here, since it's original prompt from llama https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_1/#user-defined-custom-tool-calling

camel/agents/chat_agent.py Outdated Show resolved Hide resolved
camel/agents/chat_agent.py Show resolved Hide resolved
camel/agents/chat_agent.py Outdated Show resolved Hide resolved
camel/configs/base_config.py Outdated Show resolved Hide resolved
camel/societies/workforce/task_channel.py Outdated Show resolved Hide resolved
camel/societies/workforce/task_channel.py Outdated Show resolved Hide resolved
MuggleJinx and others added 14 commits October 30, 2024 16:15
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
Co-authored-by: Wendong <w3ndong.fan@gmail.com>
Co-authored-by: Guohao Li <lightaime@gmail.com>
Co-authored-by: Wendong <w3ndong.fan@gmail.com>
Co-authored-by: Wendong <w3ndong.fan@gmail.com>
Co-authored-by: Wendong-Fan <133094783+Wendong-Fan@users.noreply.github.com>
Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

Thanks @MuggleJinx 's great work! LGTM, I think the next step could be review and polish our existing docstrings and close #911

@Wendong-Fan Wendong-Fan merged commit 3c1c3a1 into master Oct 30, 2024
6 checks passed
@Wendong-Fan Wendong-Fan deleted the xiaotian branch October 30, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

6 participants