Fix incorrect usage of insert_file API
Browse files
examples/lightrag_api_ollama_demo.py
CHANGED
|
@@ -158,7 +158,7 @@ if __name__ == "__main__":
|
|
| 158 |
# curl -X POST "http://127.0.0.1:8020/insert" -H "Content-Type: application/json" -d '{"text": "your text here"}'
|
| 159 |
|
| 160 |
# 3. Insert file:
|
| 161 |
-
# curl -X POST "http://127.0.0.1:8020/insert_file" -H "Content-Type:
|
| 162 |
|
| 163 |
# 4. Health check:
|
| 164 |
# curl -X GET "http://127.0.0.1:8020/health"
|
|
|
|
| 158 |
# curl -X POST "http://127.0.0.1:8020/insert" -H "Content-Type: application/json" -d '{"text": "your text here"}'
|
| 159 |
|
| 160 |
# 3. Insert file:
|
| 161 |
+
# curl -X POST "http://127.0.0.1:8020/insert_file" -H "Content-Type: multipart/form-data" -F "file=@path/to/your/file.txt"
|
| 162 |
|
| 163 |
# 4. Health check:
|
| 164 |
# curl -X GET "http://127.0.0.1:8020/health"
|
examples/lightrag_api_openai_compatible_demo.py
CHANGED
|
@@ -176,7 +176,7 @@ if __name__ == "__main__":
|
|
| 176 |
# curl -X POST "http://127.0.0.1:8020/insert" -H "Content-Type: application/json" -d '{"text": "your text here"}'
|
| 177 |
|
| 178 |
# 3. Insert file:
|
| 179 |
-
# curl -X POST "http://127.0.0.1:8020/insert_file" -H "Content-Type:
|
| 180 |
|
| 181 |
# 4. Health check:
|
| 182 |
# curl -X GET "http://127.0.0.1:8020/health"
|
|
|
|
| 176 |
# curl -X POST "http://127.0.0.1:8020/insert" -H "Content-Type: application/json" -d '{"text": "your text here"}'
|
| 177 |
|
| 178 |
# 3. Insert file:
|
| 179 |
+
# curl -X POST "http://127.0.0.1:8020/insert_file" -H "Content-Type: multipart/form-data" -F "file=@path/to/your/file.txt"
|
| 180 |
|
| 181 |
# 4. Health check:
|
| 182 |
# curl -X GET "http://127.0.0.1:8020/health"
|
examples/lightrag_api_oracle_demo.py
CHANGED
|
@@ -269,7 +269,8 @@ if __name__ == "__main__":
|
|
| 269 |
# curl -X POST "http://127.0.0.1:8020/insert" -H "Content-Type: application/json" -d '{"text": "your text here"}'
|
| 270 |
|
| 271 |
# 3. Insert file:
|
| 272 |
-
# curl -X POST "http://127.0.0.1:8020/insert_file" -H "Content-Type:
|
|
|
|
| 273 |
|
| 274 |
# 4. Health check:
|
| 275 |
# curl -X GET "http://127.0.0.1:8020/health"
|
|
|
|
| 269 |
# curl -X POST "http://127.0.0.1:8020/insert" -H "Content-Type: application/json" -d '{"text": "your text here"}'
|
| 270 |
|
| 271 |
# 3. Insert file:
|
| 272 |
+
# curl -X POST "http://127.0.0.1:8020/insert_file" -H "Content-Type: multipart/form-data" -F "file=@path/to/your/file.txt"
|
| 273 |
+
|
| 274 |
|
| 275 |
# 4. Health check:
|
| 276 |
# curl -X GET "http://127.0.0.1:8020/health"
|