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

Improve TextPrompt and add docs #127

Merged
merged 6 commits into from
May 29, 2023
Merged

Improve TextPrompt and add docs #127

merged 6 commits into from
May 29, 2023

Conversation

lightaime
Copy link
Member

No description provided.

@lightaime lightaime added documentation Improvements or additions to documentation Prompt Related to camel prompts labels May 29, 2023
@lightaime lightaime self-assigned this May 29, 2023
@@ -10,7 +10,7 @@ jobs:
- uses: actions/setup-python@v3

Choose a reason for hiding this comment

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

GPT summary of 0ce035 - 613baf:

  • Replaced pip install command with updated version, adding recommonmark package.

@@ -0,0 +1,17 @@
name: GPT Commits summarizer

Choose a reason for hiding this comment

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

GPT summary of None - 9e155e:

  • This action will write a comment about every commit in a pull request
  • Generate a summary for every file that was modified and add it to the review page
  • Compile a PR summary from all commit summaries and file diff summaries
  • Delete outdated code review comments

@@ -1,12 +1,78 @@
from typing import Any, Dict, Set
import inspect

Choose a reason for hiding this comment

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

GPT summary of 255b6f - 49a377:

  • Imported inspect module and added T type variable
  • Added return_text_prompt decorator and wrap_text_prompt_functions decorator
  • Updated TextPrompt class to extend str class and added key_words property
  • Updated format method to return a TextPrompt instance with the formatted string

@@ -6,3 +6,38 @@ sphinx-apidoc -o docs camel/
```

Choose a reason for hiding this comment

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

GPT summary of 2cf7c2 - e55af4:

  • Instructions added for installing CAMEL from source
  • Instructions added for installing Sphinx, Sphinx theme and recommonmark
  • Instructions added for building the documentation with make
  • Instructions added for launching the HTML documentation from the terminal using a local HTTP server

@@ -1,4 +1,4 @@
camel package
Camel Package

Choose a reason for hiding this comment

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

GPT summary of 72818d - e1c507:

  • Changed the title of the file from "camel package" to "Camel Package"
  • Added a section for "Subpackages"

@@ -11,17 +11,25 @@

Choose a reason for hiding this comment

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

GPT summary of dac50c - 0efe7b:

  • Changed project, copyright and author names
  • Added source_suffix
  • Added recommonmark extension
  • Changed html_theme
  • Removed html_static_path

@@ -0,0 +1,112 @@
# Write Your Prompts with the `TextPrompt` Class

Choose a reason for hiding this comment

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

GPT summary of None - 0a1fa7:

  • The TextPrompt class is a subclass of the built-in str class and provides additional features for working with text prompts.
  • It provides a property called key_words, which returns a set of strings representing the key words in the prompt.
  • It also provides a format method to allow for partial formatting values in the format string.
  • It can be manipulated with various string manipulation operations, such as concatenation, joining, and applying string methods.

@@ -1,14 +1,26 @@
.. Camel documentation master file, created by
.. CAMEL documentation master file, created by

Choose a reason for hiding this comment

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

GPT summary of 6c0a5b - 036c93:

  • Changed the title from "Camel" to "CAMEL"
  • Added a description of CAMEL
  • Added a link to join the slack channel
  • Added a section for getting started
  • Modified the contents section to "Modules"

@github-actions
Copy link

GPT summary of 1824dd0:

Error: couldn't generate summary

@github-actions
Copy link

GPT summary of 22ce3d6:

@github-actions
Copy link

GPT summary of e11720f:

Not generating summary for merge commits

PR summary so far:

  • Added a Github Action for GPT commit summarizer
  • Updated the documentation with instructions for installing CAMEL from source, and building the documentation with make
  • Updated TextPrompt class to extend str class and added key_words property
  • Added return_text_prompt and wrap_text_prompt_functions decorators
  • Added a TextPromptDict class for storing TextPrompts

@@ -1,11 +1,69 @@
from camel.prompts import TextPrompt, TextPromptDict
from camel.prompts.base import (
Copy link

@github-actions github-actions bot May 29, 2023

Choose a reason for hiding this comment

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

GPT summary of 58172b - b5bfbf:

  • Added functions return_text_prompt and wrap_text_prompt_functions to the TextPrompt base class.
  • Added tests for return_text_prompt and wrap_text_prompt_functions.
  • Added tests for TextPrompt's key_words and format methods.
  • Added tests for TextPrompt's manipulate and upper methods.

@github-actions
Copy link

GPT summary of 9e00c2f:

  • Changed the capitalization of the key word in the TextPrompt from name to NAME test_base.py

@github-actions
Copy link

github-actions bot commented May 29, 2023

GPT summary of 3002141:

Not generating summary for merge commits

PR summary so far:

  • Added Github Action for GPT commit summarizer
  • Updated the TextPrompt class to extend str class and added key_words property
  • Updated format method to return a TextPrompt instance with the formatted string
  • Added instructions for installing CAMEL from source, Sphinx, Sphinx theme and recommonmark
  • Added instructions for building the documentation with make and launching the HTML documentation from the terminal using a local HTTP server
  • Added functions return_text_prompt and wrap_text_prompt_functions to the TextPrompt base class and tests for them
  • Added tests for TextPrompt's key_words and format methods, as well as manipulate and upper methods

@lightaime lightaime changed the title Improve TextPrompt and add docs Improve TextPrompt and add docs May 29, 2023
Copy link
Collaborator

@Obs01ete Obs01ete left a comment

Choose a reason for hiding this comment

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

Overall seems good

docs/README.md Outdated
2. Install Sphinx, Sphinx theme and `recommonmark` (Sphinx extension that enables Markdown support) by running the following command in your terminal or command prompt:
```bash
pip install sphinx
pip install sphinx-rtd-theme
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have already moved to the book theme. Replace with:

pip install sphinx_book_theme 

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the review!

permissions: write-all # Some repositories need this line

steps:
- uses: KanHarI/gpt-commit-summarizer@master
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest to remove this action. Its span is irritating. I can see the code myself, I do not need trivial comments on it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure

@lightaime lightaime merged commit 347dd66 into master May 29, 2023
@lightaime lightaime deleted the improve_text_prompt branch May 29, 2023 14:15
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 Prompt Related to camel prompts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants