obsidian-various-complements-plugin icon indicating copy to clipboard operation
obsidian-various-complements-plugin copied to clipboard

I hope to add a function of returning data from the API as a suggestion

Open zazaji opened this issue 2 years ago • 3 comments

Hello, I like this plug-in. I built an AI program. I hope to add a function of returning data from the API as suggestion, such as Post to: http://127.0.0.1/gpt/api Request parameter : {'key': 'Can you please let us know more details about your past?'} Returns as follows:

 {'value': ' We can only be honest about what happened to',
  'time': 1.2396867275238037,
  'tokens': 11},
 {'value': " Are you willing to talk about anything that you've told",
  'time': 1.2396867275238037,
  'tokens': 11}]

Thanks!

zazaji avatar Aug 13 '22 09:08 zazaji

Hi, @zazaji. Thank you for your FR :)

But sorry, I couldn't understand what and why you wanted to. Various Complements is a plugin for Obsidian, so I think it shouldn't (and can't?) implement as an API server.

tadashi-aikawa avatar Aug 14 '22 13:08 tadashi-aikawa

Thanks for you reply. I hope Various Complements can add The function like this website. https://transformer.huggingface.co/doc/gpt2-large

zazaji avatar Aug 17 '22 00:08 zazaji

Perhaps this is feasible

You can call the APIs of other plugins in dataviewjs

Like this

app.plugins.plugins["metaedit"].api;

app.plugins.plugins["obsidian-full-calendar"];

lbgws2 avatar Sep 24 '23 02:09 lbgws2