Knowledge
S3 Text Knowledge Base
Learn how to use text files from an S3 bucket in your knowledge base.
The S3TextKnowledgeBase reads text files from an S3 bucket, converts them into vector embeddings and loads them to a vector database.
Usage
We are using a local PgVector database for this example. Make sure it’s running
Then use the knowledge_base
with an Agent
:
Params
Parameter | Type | Default | Description |
---|---|---|---|
bucket_name | str | None | The name of the S3 Bucket where the files are. |
key | str | None | The key of the file in the bucket. |
formats | List[str] | [".doc", ".docx"] | Formats accepted by this knowledge base. |
reader | S3TextReader | S3TextReader() | A S3TextReader that converts the Text files into Documents for the vector database. |
S3TextKnowledgeBase
is a subclass of the AgentKnowledge class and has access to the same params.
Developer Resources
- View Cookbook