Skip to content

Commit 1d1ef4c

Browse files
committed
update: add news time limit options
1 parent 20e05b5 commit 1d1ef4c

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

Diff for: SETTINGS.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ MODEL_PROVIDER: OAIClient
99
MODEL_AUTH:
1010
api_key: "<Input Your API Key Here>"
1111
MODEL_OPTIONS:
12-
model: gpt-4-turbo
12+
model: gpt-3.5-turbo
1313
# Application Settings
1414
MAX_COLUMN_NUM: 3
1515
OUTPUT_LANGUAGE: English
1616
MAX_SEARCH_RESULTS: 8
1717
SLEEP_TIME: 5
18+
# News time limit: 'd' as day,'w' as week,'m' as month
19+
NEWS_TIME_LIMIT: d
1820
# Outline Settings
1921
USE_CUSTOMIZE_OUTLINE: false
2022
CUSTOMIZE_OUTLINE:

Diff for: logs/Agently_daily_news_collector.log

Whitespace-only changes.

Diff for: prompts/create_outline.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
input: ${topic}
1+
input:
2+
topic: ${topic}
3+
news_time_limit: ${news_time_limit}
24
instruct:
3-
task: prepare news collection outline according {input}'s topic
5+
task: prepare news collection outline according {input.topic} and {input.news_time_limit}
46
output language: ${language}
57
output:
68
report_title:
79
$type: str
8-
$desc: generate a title for this news collection like "daily news about sports", "today's news about finance"
10+
$desc: generate a title for this news collection like "news about sports", "news about finance"
911
column_list:
1012
$type:
1113
- column_title:
1214
$type: str
15+
$desc: title of this column even if this is the only one column
1316
column_requirement:
1417
$type: str
1518
$desc: describe recheck standard about the contents in this column to make sure all contents are aimed at the requirement of {input}'s topic

Diff for: workflows/column_workflow.py

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def search_executor(inputs, storage):
3535
"searched_news",
3636
search(
3737
column_outline["search_keywords"],
38+
timelimit=SETTINGS.NEWS_TIME_LIMIT if hasattr(SETTINGS, "NEWS_TIME_LIMIT") else "d",
3839
proxy=tool_proxy,
3940
logger=logger,
4041
)

Diff for: workflows/main_workflow.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def input_topic_executor(inputs, storage):
2323
if not SETTINGS.USE_CUSTOMIZE_OUTLINE:
2424
storage.set(
2525
"topic",
26-
input("[Please input the topic of your daily news collection]: ")
26+
input("[Please input the topic of your news collection]: ")
2727
)
2828

2929
@main_workflow.chunk("generate_outline")
@@ -39,6 +39,7 @@ def generate_outline_executor(inputs, storage):
3939
path=f"{ root_path }/prompts/create_outline.yaml",
4040
variables={
4141
"topic": storage.get("topic"),
42+
"news_time_limit": SETTINGS.NEWS_TIME_LIMIT if hasattr(SETTINGS, "NEWS_TIME_LIMIT") else "d",
4243
"language": SETTINGS.OUTPUT_LANGUAGE,
4344
"max_column_num": SETTINGS.MAX_COLUMN_NUM,
4445
}

0 commit comments

Comments
 (0)