FilterRSS
1.0.0
GPT-4의 관련성 점수를 요청하여 RSS 피드를 필터링하고 사용자 정의 임계 값을 충족하는 항목 만 포함하여 Python 스크립트. Twitter2RSS에서 시도 및 입증되었습니다.
python filter_rss.py <rss_feed_path> <rss_dest_path> <system_prompt_path> [--threshold THRESHOLD]
rss_feed_path : 소스 RSS 피드 파일로가는 경로.rss_dest_path : 대상 RSS 피드 파일로가는 경로.system_prompt_path : 시스템 프롬프트가 포함 된 텍스트 파일로의 경로.--threshold : (선택 사항) GPT-4 점수를 기반으로 한 항목을 필터링하기위한 임계 값. 기본값은 0.5입니다. 이 스크립트를 사용하기 전에 OpenAI API 키로 OPENAI_API_KEY 환경 변수를 설정했는지 확인하십시오.
System_Prompt_path가 언급 한 텍스트 파일은 GPT-4에 컨텐츠 중재 시스템으로 작동하도록 지시합니다. 이것은 샘플입니다 (Sample-Prompt.txt에서도 재현, 사용 준비) :
You are a content moderation system. Rate the relevance of the input on a scale of 0 to 1. Only numbers are permitted replies. prioritize tweets that contain insightful, informative, or thought-provoking content. Avoid: overly promotional, political issues, platitudes, languages other than English or German.
GPT-4에 대한 시스템 프롬프트를 만들려면 GPT-4 자체를 사용하여 다음과 같은 시스템 프롬프트를 사용하여 몇 가지 예에서 학습 할 수 있습니다.
You are given multiple user inputs which represent tweets to learn from. These are prefixed with either [WANTED] or [UNWANTED] for you, but these prefixes are not in the real data. From these inputs, create one System instruction for you, GPT-4, to use for future content ranking. This instruction only needs to be understandable by you. Tweets will be submitted individually to you, so while repetitive content is unwanted, you will not be able to infer it from the individual tweets.
그리고 다음과 같은 사용자 프롬프트 :
[UNWANTED]Insightful_User Retweeted Boring_User
Trying out @bluesky for the past couple of days.
생성 된 프롬프트를 텍스트 파일에 저장하고 스크립트를 실행할 때 파일의 경로를 제공합니다.
PIP를 사용하여 종속성을 설치하십시오.
pip install feedparser beautifulsoup4 openai
이 프로젝트는 GNU Affero General Public License v3.0 (AGPLV3)에 따라 라이센스가 부여됩니다. 자세한 내용은 라이센스 파일을 참조하십시오.