Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
daa1a032
Unverified
Commit
daa1a032
authored
May 09, 2024
by
Carlos Gamez
Committed by
GitHub
May 08, 2024
Browse files
Update langchainjs.md (#2027)
Updated sample code as per warning notification from the package maintainers
parent
6042e8bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/tutorials/langchainjs.md
docs/tutorials/langchainjs.md
+2
-2
No files found.
docs/tutorials/langchainjs.md
View file @
daa1a032
...
...
@@ -5,13 +5,13 @@ In this tutorial, we are going to use JavaScript with LangChain and Ollama to le
To get started, let's just use
**LangChain**
to ask a simple question to a model. To do this with JavaScript, we need to install
**LangChain**
:
```
bash
npm
install
langchain
npm
install
@
langchain
/community
```
Now we can start building out our JavaScript:
```
javascript
import
{
Ollama
}
from
"
langchain/llms/ollama
"
;
import
{
Ollama
}
from
"
@
langchain/
community/
llms/ollama
"
;
const
ollama
=
new
Ollama
({
baseUrl
:
"
http://localhost:11434
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment