跳转到主要内容
RAGFlow is a deep document-understanding RAG engine. You can connect it to Qhaigc either by setting environment variables in a Docker deployment or by adding an OpenAI-compatible provider through the RAGFlow UI.

Prerequisites

  • A running RAGFlow instance (Docker self-hosted or cloud version)
  • A Qhaigc API key — get yours from the API Tokens page

Option 1: Docker Deployment

1

Clone the RAGFlow repository

git clone https://github.com/infiniflow/ragflow.git
cd ragflow
2

Edit the environment configuration

Open docker/.env and add your Qhaigc credentials:
LLM_BASE_URL=https://api.qhaigc.net/v1
LLM_API_KEY=your-qhaigc-api-key
3

Start the service

cd docker
docker-compose up -d

Option 2: Cloud or Existing Instance

1

Log in to RAGFlow

Open your RAGFlow instance in a browser and sign in.
2

Open Model Providers

Click System in the top-right corner, then select Model Providers.
3

Add an OpenAI-compatible provider

Click Add Model Provider and select OpenAI Compatible.
4

Fill in the provider details

Enter the following values:
FieldValue
NameQhaigc (or any label you prefer)
Base URLhttps://api.qhaigc.net/v1
API KeyYour Qhaigc API key (starts with sk-)
ModelsThe model IDs you want to enable (e.g. gpt-4o, claude-3-5-sonnet-20241022)
5

Save and test the connection

Click Save, then click Test to verify that RAGFlow can reach Qhaigc.
Exact UI field names and layout may differ across RAGFlow versions. If you do not see a field listed above, check the Model Providers section of your RAGFlow instance’s documentation.

Create a Knowledge Base

1

Create a new knowledge base

Click Create Knowledge Base from the RAGFlow dashboard.
2

Configure the document parser

Choose a parsing method appropriate for your content:
  • General — generic documents
  • Resume — résumé files
  • Q&A — question-and-answer pairs
  • Paper — academic papers
  • Book — long-form books
3

Select a chat model

In the Chat Model field, select one of the Qhaigc models you registered in the previous section.
4

Upload documents

Upload your source documents. Supported formats include PDF, Word (.doc, .docx), TXT, Markdown, Excel (.xls, .xlsx), and HTML.
5

Start chatting

Once document parsing is complete, click Chat to begin asking questions against your knowledge base.

Advanced Features

Multi-turn conversation. RAGFlow maintains conversation context across turns, so follow-up questions reference earlier answers automatically. Citation tracing. Each answer is annotated with source references. Click a reference to view the original passage. Multiple chat sessions. Create separate chat sessions for different topics or projects within the same knowledge base.

Troubleshooting

Model connection fails. Verify that the Base URL includes /v1, the API key is correct, and your network can reach api.qhaigc.net. Document parsing fails. Check that the file format is supported, the file is not corrupted, and the system has enough resources to process it.