-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59f0513
commit 202bae8
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# pip install beyondllm | ||
# pip install ollama | ||
# pip install llama-index-embeddings-fastembed | ||
from beyondllm import source,retrieve,generator | ||
from beyondllm.llms import OllamaModel | ||
from beyondllm.embeddings import FastEmbedEmbeddings | ||
|
||
query = "what is Tarun's role at AI Planet?" | ||
data = source.fit(path="https://tarunjain.netlify.app", dtype="url",chunk_size=1024) | ||
retriever = retrieve.auto_retriever(data,embed_model=FastEmbedEmbeddings(),type="normal") | ||
pipeline = generator.Generate(question=query,llm=OllamaModel(model="llama2"),retriever=retriever) | ||
|
||
print(pipeline.call()) | ||
print(pipeline.get_rag_triad_evals()) |