Closed flemming-pr closed 2 months ago
Oh, yeah, this PR is very much anticipated! @logancyang please merge it!
Thank you very much for this PR! I have directly edited my main.js. Additionally, we need to update tiktoken as well. GPT-4o uses the o200k_base tokenizer, which is different from the one used by GPT-4 models.
Yeah great, waiting for this as well!
I believe you need to add an option to the chat model selection for it to show up:
Thanks for your help. I have added it to my PR.
Thank you very much for this PR! I have directly edited my main.js. Additionally, we need to update tiktoken as well. GPT-4o uses the o200k_base tokenizer, which is different from the one used by GPT-4 models.
@wafe To my shame. I actually just looked for suitable places in the code and added the option. Can you tell me exactly where this part needs to be added?
@wafe To my shame. I actually just looked for suitable places in the code and added the option. Can you tell me exactly where this part needs to be added?
I'd recommend waiting for the merge. But if you have to, backup the plugin folder first.
Just for reference for anyone that's trying to do this, the main.js output to edit is at .obsidian/plugins/copilot/main.js
I'd search for GPT-4 TURBO
and add duplicate line in each of the places for gpt-4o
. For the tokenizer, you can add a new case to the function getEncodingNameForModel
case "gpt-4o": {
return "o200k-base";
}
Thank you @peteretelej it worked for me
Also, if someone else comes across this and needs a quick reference, here's my main.js that works for me.
I had to change it to a text file because github
ℹ️ The file uploaded by @Richard-Woessner (thanks!) contains a typo so while it might look like it's working it'll actually not use GPT-4o. Instead it'll use whatever model you loaded before that. To fix it, search the file for GPY-4
and replace with GPT-4
! :)
file by @Richard-Woessner (thanks!) contains a typo so while it might look like it's working it'll actually not use GPT-4o
Ope, Thanks for the heads up.
Placebo effect is real. I thought it was working lol.
I'd recommend waiting for the merge.
@peteretelej Do you have insight you can share as to when this could merge?
I'd recommend waiting for the merge.
@peteretelej Do you have insight you can share as to when this could merge?
No idea, seems like Logan's been away for a while. Didn't know it'd take long. Please see my comment on how to update the main.js file to add 4o
Hi! I'm sorry, I'm new to using github. How do I update my Copilot plugin to include this PR?
Hi! I'm sorry, I'm new to using github. How do I update my Copilot plugin to include this PR?
You could wait or add the main.js file yourself. I'm out so I'm not able to give a great explanation but in your vault look into the hidden .obsidian file, go to plugins, then to obsidian copilot, backup up main.js and replace it with the text file I linked.
Make sure to rename it to main.js
Hi! I'm sorry, I'm new to using github. How do I update my Copilot plugin to include this PR?
You could wait or add the main.js file yourself. I'm out so I'm not able to give a great explanation but in your vault look into the hidden .obsidian file, go to plugins, then to obsidian copilot, backup up main.js and replace it with the text file I linked.
Make sure to rename it to main.js
Thank you so much!
@flemming-petersen Sorry guys, I've been AFK for a while, life happened. But I'm back now! Thanks for the PR, merged! Will put up a new version soon!
GPT-4o was just released and it would be nice to use it in Copilot due to lower costs and faster responses.