Cr4yfish

@Cr4yfish@lemmy.world
1 Post – 62 Comments
Joined 1 years ago

Developer fighting 502s from Lemmys Servers.

Yeah agree, I’ll definitely implement that one.

Right now I’m working on “match the cards”.

Edit: For audio I’m not so sure on how I would do it. I don’t think most people would record it themselves when creating a course so I would need to generate it. Then you’d have the issue about correct pronunciation…

Hi, you created the Korean course right? Thanks for contributing!

If you have any feature requests or suggestions please put them here: Feature Requests

There's also a collection specific for question types: Question Types Collection

1 more...

Yeah, I'll probably go with langchain and some user-options for different LLMs.

I'll also look into authelia

I made an Issue for Feature requests. I've put OIDC in there: Feature Requests & Suggestions

Thanks! I'm already eyeing ollama for this.

Haha. Well we can't all actually be Duolingo and employ people to create the courses :D

2 more...

it’s implied it’s licensed under "all rights reserved", so not open source!

Oh, I actually did not know that. I'll try to remember adding a License right from the get-go from now on, thanks :)

3 more...

Well, yes, in a way at least. I’m not pretending to invent something never done before. Although it already has multiple features that Anki doesn’t have.

Thanks for the suggestion, I’ll definitely try to make the app as language inclusive as possible!

Also, sorry if I might’ve been too vague with the post title. The app is just similar to Duolingo in terms of structure and the idea, however it’s not specific to language learning but supposed to cater to any subject, really.

For example, I personally use it to study for my university subjects.

It's GPLv3 now.

Yeah you're right. I switched it to AGPL.

Thanks, haha. I'd love develop a Native App for it too but this is a zero-budget Project (aside from the Domain). PlayStore has a one-time fee so that's 25€ for Android + 8€/Month for the IOS AppStore just to have the App on there.

In theory, I could just have a downloadable .apk for Android to circumvent the fee but most people don't want to install a random .apk from the internet. And I'm not developing a Native App for like 3 people excluding myself (I'm an iPhone user).

Soo, yeah that'll probably not happen :(.

5 more...

Yeah, good idea. It's possible to do that with WebLLM & Langchain. Once Langchain is integrated, it's kinda similar to the Python Version so should be do-able I think.

1 more...

Please do :). I take any help I can get.

Thanks :). Yeah, it's publicly accessible: nouv.app/. I use it daily already but it still has tons of bugs.

4 more...

Thanks. My general strategy regarding GenAI and reducing the amount of hallucinations is by not giving it the task to make stuff up, but to just work on existing text - that's why I'm not allowing users to create content without source material.

However, LLMs will be LLMs and I've been testing it out a lot and found already multiple hallucinations. I built in a reporting system, although only reporting stuff works right now, not viewing reported questions.

That's my short term plan to get a good content quality, at least. I also want to move away from Vercel AI & Gemini to a Langchain Agent system or Graph maybe, which will increase the output Quality.

Maybe in some parallel Universe this really takes off and many people work on high quality Courses together...

I use Gemini, which supports PDF File uploads, combined with structured outputs to generate Course Sections, Levels & Question JSON.

When you upload a PDF, it first gets uploaded to a S3 Database directly from the Browser, which then sends the Filename and other data to the Server. The Server then downloads that Document from the S3 and sends it to Gemini, which then streams JSON back to the Browser. After that, the PDF is permanently deleted from the S3.

Data Privacy wise, I wouldn't upload anything sensitive since idk what Google does with PDFs uploaded to Gemini.

The Prompts are in English, so the output language is English as well. However, I actually only tested it with German Lecture PDFs myself.

So, yes, it probably works with any language that Gemini supports.

Here is the Source Code for the core function for this feature:

export async function createLevelFromDocument(
    { docName, apiKey, numLevels, courseSectionTitle, courseSectionDescription }: 
    { docName: string, apiKey: string, numLevels: number, courseSectionTitle: string, courseSectionDescription: string }) 
    {
    
    const hasCourseSection = courseSectionTitle.length > 0 && courseSectionDescription.length > 0;

    // Step 1: Download the PDF and get a buffer from it
    const blob = await downloadObject({ filename: docName, path: "/", bucketName: "documents" });
    const arrayBuffer = await blob.arrayBuffer();
    
    // Step 2: call the model and pass the PDF
    //const openai = createOpenAI({ apiKey: apiKey });
    const gooogle = createGoogleGenerativeAI({ apiKey: apiKey });

    const courseSectionsPrompt = createLevelPrompt({ hasCourseSection, title: courseSectionTitle, description: courseSectionDescription });
    
    const isPDF = docName.endsWith(".pdf");

    const content: UserContent = [];

    if(isPDF) {
        content.push(pdfUserMessage(numLevels, courseSectionsPrompt) as any);
        content.push(pdfAttatchment(arrayBuffer) as any);
    } else {
        const html = await blob.text();
        content.push(htmlUserMessage(numLevels, courseSectionsPrompt, html) as any);
    }

    const result = await streamObject({ 
        model: gooogle("gemini-1.5-flash"),
        schema: multipleLevelSchema,
        messages: [
            {
                role: "user",
                content: content
            }
        ]
    })
    

    return result;
}

I added it back to the roadmap :).

Hm that's very weird. I can't replicate it and I used some random SSL checker website and it checks out as well.

Really not sure why that's happening.

2 more...

Is it for self-host ppl too?

In theory not an issue. I use Supabase, which you can self host as well.

You can also self host the Mistral Client, but not Gemini. However, I am planning to move away from Gemini towards a more open solution which would also support self hosting, or in-browser AI.

I am looking for OIDC, S3 and PgSQL

Since I use Supabase, it runs on PgSQL and Supabase Storage, which is just an Adapter to AWS S3 - or any S3, really. For Auth, I use Supabase Auth which uses OAuth 2.0, that's the same as OIDC right?

2 more...

Fair opinion. Native Apps do have some huge advantages, but also some disadvantages.

I've coded both before (although way more PWAs) and with Native you also run into Platform issues as long as you don't ship exclusively for one Platform.

PWAs have a huge advantage here since they run the same everywhere as long as the Platform has a browser which is not safari.

The UI mostly works offline once loaded in due to aggressive caching. Downloading Course Content was on the initial Roadmap but I removed it since I wasn't sure if anyone would like the feature.

Syncing stuff is a real pain in the ass but I'll implement it if at least a couple people want it.

3 more...

oh, right. Forget that every time. I'll add one.

Would be nice for sure... 0 forks yet.. but I'm hopeful :D

That's weird. Did a quick google and it does seem to be 25 USD. Last time I made one it were 25 for sure as well - but that one got banned due to inactivity D:

Understandable. I added a proper offline mode back to the Roadmap on github.

Thanks :)

Thank you!. Let me know if you find out more about the issue. I'll also keep an eye out for the cause.

Edit: I've opened an Issue for this on GitHub: https://github.com/cr4yfish/nouv/issues/2

I'm making an App for Lemmy and I'm planning on adding that feature. I also want to make it so you only have to register once and the App can register you to all the instances you choose automatically.

Edit: The Webapp is Nemmy, also the Community !nemmy@lemmy.world

Edit2: Please note that Nemmy is early Alpha, so not really useable as a daily driver yet.

Edit3: Changed Community link to proper format

26 more...

I just wished the Lemmy API docs were better lol.

11 more...

takes notes for my own App 👀

Well it's open source, so whenever there's demand someone will fork and maintain it, if the original team ever leaves.

This should be the community icon.

I always wonder when people say something like this. I also develop a Lemmy app myself and don't understand this point, like are you afraid people will complain about your code cleanliness or commenting techniques?

I mean what extra work is there really? Moving secrets to environment variables is annoying, I get that at least.

I mean no offense to you at all, really, but when I check out other Lemmy apps I don't even bother with closed source ones since I can't possibly know if you just steal login information. Especially since this is so immensely easy with Lemmy.

Again, I'm not saying you do these things but it's always better being able to check yourself, you know?

3 more...

Very good point! I think @TheButtonJustSpins@infosec.pub has a good idea on how to circumvent that.

I could make my own database with hashed passwords using postgreqsl and RLS, which is pretty secure. The User then decrypts the hashed passwords once on login and is simultaneously logged into multiple instances of Lemmy to get the JWT of each instance, which is then stored in SessionStorage or even in a Cookie if the User wants to which would make this a one-time process.

On signup the User could just register to one instance and then I just generate random 32 Character passwords and hash them with the Users' password, then get the JWTs and if cookies are enabled the that would only have to be done every year or so (or when the User deletes the Cookies).

This whole process is seems pretty easy, especially if you've done something like this before and I'm betting some other App Dev is already taking notes lmao.

Edit: Let's also do a thought experiment on what data will be leaked if I did this 1:1 and the database gets somehow hacked:

For each User:

  1. Username (=> Gives away that you use Nemmy)
  2. Hashed Passwords (=> Hashed passwords cannot be read if you don't have the original Users' password until we have access to quantum computers which can literally crack the encryption algorithm)
1 more...

You could make like a circular shape on the screen with numbers correlating to the speed on different angles. Then maybe add some rectangle which points at the current speed and effectively changes the angle when the speed changes.

Oh wait..

I'm actually trying to solve this issue on my own Lemmy app. It automatically switches instances when the requested one is down. Works only in the Feed right now and, of course, accounts are still instance-bound - but I will fix that soon.

There actually were a number of French nazis in France during German occupation. It's a topic often disregarded by the countries itself. E.g The Polish government tries to sweep that under the carpet.

I mean there even were Nazis in the US.

3 more...

That's probably the cbat dude after his gf left him.

You can actually fast travel directly to cities, even when you're in a different system.