different-ai / obsidian-ava

Quickly format your notes with ChatGPT in Obsidian
https://app.anotherai.co
MIT License
653 stars 18 forks source link

Can you Selfhost the API? #68

Open DarkByteZero opened 1 year ago

DarkByteZero commented 1 year ago

Im confused, in the settings there is the option for a custom embed base, which seems to be one part of Ava. But is it possible to self-host all the APIs used by AVA. So, the plugin is fully functional with my own OpenAI Account etc.

The Pricing Page also mentions: "Get the hosted version. No Config. No Hassle." So, I am assuming there is a self-hosted version.

louis030195 commented 1 year ago

Ava uses two API, one for Links and the other for Rewrite, Paragraph

@DarkByteZero you can self-host the first API providing Link feature by following these instructions

FYI the special instance source code used in the hosted version is here (you don't need it) https://github.com/different-ai/embedbase-ava which is just the original API + some middleware to check API keys

As of now, you cannot self-host the (second) text generation features API such as Rewrite

DarkByteZero commented 1 year ago

But i cant find where the code for these routes is defined ?

plans = { "free": { "/v1/text/create": 25, "/v1/image/create": 5, "/v1/search": 15, }, "hobby": { "/v1/text/create": 1000, "/v1/image/create": 200, "/v1/search": 600, }, "pro": { "/v1/text/create": 1000, "/v1/image/create": 200, "/v1/search": 600, }, }

does it come from embedbase? I thought embedbase is just for context search?

DarkByteZero commented 1 year ago

ah i see you edited your response. Would you accept a PR that adds a Setting to use the OpenAI API directly ? (API Key Setting) Or are there plans to open source the second API too?

louis030195 commented 1 year ago

ah i see you edited your response. Would you accept a PR that adds a Setting to use the OpenAI API directly ? (API Key Setting) Or are there plans to open source the second API too?

that would be great, I wish I had time to open source the API, an option to use openai api directly would be highly appreciated :)

DarkByteZero commented 1 year ago

Ok, when I have the time, I will try to check it out.

Mapleshade20 commented 1 year ago

I would be really appreciating this feature too! GPT4All recently came out working perfectly on PC and it can handle local API call exactly in the same format to OpenAI api. So could you add a feature to support customizing API?