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

Develop reformating prompts and readme for offline learner #19

Merged
merged 9 commits into from
Mar 12, 2024

Conversation

vyokky
Copy link
Contributor

@vyokky vyokky commented Mar 9, 2024

  1. Reformating prompts on examples and API calls
  2. remove request header defined in the main function
  3. Add readme and examples for offline learner.

@vyokky vyokky requested a review from kangyu March 9, 2024 16:33
ACTION_SELECTION_PROMPT: "ufo/prompts/base/action_selection.yaml" # The prompt for the action selection
ACTION_SELECTION_PROMPT: "ufo/prompts/base/action_selection_rag.yaml" # The prompt for the action selection

APP_SELECTION_EXAMPLE_PROMPT: "ufo/prompts/examples/app_example.yaml" # The prompt for the app selection
Copy link
Collaborator

Choose a reason for hiding this comment

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

May need to specify what's the difference between this prompt and previous app_selection prompt. Both called the prompt for the app selection

@@ -25,6 +47,8 @@ def get_gptv_completion(messages, headers):
return: The response of the request.
"""
aad = configs['API_TYPE'].lower() == 'azure_ad'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a checker variable.

Suggested change
aad = configs['API_TYPE'].lower() == 'azure_ad'
is_aad = configs['API_TYPE'].lower() == 'azure_ad'

prompts += document
prompts += "\n"
prompts += "\n\n"
return prompts
Copy link
Collaborator

Choose a reason for hiding this comment

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

The type of the return is a prompt string. The name of prompts may cause confusing. Why it is prompts instead of prompt?

Comment on lines 89 to 90
return: The prompt for retrieved documents.
"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

could specify return type, in function definition or comment line.

return prompts



def api_prompt_helper(apis: dict, verbose: int = 1):
Copy link
Collaborator

Choose a reason for hiding this comment

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

May specify return type.

Suggested change
def api_prompt_helper(apis: dict, verbose: int = 1):
def api_prompt_helper(apis: dict, verbose: int = 1) -> list[str]:

@@ -33,6 +33,10 @@ Both agents leverage the multi-modal capabilities of GPT-Vision to comprehend th


## 📢 News
- 📅 2024-03-XX: New Release for v0.0.1! Check out our exciting new features:
1. Our UFO framework now support RAG from offline document and online Bing search.
2. We now support creating your help documents for each Windows app to become an app expert. Check XX for more details!
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it a missing or TBD as expected?

"""
Get the application name of the window.
:param window: The window to get the application name.
:return: The application name of the window.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:return: The application name of the window.
:return: The application name of the window. Empty string ("") if failed to get the name.

@vyokky vyokky merged commit d5e53c7 into pre-release Mar 12, 2024
1 check 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.

2 participants