diff options
author | 2024-08-19 22:04:17 +0800 | |
---|---|---|
committer | 2024-08-19 22:04:17 +0800 | |
commit | ff8e06f2d495497d111e45f368b6c3bb1f9088c1 (patch) | |
tree | da422da8c9877f58ecab787c8c25769ac9ac1c22 | |
parent | 9adf372d461ceee5d9fc3aef4429b262290636b4 (diff) | |
download | miniflux-ai-ff8e06f2d495497d111e45f368b6c3bb1f9088c1.tar.gz miniflux-ai-ff8e06f2d495497d111e45f368b6c3bb1f9088c1.tar.zst miniflux-ai-ff8e06f2d495497d111e45f368b6c3bb1f9088c1.zip |
add timeout, add err handlerv0.5
-rw-r--r-- | main.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -27,7 +27,7 @@ def process_entry(entry): (((agent[1]['whitelist'] is not None) and (entry['feed']['site_url'] in agent[1]['whitelist'])) or (agent[1]['blacklist'] is not None and entry['feed']['site_url'] not in agent[1]['blacklist']) or (agent[1]['whitelist'] is None and agent[1]['blacklist'] is None))): - completion = llm_client.chat.completions.create( model=config['llm']['model'], messages= messages, timeout=60 ) + completion = llm_client.chat.completions.create( model=config['llm']['model'], messages= messages, timeout=15 ) response_content = completion.choices[0].message.content print(time.strftime("%Y/%m/%d %H:%M:%S", time.localtime()), agent[0], entry['feed']['feed_url'], response_content) |