Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.05 KB

File metadata and controls

44 lines (30 loc) · 1.05 KB

1. Create a custom-named environment

python -m venv .llm_chunker_env

2. Activate it

source .llm_chunker_env/Scripts/activate

3. Install only relevant packages

pip install python-dotenv transformers groq langchain-groq langchain nbformat GitPython pydantic langgraph typing_extensions fastapi uvicorn langchain_text_splitters pip install langchain_nebius

Run the API on port 8000

uvicorn main:app --reload

Test API

curl -X POST http://127.0.0.1:8000/summarize
-H "Content-Type: application/json"
-d '{"github_url": "https://github.com/psf/requests"}'

curl -X POST http://127.0.0.1:8000/summarize
-H "Content-Type: application/json"
-d '{"github_url": "https://github.com/pymc-devs/pymc"}'

curl -X POST http://127.0.0.1:8000/summarize
-H "Content-Type: application/json"
-d '{"github_url": "https://github.com/psf/reqsdsuests"}'

5. Save dependencies

pip freeze > requirements.txt

6. Create Docker File

7. 2Build the Docker image

a. Check docker running:

docker version
docker build -t github-summarizer .