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
5950c176
Unverified
Commit
5950c176
authored
Apr 30, 2024
by
Christian Frantzen
Committed by
GitHub
Apr 29, 2024
Browse files
Update langchainpy.md (#4037)
Updated the code a bit
parent
23d23409
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
docs/tutorials/langchainpy.md
docs/tutorials/langchainpy.md
+6
-4
No files found.
docs/tutorials/langchainpy.md
View file @
5950c176
...
...
@@ -17,10 +17,12 @@ Let's start by asking a simple question that we can get an answer to from the **
Then we can create a model and ask the question:
```
python
from
langchain.llms
import
Ollama
ollama
=
Ollama
(
base_url
=
'http://localhost:11434'
,
model
=
"llama2"
)
print
(
ollama
(
"why is the sky blue"
))
from
langchain_community.llms
import
Ollama
ollama
=
Ollama
(
base_url
=
'http://localhost:11434'
,
model
=
"llama3"
)
print
(
ollama
.
invoke
(
"why is the sky blue"
))
```
Notice that we are defining the model and the base URL for Ollama.
...
...
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