8000 GitHub - zmwzmo11130/neuraldocs: Demo RAG API (FastAPI, OpenAI, ChromaDB, Docker) automatically generated using the OpenAI Codex CLI tool. Highlights Codex's capability for rapid, complex application development.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Demo RAG API (FastAPI, OpenAI, ChromaDB, Docker) automatically generated using the OpenAI Codex CLI tool. Highlights Codex's capability for rapid, complex application development.

Notifications You must be signed in to change notification settings

zmwzmo11130/neuraldocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuralDocs: A Demo RAG API

NeuralDocs

Welcome to NeuralDocs! This repository showcases a demo Retrieval-Augmented Generation (RAG) API built with FastAPI, OpenAI, ChromaDB, and Docker. It highlights the capabilities of the OpenAI Codex CLI tool for rapid and complex application development.

Check out the latest releases here!

Table of Contents

Introduction

NeuralDocs provides a simple yet powerful API that leverages state-of-the-art technologies to enhance document retrieval and generation. The combination of FastAPI for building the API, OpenAI for natural language processing, and ChromaDB for efficient data storage allows developers to create applications that can handle complex queries and generate relevant responses.

This project serves as a practical example of how to integrate various tools to create a robust application quickly.

Features

  • FastAPI: High-performance web framework for building APIs.
  • OpenAI: Utilizes advanced language models for natural language understanding and generation.
  • ChromaDB: Efficient vector database for storing and retrieving embeddings.
  • Docker: Containerization for easy deployment and scalability.
  • Automatic Code Generation: Rapidly generate code using OpenAI Codex.

Technologies Used

  • FastAPI: For building APIs quickly and efficiently.
  • OpenAI Codex: For natural language processing and code generation.
  • ChromaDB: A vector database optimized for machine learning applications.
  • Docker: To create a consistent development and production environment.
  • Python: The primary programming language used in this project.
  • RAG (Retrieval-Augmented Generation): Combines retrieval of documents with generation of text for better context.

Installation

To get started with NeuralDocs, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/zmwzmo11130/neuraldocs.git
    cd neuraldocs
  2. Set Up the Environment: Make sure you have Python 3.8 or higher installed. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install Dependencies: Install the required packages using pip:

    pip install -r requirements.txt
  4. Build the Docker Image: If you want to run the application in a Docker container, build the image:

    docker build -t neuraldocs .
  5. Run the Application: You can run the application locally using FastAPI:

    uvicorn main:app --reload

    Or run it in a Docker container:

    docker run -p 8000:8000 neuraldocs

Usage

Once the application is running, you can access it at http://localhost:8000. The FastAPI interface provides an interactive documentation page where you can test the API endpoints.

API Endpoints

1. Retrieve Documents

Endpoint: /retrieve

Method: POST

Description: This endpoint retrieves relevant documents based on a user query.

Request Body:

{
  "query": "Your search query here"
}

Response:

{
  "documents": [
    {
      "title": "Document Title",
      "content": "Document content here."
    }
  ]
}

2. Generate Text

Endpoint: /generate

Method: POST

Description: This endpoint generates text based on a given prompt.

Request Body:

{
  "prompt": "Your prompt here"
}

Response:

{
  "generated_text": "Generated text here."
}

Contributing

We welcome contributions to NeuralDocs! If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/YourFeature.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/YourFeature.
  5. Open a pull request.

Please ensure your code adheres to the existing style and includes tests where applicable.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or feedback, please reach out to the project maintainer:

Thank you for checking out NeuralDocs! We hope you find it useful in your projects. For updates, please visit our Releases section.

About

Demo RAG API (FastAPI, OpenAI, ChromaDB, Docker 63CC ) automatically generated using the OpenAI Codex CLI tool. Highlights Codex's capability for rapid, complex application development.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0