Files
RSSHub/lib/v2/openai/radar.js
T
Guorui Yu 0267e2c307 fix(route): add openai research support (#12484)
* fix(route): split openai common logic to common.js

Signed-off-by: Guorui Yu <yuguorui@pku.edu.cn>

* fix(route): add openai research support

Signed-off-by: Guorui Yu <yuguorui@pku.edu.cn>

* fix(route): add openai research docs

Signed-off-by: Guorui Yu <yuguorui@pku.edu.cn>

---------

Signed-off-by: Guorui Yu <yuguorui@pku.edu.cn>
2023-05-11 21:25:50 +08:00

36 lines
1.1 KiB
JavaScript

module.exports = {
'openai.com': {
_name: 'OpenAI',
'.': [
{
title: 'Blog',
docs: 'https://docs.rsshub.app/en/new-media.html#openai',
source: '/blog',
target: (_, url) => {
const topics = new URL(url).searchParams.get('topics');
if (topics) {
return `/openai/blog/${topics}`;
}
return '/openai/blog';
},
},
],
chat: [
{
title: 'ChatGPT - Release Notes',
docs: 'https://docs.rsshub.app/en/new-media.html#openai',
source: '/chat',
target: () => '/openai/chatgpt/release-notes',
},
],
research: [
{
title: 'Research',
docs: 'https://docs.rsshub.app/en/new-media.html#openai',
source: '/research',
target: () => '/openai/research',
},
],
},
};