Skip to content

Commit

Permalink
add feed blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
Qetesh committed Aug 13, 2024
1 parent 9c5c31a commit ed78d9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
llm_base_url = os.getenv('llm_base_url')
llm_api_key = os.getenv('llm_api_key')
llm_model = os.getenv('llm_model')
feed_blacklist = os.getenv('feed_blacklist').split(',')

miniflux_client = miniflux.Client(miniflux_base_url, api_key=miniflux_api_key)
llm_client = OpenAI(base_url=llm_base_url, api_key=llm_api_key)

def process_entry(entry):
if not entry['content'].startswith('摘要'):
if (not entry['content'].startswith('摘要')) & (entry['feed']['site_url'] not in feed_blacklist):
completion = llm_client.chat.completions.create(
model=llm_model,
messages=[
Expand Down

0 comments on commit ed78d9a

Please sign in to comment.