bramses / chatgpt-md

A (nearly) seamless integration of ChatGPT into Obsidian.
MIT License
824 stars 61 forks source link

Feature Request: customize API server domain #34

Closed Akifyss closed 1 year ago

Akifyss commented 1 year ago

Hi there! Thank you for creating this amazing plugin!❤️ I was wondering if it would be possible to add a feature that allows users to customize the API server domain. It would be really helpful for those who have specific domains. Thank again for your hard work! 🙌 Here's an example: image

bramses commented 1 year ago

Hey @Akifyss,

Yep, you can use a custom endpoint (thanks to @Nintorac!) in your frontmatter as long as it conforms to the OpenAI API params

Jackiexiao commented 1 year ago

I encounter this problem... sorry , I don't know how to fix it

Access to XMLHttpRequest at 'https://chatgpt-xxxx.app/proxy' from origin 'app://obsidian.md' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

bramses commented 1 year ago

Hi @Jackiexiao,

CORS is a known problem for Obsidian. You can try making a middleware server!

https://forum.obsidian.md/t/make-http-requests-from-plugins/15461/2