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.5k stars 133 forks source link

Error: ENOENT: no such file or directory #300

Closed acsezen closed 4 months ago

acsezen commented 4 months ago

Hello,

I started to receive this error while renaming my title with TG. I disabled all my plugin except TG and still had it.

plugin:obsidian-textgenerator-plugin:1974 {messages: Array(1), k: 'invoked', llmpredict: true, llmPredict2: false}
plugin:obsidian-textgenerator-plugin:1976 {target: 'https://api.anthropic.com/', path: 'https://api.anthropic.com//https%3A%2F%2Fapi.anthropic.com%2F/v1/messages'}
plugin:obsidian-textgenerator-plugin:2077 Error: ENOENT: no such file or directory, rename 'D:\vault\1.md' -> 'D:\vault\Based on the content provided, an appropriate title for the current document could be

Openshift Pod Resource Specifications Cheatsheet

This title captures the main topic (Openshift pods and their specifications), indicates that it's a reference or cheatsheet, and avoids using any of the disallowed characters.md'
    at async Object.rename (node:internal/original-fs/promises:779:10)
handelError @ plugin:obsidian-textgenerator-plugin:2077
callback @ plugin:obsidian-textgenerator-plugin:2054
await in callback (async)
RK @ app.js:1
t.onChooseItem @ app.js:1
t.onChooseSuggestion @ app.js:1
t.selectSuggestion @ app.js:1
e.useSelectedItem @ app.js:1
(anonymous) @ app.js:1
e.handleKey @ app.js:1
e.onKeyEvent @ app.js:1

Is it a bug or something can be on my side?

Thanks!

haouarihk commented 4 months ago

modify your prompt so that the AI doesn't put a bunch of not allowed letters like newlines and some special characters.

acsezen commented 4 months ago

Hi,

I noticed that i have this problem only when i use Claud. Its not happening when i use chatgpt? I am not using a custom prompt. I am using default generate title comes with TG.

Thanks!