Richard Fan commited on
Commit
e68fb0a
·
1 Parent(s): ca3e69d

remove email fields from config.yaml

Browse files
Files changed (3) hide show
  1. advanced_usage.md +4 -4
  2. config.yaml +0 -11
  3. src/action.py +2 -2
advanced_usage.md CHANGED
@@ -61,8 +61,8 @@ An alternative way to get started using this repository is to:
61
  - `MAIL_CONNECTION` (see above)
62
  - `MAIL_PASSWORD` (only if you don't have `MAIL_CONNECTION` set)
63
  - `MAIL_USERNAME` (only if you don't have `MAIL_CONNECTION` set)
64
- - `FROM_EMAIL` (only if you don't have it set in `config.yaml`)
65
- - `TO_EMAIL` (only if you don't have it set in `config.yaml`)
66
  6. Manually trigger the action or wait until the scheduled action takes place.
67
 
68
  ### Running as a github action without emails
@@ -84,8 +84,8 @@ If you do not wish to fork this repository, and would prefer to clone and run it
84
  5. Set the following secrets as environment variables:
85
  - `OPENAI_API_KEY`
86
  - `SENDGRID_API_KEY` (only if using SendGrid)
87
- - `FROM_EMAIL` (only if using SendGrid and if you don't have it set in `config.yaml`. Note that this value must match the email you used to create the SendGrid Api Key.)
88
- - `TO_EMAIL` (only if using SendGrid and if you don't have it set in `config.yaml`)
89
  6. Run `python action.py`.
90
  7. If you are not using SendGrid, the html of the digest will be written to `digest.html`. You can then use your favorite webbrowser to view it.
91
 
 
61
  - `MAIL_CONNECTION` (see above)
62
  - `MAIL_PASSWORD` (only if you don't have `MAIL_CONNECTION` set)
63
  - `MAIL_USERNAME` (only if you don't have `MAIL_CONNECTION` set)
64
+ - `FROM_EMAIL`
65
+ - `TO_EMAIL`
66
  6. Manually trigger the action or wait until the scheduled action takes place.
67
 
68
  ### Running as a github action without emails
 
84
  5. Set the following secrets as environment variables:
85
  - `OPENAI_API_KEY`
86
  - `SENDGRID_API_KEY` (only if using SendGrid)
87
+ - `FROM_EMAIL` (only if using SendGrid. Note that this value must match the email you used to create the SendGrid Api Key.)
88
+ - `TO_EMAIL` (only if using SendGrid)
89
  6. Run `python action.py`.
90
  7. If you are not using SendGrid, the html of the digest will be written to `digest.html`. You can then use your favorite webbrowser to view it.
91
 
config.yaml CHANGED
@@ -5,17 +5,6 @@ topic: "Computer Science"
5
  # Including more categories will result in more calls to the large language model
6
  categories: ["Artificial Intelligence", "Computation and Language"]
7
 
8
- # The email address that the digest will be sent from. must be the address matching
9
- # your sendgrid api key.
10
- # Leaving this empty will cause the script to use the
11
- # FROM_EMAIL environment variable instead
12
- from_email: ""
13
-
14
- # The email address you are going to send the digest to
15
- # Leaving this empty will cause the script to use the
16
- # TO_EMAIL environment variable instead
17
- to_email: ""
18
-
19
  # Relevance score threshold. abstracts that receive a score less than this from the large language model
20
  # will have their papers filtered out.
21
  #
 
5
  # Including more categories will result in more calls to the large language model
6
  categories: ["Artificial Intelligence", "Computation and Language"]
7
 
 
 
 
 
 
 
 
 
 
 
 
8
  # Relevance score threshold. abstracts that receive a score less than this from the large language model
9
  # will have their papers filtered out.
10
  #
src/action.py CHANGED
@@ -116,8 +116,8 @@ if __name__ == "__main__":
116
 
117
  topic = config["topic"]
118
  categories = config["categories"]
119
- from_email = config.get("from_email") or os.environ.get("FROM_EMAIL")
120
- to_email = config.get("to_email") or os.environ.get("TO_EMAIL")
121
  threshold = config["threshold"]
122
  interest = config["interest"]
123
  with open("digest.html", "w") as f:
 
116
 
117
  topic = config["topic"]
118
  categories = config["categories"]
119
+ from_email = os.environ.get("FROM_EMAIL")
120
+ to_email = os.environ.get("TO_EMAIL")
121
  threshold = config["threshold"]
122
  interest = config["interest"]
123
  with open("digest.html", "w") as f: