Skip to main content

Easily implement RAG workflows with pre-built modules.

Project description

easy_rag

NOT YET ALLOWED.

PLAN TO APPLY OPENAI AND DEEPSEEK MODELS.

Usage

Install

pip install easy_rag

How to integrate to your service?

from easy_rag import RagService

# Step 1: 서비스 초기화
rs = RagService( 
	embedding_model="text-embedding-3-small", # Fix openai.
	response_model="deepseek", # openai or deepseek
	open_api_key="your_openai_api_key_here",
	deepseek_api_key="your_deepseek_api_key_here",
	deepseek_base_url="https://api.deepseek.com", 
)

# Step 2: 자료 학습
# rsc()는 학습 리소스를 반환하며, 내부적으로 임베딩을 생성하고 저장
resource = rs.rsc("./rscFiles")  # rscFiles 디렉토리 아래 모든 파일 학습

# Step 3: 에이전트 생성 및 쿼리
# agent()는 입력 쿼리에 대한 답변을 생성
query = "What is the summary of the first document?"
response = rs.agent(resource, query)

print(response)

MEMO.

pdf 제목을 강제하자. info.json 을 추가하는 방식 대신 pdf의 제목을 추출하는 방식으로. worker 개수 사용자 단에서 조정할 필요성. 아니면 그냥 CPU 개수로 조절하는 방식 생각.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_rag_llm-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_rag_llm-1.0.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file easy_rag_llm-1.0.0.tar.gz.

File metadata

  • Download URL: easy_rag_llm-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for easy_rag_llm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b8131af1d147410f5da425521b1510c63350096ba359dde8210ab00a1fa66daf
MD5 788fc0854348fcf177301427a11b876d
BLAKE2b-256 cddf1246c437e74116137c3e516d681d0b5f9795cd4e618ac768abf6e5a89aa4

See more details on using hashes here.

File details

Details for the file easy_rag_llm-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: easy_rag_llm-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for easy_rag_llm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0707f7ed40d1ced877d8c6ad36c77a706cc05570b576381737ad777722fab9a0
MD5 1ddfd7487b426119889ddae97ceaa333
BLAKE2b-256 2ed9694b78c08b1eef059899c56b8a5cc18734e51388d95c0971d9507a3aae71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page