Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo: RAG service #9

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

nerdalert
Copy link
Contributor

Demo APIs for a basic RAG service.

  • Add /collections endpoint: Lists all existing collections in the Milvus vector database.
  • Add /collections/{collection_name} DELETE endpoint: Deletes a specified collection from the Milvus vector database.
  • Add /collections/{collection_name}/documents/file endpoint: Converts and Ingests a document file into the specified Milvus collection after conversion.
  • Add /collections/{collection_name}/documents/url endpoint: Converts and Ingests a document from a URL into the specified Milvus collection after conversion.
  • Add /collections/{collection_name}/query endpoint: Queries a specified collection.

Example curl commands:

# Ingest/Convert a URL
curl -X POST "http://localhost:8000/collections/demo_collection/documents/http" \
-H "Content-Type: application/json" \
-d '{
  "http_source": {
    "url": "https://arxiv.org/pdf/2206.01060",
    "headers": {}
  }
}'


# Ingest/Convert a file
curl -X POST "http://localhost:8000/collections/demo_collection/documents/file" \
-F "file=@/Users/brent/code/docling/docling-serve/Amazon-com-Inc-2023-Annual-Report.pdf"



### Query a collection:
curl -X POST "http://127.0.0.1:8000/collections/demo_collection/query" -H "Content-Type: application/json" -d '{
      "question": "What are the content of the PDF?"
    }'


# List collections
curl -X GET "http://127.0.0.1:8000/collections"


# Delete a collection
curl -X DELETE "http://127.0.0.1:8000/collections/demo_collection2"

Adds APIs for a basic RAG service.

Signed-off-by: Brent Salisbury <[email protected]>
@nerdalert
Copy link
Contributor Author

A demo with an instructlab UI can be viewed here instructlab/ui#287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant