Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LM Studio + n8n not interchangeable with OpenAI + n8n #61

Open
J-Fo-S opened this issue Aug 9, 2024 · 0 comments
Open

LM Studio + n8n not interchangeable with OpenAI + n8n #61

J-Fo-S opened this issue Aug 9, 2024 · 0 comments

Comments

@J-Fo-S
Copy link

J-Fo-S commented Aug 9, 2024

Hi, I am trying to employ LM Studio with n8n as a local alternative to OpenAI as a dev/testing tool for clients. It works somewhat for basic http requests where I format the prompt and parameters. but does not play nice with n8n's Langchain agent implementations. In most implementations (see below), LM Studio does not call tools or properly format output. I do not think it is entirely due to model quality, but rather some mismatch between the OpenAI and LM Studio APIs, under-the-hood n8n code/protocol - or perhaps some agents aren't supported on LM Studio or specific models. I have used mistral and LLama with LM Studio. All tools work as intended with OpenAI API.

Agent Calls Tools Correct Output Format
Conversational N/A No
ReAct Yes No
Plan + Execute Yes No
Tools No No
Function No* Yes
  • It seems that Function Agent in LM Studio does attempt to obtain information via function-calling the tools, but it leaves no log to validate this. OpenAI will leave a log of each tool called and the input/output.

IMO, the best agent n8n has implemented is the Tools agent - it is the most efficient and dependable. It would work the best with locally hosted, smaller models. However, it does not function well at all with LM Studio, perhaps because it passes the tool schema to the agent without injecting it into the prompt?

The second best is the Functions agent, which I have at least outputting correct format with LM Studio, which is a start. Plan + Execute is only useful for the plan, and ReAct is a train off the rails.

If n8n Tools Agent could function properly in LM Studio, you would have a powerful tool for development.

If there is any interest in investigating this and coming up with a solution so LM Studio is interchangeable with OpenAI on n8n, I'd be happy to share logs, code, whatever. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant