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.45k stars 127 forks source link

Auto Suggest fails on Claude-3 #281

Open PretzelVector opened 5 months ago

PretzelVector commented 5 months ago

Hello,

Thank you for your work on this plugin. Unfortunately, I am having some difficulties getting things functioning with Anthropic.

Steps to reproduce:

  1. Create a new vault
  2. Enable community plugins and install obsidian-text-generator
  3. Edit the settings as follows:
    • LLM Provider: Chat Anthropic
    • Anthropic API Key
    • Model: claude-3-haiku-20240307
    • Enable auto suggest
  4. Close settings
  5. Place cursor at the end of the Welcome note and hit double space

Expected Behaviour: After a brief pause, the auto-suggest options appear.

Actual Behaviour: Error message and no text generation.

Error: "stopSequence" parameter found in input and default params
    at ChatAnthropic2._generate (plugin:obsidian-textgenerator-plugin:99092:17)
    at eval (plugin:obsidian-textgenerator-plugin:22511:93)
    at Array.map (<anonymous>)
    at ChatAnthropic2._generateUncached (plugin:obsidian-textgenerator-plugin:22511:63)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async eval (plugin:obsidian-textgenerator-plugin:259505:29)

Thanks again, ~PV