KnowledgeCanvas / knowledge

Knowledge is a tool for saving, searching, accessing, exploring and chatting with all of your favorite websites, documents and files.
Apache License 2.0
1.31k stars 91 forks source link

GPT-4? #125

Closed rmulligan closed 10 months ago

rmulligan commented 11 months ago

Where's GPT-4 support?

RobRoyce commented 11 months ago

Just so happens I started working on this last weekend. Hopefully I can get a new release out with GPT-4 and GPT-3.5 16K within a couple days!

rmulligan commented 11 months ago

Terrific. I tried to do it myself, but hit a snag with the wasm file. Will be watching for it. I love this tool!

RobRoyce commented 10 months ago

Terrific. I tried to do it myself, but hit a snag with the wasm file. Will be watching for it. I love this tool!

Yeah the wasm is giving me trouble as well. The particular tiktoken implementation we're using supports GPT4, but claims the model fails to initialize (even though it successfully encodes/decodes during use).

I pretty much have this implemented (with a few extra bonus features I couldn't resist implementing). I'll wrap it up soon and put out a release!

rmulligan commented 10 months ago

Thanks, Rob!! Can't wait. I'm happy to help contribute to this project as well if you could use a hand.

RobRoyce commented 10 months ago

I appreciate the offer. I just pushed GPT4 support to release/0.8.4. It would be great if you could give it a go and let me know that things are working (or not).

Note that you will have to copy the tiktoken_bg.wasm file from node_modules/... to Resources/tiktoken_bg.wasm (dev-only procedure).

No worries if you can't, I'll do more extensive testing on the weekend.

rmulligan commented 10 months ago

It's working great. Obviously slower that 3.5, but the responses are smarter.

I found this discussion regarding copying the wasm file on build (albeit with nextjs): https://github.com/transitive-bullshit/chatgpt-api/issues/570#issuecomment-1700313359

Thanks for getting this out!