promptslab / Promptify

Prompt Engineering | Prompt Versioning | Use GPT or other prompt based models to get structured output. Join our discord for Prompt-Engineering, LLMs and other latest research
https://discord.gg/m88xfYMbK6
Apache License 2.0
3.21k stars 238 forks source link

Update utils.py #19

Open YoussephAhmed opened 1 year ago

YoussephAhmed commented 1 year ago

fixed 2 typos here: 1- if last_modified == response.headers.get("last-modified") (line:34) 2- declare the "last_modified" variable before calling it (line:18)

escesare commented 1 year ago

After reading this code more carefully, much of it doesn't make sense too me.

Neither of these variables are being used: mtime, headers["if-modified-since"]

My guess is that the intention is to compare them against the response file's modified time, but it's not doing that.

Also I don't see "last-modified" as a key in response.headers, but maybe that's system dependent?