-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Connect langchainjs to a local llm installed in Jan AI (llama) #7540
Comments
I found a similar discussion regarding the issue of connecting LangChainJS to a local LLM installed in Jan AI (llama) [1]. The user in that discussion also encountered a 404 error when attempting to use LangChainJS with a local LLM, despite being able to make successful API calls using Axios. To address the 404 error when using the
By ensuring the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
As mentionned, i tried other urls and it doesnt work :
|
To resolve the "ResponseError: Not Found" error when using the Additionally, if you are running the service locally, make sure to use Verify that the server is running and accessible at the specified base URL, and ensure that the expected endpoint paths are correctly set up on your server. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
I think using |
@ucev oh i see thank you for your answer or i can create a wrapper to call the llm with the arguments and chain after... |
@getzelus yeah, i think you can contribute your own LLM wrapper. Most chat models need |
Discussed in #7539
Originally posted by getzelus January 17, 2025
Hello guys,
Im trying to use langchainjs with a local llm (llama3.2-1b-instruct) that i installed in Jan AI and I start its server.
I can do a simple call without langchainjs and its working.
But when I try with langchainjs, i have an error.
Its difficult to find the solution in the documentation, forum or chatgpt.
Here is the code working without langchainjs :
Here is the code for langchainjs that doesnt work :
I tried many options, like changing the url, the name of the model, using chatopenAI package etc...
the error i got :
Thank you for your attention
System Info
Windows 11
Node 20.14
"@langchain/core": "^0.3.30",
"@langchain/ollama": "^0.1.4",
"@langchain/openai": "^0.3.17",
"axios": "^1.7.9",
"dotenv": "^16.4.7",
"langchain": "^0.3.11"
The text was updated successfully, but these errors were encountered: