Skip to content

remix-project-org/W3AgentRAGServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web3 RAG Server

This repository implements a RAG server for Web3 related requests.

How it works

Data for RAG is provided by the user either manualy or by using the data submission interface. Git repositories are prefered as data source.

Start the servers

Intall the requirements with pip install -r requirements.txt

TOKENIZERS_PARALLELISM=false python main.py

Server endpoints

query

Handles RAG query via HTTP POST request

curl -X POST http://localhost:7860/query \
     -H "Content-Type: application/json" \
     -d '{"query":"Write an ERC721 soulbound contract"}'

repositories

GET Queries the current git data repository config or POST insert a new repository to be crawled and added to the knowledge base.

curl -X POST http://localhost:7860/repositories \
     -H "Content-Type: application/json" \
     -d '{
         "name": "hardhat",
         "url": "https://github.com/NomicFoundation/hardhat.git",
         "local_path": "data/hardhat",
         "update_frequency_hours": 24
     }'
curl -X GET http://localhost:7860/repositories \
     -H "Content-Type: application/json"

knowledge_base

Get the number of documents in the knowledge base.

curl -X GET http://localhost:7860/knowledge_base \
     -H "Content-Type: application/json" 

About

Web3 RAG for remix agent composer. Provides the latest related docs for user request.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages