/chatnio-blob-service

File Service for Chat Nio

Primary LanguagePythonApache License 2.0Apache-2.0

📦 Chat Nio Blob Service

File Service for Chat Nio

Deploy to Vercel

Supported File Types

  • Text
  • Image (require vision models)
  • Audio (require Azure Speech to Text Service)
  • Docx (not support .doc)
  • Pdf
  • Pptx (not support doc)
  • Xlsx (support .xls)

Run

pip install -r requirements.txt
uvicorn main:app --reload

Then the service will be running on http://localhost:8000

Deploy

uvicorn main:app

Using Docker

Image: programzmh/chatnio-blob-service

docker run -p 8000:8000 programzmh/chatnio-blob-service

# with environment variables
# docker run -p 8000:8000 -e AZURE_SPEECH_KEY="..." -e AZURE_SPEECH_REGION="..." programzmh/chatnio-blob-service

API

POST /upload Upload a file

{
    "file": "file"
}

Response

{
  "status": true,
  "content": "...",
  "error": ""
}

Environment Variables

  • AZURE_SPEECH_KEY: Azure Speech to Text Service Key (Required for Audio Support)
  • AZURE_SPEECH_REGION: Azure Speech to Text Service Region (Required for Audio Support)