Skip to content

Crokily/docs-rag

Repository files navigation

This is a LlamaIndex project bootstrapped with create-llama.

Getting Started

First, install the dependencies:

npm install

Then check the parameters that have been pre-configured in the .env file in this directory. Make sure you have set the OPENAI_API_KEY for the LLM.

Second, generate the embeddings of the example documents in the ./data directory:

npm run generate

Third, run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the chat UI.

Configure LLM and Embedding Model

You can configure LLM model and embedding model in the settings file.

Use Case

We have prepared an example workflow for the agentic RAG use case, where you can ask questions about the example documents in the ./data directory.

You can start by sending an request on the chat UI or you can test the /api/chat endpoint with the following curl request:

curl --location 'localhost:3000/api/chat' \
--header 'Content-Type: application/json' \
--data '{ "messages": [{ "role": "user", "content": "What standards for a letter exist?" }] }'

Eject Mode

If you want to fully customize the server UI and routes, you can use npm eject. It will create a normal Next.js project with the same functionality as @llamaindex/server.

npm run eject

Learn More

To learn more about LlamaIndex, take a look at the following resources:

You can check out the LlamaIndexTS GitHub repository - your feedback and contributions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages