-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.py
More file actions
27 lines (25 loc) · 777 Bytes
/
tools.py
File metadata and controls
27 lines (25 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from crewai_tools import PDFSearchTool
def get_pdf_search_tool(path):
path = path + ".pdf"
return PDFSearchTool(
pdf=path,
config=dict(
llm=dict(
provider="google", # or google, openai, anthropic, llama2, ...
config=dict(
model="gemini",
temperature=0.0,
# top_p=1,
# stream=true,
),
),
embedder=dict(
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
# title="Embeddings",
),
),
)
)