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

Prompt Class Added #2

Merged
merged 7 commits into from
Dec 31, 2024
Merged

Prompt Class Added #2

merged 7 commits into from
Dec 31, 2024

Conversation

sadrasabouri
Copy link
Member

This PR will add Prompt class with following fields/methods:

Prompt object:

Inputs:

  1. message - str - required
  2. responses - list of str's - optional (default = [])
  3. role - enum - optional - (default = "user")
  4. temperature - float - optional - (default = None)
  5. model - str - optional - (default = None)
  6. date/time - datetime - optional - (default = now)
  7. response_obj - dict - optional - (default = None)

Methods:

  1. add_response(response, index=None)
  2. remove_reponse(index)
  3. message() —> return prompt as str that is ready for LLM input
  4. to_json() —> return json object of Prompt (like dictionary)

@sadrasabouri sadrasabouri added the good first issue Good for newcomers label Dec 28, 2024
@sadrasabouri sadrasabouri added this to the memor v0.1 milestone Dec 28, 2024
@sadrasabouri sadrasabouri self-assigned this Dec 28, 2024
memor/Prompt.py Outdated Show resolved Hide resolved
memor/Prompt.py Outdated Show resolved Hide resolved
Copy link
Member

@sepandhaghighi sepandhaghighi left a comment

Choose a reason for hiding this comment

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

@sadrasabouri
Please rename Prompt.py to prompt.py

memor/__init__.py Outdated Show resolved Hide resolved
@sepandhaghighi sepandhaghighi merged commit 099e121 into dev Dec 31, 2024
24 checks passed
@sepandhaghighi sepandhaghighi deleted the prompt-class branch December 31, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants