rihal-llm-suite / README.md
Rihal LLM Suite
Rihal LLM Suite
Rihal LLM suite contains the following services:
- doc-connector:
DocumentProcessorActivitytemporal activity to parse and extract content from documents. - web-connector:
ScrapingActivitytemporal activity to parse and extract content from websites URLs. - rag: Contains the following activities:
EmbeddingToQdrantActivitytemporal activity to chunk the content and embed it to qdrant.ContextRetrievalActivitytemporal activity to retrieve the context from qdrant.
- llm:
POST /generateendpoint to generate the LLM response to user query. - ocr:
POST /ocrendpoint to extract text from image. - web: react web application for
rihal-llm-suite. - server: Go server for
rihal-llm-suite. - postgres: Postgres database for
rihal-llm-suite. - qdrant: Qdrant vector database for
rihal-llm-suite. - keycloak: Keycloak for
rihal-llm-suite.
Running the project
- Clone the repository
- Run
make runin the root directory of the project. - To stop the project, run
make stopin the root directory of the project. - To clean the project, run
make rmin the root directory of the project.
Users
- User: admin Password: 123
- User: user Password: 123
Troubleshooting
- If you are not working from the office, you need to update the
OLLAMA_BASE_URLin the.envfile to the correct URL.
OLLAMA_BASE_URL="https://ollama-api.rihal.solutions/"
OLLAMA_MODEL=llama3.1:70b
WHISPER_POD_URL="whisper-api.rihal.solutions"
- To run Bedrock, you need to have the following environment variables in the
.envfile.
BEDROCK_OLLAMA_MODEL_ID=us.meta.llama3-1-70b-instruct-v1:0
BEDROCK_EMBEDDING_MODEL_ID=amazon.titan-embed-text-v2:0
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=<your AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<your AWS_SECRET_ACCESS_KEY>
You can get the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from your AWS account.
Note: You have to request access to the us.meta.llama3-1-70b-instruct-v1:0 and amazon.titan-embed-text-v2:0 models from bedrock dashboard.
CI
If you don't have black configured in your IDE, you can run the following commands to format/lint the code.
Formatting
find . -path "./web" -prune -o -path "./rihal-llm" -prune -o -name "*.py" -print0 | xargs -0 black
Linting
find . -path "./web" -prune -o -path "./rihal-llm" -prune -o -name "*.py" -print0 | xargs -0 flake8 --ignore=E203,W503,E501