Custom AI providers in DT4

Is it possible to include a custom AI provider in DT4? For example Obsidian AI Tools?
A simple approach would be to enter the provider name, endpoint url, model name and API token.

1 Like

Welcome @tim.fidd
No, that’s not supported at this time. The options you see in the AI > Chat are the options available.

I appreciate that, but was hoping this functionality could be added at some time.

That’s something development would have to assess. The request is noted, with no promises.

Okay. Thanks all the same. I think it would be a good feature, because other AI providers offer multiple same model access cheaper than other more well known providers that support multiple models, like perplexity.

What are you hoping to achieve/automate?

The sort of features that are in Obsidian AI Tools can largely be achieved through Devonthink scripting. Interestingly, Cursor AI does a pretty good job not just writing scripts but also serving as a natural language front end for executing these scripts or modifying them as your needs change.

It helps a good bit if you export the DT4 Scripting Dictionary and put it in your Cursor AI project folder.

I have had pretty good success with queries such as “Search the current group for documents containing word XXX; prepare a table of such occurrences in context along with page links” or “Find all documents in group XXX which mention YYY and add tag ABCD.”

What sort of query/automation would you be hoping to add to DT?

1 Like

Well, I like the use of DT4’s AI to probe documents in a DT4 database or indexed files, like an Obsidian vault, and have a free flowing conversation. Currently, apart from local LLM’s DT4 is limited to particular providers. I expect most people will adopt one provider. But the provider I use currently is Obsidian AI tools, and that offers multiple LLM’s, a bit like Perplexity, and it’s only 7USD per month. Hence why I would be interested in provision for custom providers in DT4, if that’s possible. I note in other discussions you developed a script for OpenAI, pre DT4 beta. Do you have any updates of this script or is it the same as in a previous thread by you? I had a quick look at it and think I could adapt that, but that’s not the best solution, I think. Thanks for your feedback though.

The script I prevoiusly posted to integrate with OpenAI has been far surpassed by the current features of DT4; I wrote that hoping Devontech could improve on it and they have done so 1,000 times over.

That said - there remain areas where scripts can be helpful in DT4 - be it Applescript that calls DT4 or integration with other external apps.

Can you give some more examples of the things that Obsidian AI Tools does that you are hoping to do with DT4?

I would mainly use it to extract summaries, change the writing style etc. It depends on what documents I may be working with. Obsidian AI Tools is a paid subscription. Ultimate AI are the backend provider. It offers most of the latest common models from the likes of OpenAI, Google, Anthopoic etc. and provides a chat interface etc. In that sense it’s not much different than other chat based UI. It’s no deal breaker if it is not in DT4, as I can of course use it in Obsidian or via a browser. I only index Obsidian vaults into DT4, so they are not part of a DT4 database.

DT4 can easily do that - you simply pay as you go via an API account to the AI provider of your choice and then use the DT4 chat features.

You would only need to get into additional software or scripts if your documents were so large that they exceed the context window size for the language model or if the template for your summaries is very complex.

But for 95% of use cases to summarize a document or change writing style, DT4 does that for you out of the box.

2 Likes