Custom model docs (#368)

This commit is contained in:
Gui Vieira
2024-03-22 03:01:34 -03:00
committed by GitHub
parent 637bd885cf
commit aa0eb02968
17 changed files with 440 additions and 88 deletions

View File

@@ -1,8 +1,5 @@
# CSVSearchTool
!!! note "Depend on OpenAI"
All RAG tools at the moment can only use openAI to generate embeddings, we are working on adding support for other providers.
!!! note "Experimental"
We are still working on improving tools, so there might be unexpected behavior or changes in the future.
@@ -34,4 +31,32 @@ tool = CSVSearchTool()
## Arguments
- `csv` : The path to the CSV file you want to search. This is a mandatory argument if the tool was initialized without a specific CSV file; otherwise, it is optional.
- `csv` : The path to the CSV file you want to search. This is a mandatory argument if the tool was initialized without a specific CSV file; otherwise, it is optional.
## Custom model and embeddings
By default, the tool uses OpenAI for both embeddings and summarization. To customize the model, you can use a config dictionary as follows:
```python
tool = CSVSearchTool(
config=dict(
llm=dict(
provider="ollama", # or google, openai, anthropic, llama2, ...
config=dict(
model="llama2",
# temperature=0.5,
# top_p=1,
# stream=true,
),
),
embedder=dict(
provider="google",
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
# title="Embeddings",
),
),
)
)
```