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
orangecat
ollama
Commits
c78bb76a
Unverified
Commit
c78bb76a
authored
May 05, 2024
by
Lord Basil - Automate EVERYTHING
Committed by
GitHub
May 05, 2024
Browse files
update libraries for langchain_community + llama3 changed from llama2 (#4174)
parent
942c9792
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
examples/langchain-python-rag-websummary/main.py
examples/langchain-python-rag-websummary/main.py
+4
-4
No files found.
examples/langchain-python-rag-websummary/main.py
View file @
c78bb76a
from
langchain.llms
import
Ollama
from
langchain
_community
.llms
import
Ollama
from
langchain.document_loaders
import
WebBaseLoader
from
langchain
_community
.document_loaders
import
WebBaseLoader
from
langchain.chains.summarize
import
load_summarize_chain
from
langchain.chains.summarize
import
load_summarize_chain
loader
=
WebBaseLoader
(
"https://ollama.com/blog/run-llama2-uncensored-locally"
)
loader
=
WebBaseLoader
(
"https://ollama.com/blog/run-llama2-uncensored-locally"
)
docs
=
loader
.
load
()
docs
=
loader
.
load
()
llm
=
Ollama
(
model
=
"llama
2
"
)
llm
=
Ollama
(
model
=
"llama
3
"
)
chain
=
load_summarize_chain
(
llm
,
chain_type
=
"stuff"
)
chain
=
load_summarize_chain
(
llm
,
chain_type
=
"stuff"
)
result
=
chain
.
run
(
docs
)
result
=
chain
.
invoke
(
docs
)
print
(
result
)
print
(
result
)
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