clairefro / obsidian-chat-cbt-plugin

AI-powered journaling plugin for your Obsidian notes, inspired by cognitive behavioral therapy
https://obsidian.md/plugins?search=chatcbt
MIT License
185 stars 11 forks source link

could you please support api url? #13

Open lisasuosuo opened 6 months ago

lisasuosuo commented 6 months ago

can I use other api transfer url and api to connect to the model?

clairefro commented 6 months ago

Do you have an API in mind? Every API has a different interface

clairefro commented 6 months ago

By the way, if using Ollama, you can use any model found on Hugging Face locally. after downloading and running the model in Ollama, you can update the ChatCBT settings to point to that model. Hope this helps

lisasuosuo commented 6 months ago

Thanks for your reply very much !!! Actually the API transfer url I mean is like this.


client = OpenAI(
    # defaults to os.environ.get("OPENAI_API_KEY")
    api_key="YOUR API KEY",
    base_url="https://api.chatanywhere.tech/v1"
    # base_url="https://api.chatanywhere.cn/v1"
)

It is the api transfer host. Because the region where I am can't use the openai api directly, we should use the host to transfer. Hopefully I've made it clear.

clairefro commented 6 months ago

@lisasuosuo oh! Thanks for the example. I think I can make this work.

In the meantime, if you'd like to try you can use Ollama with Mistral

lisasuosuo commented 6 months ago

Yeah , Thanks again for your quickly and helpful reply!!! I will try your suggestion! Expected to use this plugin!