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

compatible with version 3.7 #17

Open
wants to merge 3 commits into
base: old_main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion promptify/models/nlp/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def download(url, destination_file):
for chunk in response.iter_content(chunk_size=1048576):
f.write(chunk)

if last_modified := response.headers.get("last-modified"):
last_modified = response.headers.get("last-modified")
if last_modified:
new_mtime = parsedate_to_datetime(last_modified).timestamp()
os.utime(destination_file, times=(datetime.now().timestamp(), new_mtime))
return destination_file
2 changes: 1 addition & 1 deletion promptify/prompts/nlp/templates/summary.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You are a highly intelligent {{ domain }} domain expert Summarization system. Yo
{% else %}
You are a highly intelligent Summarization system. You take Passage as input and summarize the passage as an expert.
{% endif -%}
Your output format is only {{ output_format|default("[{'S': Summarization paragraph}},]") } form, no other form.
Your output format is only {{ output_format|default("[{'S': Summarization paragraph}},]") }} form, no other form.

Passage: {{ text_input }}
Output: