Giter Site home page Giter Site logo

reply2future / xextension-newsassistant Goto Github PK

View Code? Open in Web Editor NEW
40.0 4.0 6.0 52 KB

An extension to summarize the feeds of FreshRSS using GPT.

Home Page: https://github.com/FreshRSS/FreshRSS

License: The Unlicense

PHP 52.06% HTML 29.80% JavaScript 12.78% CSS 5.36%
freshrss freshrss-extension

xextension-newsassistant's Introduction

xextension-newsassistant's People

Contributors

reply2future avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

xextension-newsassistant's Issues

gen.layout.title is not a valid key

[Tue, 12 Sep 2023 09:56:11 +0000] [error] --- Could not fetch available extension from GitHub
[Tue, 12 Sep 2023 09:56:12 +0000] [error] --- Could not fetch available extension from GitHub
[Tue, 12 Sep 2023 09:56:13 +0000] [error] --- Could not fetch available extension from GitHub
[Tue, 12 Sep 2023 09:56:14 +0000] [error] --- Could not fetch available extension from GitHub
[Tue, 12 Sep 2023 09:56:39 +0000] [debug] --- gen.layout.title is not a valid key
[Tue, 12 Sep 2023 09:56:39 +0000] [debug] --- gen.action.set_read is not a valid key
[Tue, 12 Sep 2023 09:58:35 +0000] [debug] --- gen.layout.title is not a valid key
[Tue, 12 Sep 2023 09:58:35 +0000] [debug] --- gen.action.set_read is not a valid key

image

No output

image

image
As shown in the figure, there is no text output [I can run normally in another freshress]
Use a self built chatGPT model that is compatible with OpenAI. There is no log output in the large model

image

Normally, there should be such output. But there is no log output in this freshress
(This screenshot is another normal summary of freshress logs)

make the UI more friendly

goal

  • add the MaxTokens hins
  • add the Temperature hins
  • add the api ref links
  • add the help ref links

handle the curl error

goal

It will display nothing when there are some request error like SSL_ERROR_SYSCALL

[Request to add feature]: Automatically refresh summary

image

Option 1: When I click this button, I can automatically summarize the remaining 5 pieces of information
Alternatively, option 2: Use scrolling to automatically and continuously update summary summaries [just like displaying new articles in Freshrss]

No summary generated

i have everything setup correct and i can see the api is being used via openIA's portal but nothing is summarized

image
image

Resume title by default instead of content

Due to the limitations of the model I was not able to summarize the content, while the title works well, except the content is default and may cause problems for a new user.

Telegram bot notification

#20 (comment)

To implement scheduled summarization and subsequently push the summarized content to a Telegram bot. But it would be a little bit difference to the original workflow, which is:

  1. select the category feeds to summarize
  2. click the read button to change the status of feeds (this may be not easy to do with telegram bot)

format the result

goal

the summary of data should be formatted when it containers some line breaks.

Gemini AI support

Thinking of run it with FreshRSS, is there anyone to can help me?

const Parser = require('rss-parser');
const {
GoogleGenerativeAI,
HarmCategory,
HarmBlockThreshold,
} = require('@google/generative-ai');

const MODEL_NAME = 'gemini-1.5-pro-latest';
const API_KEY = 'XXX';

const parser = new Parser();
const feedURL = 'https://test.com/feed/';

async function getRSSData() {
try {
const feed = await parser.parseURL(feedURL);
const latestItem = feed.items[0];

const rssContent = `${latestItem.title} ${latestItem.contentSnippet}`;

return rssContent;

} catch (err) {
console.error('RSS verisi alınamadı:', err);
return null;
}
}

async function runChat() {
const rssContent = await getRSSData();

if (!rssContent) {
console.log('RSS verisi alınamadı.');
return;
}

const genAI = new GoogleGenerativeAI(API_KEY);
const model = genAI.getGenerativeModel({ model: MODEL_NAME });

const generationConfig = {
temperature: 1,
topK: 0,
topP: 0.95,
maxOutputTokens: 8192,
};

const safetySettings = [
{
category: HarmCategory.HARM_CATEGORY_HARASSMENT,
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
},
{
category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
},
{
category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
},
{
category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
},
];

const chat = model.startChat({
generationConfig,
safetySettings,
history: [],
});

const result = await chat.sendMessage(rssContent);

const response = result.response;
console.log(response.text());
}

runChat();

no whitespace

problem

There are some message is a whitespace which would be transfer to empty string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.