nhaouari / obsidian-textgenerator-plugin

Text Generator is a versatile plugin for Obsidian that allows you to generate text content using various AI providers, including OpenAI, Anthropic, Google and local models.
https://text-gen.com/
MIT License
1.51k stars 136 forks source link

Support for locally hosted LLMs #182

Closed Schallabajzr closed 11 months ago

Schallabajzr commented 1 year ago

I was following a blog post and self hosting both:

the requests to these servers work via curl as per this curl http://localhost:8080/v1/models {"object":"list","data":[{"id":"gpt-3.5-turbo","object":"model"}]}%

but when I try to communicate with it through the text generator plugin with the model rename to gpt-3.5-turbo to the self hosted instance (running inside docker at localhost:8080) I get the following error. `

[!failure]- Failure TypeError: Failed to fetch

  • plugin:obsidian-textgenerator-plugin:57307 eval plugin:obsidian-textgenerator-plugin:57307:9

  • new Promise

  • plugin:obsidian-textgenerator-plugin:57291 TextGenerator.eval plugin:obsidian-textgenerator-plugin:57291:14

  • Generator.next

  • plugin:obsidian-textgenerator-plugin:78 eval plugin:obsidian-textgenerator-plugin:78:61

  • new Promise

  • plugin:obsidian-textgenerator-plugin:62 __async plugin:obsidian-textgenerator-plugin:62:10

  • plugin:obsidian-textgenerator-plugin:57290 TextGenerator.request plugin:obsidian-textgenerator-plugin:57290:12

  • plugin:obsidian-textgenerator-plugin:57275 TextGenerator.eval plugin:obsidian-textgenerator-plugin:57275:86

  • Generator.next

`

haouarihk commented 1 year ago

The support for locally hosted llms are coming soon. it is in the beta release, it will be out soon

dahifi commented 1 year ago

+1 on this as well. LMStudio support with this will be awesome.

Any related tasks on this @haouarihk, or are you doing all this in private?

haouarihk commented 11 months ago

+1 on this as well. LMStudio support with this will be awesome.

Any related tasks on this @haouarihk, or are you doing all this in private?

i forgot to mention it there, LMStudio support is out, if you want up to date tasks. you can join our discord community

dahifi commented 11 months ago

Relevant Discord link here, below is copypasta from the thread, c/o haitam(526577079509057537). https://discord.com/channels/1083485983879741572/1159894948636799126

note that it will not work without api key being set to something, we recommend setting it to random text like "asdf" if the generation is slow, and you have a decent gpu make sure to set these

image