-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from Cassius0924/feat-spark
feat:支持Spark星火认知LLM
- Loading branch information
Showing
17 changed files
with
769 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
[ | ||
{ | ||
"guid": 218572, | ||
"type": 1, | ||
"cat": "6", | ||
"cover_thumb": "http://pic.yupoo.com/fotomag/7aa701a9/b54ad0d4.jpg", | ||
"cover_sq": "http://pic.yupoo.com/fotomag/30d0f2dd/aff88815.jpg", | ||
"cover_sq_hd": "http://pic.yupoo.com/fotomag/30d0f2dd/aff88815.jpg", | ||
"cover_landscape": "http://pic.yupoo.com/fotomag/ceb7f2e4/4b506571.jpg", | ||
"cover_landscape_hd": "http://pic.yupoo.com/fotomag/4600d642/c681b939.jpg", | ||
"pubdate": "November 17, 2024", | ||
"archive_timestamp": 1731772800, | ||
"pubdate_timestamp": 1731842880, | ||
"lastupdate_timestamp": 1731854888, | ||
"ui_sets": { | ||
"caption_subtitle": "泰国庆祝天灯节", | ||
"cover_landscape_hd_4k": "http://pic.yupoo.com/fotomag/2f5642d1/b1a5daf7.jpg" | ||
}, | ||
"title": "November 17, 2024", | ||
"author": "", | ||
"source": "", | ||
"link_share": "https://m.idai.ly/se/8eeShU", | ||
"link_wechat": "https://m.idai.ly/se/8eeShU", | ||
"title_wechat_tml": "泰国庆祝天灯节 - November 17, 2024 | iDaily 每日全球最佳新闻图片", | ||
"has_caption": 1, | ||
"has_news": 1, | ||
"latitude": 18.7964642, | ||
"longitude": 98.6600586, | ||
"geo_span": 0.25, | ||
"location": "泰国 · 清迈", | ||
"summary": "", | ||
"content": "泰国民众放飞孔明灯庆祝「天灯节」(Yi Peng festival),清迈。「天灯节」是泰国北部地区的传统节日,历史可追溯至13世纪泰北兰纳王国时期,庆祝日期为每年泰国农历第12个月的满月日,人们会放飞孔明灯庆祝新一年即将开始。泰国旅游部数据显示2024年1至10月接待外国游客超过2900万人次,创造1.35万亿泰铢(约合393亿美元)旅游业收入,前5大游客来源国依次为中国、马来西亚、印度、韩国和俄罗斯。摄影师:Manan Vatsyayana", | ||
"coordinate_sets": [], | ||
"entry_imgs": [], | ||
"tags": [ | ||
{ | ||
"id": "culture", | ||
"name": "CULTURE · 人类文化", | ||
"focus": 1 | ||
} | ||
], | ||
"news_count": 6 | ||
}, | ||
{ | ||
"guid": 218571, | ||
"type": 1, | ||
"cat": "6", | ||
"cover_thumb": "http://pic.yupoo.com/fotomag/0fb2e5d0/790f0d7b.jpg", | ||
"cover_sq": "http://pic.yupoo.com/fotomag/c1974685/8395c708.jpg", | ||
"cover_sq_hd": "http://pic.yupoo.com/fotomag/c1974685/8395c708.jpg", | ||
"cover_landscape": "http://pic.yupoo.com/fotomag/e960e6e1/b846d124.jpg", | ||
"cover_landscape_hd": "http://pic.yupoo.com/fotomag/c8c52912/a379ccf6.jpg", | ||
"pubdate": "November 17, 2024", | ||
"archive_timestamp": 1731772800, | ||
"pubdate_timestamp": 1731841140, | ||
"lastupdate_timestamp": 1731854900, | ||
"ui_sets": { | ||
"caption_subtitle": "中美元首利马会晤", | ||
"cover_landscape_hd_4k": "http://pic.yupoo.com/fotomag/dc420fab/e6a3dff6.jpg" | ||
}, | ||
"title": "November 17, 2024", | ||
"author": "", | ||
"source": "", | ||
"link_share": "https://m.idai.ly/se/8e7445", | ||
"link_wechat": "https://m.idai.ly/se/8e7445", | ||
"title_wechat_tml": "中美元首利马会晤 - November 17, 2024 | iDaily 每日全球最佳新闻图片", | ||
"has_caption": 1, | ||
"has_news": 1, | ||
"latitude": -12.0466888, | ||
"longitude": -77.0430886, | ||
"geo_span": 0.25, | ||
"location": "秘鲁 · 利马", | ||
"summary": "", | ||
"content": "中国国家主席习近平与美国总统 Joe Biden 在 APEC 峰会期间举行会晤,秘鲁利马。11月16日,中美两国领导人就双边关系、人工智能治理、地区及国际局势议题举行1小时45分钟会谈。习近平就台湾问题、中国南海、经贸科技、网络安全、乌克兰危机、朝鲜半岛局势等重大问题阐明中方立场。Biden 强调美国的一个中国政策保持不变,对中国支持俄罗斯国防工业深表关切,对中国不公平的贸易政策表示担忧。双方一致认为应以慎重负责的态度发展军事领域的人工智能技术,应维持由人类控制核武器使用的决定。美国总统 Biden 将于2025年1月正式卸任。摄影师:Leah Millis", | ||
"coordinate_sets": [], | ||
"entry_imgs": [], | ||
"tags": [ | ||
{ | ||
"id": "spotnews", | ||
"name": "SPOT NEWS · 全球焦点", | ||
"focus": 1 | ||
} | ||
], | ||
"news_count": 7 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import json | ||
import unittest | ||
|
||
from wechatter.commands._commands import idaily | ||
|
||
|
||
class TestIdailyCommand(unittest.TestCase): | ||
def setUp(self): | ||
with open( | ||
"tests/commands/test_idaily/idaily_response.json" | ||
) as f: | ||
self.tih_response = json.load(f) | ||
self.tih_list = self.tih_response | ||
|
||
def test_extract_idaily_data_success(self): | ||
result = idaily._extract_idaily_data(self.tih_response) | ||
self.assertListEqual(result, self.tih_list) | ||
|
||
def test_generate_idaily_message_success(self): | ||
result = idaily._generate_idaily_message(self.tih_list) | ||
true_result = "✨====每日环球视野====✨\n今天的iDaily还没更新,现在为您呈现的是:\n🗓️ 时间: November 17, 2024\n1. 🌎 泰国庆祝天灯节\n 🌪️ 泰国民众放飞孔明灯庆祝「天灯节」(Yi Peng festival),清迈。「天灯节」是泰国北部地区的传统节日,历史可追溯至13世纪泰北兰纳王国时期,庆祝日期为每年泰国农历第12个月的满月日,人们会放飞孔明灯庆祝新一年即将开始。泰国旅游部数据显示2024年1至10月接待外国游客超过2900万人次,创造1.35万亿泰铢(约合393亿美元)旅游业收入,前5大游客来源国依次为中国、马来西亚、印度、韩国和俄罗斯。摄影师:Manan Vatsyayana\n2. 🌎 中美元首利马会晤\n 🌪️ 中国国家主席习近平与美国总统 Joe Biden 在 APEC 峰会期间举行会晤,秘鲁利马。11月16日,中美两国领导人就双边关系、人工智能治理、地区及国际局势议题举行1小时45分钟会谈。习近平就台湾问题、中国南海、经贸科技、网络安全、乌克兰危机、朝鲜半岛局势等重大问题阐明中方立场。Biden 强调美国的一个中国政策保持不变,对中国支持俄罗斯国防工业深表关切,对中国不公平的贸易政策表示担忧。双方一致认为应以慎重负责的态度发展军事领域的人工智能技术,应维持由人类控制核武器使用的决定。美国总统 Biden 将于2025年1月正式卸任。摄影师:Leah Millis" | ||
self.assertIn(true_result, result) | ||
|
||
def test_generate_idaily_message_empty_list(self): | ||
result = idaily._generate_idaily_message([]) | ||
self.assertEqual(result, "暂无每日环球视野") |
30 changes: 0 additions & 30 deletions
30
tests/commands/test_today_in_history/test_today_in_history.py
This file was deleted.
Oops, something went wrong.
84 changes: 0 additions & 84 deletions
84
tests/commands/test_today_in_history/today_in_history_response.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.