ChatBees
  • 👋Welcome
  • Concepts
    • 📖Architecture
    • 📖Security
    • 📖Serverless RAG
    • 📖Namespace and Collection
    • 📖Access Control
    • 🚀Ticket AI Agent
  • Ticket AI Agent
    • Installation
  • WEB APP REFERENCES
    • 🔑Sign-in and Sign-out
    • ⛓️Manage Connectors
    • 🌏Manage Collections
      • 💿Data Sources
        • 📖Configure Periodic Import
      • ❓Chat with collection
      • ⏱️View Q/A history
      • 📖Publish a Collection
    • 🏛️Manage Users
    • 💰[Flex] Billing and Payment
    • 💰[Enterprise] Billing and Payment
    • 📈Account Usage
    • 🗝️API Keys
    • 🖥️Generated Code Sample
  • ChatBots
    • 🪄AI Chat for Confluence
    • 🪄ChatBees Slack Bot
    • 🪄ChatBees Website ChatBot
    • 🪄Pnyx Discord Bot
  • Snowflake Native App
  • API References
    • 📖API Key
    • 📖Collection Operations
      • 📖Create Collection
      • 📖Configure Collection
      • 📖List Collections
      • 📖Delete Collection
    • 📖Document Operations
      • 📖Upload Document
      • 📖Summarize Document
      • 📖Get Document Outlines and FAQs
      • 📖Ask
      • 📖Chat
      • 📖Search
      • 📖Personalize Response
      • 📖List Documents
      • 📖Delete Document
    • 📖Crawl Operations
      • 📖Create Crawl
      • 📖Get Crawl
      • 📖Index Crawl
      • 📖Delete Crawl
    • 📖Ingest Data Sources
      • 📖Create Ingestion
      • 📖Get Ingestion
      • 📖Index Ingestion
      • 📖Delete Ingestion
Powered by GitBook
On this page
  1. API References
  2. Document Operations

Upload Document

Upload a document to a collection. Currently we support a maximum file size of 10 MB and the following content types

  • PDF (.pdf)

  • Plaintext (.txt)

  • CSV (.csv)

  • Markdown (.md)

  • Microsoft Words (.docx)

Documents have to be uniquely named. If one document is uploaded with a name that is the same as one already uploaded, it will replace that document.

POST /docs/add HTTP/1.1
Api-Key: my_api_key
Host: my_account_id.us-west-2.aws.chatbees.ai

Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="example.txt"
Content-Type: text/plain

[File content here]

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="request"

{
  "namespace_name": "string",
  "collection_name": "string"
}
----WebKitFormBoundary7MA4YWxkTrZu0gW--
import chatbees as cb

# Configure API key
cb.init(api_key="my_api_key", account_id="my_account_id")

# Create a collection called llm_research.
collection = cb.collection('llm_research')
cb.create_collection(collection)

# Local file and URLs are both supported.
# URL must contain the full scheme prefix (http:// or https://)
cb.collection('llm_research').upload_document('/path/to/file.pdf')
cb.collection('llm_research').upload_document('https://path/to/file.pdf')
PreviousDocument OperationsNextSummarize Document

Last updated 11 months ago

📖
📖