Files
langchain/docs/docs/integrations/document_loaders/tencent_cos_file.ipynb
Erick Friis 7bc100fd43 docs: integration package pip installs (#15762)
More than 300 files - will fail check_diff. Will merge after Vercel
deploy succeeds

Still occurrences that need changing - will update more later
2024-01-09 11:13:10 -08:00

100 lines
2.5 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"id": "a634365e",
"metadata": {},
"source": [
"# Tencent COS File\n",
"\n",
">[Tencent Cloud Object Storage (COS)](https://www.tencentcloud.com/products/cos) is a distributed \n",
"> storage service that enables you to store any amount of data from anywhere via HTTP/HTTPS protocols. \n",
"> `COS` has no restrictions on data structure or format. It also has no bucket size limit and \n",
"> partition management, making it suitable for virtually any use case, such as data delivery, \n",
"> data processing, and data lakes. `COS` provides a web-based console, multi-language SDKs and APIs, \n",
"> command line tool, and graphical tools. It works well with Amazon S3 APIs, allowing you to quickly \n",
"> access community tools and plugins.\n",
"\n",
"This covers how to load document object from a `Tencent COS File`."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "85e97267",
"metadata": {},
"outputs": [],
"source": [
"%pip install --upgrade --quiet cos-python-sdk-v5"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "2f0cd6a5",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langchain_community.document_loaders import TencentCOSFileLoader\n",
"from qcloud_cos import CosConfig"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "321cc7f1",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"conf = CosConfig(\n",
" Region=\"your cos region\",\n",
" SecretId=\"your cos secret_id\",\n",
" SecretKey=\"your cos secret_key\",\n",
")\n",
"loader = TencentCOSFileLoader(conf=conf, bucket=\"you_cos_bucket\", key=\"fake.docx\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4c50d2c7",
"metadata": {},
"outputs": [],
"source": [
"loader.load()"
]
},
{
"cell_type": "markdown",
"id": "0690c40a",
"metadata": {},
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}